/* ==========================================================================
   QuickMark website — design tokens from /DESIGN.md
   Soft Brand Blue · calm · bright · peaceful · lightweight · light-first + soft dark
   ========================================================================== */

/* ---- Tokens: Light (primary) ---- */
:root {
  --bg: #FBFCFD;
  --surface: #FFFFFF;
  --surface-2: #F4F7FA;
  --ink: #1F2937;
  --ink-strong: #0B1220;
  --muted: #5B6573;
  --subtle: #8A929E;
  --line: #E6ECF2;
  --accent: #2F6FED;
  --accent-strong: #1F58D6;
  --accent-bg: #EAF1FE;
  --success: #1A7F37;
  --code-bg: #F6F8FA;
  --code-fg: #1F2328;

  --brand-gradient: linear-gradient(135deg, #22D8FF 0%, #1A9DFF 45%, #5137D6 100%);

  --shadow-e1: 0 1px 2px rgba(20,40,80,.04), 0 4px 12px rgba(20,40,80,.04);
  --shadow-e2: 0 8px 30px rgba(20,40,80,.06);
  --shadow-e3: 0 30px 60px -30px rgba(20,40,80,.18), 0 8px 24px -12px rgba(20,40,80,.10);
  --focus: 0 0 0 3px rgba(47,111,237,.30);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;

  --container: 1080px;
  --prose: 720px;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --nav-h: 64px;
  color-scheme: light;
}

/* ---- Tokens: Dark (soft) — applied when system is dark (no manual choice)… ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F141A;
    --surface: #161A21;
    --surface-2: #1B2027;
    --ink: #E6EDF3;
    --ink-strong: #F2F6FA;
    --muted: #9AA4B2;
    --subtle: #6E7884;
    --line: #283039;
    --accent: #5B9BFF;
    --accent-strong: #8FBCFF;
    --accent-bg: rgba(91,155,255,.12);
    --success: #3FB950;
    --code-bg: #161B22;
    --code-fg: #E6EDF3;
    --shadow-e1: 0 1px 2px rgba(0,0,0,.30), 0 4px 12px rgba(0,0,0,.30);
    --shadow-e2: 0 8px 30px rgba(0,0,0,.40);
    --shadow-e3: 0 30px 60px -30px rgba(0,0,0,.55), 0 8px 24px -12px rgba(0,0,0,.40);
    color-scheme: dark;
  }
}

/* …and always when the user explicitly chose dark. */
:root[data-theme="dark"] {
  --bg: #0F141A;
  --surface: #161A21;
  --surface-2: #1B2027;
  --ink: #E6EDF3;
  --ink-strong: #F2F6FA;
  --muted: #9AA4B2;
  --subtle: #6E7884;
  --line: #283039;
  --accent: #5B9BFF;
  --accent-strong: #8FBCFF;
  --accent-bg: rgba(91,155,255,.12);
  --success: #3FB950;
  --code-bg: #161B22;
  --code-fg: #E6EDF3;
  --shadow-e1: 0 1px 2px rgba(0,0,0,.30), 0 4px 12px rgba(0,0,0,.30);
  --shadow-e2: 0 8px 30px rgba(0,0,0,.40);
  --shadow-e3: 0 30px 60px -30px rgba(0,0,0,.55), 0 8px 24px -12px rgba(0,0,0,.40);
  color-scheme: dark;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  /* Top glow lives on the page background, but its peak sits BELOW the very top
     so the top strip stays the solid --bg (same color iOS Safari paints behind
     the status bar) → no hard divide there; the white header just fades down
     into the glow. */
  background:
    radial-gradient(1200px 780px at 50% 360px, rgba(47,111,237,.13), rgba(81,55,214,.05) 48%, transparent 72%) no-repeat,
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .25s ease, color .25s ease;
}

h1, h2, h3, h4 { color: var(--ink-strong); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h2 { font-size: 30px; letter-spacing: -.01em; }
h3 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
h4 { font-size: 18px; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
img { max-width: 100%; display: block; }
strong { color: var(--ink-strong); font-weight: 650; }

code {
  font-family: var(--font-mono);
  font-size: .9em;
  background: var(--code-bg);
  color: var(--code-fg);
  padding: .15em .4em;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }

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

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font: inherit; font-weight: 600; line-height: 1;
  padding: 14px 22px; border-radius: var(--r-md);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-e1); }
.btn--primary:hover { background: var(--accent-strong); color: #fff; transform: translateY(-1px); }
.btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--secondary:hover { background: var(--surface-2); color: var(--ink); transform: translateY(-1px); }
.btn .apple { width: 17px; height: 17px; fill: currentColor; margin-top: -2px; }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }

/* ---- Eyebrow / chips ---- */
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding: 0; list-style: none; }
.chips li {
  font-size: 14px; color: var(--accent); background: var(--accent-bg);
  border-radius: var(--r-full); padding: 4px 12px; font-weight: 600;
}

/* ---- Nav ---- */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 100;
  display: flex; align-items: center;
  transition: background-color .25s ease, box-shadow .25s ease, border-color .25s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom-color: var(--line);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 19px; color: var(--ink-strong); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand-name { display: flex; flex-direction: column; gap: 1px; line-height: 1.04; }
.brand-name small {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: .02em; color: var(--subtle); text-transform: none;
  margin-top: 2px; margin-left: 2px;
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--muted); font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--ink-strong); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav .btn { padding: 9px 16px; font-size: 14px; }

.theme-toggle {
  width: 38px; height: 38px; border-radius: var(--r-full);
  display: inline-grid; place-items: center; cursor: pointer;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.theme-toggle:hover { color: var(--ink-strong); border-color: var(--muted); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
}

.menu-btn { display: none; }

/* ---- Hero ---- */
/* No overflow:hidden + no blurred ::before blob — that combo clipped the blur
   into a hard horizontal seam ("fold") at the top. The top glow now lives on
   `body` (full-bleed, unclipped). */
.hero { position: relative; padding: calc(var(--nav-h) + 72px) 0 64px; text-align: center; }
.hero h1 {
  font-size: clamp(40px, 6.2vw, 68px); line-height: 1.05; letter-spacing: -.025em;
  margin: 0 auto .28em; max-width: 16ch;
}
.hero .lead { font-size: 20px; color: var(--muted); max-width: 56ch; margin: 0 auto 30px; }
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hero-cta .note { font-size: 14px; color: var(--subtle); }
.hero-figure {
  margin: 56px auto 0; max-width: 980px;
  border-radius: var(--r-xl); border: 1px solid var(--line);
  box-shadow: var(--shadow-e3); overflow: hidden; background: var(--surface);
}
.hero-figure img { width: 100%; height: auto; }

/* ---- Section scaffolding ---- */
.section { padding: 80px 0; }
.section-head { max-width: var(--prose); margin: 0 auto 8px; text-align: center; }
.section-head p { color: var(--muted); font-size: 18px; }

/* ---- Feature rows (alternating) ---- */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
  padding: 56px 0;
}
.feature + .feature { border-top: 1px solid var(--line); }
.feature.reverse .feature-text { order: 2; }
.feature-text h2 { margin-bottom: .35em; }
.feature-text p { color: var(--muted); font-size: 18px; margin-bottom: 0; }
.feature-media {
  border-radius: var(--r-lg); border: 1px solid var(--line);
  box-shadow: var(--shadow-e2); overflow: hidden; background: var(--surface);
}
.feature-media img { width: 100%; height: auto; }

/* ---- Highlight band ---- */
.band { background: var(--surface-2); border-block: 1px solid var(--line); }
.band .feature { border: 0; }

/* ---- Feature grid (compact, no screenshots) ---- */
.grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 44px;
}
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px; box-shadow: var(--shadow-e1);
  transition: transform .15s ease, box-shadow .15s ease;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-e2); }
.tile .ic {
  width: 42px; height: 42px; border-radius: var(--r-md);
  display: grid; place-items: center; background: var(--accent-bg); color: var(--accent);
  margin-bottom: 16px;
}
.tile .ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.tile h3 { font-size: 18px; margin-bottom: .35em; }
.tile p { color: var(--muted); font-size: 15.5px; margin: 0; line-height: 1.6; }
@media (prefers-reduced-motion: reduce) { .tile:hover { transform: none; } }

/* ---- Free & Pro ---- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 44px; }
.plan {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 32px; box-shadow: var(--shadow-e1);
}
.plan.pro { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: var(--shadow-e2); }
.plan .tag {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.plan.pro .tag { color: var(--accent); }
.plan h3 { font-size: 24px; margin-bottom: .15em; }
.plan .sub { color: var(--muted); margin-bottom: 18px; }
.plan ul { list-style: none; padding: 0; margin: 0; }
.plan li { position: relative; padding-left: 28px; margin-bottom: 11px; color: var(--ink); font-size: 16px; }
.plan li::before {
  content: ""; position: absolute; left: 2px; top: .42em; width: 14px; height: 8px;
  border-left: 2px solid var(--success); border-bottom: 2px solid var(--success);
  transform: rotate(-45deg);
}
.plans-cta { text-align: center; margin-top: 32px; }
.plans-cta .note { color: var(--subtle); font-size: 14px; margin-top: 12px; }

/* ---- User Stories / testimonials (ported from the AI Studio layout, recolored
   with our tokens + typography) ---- */
.stories { background: var(--surface); border-top: 1px solid var(--line); }
.stories .section-head { max-width: 680px; }
/* Carousel: a horizontal scroll-snap track showing 3 cards per view (2 on
   tablet, 1 on phone). Manual navigation only — DESIGN.md forbids autoplay
   carousels. Swipeable on touch; arrows + dots on pointer devices. */
.t-carousel { margin-top: 56px; }
.t-viewport { position: relative; }
.t-track {
  display: flex; gap: 32px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; padding-bottom: 6px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.t-track::-webkit-scrollbar { display: none; }
.t-track > .t-card { flex: 0 0 calc((100% - 64px) / 3); scroll-snap-align: start; }
.t-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 40px; height: 40px; border-radius: var(--r-full);
  display: grid; place-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  box-shadow: var(--shadow-e1);
  transition: color .15s ease, border-color .15s ease, opacity .15s ease;
}
.t-nav:hover { color: var(--accent); border-color: var(--accent); }
.t-nav svg { width: 20px; height: 20px; }
.t-prev { left: -14px; }
.t-next { right: -14px; }
.t-nav[disabled] { opacity: 0; pointer-events: none; }
.t-dots { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }
.t-dots button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: var(--r-full);
  background: var(--line); cursor: pointer;
  transition: background-color .15s ease, width .15s ease;
}
.t-dots button[aria-current="true"] { width: 22px; background: var(--accent); }
.t-card {
  position: relative; overflow: hidden;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.t-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-e2); }
/* Quote mark decorator — top-right, rotated 180°, brightens to accent on hover */
.t-quote-mark {
  position: absolute; right: 24px; top: 24px;
  color: color-mix(in srgb, var(--line) 80%, transparent);
  transform: rotate(180deg); pointer-events: none; transition: color .2s ease;
}
.t-quote-mark svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2; }
.t-card:hover .t-quote-mark { color: color-mix(in srgb, var(--accent) 20%, transparent); }
/* USER_VERIFIED indicator */
.t-verified {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 20px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--subtle);
}
.t-verified svg { width: 14px; height: 14px; fill: none; stroke: var(--accent); stroke-width: 2; }
.t-content { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 0 0 24px; }
.t-author {
  display: flex; align-items: center; gap: 12px; margin-top: auto;
  padding-top: 16px; border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}
/* Initials avatar circle — no image asset; on-brand blue family, dark-mode-safe.
   A 5-colour rotation via :nth-child keeps the markup to bare initials while
   still reading as distinct people across the carousel. */
.t-avatar {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; letter-spacing: .01em; line-height: 1;
  color: #fff; background: var(--accent); user-select: none;
}
.t-track .t-card:nth-child(5n+1) .t-avatar { background: #2F6FED; }
.t-track .t-card:nth-child(5n+2) .t-avatar { background: #1A9DFF; }
.t-track .t-card:nth-child(5n+3) .t-avatar { background: #5137D6; }
.t-track .t-card:nth-child(5n+4) .t-avatar { background: #1AA9C9; }
.t-track .t-card:nth-child(5n+5) .t-avatar { background: #6E59E6; }
.t-author .name { color: var(--ink); font-size: 12px; font-weight: 700; line-height: 1.35; }
.t-author .role { display: block; color: var(--subtle); font-size: 11px; }
/* 5-star rating, right-aligned in the empty space of the card footer */
.t-stars { margin-left: auto; align-self: center; flex: 0 0 auto; }
.t-stars svg { display: block; width: 74px; height: 15px; fill: #F5A623; }

/* Per-feature kicker label (mono accent, above the feature heading) */
.feature-text .kicker {
  display: inline-block; font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: .03em; color: var(--accent); margin-bottom: 12px;
}
/* "Crafted with care" line */
.t-craft {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 64px; font-size: 12px; font-weight: 500; color: var(--subtle); user-select: none;
}
.t-craft svg { width: 14px; height: 14px; fill: #ef4444; stroke: #ef4444; }
@media (prefers-reduced-motion: reduce) { .t-card:hover { transform: none; } .t-track { scroll-behavior: auto; } }
@media (max-width: 980px) { .t-track > .t-card { flex: 0 0 calc((100% - 32px) / 2); } .t-nav { display: none; } }
@media (max-width: 640px) { .t-track > .t-card { flex: 0 0 100%; } }

/* ---- Final CTA band ---- */
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(30px, 4.4vw, 44px); letter-spacing: -.02em; max-width: 18ch; margin-inline: auto; }
.cta-band p { color: var(--muted); font-size: 19px; max-width: 52ch; margin: 0 auto 28px; }
.cta-band .hero-cta { margin-top: 26px; }

/* ---- Contact form ---- */
.contact-wrap { max-width: 560px; margin-inline: auto; padding: 40px 24px 24px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; box-shadow: var(--shadow-e1); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-strong); margin-bottom: 6px; }
.form-group input, .form-group textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px 14px; transition: border-color .15s ease, box-shadow .15s ease;
}
.form-group textarea { min-height: 150px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.form-group.invalid input, .form-group.invalid textarea { border-color: #E5484D; }
.field-error { display: none; color: #E5484D; font-size: 13px; margin: 6px 0 0; }
.form-group.invalid .field-error { display: block; }
.notice--error {
  color: #E5484D; background: color-mix(in srgb, #E5484D 9%, transparent);
  border: 1px solid color-mix(in srgb, #E5484D 28%, transparent);
  border-radius: var(--r-md); padding: 10px 14px; font-size: 14px; margin-bottom: 16px;
}
.contact-card .btn { width: 100%; justify-content: center; }
.contact-card .btn[disabled] { opacity: .55; pointer-events: none; }
.contact-success { text-align: center; padding: 12px 0 4px; }
.success-pill {
  width: 56px; height: 56px; border-radius: var(--r-full); display: grid; place-items: center;
  margin: 0 auto 14px; background: var(--accent-bg); color: var(--success); font-size: 26px; font-weight: 700;
}
.contact-success h2 { font-size: 22px; }
.contact-success .back-link { margin-top: 10px; }
.alt-contact { text-align: center; color: var(--muted); font-size: 14px; margin: 18px 0 0; }
.contact-foot { text-align: center; color: var(--muted); font-size: 14.5px; margin-top: 22px; }

/* ---- Footer ---- */
.footer { background: var(--surface-2); border-top: 1px solid var(--line); padding: 56px 0 40px; margin-top: 24px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.footer .brand { margin-bottom: 12px; }
.footer .tagline { color: var(--muted); max-width: 34ch; font-size: 15px; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-cols h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--subtle); margin-bottom: 14px; }
.footer-cols a { display: block; color: var(--muted); font-size: 15px; margin-bottom: 10px; }
.footer-cols a:hover { color: var(--ink-strong); }
.footer-bottom {
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  color: var(--subtle); font-size: 14px;
}

/* ---- Prose / legal pages ---- */
.page-head { padding: calc(var(--nav-h) + 56px) 0 28px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(34px, 5vw, 46px); letter-spacing: -.02em; margin-bottom: .25em; }
.page-head .updated { color: var(--subtle); font-size: 15px; }
.prose { max-width: var(--prose); margin-inline: auto; padding: 48px 24px 24px; }
.prose h2 { font-size: 24px; margin-top: 1.8em; }
.prose h3 { font-size: 19px; margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink); font-size: 17px; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--subtle); }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.back-link { display: inline-block; margin-top: 36px; color: var(--muted); font-weight: 500; }
.back-link:hover { color: var(--accent); }

/* ==========================================================================
   Hero demo — 3-device tabbed video player + device frames
   ========================================================================== */
.hero-demo { margin: 50px auto 0; display: flex; flex-direction: column; align-items: center; }

/* segmented device switcher */
.seg {
  display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 30px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-full);
  box-shadow: var(--shadow-e1);
}
.seg-btn {
  border: 0; background: transparent; cursor: pointer; font: inherit;
  font-weight: 600; font-size: 14px; color: var(--muted);
  padding: 8px 20px; border-radius: var(--r-full);
  display: inline-flex; align-items: center; gap: 7px;
  transition: color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.seg-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.seg-btn:hover { color: var(--ink-strong); }
.seg-btn.is-active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-e1); }

/* stage keeps a stable height while frames swap */
.device-stage {
  --stage-h: 560px;
  width: 100%; min-height: var(--stage-h);
  display: flex; align-items: center; justify-content: center;
}
.device-frame { display: block; }
.device-frame[hidden] { display: none; }
.device-frame video, .device-frame img { display: block; background: #0c0e12; }

/* phone */
.device-frame--phone { height: var(--stage-h); }
.device-frame--phone .device-screen {
  position: relative; height: 100%; aspect-ratio: 9 / 19.5;
  border: 6px solid #0c0e12; border-radius: 36px; overflow: hidden;
  box-shadow: var(--shadow-e3), 0 0 0 1px rgba(0,0,0,.04);
}
.device-frame--phone video, .device-frame--phone img { width: 100%; height: 100%; object-fit: cover; }

/* tablet */
.device-frame--tablet { height: var(--stage-h); }
.device-frame--tablet .device-screen {
  position: relative; height: 100%; aspect-ratio: 4 / 3;
  border: 8px solid #0c0e12; border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-e3), 0 0 0 1px rgba(0,0,0,.04);
}
.device-frame--tablet video, .device-frame--tablet img { width: 100%; height: 100%; object-fit: cover; }

/* mac — MacBook laptop (dark bezel + silver deck), consistent with phone/tablet */
.device-frame--mac { width: min(820px, 100%); }
.device-frame--mac .laptop { position: relative; }
.device-frame--mac .laptop::before {              /* camera dot, sits inside the top bezel */
  content: ""; position: absolute; z-index: 4; top: 2.5px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: #3a3d44;
}
.device-frame--mac .laptop-screen {
  border: 8px solid #0c0e12; border-radius: 14px 14px 5px 5px; overflow: hidden;
  background: #0c0e12; box-shadow: var(--shadow-e3), 0 0 0 1px rgba(0,0,0,.05);
}
.device-frame--mac video, .device-frame--mac img {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #0c0e12;
}
.device-frame--mac .laptop-base {                 /* the silver deck under the lid */
  position: relative; height: 14px; width: 106%; margin: 0 -3%;
  background: linear-gradient(180deg, #e4e7ec 0%, #c4c9d1 55%, #aeb4be 100%);
  border-radius: 0 0 14px 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), var(--shadow-e2);
}
.device-frame--mac .laptop-base::before {         /* lid-opening notch */
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 92px; height: 7px; background: #b4b9c2; border-radius: 0 0 8px 8px;
}

/* ==========================================================================
   Multi-device showcase
   ========================================================================== */
.showcase { background: var(--surface-2); border-block: 1px solid var(--line); text-align: center; }
.showcase-stage {
  margin-top: 56px; display: flex; justify-content: center; align-items: flex-end;
  gap: 34px; flex-wrap: wrap;
}
.showcase-item { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.showcase-item .label {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: .04em; color: var(--subtle); text-transform: uppercase;
}
/* Lineup — MacBook centerpiece; full screenshot at natural aspect (no crop). */
.showcase-stage .device-frame--mac { width: 470px; }
.showcase .device-frame--mac img { aspect-ratio: auto; width: 100%; height: auto; object-fit: fill; }
.showcase-stage .device-frame--phone { height: 300px; }
.showcase-stage .device-frame--phone .device-screen { border-radius: 22px; }
.showcase-stage .device-frame--tablet { height: 232px; }

/* ==========================================================================
   Essentials grid — slightly richer tile (icon-led)
   ========================================================================== */
.grid--essentials { grid-template-columns: repeat(3, 1fr); }
.grid--why { grid-template-columns: repeat(4, 1fr); }
.grid--why .tile h3 { margin-bottom: .3em; }
@media (prefers-reduced-motion: reduce) {
  .hero-demo video { /* poster stays; JS won't autoplay */ }
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .grid--essentials { grid-template-columns: 1fr; }
  /* Hero stage: size tablet + mac by width (not height) so 4:3 / 16:9 can't
     overflow the viewport; keep the phone height-driven (it's already narrow).
     Scoped to .device-stage so the showcase frames aren't affected. */
  .device-stage { --stage-h: 460px; min-height: var(--stage-h); }
  .device-stage .device-frame--phone { height: var(--stage-h); }
  .device-stage .device-frame--tablet { height: auto; width: 100%; }
  .device-stage .device-frame--tablet .device-screen { height: auto; width: 100%; }
  .device-stage .device-frame--mac { width: 100%; }
  /* Showcase: MacBook full-width on top, iPad + iPhone in a row below. */
  .showcase-stage { gap: 26px 28px; }
  .showcase-item--mac { flex-basis: 100%; order: -1; }
  .showcase-stage .device-frame--mac { width: min(560px, 100%); }
  .showcase-stage .device-frame--phone { height: 280px; }
  .showcase-stage .device-frame--tablet { height: auto; width: 250px; max-width: 78vw; }
  .showcase-stage .device-frame--tablet .device-screen { height: auto; width: 100%; }
}
@media (max-width: 860px) {
  .feature, .grid, .plans { grid-template-columns: 1fr; gap: 32px; }
  .feature.reverse .feature-text { order: 0; }
  .feature.reverse .feature-media { order: -1; }
  .nav-links { display: none; }
  .menu-btn {
    display: inline-grid; place-items: center; width: 38px; height: 38px;
    border: 1px solid var(--line); border-radius: var(--r-full); background: transparent;
    color: var(--muted); cursor: pointer;
  }
  .nav.menu-open { background: var(--surface); border-bottom-color: var(--line);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .nav.menu-open .nav-links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 16px 24px 22px;
  }
  .nav.menu-open .nav-links a { padding: 8px 0; font-size: 16px; }
  .hero .lead { font-size: 18px; }
  .section { padding: 56px 0; }
}
@media (max-width: 520px) {
  .footer-top { flex-direction: column; gap: 28px; }
  .footer-cols { gap: 40px; }
  /* On phones the header download button collapsed to an empty pill (the label
     was hidden with no icon). Hide the whole button — the hamburger menu + the
     big hero "Download on the App Store" cover it. */
  .nav .btn--primary { display: none; }
}

/* ==========================================================================
   Screenshot lightbox — hover cue on [data-zoomable] images + click-to-zoom.
   :has() gates the cue to containers that actually hold a zoomable image, so
   the hero <video> device frames never get it.
   ========================================================================== */
[data-zoomable] { cursor: zoom-in; transition: transform .3s ease; }
.feature-media:has([data-zoomable]),
.device-screen:has([data-zoomable]),
.laptop-screen:has([data-zoomable]) { position: relative; }

/* circle badge behind the magnifier */
.feature-media:has([data-zoomable])::before,
.device-screen:has([data-zoomable])::before,
.laptop-screen:has([data-zoomable])::before {
  content: ""; position: absolute; z-index: 2; top: 50%; left: 50%;
  width: 52px; height: 52px; border-radius: var(--r-full);
  transform: translate(-50%, -50%) scale(.9); opacity: 0;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow-e2);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: opacity .22s ease, transform .22s ease; pointer-events: none;
}
/* magnifier glyph (masked SVG → follows the theme via background-color) */
.feature-media:has([data-zoomable])::after,
.device-screen:has([data-zoomable])::after,
.laptop-screen:has([data-zoomable])::after {
  content: ""; position: absolute; z-index: 3; top: 50%; left: 50%;
  width: 24px; height: 24px; transform: translate(-50%, -50%) scale(.9); opacity: 0;
  background-color: var(--ink-strong);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.5-4.5'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.5-4.5'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: opacity .22s ease, transform .22s ease; pointer-events: none;
}
.feature-media:has([data-zoomable]):hover::before,
.device-screen:has([data-zoomable]):hover::before,
.laptop-screen:has([data-zoomable]):hover::before,
.feature-media:has([data-zoomable]):hover::after,
.device-screen:has([data-zoomable]):hover::after,
.laptop-screen:has([data-zoomable]):hover::after,
.feature-media:has([data-zoomable]:focus-visible)::before,
.feature-media:has([data-zoomable]:focus-visible)::after {
  opacity: 1; transform: translate(-50%, -50%) scale(1);
}
.feature-media:has([data-zoomable]):hover [data-zoomable],
.device-screen:has([data-zoomable]):hover [data-zoomable],
.laptop-screen:has([data-zoomable]):hover [data-zoomable] { transform: scale(1.03); }

/* --- The lightbox overlay --- */
html.lb-locked { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(11, 18, 32, .72);
  -webkit-backdrop-filter: saturate(160%) blur(10px); backdrop-filter: saturate(160%) blur(10px);
  opacity: 0; transition: opacity .2s ease;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lb-figure {
  margin: 0; max-width: 92vw; max-height: 90vh;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  transform: scale(.92); opacity: 0;
  transition: transform .24s cubic-bezier(.2, .8, .2, 1), opacity .24s ease;
}
.lightbox.is-open .lb-figure { transform: scale(1); opacity: 1; }
.lb-img {
  max-width: 92vw; max-height: 82vh; width: auto; height: auto; object-fit: contain;
  border-radius: var(--r-lg); box-shadow: var(--shadow-e3); background: var(--surface); cursor: zoom-in;
}
.lb-cap { color: rgba(255, 255, 255, .86); font-size: 14px; text-align: center; max-width: 62ch; margin: 0; }
/* actual-size (100%) mode: natural pixels, pan by scrolling the overlay */
.lightbox.is-actual { align-items: flex-start; justify-content: flex-start; overflow: auto; }
.lightbox.is-actual .lb-figure { max-width: none; max-height: none; margin: auto; }
.lightbox.is-actual .lb-img { max-width: none; max-height: none; cursor: zoom-out; }
/* controls */
.lb-close, .lb-nav {
  position: fixed; z-index: 201; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: var(--r-full); border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .15); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background-color .15s ease, transform .15s ease;
}
.lb-close svg, .lb-nav svg { width: 22px; height: 22px; }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .3); }
.lb-close:focus-visible, .lb-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lb-close { top: 18px; right: 18px; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-nav:hover { transform: translateY(-50%) scale(1.08); }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
@media (max-width: 560px) { .lb-nav { width: 40px; height: 40px; } .lb-prev { left: 10px; } .lb-next { right: 10px; } }

@media (prefers-reduced-motion: reduce) {
  .lightbox, .lb-figure { transition: opacity .15s ease; }
  .lightbox .lb-figure, .lightbox.is-open .lb-figure { transform: none; }
  .feature-media:has([data-zoomable]):hover [data-zoomable],
  .device-screen:has([data-zoomable]):hover [data-zoomable],
  .laptop-screen:has([data-zoomable]):hover [data-zoomable] { transform: none; }
}
