/* =========================================================================
   Reflex marketing site — themed from the app's superadmin design tokens.
   Palette: teal #0e7490 -> #0891b2 -> #14b8a6 on navy-slate neutrals.
   Light/dark selected via [data-theme] on <html>.
   ========================================================================= */

:root {
  --primary: #0e7490;
  --secondary: #0891b2;
  --tertiary: #14b8a6;
  --accent: var(--primary);
  --accent-fg: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --ring: color-mix(in srgb, var(--secondary) 55%, transparent);
}

/* ---- Dark (default) ---- */
:root[data-theme="dark"] {
  --bg: #070d17;
  --bg-2: #0a1322;
  --surface: #0f1a2b;
  --surface-2: #15233a;
  --surface-3: #1c2c46;
  --border: #25364f;
  --border-strong: #34496a;
  --text: #e7eef7;
  --muted: #9db0c6;
  --faint: #6c8099;
  --accent: #22b8cf;
  --accent-2: #2dd4bf;
  --glow: color-mix(in srgb, var(--accent) 40%, transparent);
  --card-grad: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, var(--accent) 8%), var(--surface));
  --shadow: 0 24px 60px -24px rgb(0 0 0 / 0.7);
  --shadow-sm: 0 10px 30px -16px rgb(0 0 0 / 0.6);
}

/* ---- Light ---- */
:root[data-theme="light"] {
  --bg: #eef3f7;
  --bg-2: #e6edf3;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --surface-3: #e6edf3;
  --border: #d6e0ea;
  --border-strong: #b9c8d6;
  --text: #0d1b2a;
  --muted: #4a5a6b;
  --faint: #76879a;
  --accent: #0e7490;
  --accent-2: #0d9488;
  --glow: color-mix(in srgb, var(--accent) 22%, transparent);
  --card-grad: linear-gradient(180deg, #ffffff, #fbfdff);
  --shadow: 0 30px 60px -28px rgb(13 27 42 / 0.28);
  --shadow-sm: 0 14px 34px -20px rgb(13 27 42 / 0.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 560px at 88% -8%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    radial-gradient(900px 520px at 4% 8%, color-mix(in srgb, var(--tertiary) 8%, transparent), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection { background: color-mix(in srgb, var(--accent) 32%, transparent); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
em { font-style: normal; color: var(--accent); }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

.theme-strip {
  height: 4px; width: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary) 50%, var(--tertiary));
  position: relative; z-index: 60;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 0.95rem; line-height: 1;
  padding: 12px 20px; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-lg { padding: 15px 26px; font-size: 1rem; }
.btn-primary {
  color: var(--accent-fg);
  background: linear-gradient(135deg, var(--primary), var(--secondary) 55%, var(--tertiary));
  box-shadow: 0 12px 30px -12px color-mix(in srgb, var(--secondary) 80%, transparent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -14px color-mix(in srgb, var(--secondary) 85%, transparent); }
.btn-ghost {
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border-color: var(--border-strong);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }

:where(a, button):focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; }
.brand-name { font-size: 1.2rem; }
.nav { display: flex; gap: 6px; margin-inline-start: 18px; }
.nav a { color: var(--muted); font-weight: 500; font-size: 0.94rem; padding: 8px 12px; border-radius: 9px; transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.theme-toggle {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 11px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); cursor: pointer; transition: color .15s, border-color .15s, background .15s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
:root[data-theme="light"] .i-sun { display: none; }
:root[data-theme="light"] .i-moon { display: block; }

.menu-btn { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 6px; }
.mobile-nav { display: none; flex-direction: column; gap: 4px; padding: 10px 24px 18px; border-bottom: 1px solid var(--border); background: var(--bg); }
.mobile-nav a { padding: 11px 12px; border-radius: 9px; color: var(--muted); font-weight: 500; }
.mobile-nav a:hover { background: var(--surface-2); color: var(--text); }
.mobile-nav .btn { margin-top: 6px; }

/* ---------------- Hero ---------------- */
.hero { position: relative; padding: 80px 0 40px; overflow: hidden; }
.hero-inner { position: relative; z-index: 2; text-align: center; }
.glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; pointer-events: none; z-index: 0; }
.glow-a { width: 620px; height: 620px; top: -200px; right: -120px; background: radial-gradient(circle, var(--glow), transparent 65%); }
.glow-b { width: 520px; height: 520px; top: 120px; left: -160px; background: radial-gradient(circle, color-mix(in srgb, var(--tertiary) 34%, transparent), transparent 65%); }
.glow-c { width: 700px; height: 480px; left: 50%; top: -120px; transform: translateX(-50%); background: radial-gradient(circle, var(--glow), transparent 60%); opacity: .4; }

.eyebrow {
  display: inline-block; margin: 0 0 14px; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.hero h1 {
  margin: 0 auto 20px; max-width: 16ch; font-size: clamp(2.3rem, 5.4vw, 3.9rem);
  line-height: 1.05; letter-spacing: -0.03em; font-weight: 800;
}
.grad {
  background: linear-gradient(120deg, var(--primary), var(--secondary) 45%, var(--tertiary));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { margin: 0 auto 30px; max-width: 64ch; font-size: clamp(1.04rem, 1.7vw, 1.22rem); color: var(--muted); }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin: 14px auto 0; max-width: 52ch; font-size: 0.9rem; color: var(--faint); }
.trust {
  display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center;
  list-style: none; margin: 26px 0 0; padding: 0; color: var(--faint); font-size: 0.9rem; font-weight: 500;
}
.trust li { display: flex; align-items: center; gap: 8px; }
.trust li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------------- Screenshot window frame ---------------- */
.shot { margin: 0; }
.hero-shot { margin-top: 54px; }
.window {
  border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow);
}
.window-bar {
  display: flex; align-items: center; gap: 7px; padding: 11px 14px;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.window-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); }
.window-bar .dot:nth-child(1) { background: #f87171; }
.window-bar .dot:nth-child(2) { background: #fbbf24; }
.window-bar .dot:nth-child(3) { background: #34d399; }
.window-bar .url {
  margin-inline-start: 12px; font-size: 0.78rem; color: var(--faint);
  background: var(--bg); padding: 4px 12px; border-radius: 7px; border: 1px solid var(--border);
  max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.window img { width: 100%; height: auto; display: block; }

/* ---------------- Sections ---------------- */
.section { padding: 84px 0; position: relative; }
.section-alt { background:
  linear-gradient(180deg, transparent, color-mix(in srgb, var(--surface) 40%, transparent) 12%, color-mix(in srgb, var(--surface) 40%, transparent) 88%, transparent);
  border-block: 1px solid var(--border); }
.section-head { max-width: 720px; margin: 0 auto 52px; text-align: center; }
.section-head h2 { margin: 0 0 14px; font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing: -0.025em; line-height: 1.12; font-weight: 800; }
.section-sub { margin: 0; color: var(--muted); font-size: 1.06rem; }

/* ---------------- Feature grid ---------------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--card-grad); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 26px; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow-sm); }
.card .ic {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.card .ic svg { width: 24px; height: 24px; }
.card h3 { margin: 0 0 9px; font-size: 1.16rem; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* ---------------- Split spotlight ---------------- */
.split { display: grid; grid-template-columns: 1fr 1.12fr; gap: 52px; align-items: center; margin-top: 40px; }
.split + .split { margin-top: 96px; }
.split-rev .split-copy { order: 2; }
.split-rev .split-shot { order: 1; }
.step-tag {
  display: inline-block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  padding: 5px 11px; border-radius: 999px; margin-bottom: 16px;
}
.split-copy h3 { margin: 0 0 14px; font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -0.02em; line-height: 1.15; font-weight: 800; }
.split-copy p { margin: 0 0 18px; color: var(--muted); font-size: 1.04rem; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-inline-start: 30px; color: var(--text); font-size: 0.98rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 6px;
  background:
    color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
}
.ticks li::after {
  content: ""; position: absolute; left: 6px; top: 7px; width: 8px; height: 5px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}

/* ---------------- Analytics extras ---------------- */
.wide-shot { max-width: 1000px; margin: 0 auto; }
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 44px; }
.mini-grid h4 { margin: 0 0 8px; font-size: 1.05rem; }
.mini-grid h4::before { content: ""; display: inline-block; width: 22px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--primary), var(--tertiary)); margin-right: 10px; vertical-align: middle; }
.mini-grid p { margin: 0; color: var(--muted); font-size: 0.96rem; }

/* ---------------- Theming band ---------------- */
.theming-band {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center;
  background: var(--card-grad); border: 1px solid var(--border); border-radius: 22px; padding: 44px;
  box-shadow: var(--shadow-sm);
}
.theming-copy h2 { margin: 6px 0 12px; font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -0.02em; font-weight: 800; }
.theming-copy .section-sub { margin-bottom: 22px; }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sw { aspect-ratio: 1; border-radius: 14px; border: 1px solid var(--border-strong); }
.sw1 { background: var(--primary); }
.sw2 { background: var(--secondary); }
.sw3 { background: var(--tertiary); }
.sw4 { background: var(--surface); }
.sw5 { background: linear-gradient(135deg, var(--primary), var(--tertiary)); }
.sw6 { background: var(--surface-3); }

/* ---------------- Steps ---------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { background: var(--card-grad); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 26px; }
.step .num { font-size: 0.9rem; font-weight: 800; letter-spacing: 0.1em; color: var(--accent); }
.step h4 { margin: 12px 0 8px; font-size: 1.16rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* ---------------- CTA ---------------- */
.cta-section { position: relative; padding: 96px 0; text-align: center; overflow: hidden; border-top: 1px solid var(--border); }
.cta-inner { position: relative; z-index: 2; }
.cta-section h2 { margin: 0 auto 12px; max-width: 20ch; font-size: clamp(1.9rem, 3.6vw, 2.8rem); letter-spacing: -0.025em; font-weight: 800; }
.cta-section p { margin: 0 auto 26px; max-width: 52ch; color: var(--muted); font-size: 1.08rem; }

/* ---------------- Footer ---------------- */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 30px; background: color-mix(in srgb, var(--surface) 30%, transparent); }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding-bottom: 26px; border-bottom: 1px solid var(--border); }
.footer-brand p { margin: 12px 0 0; color: var(--muted); font-size: 0.95rem; max-width: 32ch; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.footer-nav a { color: var(--muted); font-size: 0.94rem; font-weight: 500; }
.footer-nav a:hover { color: var(--accent); }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 22px; color: var(--faint); font-size: 0.86rem; }

/* ---------------- Reveal animation ---------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .header-cta { display: none; }
  .menu-btn { display: inline-flex; }
  .mobile-nav.open { display: flex; }
  .feature-grid, .mini-grid, .steps { grid-template-columns: 1fr 1fr; }
  .split, .theming-band { grid-template-columns: 1fr; gap: 30px; }
  .split-rev .split-copy { order: 1; }
  .split-rev .split-shot { order: 2; }
  .split + .split { margin-top: 60px; }
  .swatches { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 560px) {
  .feature-grid, .mini-grid, .steps { grid-template-columns: 1fr; }
  .hero { padding-top: 52px; }
  .section { padding: 64px 0; }
  .theming-band { padding: 30px; }
  .window-bar .url { max-width: 50%; }
  .footer-inner { flex-direction: column; gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .btn:hover, .card:hover { transform: none; }
}
