/* ============================================================
   Sightline — design system
   Warm-dark aesthetic. Tokens defined FIRST, before any screen.
   Values sourced from the app's Theme.swift / AccentTheme.swift.
   ============================================================ */

/* DM Serif Display — the app's accent serif, for elevated moments (OFL, self-hosted) */
@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/DMSerifDisplay-Regular.woff2') format('woff2'),
       url('../fonts/DMSerifDisplay-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'DM Serif Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/DMSerifDisplay-Italic.woff2') format('woff2'),
       url('../fonts/DMSerifDisplay-Italic.ttf') format('truetype');
}

:root {
  /* Surfaces — warm "espresso" dark (chosen over pure near-black) */
  --surface-base:    #17120D;  /* primary canvas */
  --surface-camera:  #100C08;  /* deepest — device screens */
  --surface-raised:  #211A13;  /* cards, raised blocks */
  --surface-overlay: #2E251C;  /* hairlines, chips, floating cards */

  /* Accent — the one accent, amber gold */
  --accent:       #F2A11A;
  --accent-muted: #CCA15A;
  --accent-deep:  #A8680C;  /* amber text on light paper */

  /* Ink — text on dark */
  --ink-primary:   #EDE7DC;  /* headlines */
  --ink-secondary: #B8B1A6;
  --ink-body:      #A8A196;  /* prose */
  --ink-muted:     #8C857A;  /* captions */
  --ink-dim:       #7D776D;  /* inactive */

  /* Paper — light insets (echoes the in-app report/paywall) */
  --paper:          #FBF8F2;
  --paper-ink:      #241E17;
  --paper-ink-body: #4C453A;
  --paper-ink-muted:#837A6C;

  /* Status — used sparingly; amber is never caution */
  --status-ok:  #5FA86C;
  --status-bad: #D25A50;

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 5rem;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;

  /* Layout */
  --maxw: 1120px;

  /* Type scale (fluid, clamp-based) */
  --fs-h1:   clamp(2.4rem, 1.6rem + 3.4vw, 3.8rem);
  --fs-h2:   clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem);
  --fs-h3:   clamp(1.15rem, 1.05rem + 0.5vw, 1.35rem);
  --fs-lead: clamp(1.05rem, 0.98rem + 0.4vw, 1.25rem);
  --fs-body: 1rem;
  --fs-sm:   0.875rem;

  /* Font stack */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "DM Serif Display", Georgia, "Times New Roman", serif;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink-body);
  background: var(--surface-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-muted); }

::selection { background: rgba(242,161,26,0.28); color: var(--ink-primary); }

/* ---------- Type roles ---------- */

.h1 {
  font-size: var(--fs-h1);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--ink-primary);
  margin: 0;
}
.h2 {
  font-size: var(--fs-h2);
  line-height: 1.12;
  letter-spacing: -0.015em;
  font-weight: 600;
  color: var(--ink-primary);
  margin: 0 0 var(--sp-4);
}
.h3 {
  font-size: var(--fs-h3);
  line-height: 1.25;
  font-weight: 600;
  color: var(--ink-primary);
  margin: 0 0 var(--sp-2);
}
.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--ink-secondary);
  margin: 0;
}
.muted { color: var(--ink-muted); font-size: var(--fs-sm); }
.accent { color: var(--accent); }

/* ---------- Layout ---------- */

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

.section {
  padding-block: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
}
.section-center { text-align: center; }
.section-head {
  max-width: 52rem;
  margin-inline: auto;
  margin-bottom: var(--sp-7);
}
.section-center .section-head { text-align: center; }

/* ---------- Eyebrow chip ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.32rem 0.7rem;
  border: 1px solid var(--surface-overlay);
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); display: inline-block;
}

/* ---------- Buttons (3-tier, mirrors the app) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.7rem 1.25rem;
  border-radius: 11px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.btn-primary {
  background: var(--accent);
  color: var(--paper-ink);
}
.btn-secondary {
  background: transparent;
  color: var(--ink-secondary);
  border-color: var(--surface-overlay);
}
.btn-secondary:hover { color: var(--ink-primary); border-color: var(--ink-dim); }

/* Inert "Coming soon" state — until the App Store URL exists */
.btn-soon {
  pointer-events: none;
  background: var(--surface-overlay);
  color: var(--ink-muted);
}

@media (hover: hover) {
  .btn-primary:hover { box-shadow: 0 6px 22px rgba(242,161,26,0.28); }
}

/* ---------- Card ---------- */

.card {
  background: var(--surface-raised);
  border: 1px solid var(--surface-overlay);
  border-radius: var(--r-md);
  padding: var(--sp-5);
}

/* ---------- Hero ---------- */

.hero { overflow: hidden; position: relative; }
/* Barely-there splash photo behind the hero — warm-tinted, mirrored so the
   dark subject sits behind the copy and the faint screen-glow falls toward
   the iPad; fades out downward so it dissolves into the page. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  transform: scaleX(-1);
  opacity: 0.3;
  filter: sepia(0.55) saturate(1.4) brightness(0.85) contrast(1.05);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,0.6) 45%, transparent 88%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,0.6) 45%, transparent 88%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--sp-6);
  align-items: center;
  padding-block: clamp(2.5rem, 1.5rem + 5vw, 5.5rem);
  min-height: 560px;
}
.hero-copy { min-width: 0; }
.hero-title { margin-top: var(--sp-5); }
.hero-lead { margin-top: var(--sp-4); max-width: 30rem; }
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}
.hero-trust { margin-top: var(--sp-4); }

/* Stage + halo */
.hero-stage {
  position: relative;
  height: 460px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.halo {
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242,161,26,0.16), rgba(242,161,26,0) 62%);
  filter: blur(6px);
}

/* Hero device — one landscape iPad playing the Critique flow.
   Frames cross-dissolve; the device stays still, the content carries the life. */
.ipad-seq {
  position: relative;
  width: 100%;
  max-width: 620px;
}
.ipad {
  position: relative;
  width: 100%;
  background: #050403;
  border: 1px solid var(--surface-overlay);
  border-radius: 22px;
  padding: 10px;
  box-shadow: 0 30px 66px rgba(0,0,0,0.55);
}
.ipad-screen {
  position: relative;
  aspect-ratio: 2752 / 2064;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-camera);
}
.seq-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}
/* Fallback: the verdict frame stays visible with no JS / reduced motion */
.ipad-seq:not(.animate) .seq-frame.f6 { opacity: 1; }

/* Amber scan sweep over the framed artifact — scanning frame (05) only.
   Region matches the corner-bracket rectangle in hero_iPad_Landscape05. */
.seq-scan {
  position: absolute;
  left: 50%; top: 27%;
  width: 24%; height: 41%;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.seq-scan::before {
  content: "";
  position: absolute;
  left: -10%; right: -10%;
  top: -15%; height: 14%;
  background: linear-gradient(to bottom,
    rgba(242,161,26,0) 0%, rgba(242,161,26,0.9) 50%, rgba(242,161,26,0) 100%);
  box-shadow: 0 0 26px 6px rgba(242,161,26,0.4);
}

/* Faux finger-tap — a pressed dot inside an expanding ring, fired near the end
   of a screen's hold to read as "user taps -> next screen". */
.seq-tap {
  position: absolute;
  width: 9%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}
.seq-tap-nav { left: 14%; top: 23.5%; }    /* Critique row in the sidebar (frame 01) */
.seq-tap-cta { left: 62%; top: 15%; }       /* "Critique a design" CTA (frame 02) */
.seq-tap-camera { left: 62%; top: 35%; }    /* "Camera" in the capture popover (frame 03) */
.seq-tap-shutter { left: 92%; top: 52%; }   /* shutter on the right edge (frame 04) */
.seq-tap::before {
  content: "";
  position: absolute;
  inset: 26%;
  border-radius: 50%;
  background: rgba(240,110,110,0.9);
}
.seq-tap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(240,110,110,0.55);
  background: rgba(240,110,110,0.15);
}

@media (prefers-reduced-motion: no-preference) {
  .seq-frame { transition: opacity 1.4s var(--ease); }
  .ipad-seq.animate[data-phase="0"] .seq-frame.f1,
  .ipad-seq.animate[data-phase="1"] .seq-frame.f2,
  .ipad-seq.animate[data-phase="2"] .seq-frame.f3,
  .ipad-seq.animate[data-phase="3"] .seq-frame.f4,
  .ipad-seq.animate[data-phase="4"] .seq-frame.f5,
  .ipad-seq.animate[data-phase="5"] .seq-frame.f6 { opacity: 1; }
  .ipad-seq.animate[data-phase="4"] .seq-scan { opacity: 1; }
  .ipad-seq.animate[data-phase="4"] .seq-scan::before { animation: scan 2.7s linear 0.7s; }
  .halo { animation: breathe 7s ease-in-out infinite; }

  .ipad-seq.animate[data-phase="0"] .seq-tap-nav,
  .ipad-seq.animate[data-phase="1"] .seq-tap-cta,
  .ipad-seq.animate[data-phase="2"] .seq-tap-camera { animation: tapShow 1.1s ease-out 1.3s; }
  .ipad-seq.animate[data-phase="0"] .seq-tap-nav::before,
  .ipad-seq.animate[data-phase="1"] .seq-tap-cta::before,
  .ipad-seq.animate[data-phase="2"] .seq-tap-camera::before { animation: tapDot 1.1s ease-out 1.3s; }
  .ipad-seq.animate[data-phase="0"] .seq-tap-nav::after,
  .ipad-seq.animate[data-phase="1"] .seq-tap-cta::after,
  .ipad-seq.animate[data-phase="2"] .seq-tap-camera::after { animation: tapRing 1.1s ease-out 1.3s; }

  /* The camera frame lingers (4s hold); fire the shutter tap LATE so the press
     reads near the end of the linger, just before the scan. */
  .ipad-seq.animate[data-phase="3"] .seq-tap-shutter { animation: tapShow 1.1s ease-out 2.6s; }
  .ipad-seq.animate[data-phase="3"] .seq-tap-shutter::before { animation: tapDot 1.1s ease-out 2.6s; }
  .ipad-seq.animate[data-phase="3"] .seq-tap-shutter::after { animation: tapRing 1.1s ease-out 2.6s; }
}
@keyframes scan {
  0%   { top: -12%; animation-timing-function: ease-in-out; }
  33%  { top: 100%; animation-timing-function: ease-in-out; }
  66%  { top: -12%; animation-timing-function: ease-in-out; }
  100% { top: 100%; }
}
@keyframes tapShow {
  0% { opacity: 0; }
  15% { opacity: 1; }
  78% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes tapDot {
  0% { transform: scale(1.15); }
  22% { transform: scale(0.82); }
  48% { transform: scale(1); }
  100% { transform: scale(1); }
}
@keyframes tapRing {
  0% { transform: scale(0.3); opacity: 0.9; }
  60% { opacity: 0.3; }
  100% { transform: scale(1.5); opacity: 0; }
}
@keyframes breathe {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: var(--sp-7); }
  .hero-stage { order: 2; height: auto; }
  .hero-title { margin-top: var(--sp-4); }
  .ipad-seq { max-width: 560px; margin-inline: auto; }
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(23,18,13,0.72);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav.scrolled {
  border-bottom-color: var(--surface-overlay);
  background: rgba(23,18,13,0.88);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.4rem;
  letter-spacing: 0;
  color: var(--ink-primary);
}
.wm-slash { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}
.nav-links a {
  color: var(--ink-secondary);
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--ink-primary); }
.nav-links a.btn-primary { color: var(--paper-ink); }
.nav-links a.btn-soon { color: var(--ink-muted); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px; height: 40px;
  padding: 9px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  height: 2px; width: 100%;
  background: var(--ink-secondary);
  border-radius: 2px;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-2);
    padding: var(--sp-4) var(--sp-5) var(--sp-5);
    background: var(--surface-raised);
    border-bottom: 1px solid var(--surface-overlay);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding-block: 0.35rem; }
  .nav-links a.btn { justify-content: center; margin-top: var(--sp-2); }
}

/* ---------- Footer ---------- */

.footer {
  background: var(--surface-raised);
  border-top: 1px solid var(--surface-overlay);
  padding-top: var(--sp-7);
  margin-top: var(--sp-8);
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-6);
  padding-bottom: var(--sp-6);
}
.footer-brand .nav-logo { display: inline-block; margin-bottom: var(--sp-2); }
.footer-brand .muted { max-width: 22rem; }
.footer-credit { color: var(--ink-dim); font-size: 0.78rem; margin-top: var(--sp-4); }
.footer-col { display: flex; flex-direction: column; gap: var(--sp-2); }
.footer-head {
  color: var(--ink-muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-1);
}
.footer-col a { color: var(--ink-secondary); font-size: 0.92rem; }
.footer-col a:hover { color: var(--ink-primary); }
.footer-base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--surface-overlay);
}

@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-base { flex-direction: column; gap: var(--sp-2); align-items: flex-start; }
}

/* ---------- Positioning line ---------- */

.positioning { padding-block: clamp(2.5rem, 1.8rem + 3vw, 4.5rem); }
.positioning-line {
  max-width: 34ch;
  margin-inline: auto;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.8rem, 1.35rem + 2vw, 2.8rem);
  line-height: 1.22;
  letter-spacing: 0;
  color: var(--ink-primary);
  font-weight: 400;
}

/* ---------- How it works — steps ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-5);
}
.step-icon {
  display: inline-flex;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}
.step-icon svg { width: 46px; height: 46px; }
.step-num {
  display: block;
  color: var(--accent-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}
.step p { color: var(--ink-body); margin: var(--sp-2) 0 0; }

@media (hover: hover) {
  .step-icon svg { transition: transform 0.25s var(--ease); }
  .step:hover .step-icon svg { transform: translateY(-3px); }
}
@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-6); }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; max-width: 26rem; margin-inline: auto; }
}

/* ---------- Five tools ---------- */

.tool-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--sp-4);
}
.tool {
  padding: var(--sp-5);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.tool-icon {
  display: inline-flex;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}
.tool-icon svg { width: 40px; height: 40px; }
.tool h3 { margin-bottom: var(--sp-2); font-family: var(--font-serif); font-weight: 400; letter-spacing: 0; }
.tool p { color: var(--ink-body); margin: 0; font-size: 0.95rem; }

@media (hover: hover) {
  .tool:hover { transform: translateY(-4px); border-color: var(--ink-dim); }
  .tool:hover .tool-icon svg { transition: transform 0.2s var(--ease); transform: scale(1.08); }
}

/* ---------- Screenshot rail ----------
   Five real iPhone screens in CSS bezels (same treatment as the hero phone),
   evenly spread on desktop; a snap-scrolling filmstrip on narrow screens. */
.shot-rail {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(var(--sp-4), 2.2vw, var(--sp-6));
  align-items: flex-start;
  justify-content: center;
}
.shot {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
}
.phone {
  display: block;
  width: 100%;
  background: #050403;
  border: 1px solid var(--surface-overlay);
  border-radius: clamp(18px, 2.4vw, 30px);
  padding: 5px;
  box-shadow: 0 20px 46px rgba(0,0,0,0.5);
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
  cursor: zoom-in;
}
.phone:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.phone-shot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 520 / 1130;
  object-fit: cover;
  object-position: top center;
  border-radius: clamp(14px, 2vw, 26px);
}
.shot-cap {
  color: var(--ink-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: center;
  line-height: 1.25;
}

@media (hover: hover) {
  .phone { transition: transform 0.25s var(--ease); }
  .shot:hover .phone { transform: translateY(-5px); }
}

/* Narrow screens: swipeable filmstrip so phones stay legible */
@media (max-width: 720px) {
  .shot-rail {
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: var(--sp-4);
    margin-inline: calc(-1 * var(--sp-5));
    padding-inline: var(--sp-5);
    -webkit-overflow-scrolling: touch;
  }
  .shot {
    flex: 0 0 auto;
    width: 46vw;
    max-width: 220px;
    scroll-snap-align: center;
  }
  .phone { cursor: default; }
}

/* Enlarge-on-tap lightbox (desktop) */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.lightbox.open { opacity: 1; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 5, 3, 0.82);
  backdrop-filter: blur(4px);
  cursor: zoom-out;
}
.lightbox-dialog {
  position: relative;
  max-height: 90vh;
  background: #050403;
  border: 1px solid var(--surface-overlay);
  border-radius: 34px;
  padding: 6px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
  transform: scale(0.96);
  transition: transform 0.2s var(--ease);
}
.lightbox.open .lightbox-dialog { transform: none; }
.lightbox-img {
  display: block;
  max-height: calc(90vh - 14px);
  width: auto;
  border-radius: 28px;
}
.lightbox-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--ink-primary);
  border: 1px solid var(--surface-overlay);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover { border-color: var(--ink-dim); }
@media (prefers-reduced-motion: reduce) {
  .lightbox, .lightbox-dialog { transition: none; }
}

/* ---------- Who it's for (personas) ---------- */

.persona-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
}
.persona {
  padding: var(--sp-5);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.persona-icon {
  display: inline-flex;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}
.persona-icon svg { width: 34px; height: 34px; }
.persona h3 { margin-bottom: var(--sp-2); font-size: 1.1rem; }
.persona p { color: var(--ink-body); margin: 0; font-size: 0.92rem; }

@media (hover: hover) {
  .persona:hover { transform: translateY(-3px); border-color: var(--ink-dim); }
}
@media (max-width: 780px) {
  .persona-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .persona-grid { grid-template-columns: 1fr; max-width: 24rem; margin-inline: auto; }
}

/* ---------- Synced everywhere ---------- */

.sync-rail {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(2rem, 7vw, 6rem);
  margin-top: var(--sp-7);
}
/* connecting line behind the nodes */
.sync-rail::before {
  content: "";
  position: absolute;
  top: 34px;
  left: 14%;
  right: 14%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--surface-overlay) 12%, var(--surface-overlay) 88%, transparent);
  z-index: 0;
}
/* amber pulse that flows across the line = syncing */
.sync-rail::after {
  content: "";
  position: absolute;
  top: 31px;
  left: 14%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px 2px rgba(242,161,26,0.6);
  z-index: 0;
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .sync-rail::after { animation: syncflow 3.2s var(--ease) infinite; }
}
@keyframes syncflow {
  0%   { left: 14%; opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { left: 86%; opacity: 0; }
}
.sync-node {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
}
.sync-ic {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--surface-raised);
  border: 1px solid var(--surface-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.sync-ic svg { width: 32px; height: 32px; }
.sync-label { color: var(--ink-secondary); font-size: 0.9rem; }

/* ---------- Pricing ---------- */

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-5);
  max-width: 780px;
  margin-inline: auto;
  align-items: stretch;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface-raised);
  border: 1px solid var(--surface-overlay);
  border-radius: var(--r-md);
  padding: var(--sp-6);
}
.plan-featured {
  border: 2px solid var(--accent);
  background: linear-gradient(180deg, rgba(242,161,26,0.05), transparent 60%), var(--surface-raised);
}
.plan-badge {
  position: absolute;
  top: -12px; left: var(--sp-6);
  background: var(--accent);
  color: var(--paper-ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
}
.plan-name {
  color: var(--ink-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 var(--sp-2);
}
.plan-price { display: flex; align-items: baseline; gap: 4px; }
.plan-amt { font-family: var(--font-serif); font-size: 2.9rem; font-weight: 400; color: var(--ink-primary); letter-spacing: 0; line-height: 1; }
.plan-per { color: var(--ink-muted); font-size: 1rem; }
.plan-note { color: var(--ink-secondary); font-size: 0.9rem; margin: var(--sp-2) 0 0; }
.plan-feats {
  list-style: none;
  margin: var(--sp-5) 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  flex: 1;
}
.plan-feats li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--ink-body);
  font-size: 0.92rem;
}
.plan-feats li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.42em;
  width: 12px; height: 6px;
  border-left: 2px solid var(--ink-dim);
  border-bottom: 2px solid var(--ink-dim);
  transform: rotate(-45deg);
}
/* Pro upgrade rows — the tier deltas, emphasized */
.plan-feats li.feat-up {
  color: var(--ink-primary);
  font-weight: 500;
}
.plan-feats li.feat-up::before {
  border-color: var(--accent);
}
.plan-cta { justify-content: center; width: 100%; }
.plan-fineprint {
  color: var(--ink-muted);
  font-size: 0.78rem;
  text-align: center;
  margin: var(--sp-3) 0 0;
}
.plans-note {
  color: var(--ink-secondary);
  font-size: 0.9rem;
  text-align: center;
  max-width: 34rem;
  margin: var(--sp-5) auto 0;
}

@media (max-width: 620px) {
  .plans { grid-template-columns: 1fr; max-width: 26rem; }
}

/* ---------- FAQ ---------- */

.faq-list { max-width: 44rem; margin-inline: auto; }
.faq-item { border-bottom: 1px solid var(--surface-overlay); }
.faq-item:first-child { border-top: 1px solid var(--surface-overlay); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5) 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink-primary);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent-muted); }
.faq-chev { color: var(--accent); flex-shrink: 0; display: inline-flex; transition: transform 0.25s var(--ease); }
.faq-chev svg { width: 20px; height: 20px; display: block; }
.faq-item[open] .faq-chev { transform: rotate(180deg); }
.faq-a {
  padding: 0 0 var(--sp-5);
  color: var(--ink-body);
  max-width: 54ch;
  line-height: 1.6;
}
.faq-a p { margin: 0; }

/* ---------- Closing CTA band ---------- */

.closing {
  position: relative;
  overflow: hidden;
  text-align: center;
  border-top: 1px solid var(--surface-overlay);
  padding-block: clamp(4.5rem, 3rem + 7vw, 8.5rem);
}
/* Same splash photo behind the closing band — warm-tinted, faded at the top
   and bottom edges so it blends into the page; the amber glow sits on top. */
.closing::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.2;
  filter: sepia(0.55) saturate(1.4) brightness(0.85) contrast(1.05);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 28%, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 28%, #000 72%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.closing-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 75% at 50% 42%, rgba(242,161,26,0.16), transparent 68%);
  pointer-events: none;
  z-index: 1;
}
.closing .container { position: relative; z-index: 2; }
.closing-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--accent);
  font-size: clamp(2.8rem, 1.8rem + 4.5vw, 4.8rem);
  line-height: 1;
  margin: 0;
}
.closing-sub {
  color: var(--ink-secondary);
  font-size: var(--fs-lead);
  margin: var(--sp-4) 0 var(--sp-6);
}

/* ---------- Scroll reveal ----------
   Elements only start hidden when JS is active AND the user allows motion.
   No JS  -> .js never added -> content visible.
   Reduced motion -> media query fails -> content visible. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  }
  .js .reveal.in {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Inner pages (support / privacy / terms) ---------- */

.page-hero {
  padding-top: clamp(3rem, 2rem + 4vw, 5rem);
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid var(--surface-overlay);
  margin-bottom: var(--sp-7);
}
.page-hero h1 { margin-top: var(--sp-4); }
.page-hero .lead { margin-top: var(--sp-3); max-width: 46rem; }

.doc { max-width: 46rem; }
.doc h2 {
  font-size: var(--fs-h3);
  color: var(--ink-primary);
  margin: var(--sp-7) 0 var(--sp-3);
}
.doc h2:first-child { margin-top: 0; }
.doc p { color: var(--ink-body); line-height: 1.7; margin: 0 0 var(--sp-4); }
.doc ul { margin: 0 0 var(--sp-4); padding-left: 1.25rem; }
.doc li { color: var(--ink-body); line-height: 1.7; margin-bottom: var(--sp-2); }
.doc a { color: var(--accent); }
.doc a:hover { color: var(--accent-muted); }
.doc strong { color: var(--ink-secondary); font-weight: 500; }
.doc-updated { color: var(--ink-muted); font-size: var(--fs-sm); }

.callout {
  background: var(--surface-raised);
  border: 1px solid var(--surface-overlay);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  margin: 0 0 var(--sp-6);
}
.callout .h3 { margin-bottom: var(--sp-2); }
.callout p { margin: 0; color: var(--ink-body); }
.callout a { color: var(--accent); font-weight: 500; }
