/* ── TOKENS (Sage & Sand default) ── */
:root {
  --bg-primary:           #FDFAF5;
  --bg-secondary:         #F5EFE4;
  --bg-tertiary:          #EDE4D4;
  --accent-primary:       #7D9B7A;
  --accent-light:         #A8C2A5;
  --accent-pale:          #D4E4D2;
  --accent-warm:          #C4955A;
  --accent-warm-light:    #E8C99A;
  --accent-warm-pale:     #FBF0DC;
  --text-dark:            #2D3748;
  --text-mid:             #4A5568;
  --text-soft:            #718096;
  --text-xsoft:           #A0AEC0;
  --border-color:         rgba(125,155,122,0.2);
  --border-subtle:        rgba(125,155,122,0.12);
  --card-bg:              #FFFFFF;
  --nav-bg:               rgba(253,250,245,0.92);
  --glow-color:           rgba(168,194,165,0.28);
  --btn-gradient:         linear-gradient(145deg, #7D9B7A, #5E8A5B);
  --btn-shadow:           rgba(125,155,122,0.40);
}

/* ── TOKENS (Dusk) ── */
[data-theme="dusk"] {
  --bg-primary:           #1E1A2E;
  --bg-secondary:         #2A2540;
  --bg-tertiary:          #332E4A;
  --accent-primary:       #9B8EC4;
  --accent-light:         #B5ADDA;
  --accent-pale:          #3D3660;
  --accent-warm:          #E8A87C;
  --accent-warm-light:    #F2C9A8;
  --accent-warm-pale:     #3A2E1A;
  --text-dark:            #EDE9F7;
  --text-mid:             #C5BFDB;
  --text-soft:            #8E87A8;
  --text-xsoft:           #6A6480;
  --border-color:         rgba(155,142,196,0.25);
  --border-subtle:        rgba(155,142,196,0.14);
  --card-bg:              #252038;
  --nav-bg:               rgba(30,26,46,0.94);
  --glow-color:           rgba(155,142,196,0.18);
  --btn-gradient:         linear-gradient(145deg, #9B8EC4, #7B6EA4);
  --btn-shadow:           rgba(155,142,196,0.40);
}

/* Dusk — ambient section override (it's already dark, lighten it slightly) */
[data-theme="dusk"] .ambient-section {
  background: #13111F;
}
[data-theme="dusk"] .ambient-visual .img-placeholder {
  background: #1A1730;
}

/* Theme transition */
body, nav, section, footer, .testimonial-card, .faq-item, .pricing-card,
.feature-visual, .ambient-section, .problem-section, .testimonials-section,
.faq-section, .screen-main, .screen-ambient {
  transition: background 0.45s ease, color 0.45s ease,
              border-color 0.45s ease, box-shadow 0.45s ease;
}

/* ── THEME TOGGLE BUTTON ── */
.theme-toggle {
  display: flex; align-items: center; gap: 7px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  border-radius: 22px; padding: 5px 12px 5px 8px;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem; color: var(--text-soft);
  letter-spacing: 0.06em;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent-light); color: var(--accent-primary); }
.toggle-swatches {
  display: flex; gap: 3px; align-items: center;
}
.t-swatch {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1.5px solid transparent; transition: transform 0.2s, border-color 0.2s;
}
.t-swatch.sage  { background: linear-gradient(135deg, #7D9B7A, #C4955A); }
.t-swatch.dusk  { background: linear-gradient(135deg, #9B8EC4, #E8A87C); }
.t-swatch.active { border-color: var(--text-mid); transform: scale(1.2); }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Keyboard focus (skip mouse-only outlines) */
a:focus-visible,
button:focus-visible,
.btn-primary:focus-visible,
.nav-cta:focus-visible,
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-primary);
  color: var(--text-dark);
  overflow-x: hidden;
}

/* subtle page-level glow */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 8% 5%,  var(--glow-color) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 92% 88%, rgba(196,149,90,0.09) 0%, transparent 55%);
}

/* ═══════════════════════════════
   NAV (top bar only — not <nav> in footer)
═══════════════════════════════ */
body > nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 60px;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
}
.logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.65rem; font-weight: 300; letter-spacing: 0.05em;
  color: var(--text-mid); text-decoration: none;
}
.logo span { color: var(--accent-primary); }
.nav-links {
  display: flex; gap: 36px; align-items: center; list-style: none;
}
.nav-links a {
  text-decoration: none; color: var(--text-soft);
  font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--accent-primary); }
.nav-cta {
  padding: 8px 22px;
  background: var(--btn-gradient);
  color: white; border: none; border-radius: 22px;
  font-family: 'DM Sans', sans-serif; font-size: 0.8rem; font-weight: 500;
  cursor: pointer; text-decoration: none;
  box-shadow: 0 3px 12px var(--btn-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  letter-spacing: 0.02em;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 5px 18px var(--btn-shadow); }

/* Nav layout: [logo] [collapse + actions | burger] */
.nav-top-right {
  display: flex; flex: 1; align-items: center; justify-content: space-between;
  min-width: 0; margin-left: 32px; gap: 20px;
}
.nav-collapse {
  display: flex; flex: 1; align-items: center; justify-content: space-between;
  min-width: 0; gap: 20px;
}
.nav-actions {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.nav-burger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 44px; height: 44px; padding: 0; flex-shrink: 0;
  background: transparent; border: none; border-radius: 10px; cursor: pointer;
  color: var(--text-mid);
  transition: background 0.2s, color 0.2s;
}
.nav-burger:hover { background: var(--bg-secondary); color: var(--text-dark); }
.nav-burger-line {
  display: block; width: 22px; height: 2px; border-radius: 1px;
  background: currentColor; transition: transform 0.3s ease, opacity 0.2s;
}
body.nav-menu-open .nav-burger .nav-burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.nav-menu-open .nav-burger .nav-burger-line:nth-child(2) { opacity: 0; }
body.nav-menu-open .nav-burger .nav-burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ═══════════════════════════════
   HERO
═══════════════════════════════ */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 40px 80px;
}
.beta-banner {
  display: inline-flex; align-items: center;
  padding: 8px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--accent-warm-light);
  border-radius: 999px;
  background: var(--accent-warm-pale);
  color: var(--accent-warm);
  font-size: 0.68rem; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.beta-banner:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(196,149,90,0.18);
}
.beta-banner:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}
.hero-eyebrow {
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent-primary); margin-bottom: 22px;
  display: flex; align-items: center; gap: 10px;
}
.hero-eyebrow::before,
.hero-eyebrow::after {
  content: ''; display: block; width: 28px; height: 1px;
  background: var(--accent-light);
}
.hero-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 300; line-height: 1.12;
  color: var(--text-dark);
  max-width: 780px;
  margin-bottom: 26px;
}
.hero-headline em { font-style: italic; color: var(--accent-primary); }
.hero-sub {
  font-size: 1.02rem; color: var(--text-soft);
  max-width: 480px; line-height: 1.72;
  margin-bottom: 44px;
}
.hero-cta-group {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.btn-primary {
  padding: 14px 38px;
  background: var(--btn-gradient);
  color: white; border: none; border-radius: 30px;
  font-family: 'DM Sans', sans-serif; font-size: 0.92rem; font-weight: 500;
  cursor: pointer; text-decoration: none;
  box-shadow: 0 4px 20px var(--btn-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  letter-spacing: 0.02em; display: inline-block;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px var(--btn-shadow); }
.hero-trial-note {
  font-size: 0.72rem; color: var(--text-xsoft); letter-spacing: 0.04em;
}

/* ── Hero two-screen image ── */
.hero-visual {
  position: relative; margin-top: 70px;
  width: 100%; max-width: 1000px;
}
.hero-screens {
  display: flex; gap: 20px; align-items: flex-end;
  justify-content: center;
}
.screen-main {
  width: 68%; border-radius: 14px;
  border: 2px solid var(--border-color);
  box-shadow: 0 20px 60px rgba(45,55,72,0.12), 0 4px 16px rgba(45,55,72,0.07);
  overflow: hidden; background: var(--bg-secondary);
  aspect-ratio: 16/9; position: relative;
}
.screen-ambient {
  width: 30%; border-radius: 10px;
  border: 2px solid var(--border-color);
  box-shadow: 0 12px 40px rgba(45,55,72,0.10), 0 2px 8px rgba(45,55,72,0.06);
  overflow: hidden;
  aspect-ratio: 16/9; position: relative;
}
.screen-img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
/* Image placeholder styling */
.img-placeholder {
  width: 100%; height: 100%;
  background: var(--bg-tertiary);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; color: var(--text-xsoft);
  font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.img-placeholder svg { opacity: 0.3; }
.img-placeholder .img-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem; color: var(--text-xsoft);
  background: var(--bg-secondary);
  padding: 3px 10px; border-radius: 6px;
  border: 1px dashed var(--border-color);
}

/* Screen labels */
.screen-label {
  position: absolute; bottom: 12px; left: 50%;
  transform: translateX(-50%);
  background: rgba(253,250,245,0.88); backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: 20px; padding: 4px 14px;
  font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-soft); white-space: nowrap;
}

/* ═══════════════════════════════
   SECTION WRAPPER
═══════════════════════════════ */
section {
  position: relative; z-index: 1;
  padding: 100px 60px;
}
.section-inner {
  max-width: 1040px; margin: 0 auto;
}
.section-label {
  font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent-primary); margin-bottom: 14px;
}
.section-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300; line-height: 1.15; color: var(--text-dark);
  margin-bottom: 18px;
}
.section-heading em { font-style: italic; color: var(--accent-primary); }
.section-sub {
  font-size: 0.93rem; color: var(--text-soft); line-height: 1.72;
  max-width: 520px;
}

/* ═══════════════════════════════
   FEATURE STRIP (problem framing)
═══════════════════════════════ */
.problem-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.problem-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px;
  margin-top: 60px;
}
.problem-item {
  display: flex; flex-direction: column; gap: 12px;
}
.problem-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent-pale); border: 1px solid var(--accent-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.problem-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.18rem; font-weight: 400; color: var(--text-dark);
}
.problem-body {
  font-size: 0.84rem; color: var(--text-soft); line-height: 1.7;
}

/* ═══════════════════════════════
   FEATURES — alternating rows
═══════════════════════════════ */
.features-section { padding: 80px 60px; }
.feature-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center;
  padding: 72px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.feature-row:last-child { border-bottom: none; }
.feature-row.reverse .feature-text { order: 2; }
.feature-row.reverse .feature-visual { order: 1; }
.feature-text { display: flex; flex-direction: column; gap: 16px; }
.feature-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-primary);
  background: var(--accent-pale); border: 1px solid var(--accent-light);
  border-radius: 20px; padding: 3px 12px; width: fit-content;
}
.feature-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem; font-weight: 300; line-height: 1.2; color: var(--text-dark);
}
.feature-title em { font-style: italic; color: var(--accent-primary); }
.feature-body {
  font-size: 0.87rem; color: var(--text-soft); line-height: 1.78;
}
.feature-points { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.feature-points li {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 0.83rem; color: var(--text-mid); line-height: 1.55;
}
.feature-points li::before {
  content: '';
  display: block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent-primary); flex-shrink: 0; margin-top: 6px;
}
.feature-visual {
  border-radius: 14px; overflow: hidden;
  border: 2px solid var(--border-color);
  box-shadow: 0 12px 40px rgba(45,55,72,0.09), 0 3px 10px rgba(45,55,72,0.05);
  aspect-ratio: 16/9; background: var(--bg-secondary);
}

/* ═══════════════════════════════
   AMBIENT HIGHLIGHT (full-bleed)
═══════════════════════════════ */
.ambient-section {
  background: var(--text-dark);
  padding: 110px 60px;
  overflow: hidden;
}
.ambient-inner {
  max-width: 1040px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center;
}
.ambient-text .section-label { color: var(--accent-light); }
.ambient-text .section-heading { color: #F7F4EE; }
.ambient-text .section-heading em { color: var(--accent-warm-light); }
.ambient-text .section-sub { color: rgba(247,244,238,0.6); max-width: 420px; }
.ambient-feature-list {
  list-style: none; display: flex; flex-direction: column;
  gap: 14px; margin-top: 32px;
}
.ambient-feature-list li {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.84rem; color: rgba(247,244,238,0.75); line-height: 1.5;
}
.ambient-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-warm-light); flex-shrink: 0;
}
.ambient-visual {
  border-radius: 14px; overflow: hidden;
  border: 2px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  aspect-ratio: 16/9;
}
.ambient-visual .img-placeholder {
  background: #2A3340;
}
.ambient-visual .img-placeholder .img-name {
  background: #1E2830; border-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.35);
}

/* ═══════════════════════════════
   TESTIMONIALS
═══════════════════════════════ */
.testimonials-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.testimonials-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 28px; margin-top: 52px;
}
.testimonial-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px; padding: 28px 26px;
  display: flex; flex-direction: column; gap: 18px;
  transition: box-shadow 0.25s;
}
.testimonial-card:hover {
  box-shadow: 0 6px 28px rgba(125,155,122,0.12);
}
.testimonial-quote {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.07rem; font-weight: 300; font-style: italic;
  color: var(--text-mid); line-height: 1.65;
}
.testimonial-attribution {
  display: flex; align-items: center; gap: 12px;
  margin-top: auto;
}
.t-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem; font-weight: 500; color: var(--accent-primary);
  border: 1.5px solid var(--accent-light); flex-shrink: 0;
}
.t-name { font-size: 0.8rem; font-weight: 500; color: var(--text-dark); }
.t-title { font-size: 0.7rem; color: var(--text-xsoft); }

/* ═══════════════════════════════
   PRICING
═══════════════════════════════ */
.pricing-section { text-align: center; }
.pricing-card {
  max-width: 440px; margin: 52px auto 0;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px; padding: 40px 40px 36px;
  box-shadow: 0 8px 32px rgba(125,155,122,0.10);
}
.pricing-plan-name {
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-primary); margin-bottom: 18px;
}
.pricing-amount {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.8rem; font-weight: 300; color: var(--text-dark);
  line-height: 1; margin-bottom: 4px;
}
.pricing-amount sup {
  font-size: 1.6rem; vertical-align: super; line-height: 0;
}
.pricing-interval {
  font-size: 0.8rem; color: var(--text-xsoft); margin-bottom: 6px;
}
.pricing-annual {
  font-size: 0.77rem; color: var(--accent-warm);
  background: var(--accent-warm-pale);
  border: 1px solid var(--accent-warm-light);
  border-radius: 20px; padding: 3px 12px;
  display: inline-block; margin-bottom: 32px;
}
.pricing-features {
  list-style: none; display: flex; flex-direction: column;
  gap: 11px; margin-bottom: 32px; text-align: left;
}
.pricing-features li {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.84rem; color: var(--text-mid);
}
.pricing-check {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-pale); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.pricing-check svg { display: block; }
.pricing-divider { height: 1px; background: var(--border-subtle); margin: 24px 0; }
.pricing-cta {
  display: block; width: 100%; padding: 13px;
  background: var(--btn-gradient);
  color: white; border: none; border-radius: 12px;
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 500;
  cursor: pointer; text-decoration: none;
  box-shadow: 0 3px 14px var(--btn-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 10px;
}
.pricing-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 20px var(--btn-shadow); }
.pricing-note {
  font-size: 0.71rem; color: var(--text-xsoft); text-align: center;
}

/* ═══════════════════════════════
   FAQ
═══════════════════════════════ */
.faq-section { background: var(--bg-secondary); border-top: 1px solid var(--border-subtle); }
.faq-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; margin-top: 52px;
}
.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px; padding: 24px 26px;
}
.faq-q {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem; font-weight: 400; color: var(--text-dark);
  margin-bottom: 10px;
}
.faq-a {
  font-size: 0.83rem; color: var(--text-soft); line-height: 1.72;
}
.faq-a a { color: var(--accent-primary); text-decoration: none; }
.faq-a a:hover { text-decoration: underline; }

/* ═══════════════════════════════
   FINAL CTA
═══════════════════════════════ */
.final-cta-section {
  text-align: center; padding: 120px 60px;
}
.final-cta-section .section-heading { max-width: 640px; margin: 0 auto 18px; }
.final-cta-section .section-sub { margin: 0 auto 44px; text-align: center; }

/* ═══════════════════════════════
   FOOTER
═══════════════════════════════ */
footer {
  position: relative; z-index: 1;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-subtle);
  padding: 40px 60px;
}
.footer-inner {
  max-width: 1040px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 20px;
}
.footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem; font-weight: 300; color: var(--text-soft);
  text-decoration: none;
}
.footer-logo span { color: var(--accent-primary); }
.footer-tagline {
  font-size: 0.72rem; color: var(--text-xsoft);
  letter-spacing: 0.06em; margin-top: 3px;
}
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a {
  text-decoration: none; font-size: 0.75rem; color: var(--text-soft);
  letter-spacing: 0.04em; transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent-primary); }
.footer-copy {
  font-size: 0.69rem; color: var(--text-xsoft);
  letter-spacing: 0.04em; width: 100%;
}

/* ═══════════════════════════════
   THEMED SCREEN IMAGES
═══════════════════════════════ */
.screen-img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: opacity 0.35s ease;
}
.screen-img.fading { opacity: 0; }

/* ═══════════════════════════════
   SCROLL REVEAL ANIMATION
═══════════════════════════════ */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── LIGHTBOX ── */
.lightbox-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; cursor: zoom-out;
}
.lightbox-overlay.open { display: flex; }
.lightbox-img {
  max-width: 90vw; max-height: 90vh;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.22);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  object-fit: contain;
}
.screen-img { cursor: zoom-in; }

/* Mobile drawer backdrop — hidden on desktop */
.nav-backdrop { display: none; }

/* ═══════════════════════════════
   MOBILE & TABLET (≤900px)
═══════════════════════════════ */
@media (max-width: 900px) {
  html { scroll-padding-top: 72px; }

  /* blur creates a containing block — would trap fixed .nav-collapse in the short header = scrollbar there */
  body > nav {
    padding: 10px max(16px, env(safe-area-inset-left)) 10px max(16px, env(safe-area-inset-right));
    padding-top: max(10px, env(safe-area-inset-top));
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow: visible;
  }
  .logo { font-size: 1.45rem; }

  .nav-top-right {
    margin-left: 12px; flex: 1; justify-content: flex-end; min-width: 0; overflow: visible;
  }
  .nav-burger { display: flex; z-index: 120; position: relative; }
  .nav-backdrop {
    display: block;
    position: fixed; z-index: 98; inset: 0;
    background: rgba(0,0,0,0.35);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s;
  }
  body.nav-menu-open .nav-backdrop {
    opacity: 1; visibility: visible; pointer-events: auto;
  }

  /* Full-width panel fixed to viewport, starts below the bar (not a child-sized trap) */
  .nav-collapse {
    position: fixed;
    z-index: 99;
    left: 0;
    right: 0;
    top: calc(env(safe-area-inset-top) + 3.35rem);
    bottom: auto;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0;
    flex: none; flex-direction: column;
    align-items: stretch; justify-content: flex-start; gap: 0;
    /* Closed: no height, no in-header scroll */
    max-height: 0;
    min-height: 0;
    padding: 0 max(20px, env(safe-area-inset-left)) 0 max(20px, env(safe-area-inset-right));
    overflow: hidden;
    background: var(--nav-bg);
    border: 0;
    box-shadow: none;
    -webkit-overflow-scrolling: touch;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: none;
    transition: max-height 0.4s ease, padding 0.4s ease, box-shadow 0.35s ease, opacity 0.25s ease, visibility 0.25s;
  }
  body.nav-menu-open .nav-collapse {
    max-height: min(75vh, calc(100vh - env(safe-area-inset-top) - 3.35rem - env(safe-area-inset-bottom) - 12px));
    padding: 12px max(20px, env(safe-area-inset-left)) 20px max(20px, env(safe-area-inset-right));
    overflow-y: auto;
    overflow-x: hidden;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0,0,0,0.14);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-links {
    flex-direction: column; align-items: stretch; gap: 0; width: 100%;
  }
  .nav-links li { border-bottom: 1px solid var(--border-subtle); }
  .nav-links a {
    display: block; padding: 16px 6px; font-size: 0.85rem;
  }

  .nav-actions {
    flex-direction: column; align-items: stretch; width: 100%;
    margin-top: 12px; gap: 16px; padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
  }
  .nav-actions .theme-toggle {
    justify-content: center; min-height: 48px; padding: 10px 16px; font-size: 0.78rem;
  }
  .nav-actions .t-swatch { width: 14px; height: 14px; }
  .nav-actions .nav-cta {
    text-align: center; padding: 14px 20px; font-size: 0.85rem;
  }

  body.nav-menu-open {
    overflow: hidden;
    touch-action: none;
  }

  /* Section & layout density */
  section {
    padding: 48px max(20px, env(safe-area-inset-left)) 56px max(20px, env(safe-area-inset-right));
  }
  .hero {
    min-height: min(100dvh, 100vh);
    padding: 88px max(20px, env(safe-area-inset-left)) 48px max(20px, env(safe-area-inset-right));
  }
  .hero-visual { margin-top: 40px; }

  .hero-screens {
    flex-direction: column; align-items: stretch; gap: 16px;
  }
  .screen-main, .screen-ambient { width: 100% !important; }

  .problem-grid {
    grid-template-columns: 1fr; gap: 36px; margin-top: 40px;
  }

  .features-section { padding: 40px max(20px, env(safe-area-inset-left)) 40px max(20px, env(safe-area-inset-right)) !important; }
  .feature-row {
    grid-template-columns: 1fr; gap: 32px; padding: 44px 0; align-items: start;
  }
  .feature-row .feature-text { order: 1 !important; }
  .feature-row .feature-visual { order: 2 !important; }

  .ambient-section { padding: 56px max(20px, env(safe-area-inset-left)) 64px max(20px, env(safe-area-inset-right)) !important; }
  .ambient-inner { grid-template-columns: 1fr; gap: 40px; }
  .ambient-text .section-sub { max-width: none; }

  .testimonials-grid { grid-template-columns: 1fr; gap: 20px; margin-top: 36px; }

  .faq-grid { grid-template-columns: 1fr; gap: 16px; margin-top: 36px; }

  .final-cta-section { padding: 64px max(20px, env(safe-area-inset-left)) 64px max(20px, env(safe-area-inset-right)) !important; }

  footer {
    padding: 32px max(20px, env(safe-area-inset-left)) 36px max(20px, env(safe-area-inset-right));
  }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-links { gap: 16px; }
}

/* Small phones (≤480px) */
@media (max-width: 480px) {
  .hero-headline { font-size: clamp(2.2rem, 8vw, 2.8rem); }
  .hero-eyebrow::before, .hero-eyebrow::after { width: 18px; }
  .pricing-amount { font-size: clamp(2.4rem, 12vw, 3.2rem); }
  body > nav { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
}

/* Reduced motion (keep theme color transitions on body) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.visible,
  .nav-collapse, .nav-burger-line, .nav-backdrop {
    transition: none !important; animation: none !important;
  }
}

