/* =========================================================================
   ArgilCAD — marketing site design system
   Graphite (neutral engineering) palette + teal accent, dark-first.
   Colors mirror ai_parametric_cad/lib/core/theme/app_theme.dart.
   ========================================================================= */

/* ----- Design tokens ----------------------------------------------------- */
:root {
  /* Graphite dark (default) */
  --bg:            #0b0e0f;
  --bg-2:          #111415;
  --surface:       #15191a;
  --surface-2:     #1d2022;
  --surface-3:     #282a2c;
  --border:        #2a2f31;
  --border-strong: #41484d;
  --text:          #e6e8ea;
  --text-muted:    #aab2b8;
  --text-dim:      #79838a;

  /* Teal accent */
  --accent:        #8cd0e2;
  --accent-2:      #2b6b7f;
  --accent-ink:    #002a34;
  --accent-glow:   rgba(140, 208, 226, 0.35);
  --accent-soft:   rgba(140, 208, 226, 0.10);

  /* Effects */
  --radius:    18px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow:    0 1px 0 rgba(255,255,255,0.04) inset,
               0 20px 50px -20px rgba(0,0,0,0.7);
  --ring:      0 0 0 1px var(--border);
  --maxw:      1160px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);

  --font:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  color-scheme: dark;
}

[data-theme="light"] {
  --bg:            #f8f9fa;
  --bg-2:          #ffffff;
  --surface:       #ffffff;
  --surface-2:     #f1f3f4;
  --surface-3:     #e6e8ea;
  --border:        #dde1e4;
  --border-strong: #c0c7cd;
  --text:          #14181a;
  --text-muted:    #41484d;
  --text-dim:      #6b7479;

  --accent:        #1f6072;
  --accent-2:      #2b6b7f;
  --accent-ink:    #ffffff;
  --accent-glow:   rgba(43, 107, 127, 0.22);
  --accent-soft:   rgba(43, 107, 127, 0.07);

  --shadow: 0 1px 0 rgba(255,255,255,0.6) inset,
            0 18px 40px -24px rgba(20,30,34,0.35);
  color-scheme: light;
}

/* ----- Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

/* Ambient background: subtle grid + teal glow + grain */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(60rem 40rem at 75% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(50rem 36rem at 5% 8%, var(--accent-soft), transparent 55%);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 35%, transparent 78%);
          mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 35%, transparent 78%);
  opacity: 0.5;
  pointer-events: none;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ----- Layout helpers ---------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(64px, 9vw, 132px); position: relative; }
.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent); opacity: 0.6; }

h1, h2, h3 { line-height: 1.08; letter-spacing: -0.03em; font-weight: 650; }
.h-display { font-size: clamp(2.6rem, 6.2vw, 4.6rem); font-weight: 680; }
.h-section { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.28rem); color: var(--text-muted); max-width: 56ch; }
.muted { color: var(--text-muted); }

.grad-text {
  background: linear-gradient(120deg, var(--text) 30%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ----- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 560; font-size: 15px; line-height: 1;
  padding: 14px 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
              border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 0 0 1px var(--accent), 0 14px 34px -12px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--accent), 0 20px 44px -12px var(--accent-glow); }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; }
.btn-sm { padding: 10px 16px; font-size: 14px; }

.tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em;
  padding: 6px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--border);
}

/* ----- Navbar ------------------------------------------------------------ */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 640; font-size: 18px; letter-spacing: -0.02em; }
.brand .logo { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--text-muted); font-size: 15px; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  width: 38px; height: 38px; border-radius: 999px; cursor: pointer;
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
[data-theme="light"] .theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .moon { display: block; }
.nav-toggle { display: none; }

.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px;
  border-radius: 999px; cursor: pointer; text-decoration: none;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
  font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: 0.03em;
  transition: color 0.2s, border-color 0.2s;
}
.lang-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.lang-toggle svg { width: 16px; height: 16px; }

/* ----- Hero -------------------------------------------------------------- */
.hero { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(40px, 6vw, 80px); text-align: center; }
.hero .eyebrow { margin-bottom: 22px; }
.hero h1 { margin-bottom: 22px; }
.hero .lead { margin: 0 auto 34px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 13.5px; color: var(--text-dim); font-family: var(--mono); }

/* Hero visual: Seljuk star with construction wireframe */
.hero-visual {
  margin-top: clamp(48px, 7vw, 88px);
  position: relative; display: grid; place-items: center;
}
.hero-stage {
  position: relative; width: min(640px, 92vw); aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 120% at 50% 0%, var(--surface-2), var(--bg) 70%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid; place-items: center;
}
.hero-stage .grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 38px 38px; opacity: 0.45;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%);
          mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%);
}
.hero-star { width: 54%; filter: drop-shadow(0 0 26px var(--accent-glow)); position: relative; z-index: 1; }
.hero-chip {
  position: absolute; z-index: 2;
  font-family: var(--mono); font-size: 11.5px; color: var(--accent);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hero-chip.tl { top: 14%; left: 8%; }
.hero-chip.br { bottom: 14%; right: 8%; }

/* App-window mockup (hosts a real product screenshot) */
.app-window {
  position: relative; width: min(960px, 94vw);
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  box-shadow: 0 40px 90px -40px rgba(0,0,0,0.75),
              0 0 80px -30px var(--accent-glow);
}
.app-window::before {
  content: ""; position: absolute; inset: -1px -1px auto -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0.5;
}
.app-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; background: var(--bg-2); border-bottom: 1px solid var(--border);
}
.app-bar .dots { display: flex; gap: 7px; }
.app-bar .dots i { width: 11px; height: 11px; border-radius: 999px; background: var(--surface-3); display: block; }
.app-bar .title {
  font-family: var(--mono); font-size: 12px; color: var(--text-dim);
  background: var(--surface); border: 1px solid var(--border);
  padding: 5px 14px; border-radius: 999px; margin-inline: auto;
}
/* Matches the supplied screenshot ratio (1910×1010 ≈ 191/101) so nothing is
   cropped; `contain` keeps any future image fully visible (graceful letterbox). */
.app-body { position: relative; aspect-ratio: 191 / 101; background: var(--bg); }
.app-shot { width: 100%; height: 100%; object-fit: contain; display: block; }
.app-fallback {
  position: absolute; inset: 0; display: grid; place-items: center; gap: 18px;
  background:
    radial-gradient(120% 120% at 50% 0%, var(--surface-2), var(--bg) 70%);
  text-align: center; padding: 24px;
}
.app-fallback .grid-bg { position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 38px 38px; opacity: 0.4;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%);
          mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%); }
.app-fallback .hero-star { width: 30%; }
.app-fallback .ph-note { position: relative; z-index: 1; font-family: var(--mono);
  font-size: 12.5px; color: var(--text-dim); }

/* ----- Logos / proof strip ---------------------------------------------- */
.proof { padding-block: 40px; border-block: 1px solid var(--border); }
.proof-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center;
}
.stat .n { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 680; letter-spacing: -0.03em; }
.stat .n .accent { color: var(--accent); }
.stat .l { font-size: 13.5px; color: var(--text-dim); margin-top: 4px; font-family: var(--mono); }

/* ----- Section headers --------------------------------------------------- */
.sec-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 60px); }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head .eyebrow { margin-bottom: 16px; }
.sec-head h2 { margin-bottom: 14px; }

/* ----- Bento feature grid ------------------------------------------------ */
.bento {
  display: grid; gap: 16px;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(150px, auto);
}
.card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(30rem 14rem at var(--mx, 50%) var(--my, 0%), var(--accent-soft), transparent 70%);
  transition: opacity 0.4s var(--ease);
}
.card:hover::after { opacity: 1; }
.card .ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--border);
  margin-bottom: 18px;
}
.card .ico svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.18rem; margin-bottom: 8px; letter-spacing: -0.02em; }
.card p { color: var(--text-muted); font-size: 15px; }
.col-3 { grid-column: span 3; } .col-2 { grid-column: span 2; } .col-4 { grid-column: span 4; }
.row-2 { grid-row: span 2; }
.card-feature { display: flex; flex-direction: column; }
.card-feature .spacer { flex: 1; min-height: 18px; }
.mini-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.mini-list span { font-family: var(--mono); font-size: 11.5px; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 7px; padding: 5px 9px; }

/* ----- Steps ------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); position: relative; }
.step .num { font-family: var(--mono); font-size: 13px; color: var(--accent);
  border: 1px solid var(--border); border-radius: 8px; padding: 4px 9px; }
.step h3 { font-size: 1.15rem; margin: 18px 0 8px; }
.step p { color: var(--text-muted); font-size: 15px; }

/* ----- Pricing preview --------------------------------------------------- */
.price-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; max-width: 760px; margin-inline: auto; }
.price {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); padding: 32px;
}
.price.pro { border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: linear-gradient(180deg, var(--accent-soft), var(--surface) 60%);
  box-shadow: 0 24px 60px -30px var(--accent-glow); position: relative; }
.price .plan { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.price .plan h3 { font-size: 1.3rem; }
.price .amt { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.04em; margin: 10px 0 4px; }
.price .amt small { font-size: 1rem; font-weight: 500; color: var(--text-dim); }
.price ul { list-style: none; margin: 22px 0; display: grid; gap: 12px; }
.price li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--text-muted); }
.price li svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.price .btn { width: 100%; }

/* ----- CTA band ---------------------------------------------------------- */
.cta-band {
  text-align: center; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 72px);
  background:
    radial-gradient(40rem 20rem at 50% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
  position: relative; overflow: hidden;
}
.cta-band h2 { margin-bottom: 14px; }
.cta-band .lead { margin: 0 auto 28px; }

/* ----- Footer ------------------------------------------------------------ */
.footer { border-top: 1px solid var(--border); padding-block: 56px 36px; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 44px; }
.footer .brand { margin-bottom: 14px; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-dim); margin-bottom: 14px; font-weight: 600; }
.footer-col a { display: block; color: var(--text-muted); font-size: 14.5px; padding: 5px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-about { color: var(--text-muted); font-size: 14.5px; max-width: 34ch; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap; padding-top: 26px; border-top: 1px solid var(--border);
  font-size: 13.5px; color: var(--text-dim); }
.mor-note { font-family: var(--mono); font-size: 12px; }

/* ----- Legal / content pages -------------------------------------------- */
.doc { max-width: 760px; margin-inline: auto; }
.doc .updated { font-family: var(--mono); font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.doc h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 28px; }
.doc h2 { font-size: 1.35rem; margin: 36px 0 12px; }
.doc p, .doc li { color: var(--text-muted); margin-bottom: 12px; }
.doc ul { padding-left: 22px; margin-bottom: 12px; }
.doc a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.callout {
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  background: var(--accent-soft); border-radius: var(--radius-sm);
  padding: 18px 20px; margin: 22px 0; color: var(--text);
}
.callout strong { color: var(--text); }
.doc .back { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono);
  font-size: 13px; color: var(--text-dim); margin-bottom: 22px; }
.doc .back:hover { color: var(--accent); }
.ph { background: color-mix(in srgb, #e0a23a 18%, transparent); color: #e0a23a;
  border: 1px dashed color-mix(in srgb, #e0a23a 55%, transparent); border-radius: 5px;
  padding: 0 6px; font-family: var(--mono); font-size: 0.86em; white-space: nowrap; }

/* Pricing page extras */
.faq { max-width: 760px; margin-inline: auto; display: grid; gap: 12px; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); padding: 18px 20px; }
.faq summary { cursor: pointer; font-weight: 560; list-style: none; display: flex;
  justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--text-muted); font-size: 15px; margin-top: 12px; }

/* Contact cards (support page) */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; max-width: 760px; margin-inline: auto; }
.contact-card { border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 26px; }
.contact-card .ico { width: 42px; height: 42px; border-radius: 11px; display: grid;
  place-items: center; background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--border); margin-bottom: 16px; }
.contact-card .ico svg { width: 20px; height: 20px; }
.contact-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.contact-card a { color: var(--accent); font-family: var(--mono); font-size: 14.5px;
  word-break: break-all; }
.contact-card p { color: var(--text-muted); font-size: 14px; }

/* ----- Scroll reveal ----------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ----- Mobile nav backdrop (created by app.js) --------------------------- */
.nav-backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}
.nav.open ~ .nav-backdrop,
.nav-backdrop.show { opacity: 1; visibility: visible; }
body.menu-open { overflow: hidden; }

/* ----- Responsive -------------------------------------------------------- */
@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .col-3, .col-2, .col-4 { grid-column: span 1; }
  .col-3.wide { grid-column: span 2; }
  .steps { grid-template-columns: 1fr; }
  .proof-grid { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

/* Collapse the nav into a full-width slide-down panel on tablet/phone.
   820px covers tablet-portrait so the link-heavy product/pricing navs
   never overflow. The whole .nav-inner wraps into a vertical panel; the
   toggle is pinned top-right and morphs into an ✕ when open. */
@media (max-width: 820px) {
  .nav-inner { position: relative; flex-wrap: wrap; }

  /* Hamburger / close button — always visible in the bar, top-right. */
  .nav-toggle {
    display: grid; place-items: center; position: absolute; top: 14px; right: 0;
    width: 40px; height: 40px; border-radius: 10px; z-index: 60;
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
    transition: background 0.2s, border-color 0.2s;
  }
  .nav-toggle:hover { border-color: var(--border-strong); }

  /* Closed state: hide menu contents (keep .nav-actions in flow for the toggle). */
  .nav-links { display: none; }
  .nav-actions { gap: 0; }
  .nav-actions .lang-toggle,
  .nav-actions .theme-toggle,
  .nav-actions .btn-primary { display: none; }

  /* Open state: nav-inner becomes the panel. */
  .nav.open { background: var(--surface); border-bottom-color: var(--border); }
  .nav.open .nav-inner { height: auto; row-gap: 0; padding-bottom: 14px; }

  .nav.open .nav-links {
    display: flex; flex-direction: column; flex-basis: 100%; gap: 2px;
    margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--border);
    animation: navPanelIn 0.28s var(--ease) both;
  }
  .nav.open .nav-links a {
    display: flex; align-items: center; min-height: 48px;
    font-size: 1.05rem; color: var(--text);
  }

  /* Opacity-only animation: a transform here would make .nav-actions a
     containing block for the absolutely-positioned toggle and mis-place the ✕. */
  .nav.open .nav-actions {
    flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 10px;
    margin-top: 12px; animation: navFadeIn 0.32s var(--ease) both;
  }
  .nav.open .nav-actions .lang-toggle,
  .nav.open .nav-actions .theme-toggle {
    display: inline-flex; width: 100%; height: 48px; justify-content: center;
  }
  .nav.open .nav-actions .btn-primary { display: inline-flex; width: 100%; height: 48px; }

  /* Toggle → ✕ when open (centered). */
  .nav.open .nav-toggle svg { display: none; }
  .nav.open .nav-toggle::before,
  .nav.open .nav-toggle::after {
    content: ""; position: absolute; top: 50%; left: 50%;
    width: 18px; height: 2px; margin: -1px 0 0 -9px;
    background: currentColor; border-radius: 2px;
  }
  .nav.open .nav-toggle::before { transform: rotate(45deg); }
  .nav.open .nav-toggle::after  { transform: rotate(-45deg); }
}
@keyframes navPanelIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
@keyframes navFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .price-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .hero-chip { display: none; }
}

/* Phone: single-column cards, tighter gutters, full-width tap targets. */
@media (max-width: 520px) {
  .container { padding-inline: 18px; }
  .h-display { font-size: clamp(2.1rem, 9vw, 2.8rem); }
  .bento { grid-template-columns: 1fr; }
  .col-3.wide { grid-column: span 1; }
  .card { padding: 20px; }
  .price { padding: 24px; }
  .proof-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn,
  .cta-band .hero-cta .btn { width: 100%; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
