/* ==========================================================================
   LOANLOX.AI shared styles
   Tailwind (CDN) handles layout and spacing; this file holds the design
   tokens and the reusable components that would be noisy as utility classes.
   ========================================================================== */

:root {
  --obsidian: #0B0F19;
  --surface: #111827;
  --panel: #1F2937;
  --cyan: #06B6D4;
  --cyan-soft: #22D3EE;
  --blue: #3B82F6;
  --ok: #10B981;
  --danger: #EF4444;
  --amber: #F59E0B;
  --line: rgba(75, 85, 99, 0.4);
}

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  background: var(--obsidian);
  color: #D1D5DB;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(6, 182, 212, 0.35); color: #fff; }

:focus-visible {
  outline: 2px solid var(--cyan-soft);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Backgrounds & surfaces ---------- */
.bg-grid {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 25%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 25%, transparent 75%);
}

.hero-glow {
  background: radial-gradient(closest-side, rgba(6, 182, 212, 0.22), rgba(59, 130, 246, 0.08) 60%, transparent);
  filter: blur(12px);
}

.glass {
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.6), rgba(17, 24, 39, 0.6));
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
  border: 1px solid var(--line);
}

.glow-border {
  box-shadow:
    0 0 0 1px rgba(6, 182, 212, 0.16),
    0 30px 80px -24px rgba(6, 182, 212, 0.28),
    0 12px 40px rgba(0, 0, 0, 0.5);
}

/* ---------- Brand type effects ---------- */
.text-gradient {
  background-image: linear-gradient(90deg, #22D3EE 0%, #3B82F6 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.glow-text { text-shadow: 0 0 14px rgba(34, 211, 238, 0.75); }

.logo-mark {
  display: grid; place-items: center;
  height: 2.25rem; width: 2.25rem;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, #06B6D4, #3B82F6);
  color: #031018;
  box-shadow: 0 0 22px rgba(6, 182, 212, 0.6);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border-radius: 0.75rem; padding: 0.75rem 1.25rem;
  font-weight: 700; font-size: 0.9rem; line-height: 1.25rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, #06B6D4, #3B82F6);
  color: #031018;
  box-shadow: 0 8px 28px -8px rgba(6, 182, 212, 0.7);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 34px -6px rgba(59, 130, 246, 0.8); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-ghost {
  border: 1px solid rgba(107, 114, 128, 0.55);
  background: rgba(31, 41, 55, 0.4);
  color: #E5E7EB;
}
.btn-ghost:hover { border-color: var(--cyan-soft); color: #fff; }

/* ---------- Navigation ---------- */
.nav-link {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.5rem 0.75rem; border-radius: 0.5rem;
  font-size: 0.9rem; font-weight: 600; color: #9CA3AF;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-link:hover { color: #fff; background: rgba(31, 41, 55, 0.7); }
.nav-link[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--cyan); border-radius: 0.5rem 0.5rem 0 0; }

.dropdown-item {
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 0.65rem 0.75rem; border-radius: 0.65rem;
  transition: background-color 0.15s ease;
}
.dropdown-item:hover { background: rgba(6, 182, 212, 0.08); }
.dropdown-item strong { display: block; color: #F3F4F6; font-size: 0.875rem; }
.dropdown-item span.sub { display: block; color: #9CA3AF; font-size: 0.78rem; line-height: 1.3; }

.footer-link { color: #9CA3AF; transition: color 0.15s ease; }
.footer-link:hover { color: var(--cyan-soft); }

/* ---------- Status ---------- */
.pulse-dot {
  position: relative; display: inline-block;
  height: 0.5rem; width: 0.5rem; border-radius: 9999px; background: var(--cyan-soft);
}
.pulse-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: inherit; animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }

.chip { display: inline-flex; align-items: center; gap: 0.35rem; border-radius: 9999px; padding: 0.2rem 0.6rem; font-size: 0.72rem; font-weight: 700; }
.chip-locked   { background: rgba(239, 68, 68, 0.14);  color: #FCA5A5; box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.35); }
.chip-unlocked { background: rgba(16, 185, 129, 0.14); color: #6EE7B7; box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.35); }
.chip-warn     { background: rgba(245, 158, 11, 0.14); color: #FCD34D; box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.35); }
.chip-info     { background: rgba(6, 182, 212, 0.12);  color: #67E8F9; box-shadow: inset 0 0 0 1px rgba(6, 182, 212, 0.35); }

.row-flash { animation: rowFlash 1.1s ease-out; }
@keyframes rowFlash { from { background: rgba(6, 182, 212, 0.22); } to { background: transparent; } }

/* ---------- Dashboard demo ---------- */
.dash-row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.75rem;
  width: 100%; text-align: left;
  border-radius: 0.75rem; padding: 0.6rem 0.75rem;
  border: 1px solid rgba(75, 85, 99, 0.35);
  background: rgba(11, 15, 25, 0.55);
  transition: border-color 0.2s ease;
  cursor: pointer;
}
.dash-row:hover { border-color: rgba(34, 211, 238, 0.5); }

.phone {
  width: 11.5rem; border-radius: 2rem; padding: 0.5rem;
  background: linear-gradient(160deg, #1F2937, #0B0F19);
  border: 1px solid rgba(107, 114, 128, 0.45);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8), 0 0 40px -10px rgba(6, 182, 212, 0.35);
}
.phone-screen { border-radius: 1.5rem; min-height: 17rem; padding: 1.25rem 0.9rem; text-align: center; transition: background 0.4s ease; }
.phone-screen[data-state="locked"]   { background: radial-gradient(circle at 50% 20%, rgba(239, 68, 68, 0.28), #0B0F19 70%); }
.phone-screen[data-state="unlocked"] { background: radial-gradient(circle at 50% 20%, rgba(16, 185, 129, 0.24), #0B0F19 70%); }

/* ---------- Tabs (features) ---------- */
.tab-btn {
  display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap;
  border-radius: 0.75rem; padding: 0.65rem 1rem;
  font-size: 0.9rem; font-weight: 700; color: #9CA3AF;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.tab-btn:hover { color: #fff; }
.tab-btn[aria-selected="true"] {
  color: #fff;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(59, 130, 246, 0.22));
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.4), 0 0 24px -6px rgba(6, 182, 212, 0.5);
}
.tab-panel[hidden] { display: none; }
.tab-panel:not([hidden]) { animation: panelIn 0.35s ease; }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.feature-item { display: flex; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid rgba(75, 85, 99, 0.35); }
.feature-item:last-child { border-bottom: 0; }
.feature-item h3 { color: #F9FAFB; font-weight: 700; font-size: 1rem; }
.feature-item p { margin-top: 0.25rem; color: #9CA3AF; font-size: 0.9rem; line-height: 1.55; max-width: 62ch; }

.icon-wrap {
  display: grid; place-items: center; flex: none;
  height: 2.5rem; width: 2.5rem; border-radius: 0.7rem;
  background: rgba(6, 182, 212, 0.1); color: var(--cyan-soft);
  box-shadow: inset 0 0 0 1px rgba(6, 182, 212, 0.3);
}
.icon-wrap.ok     { background: rgba(16, 185, 129, 0.1); color: #34D399; box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.3); }
.icon-wrap.danger { background: rgba(239, 68, 68, 0.1);  color: #F87171; box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.3); }
.icon-wrap.warn   { background: rgba(245, 158, 11, 0.1); color: #FBBF24; box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.3); }

/* ---------- Forms ---------- */
.label { display: block; margin-bottom: 0.4rem; font-size: 0.82rem; font-weight: 600; color: #D1D5DB; }
.input {
  width: 100%; border-radius: 0.65rem; padding: 0.7rem 0.9rem;
  background: rgba(11, 15, 25, 0.7); color: #F3F4F6; font-size: 0.92rem;
  border: 1px solid rgba(75, 85, 99, 0.7);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder { color: #6B7280; }
.input:hover { border-color: #6B7280; }
.input:focus { outline: none; border-color: var(--cyan-soft); box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2); }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15); }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.8rem center; padding-right: 2.4rem; }
select.input option { background: #111827; color: #F3F4F6; }
.field-error { margin-top: 0.35rem; font-size: 0.78rem; font-weight: 600; color: #FCA5A5; min-height: 0; }
.field-error:empty { display: none; }

/* ---------- Carousel ---------- */
.carousel-viewport { overflow: hidden; }
.carousel-track { display: flex; transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1); }
.carousel-slide { flex: 0 0 100%; padding-right: 1px; }
.carousel-dot { height: 0.5rem; width: 0.5rem; border-radius: 9999px; background: #374151; transition: width 0.25s ease, background-color 0.25s ease; }
.carousel-dot[aria-current="true"] { width: 1.75rem; background: var(--cyan-soft); }

/* ---------- FAQ ---------- */
details.faq { border-bottom: 1px solid rgba(75, 85, 99, 0.35); }
details.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; font-weight: 700; color: #F3F4F6; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq[open] summary .chev { transform: rotate(180deg); }
details.faq .chev { transition: transform 0.2s ease; flex: none; color: #9CA3AF; }
details.faq p { padding: 0 0 1.1rem; color: #9CA3AF; font-size: 0.92rem; line-height: 1.6; max-width: 65ch; }

/* ---------- Misc ---------- */
.code-block { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.78rem; line-height: 1.6; overflow-x: auto; }
.tabs-scroll { scrollbar-width: none; }
.tabs-scroll::-webkit-scrollbar { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
