/* Raaz Education — public site (landing + legal pages)
   Source: Figma "french-app" › landing (node 105:2). Design width 1440px.

   Shared by:
   - frontend/src/pages/Landing.tsx  (signed-out home at "/", loaded on mount)
   - backend/resources/views/legal/*  (/legal/privacy, /legal/terms, /account-deletion)
   Served from frontend/public/site/ → https://edu.raazvisa.com/site/ with a
   1-year immutable cache, so both consumers append a content hash (?v=…). */

@font-face {
  font-family: "Shabnam FD";
  src: url("assets/fonts/Shabnam-FD.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Shabnam FD";
  src: url("assets/fonts/Shabnam-Bold-FD.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette (Figma 106:3) */
  --primary: #6b8ff2;
  --secondary: #d3dff9;
  --accent: #f2b84b;
  --bg: #fcfcfc;
  --surface: #ffffff;
  --text: #202124;
  --text-muted: #5f6368;
  --success: #38b27d;
  --error: #e85d75;
  --border: rgba(217, 217, 217, 0.67);
  --pill: rgba(211, 223, 249, 0.3);

  --font: "Shabnam FD", Tahoma, "Segoe UI", sans-serif;
  --container: 1272px;
  --gutter: 24px;
  --header-h: 151px;
  --header-h-compact: 88px;
  --phone-shadow: 0 14px 14px rgba(0, 0, 0, 0.25);
  --phone-shadow-sm: 0 4px 4px rgba(0, 0, 0, 0.25);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 8px; }

.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* React mount point: the SPA shell's <body> carries its own utility classes. */
.rz-landing {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}
/* The app's index.css sets `unicode-bidi: plaintext` on text blocks, which would
   make lines that start with a Latin word ("Raaz Education", "AI") lay out LTR.
   The landing copy is RTL throughout, so use the inherited direction instead. */
.rz-landing :is(p, h1, h2, h3, h4, li, figcaption, blockquote) { unicode-bidi: normal; }

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -100px; z-index: 100;
  background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 12px;
}
.skip-link:focus { top: 12px; }

.section { padding-block: 56px; scroll-margin-top: calc(var(--header-h-compact) + 8px); }

.section-title {
  color: var(--primary);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.5px;
}

/* ---------- Scalable artwork ----------
   Children are placed with the exact Figma coordinates (design px) and scale
   with the artwork's width via container query units. */
.art {
  position: relative;
  width: 100%;
  container-type: inline-size;
  aspect-ratio: var(--W) / var(--H);
  --u: calc(100cqw / var(--W));
}
.art .p {
  position: absolute;
  left: calc(var(--x) * var(--u));
  top: calc(var(--y) * var(--u));
  width: calc(var(--w) * var(--u));
  height: calc(var(--h) * var(--u));
}
.art .rot { display: flex; align-items: center; justify-content: center; }
.art .rot > * { flex: none; }
.art .phone { width: 100%; height: 100%; object-fit: cover; }

/* sparkle stroke (Figma Line 1–9): 30.096 × 5.021 */
.art .spark img {
  width: calc(30.0962 * var(--u));
  height: calc(5.02057 * var(--u));
  transform: rotate(var(--r));
}

/* ---------- Header (Figma 122:6) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  transition: box-shadow 0.25s ease;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: var(--header-h);
  padding-top: 10px;
  transition: min-height 0.25s ease, padding 0.25s ease;
}
.brand { flex: none; padding: 10px; }
.brand img { width: 121px; height: 121px; transition: width 0.25s ease, height 0.25s ease; }

.main-nav { display: flex; align-items: center; gap: 10px; }
.main-nav a {
  padding: 15px;
  border-radius: 30px;
  font-size: 24px;
  line-height: 32px;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.main-nav a:hover,
.main-nav a[aria-current="true"] { background: var(--pill); color: var(--primary); }
.main-nav a[aria-current="true"] { font-weight: 700; }

.btn-waitlist {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 219px; height: 96px;
  border-radius: 16px;
  background: var(--primary);
  color: #fff;
  font-size: 24px; font-weight: 700; line-height: 32px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease,
              width 0.25s ease, height 0.25s ease, font-size 0.25s ease;
}
.btn-waitlist:hover { background: #5a7fe6; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(107, 143, 242, 0.45); }
.btn-waitlist:active { transform: translateY(0); }

.site-header.is-scrolled { box-shadow: 0 1px 0 var(--border), 0 8px 24px rgba(32, 33, 36, 0.06); }
.site-header.is-scrolled .header-inner { min-height: var(--header-h-compact); padding-top: 0; }
.site-header.is-scrolled .brand img { width: 64px; height: 64px; }
.site-header.is-scrolled .btn-waitlist { width: 168px; height: 56px; font-size: 20px; }

.nav-toggle { display: none; }

/* ---------- Hero (Figma 112:509) ---------- */
.hero { overflow-x: clip; padding-bottom: 48px; }
.hero-inner { display: flex; align-items: flex-start; gap: 57px; }
.hero-copy { flex: 0 0 650px; padding-top: 107px; letter-spacing: 0.5px; }
.hero-copy h1 { font-size: 40px; font-weight: 400; line-height: 56px; }
.hero-copy h1 .hl { color: var(--primary); }
.hero-copy > p { margin-top: 24px; font-size: 16px; line-height: 1.6; }
.hero-copy .store-badges { margin-top: 40px; }

.hero-art-col { flex: 1 1 0; min-width: 0; }
.hero-art { --W: 746; --H: 406; width: 132%; } /* bleeds off the left edge like the design */

.paris { --x: 0; --y: 0; --w: 370; --h: 354; overflow: hidden; opacity: 0.8; }
.paris img { position: absolute; top: 0; left: -65.41%; width: 165.41%; height: 115.25%; max-width: none; }
.hero-blob { --x: 371.73; --y: 70; --w: 476.004; --h: 406.281; }
.hero-blob img { width: calc(404.359 * var(--u)); height: calc(258.565 * var(--u)); transform: rotate(-25.24deg); }
.hero-phone-signin { --x: 477.73; --y: 20; --w: 163.731; --h: 302.508; }
.hero-phone-signin img { width: calc(130 * var(--u)); height: calc(289 * var(--u)); transform: rotate(-6.89deg); }
.hero-phone-syllabus { --x: 241; --y: 27; --w: 163.731; --h: 302.403; }
.hero-phone-syllabus img { width: calc(130 * var(--u)); height: calc(288.889 * var(--u)); transform: rotate(6.89deg); }
.hero-phone-signin img,
.hero-phone-syllabus img { border-radius: calc(15 * var(--u)); box-shadow: var(--phone-shadow); object-fit: cover; }
.hero-phone-home { --x: 373.73; --y: 30; --w: 148; --h: 329; }
.hero-phone-home img { border-radius: calc(20 * var(--u)); box-shadow: var(--phone-shadow); }
.hs1 { --x: 666.36; --y: 298;    --w: 23.899; --h: 13.798; --r: -150deg; }
.hs2 { --x: 657.82; --y: 311.48; --w: 17.738; --h: 21.14;  --r: -130deg; }
.hs3 { --x: 645;    --y: 320.61; --w: 4.792;  --h: 27.177; --r: -100deg; }

/* ---------- Store badges ---------- */
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.store-badge {
  display: block;
  width: 222px;
  aspect-ratio: 800 / 240;           /* badge art occupies rows 282–518 of the 800² image */
  overflow: hidden;
  border-radius: 12px;
  transition: transform 0.15s ease, filter 0.2s ease;
}
.store-badge img { width: 100%; height: 100%; object-fit: cover; }
.store-badge:hover { transform: translateY(-2px); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.18)); }

/* ---------- Why / تفاوت ما (Figma 111:414) ---------- */
.why-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.why-head { flex: 0 0 221px; }
.why-head .section-title { margin-bottom: 32px; white-space: nowrap; }
.why-tagline { font-size: 20px; line-height: 36px; letter-spacing: 0.5px; }

.why-cards { display: flex; gap: 50px; }
.card {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  width: 300px; min-height: 120px;
  padding: 10px 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(107, 143, 242, 0.14); }
.card-icon { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; }
.card-icon img { max-width: none; }
.card h3 { font-size: 14px; font-weight: 700; line-height: 16px; letter-spacing: 0.5px; text-align: center; color: #000; }
.card p { align-self: stretch; font-size: 14px; line-height: 1.4; color: #000; }

/* ---------- How / نحوه کار (Figma 112:508) ---------- */
.how { overflow-x: clip; }
.how-inner { display: flex; align-items: center; }
.how-copy { flex: 0 0 510px; }
.how-copy .section-title { margin-bottom: 48px; }
.how-copy .lead { font-size: 20px; line-height: 36px; letter-spacing: 0.5px; min-height: 72px; }
.steps { display: flex; flex-direction: column; gap: 11px; margin-top: 34px; }
.steps li { display: flex; align-items: center; gap: 13px; min-height: 52px; }
.step-num {
  flex: none;
  display: grid; place-items: center;
  width: 52px; height: 52px;
  background: url("assets/step-circle.svg") center / 52px 52px no-repeat;
  color: #fff;
  font-size: 20px; line-height: 36px; letter-spacing: 0.5px;
}
.steps h3 { font-size: 15px; font-weight: 700; line-height: 16px; letter-spacing: 0.5px; }
.steps p { margin-top: 15px; font-size: 15px; line-height: 1.4; }

.how-art-col { flex: 0 1 694.68px; min-width: 0; }
.how-art { --W: 694.68; --H: 504.26; }
.how-blob { --x: 0; --y: 0; --w: 509.682; --h: 504.26; }
.how-blob img { width: calc(404.359 * var(--u)); height: calc(313.242 * var(--u)); transform: rotate(-137.41deg) scaleY(-1); }
.how-phone { --x: 219.68; --y: 16.63; --w: 185; --h: 411; }
.how-phone img { border-radius: calc(20 * var(--u)); box-shadow: var(--phone-shadow); }
.ws1 { --x: 423.36; --y: 412;    --w: 23.899; --h: 13.798; --r: -150deg; }
.ws2 { --x: 414.82; --y: 425.48; --w: 17.738; --h: 21.14;  --r: -130deg; }
.ws3 { --x: 402;    --y: 434.61; --w: 4.792;  --h: 27.177; --r: -100deg; }
.ws4 { --x: 184;    --y: 12.98;  --w: 23.899; --h: 13.798; --r: 30deg; }
.ws5 { --x: 198.7;  --y: -7.83;  --w: 17.738; --h: 21.14;  --r: 50deg; }
.ws6 { --x: 224.47; --y: -23;    --w: 4.792;  --h: 27.177; --r: 80deg; }

/* ---------- Features / قابلیت ها (Figma 113:545) ---------- */
.features .section-title { margin-bottom: 72px; }
.feature-list { display: flex; justify-content: space-between; gap: 32px; }
.feature {
  position: relative;
  direction: ltr;                      /* phone on the left, caption on the right — as in the design */
  display: flex; align-items: flex-start;
  flex: none;
}
.feature .phone {
  width: 130px; height: 289px;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: var(--phone-shadow-sm);
}
.feature-arrow { position: absolute; left: 127px; top: 110px; max-width: none; z-index: 1; }
.feature-text { direction: rtl; text-align: right; padding-top: 123px; }
.feature-text h3 { font-size: 14px; font-weight: 700; line-height: 16px; letter-spacing: 0.5px; }
.feature-text p { margin-top: 8px; font-size: 12px; line-height: 1.4; }

.f-syllabus .phone   { transform: rotate(0.3deg); }
.f-syllabus .feature-text   { width: 119px; margin-left: 12px; }
.f-progress .phone   { border-radius: 20px; }
.f-progress .feature-text   { width: 107px; margin-left: 18px; }
.f-listening .feature-text  { width: 167px; margin-left: 27px; }
.f-listening .feature-text h3 { font-size: 13px; }
.f-quiz .feature-arrow { left: 124px; }
.f-quiz .feature-text       { width: 124px; margin-left: 14px; }

/* ---------- FAQ / سوالات متداول (Figma 132:123) ---------- */
.faq { overflow-x: clip; }
.faq-inner { display: flex; align-items: center; gap: 183px; }
.faq-copy { flex: 0 0 442px; }
.faq-copy .section-title { margin-bottom: 28px; }
.faq-list { display: flex; flex-direction: column; gap: 35px; }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  cursor: pointer;
  list-style: none;
  font-size: 14px; line-height: 1.4;
  border-radius: 8px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary span { flex: 1; transition: color 0.2s ease; }
.faq-list summary:hover span { color: var(--primary); }
.faq-list .chev { flex: none; transition: transform 0.25s ease; }
.faq-list details[open] .chev { transform: rotate(-90deg); }
.faq-list details[open] summary span { color: var(--primary); font-weight: 700; }
.faq-list details p {
  padding-top: 12px;
  padding-inline-end: 44px;
  color: var(--text-muted);
  font-size: 14px; line-height: 1.8;
}

.faq-art-col { flex: 0 1 625px; min-width: 0; }
.faq-art { --W: 625; --H: 537.74; }
.faq-heart { --x: 475.57; --y: 307.24; --w: 111.765; --h: 22.783; }
.faq-heart img { position: absolute; left: 0; top: -4.39%; width: 100%; height: 107.96%; max-width: none; }
.faq-blob { --x: 0; --y: 0; --w: 625; --h: 537.74; }
.faq-blob .box { position: relative; width: calc(391.583 * var(--u)); height: calc(528.842 * var(--u)); transform: rotate(108.29deg); }
.faq-blob .box img { position: absolute; left: 11.98%; top: 22.14%; width: 81.74%; height: 72.84%; max-width: none; }
.faq-frame { --x: 100.79; --y: 112.34; --w: 270.443; --h: 337.144; }
.faq-frame span { display: block; width: calc(232.213 * var(--u)); height: calc(309.618 * var(--u)); background: #fefafa; border-radius: calc(10 * var(--u)); transform: rotate(-7.46deg); }
.faq-photo { --x: 111.93; --y: 125.93; --w: 248.546; --h: 309.847; }
.faq-photo img { width: calc(213.412 * var(--u)); height: calc(284.55 * var(--u)); object-fit: cover; border-radius: calc(10 * var(--u)); transform: rotate(-7.46deg); }
.qs1 { --x: 57.55; --y: 147.18; --w: 23.899; --h: 13.798; --r: 30deg; }
.qs2 { --x: 72.25; --y: 126.36; --w: 17.738; --h: 21.14;  --r: 50deg; }
.qs3 { --x: 98.02; --y: 111.2;  --w: 4.792;  --h: 27.177; --r: 80deg; }

/* ---------- Footer CTA (Figma 117:592) ---------- */
.site-footer {
  margin-top: 0;
  border-radius: 40px 40px 0 0;
  background: linear-gradient(to right, rgba(211, 223, 249, 0.5), rgba(107, 143, 242, 0.5));
  scroll-margin-top: calc(var(--header-h-compact) + 8px);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  min-height: 172px;
  padding-block: 40px 28px;
}
.footer-copy { max-width: 505px; }
.footer-copy h2 { font-size: 24px; font-weight: 700; line-height: 36px; letter-spacing: 0.5px; color: #000; }
.footer-copy p { margin-top: 16px; font-size: 20px; line-height: 1.4; color: #000; }

.footer-legal {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  padding-block: 18px 24px;
  border-top: 1px solid rgba(32, 33, 36, 0.1);
  font-size: 14px;
}
.footer-legal nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-legal a { color: var(--text); transition: color 0.2s ease; }
.footer-legal a:hover,
.footer-legal a[aria-current="page"] { color: var(--primary); }
.footer-legal a[aria-current="page"] { font-weight: 700; }
.footer-legal small { font-size: 13px; color: var(--text-muted); }

/* ---------- Legal pages (/legal/privacy, /legal/terms, /account-deletion) ---------- */
.legal { padding-block: 16px 80px; }
.legal-inner { max-width: 880px; margin-inline: auto; }
.legal-inner:lang(en) {
  /* Shabnam FD renders every digit as Persian; English text needs Latin digits. */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.legal-hero {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px;
  padding: 40px 44px;
  border-radius: 28px;
  background: linear-gradient(to right, rgba(211, 223, 249, 0.6), rgba(107, 143, 242, 0.28));
}
.legal-hero h1 { color: var(--primary); font-size: 36px; font-weight: 700; line-height: 1.35; letter-spacing: 0.3px; }
.legal-updated { margin-top: 6px; font-size: 14px; color: var(--text-muted); }

.lang-switch {
  display: inline-flex; gap: 2px; padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.lang-switch a {
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 14px; font-weight: 700; line-height: 1.6;
  color: var(--text-muted);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.lang-switch a:hover { color: var(--primary); }
.lang-switch a[aria-current="true"] { background: var(--primary); color: #fff; }
.lang-switch a:lang(fa) { font-family: var(--font); }
.lang-switch a:lang(en) { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

.legal-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 24px; }
.legal-tabs a {
  padding: 9px 18px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: var(--surface);
  font-size: 15px;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.legal-tabs a:hover { color: var(--primary); border-color: rgba(107, 143, 242, 0.45); }
.legal-tabs a[aria-current="page"] { background: var(--pill); border-color: transparent; color: var(--primary); font-weight: 700; }

.legal-card {
  padding: 40px 48px 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
}

.prose { font-size: 16px; line-height: 1.95; }
.prose > * + * { margin-top: 14px; }
.prose h2 {
  margin-top: 36px;
  color: var(--primary);
  font-size: 20px; font-weight: 700; line-height: 1.5;
}
.prose > h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-inline-start: 24px; }
.prose ol { list-style: decimal; }
.prose ol:lang(fa) { list-style-type: persian; }
.prose ol > li::marker { color: var(--primary); font-weight: 700; }
.prose ul > li { position: relative; }
.prose ul > li::before {
  content: "";
  position: absolute; inset-inline-start: -17px; top: 0.82em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary);
}
.prose li + li { margin-top: 8px; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; word-break: break-word; }
.prose strong { font-weight: 700; }
.prose em {
  font-style: normal;
  padding: 1px 8px;
  border-radius: 6px;
  background: var(--pill);
  white-space: nowrap;
}
.prose bdi, .prose [dir="ltr"] { unicode-bidi: isolate; }

/* ---------- Responsive ---------- */
@media (max-width: 1279px) {
  .main-nav a { font-size: 20px; padding: 12px; }
  .why-inner { flex-direction: column; align-items: stretch; }
  .why-head { flex-basis: auto; }
  .why-head .section-title { margin-bottom: 12px; }
  .why-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .card { width: auto; }
  .feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 56px; justify-items: center; }
  .faq-inner { gap: 64px; }
  .how-inner { gap: 24px; }
}

@media (max-width: 1023px) {
  :root { --header-h: 112px; }
  .brand img { width: 88px; height: 88px; }
  .btn-waitlist { width: 168px; height: 64px; font-size: 20px; }

  .hero-inner { flex-direction: column; align-items: stretch; gap: 24px; }
  .hero-copy { flex-basis: auto; padding-top: 32px; }
  .hero-art-col { width: min(640px, 100%); margin-inline: auto; }
  .hero-art { width: 100%; }

  .how-inner,
  .faq-inner { flex-direction: column; align-items: stretch; gap: 32px; }
  .how-copy, .faq-copy { flex-basis: auto; }
  .how-art-col, .faq-art-col { flex: none; }  /* desktop flex-basis would become the height when stacked */
  .how-art-col { width: min(560px, 100%); margin-inline: auto; }
  .faq-art-col { width: min(520px, 100%); margin-inline: auto; }
  .faq-list { max-width: 560px; }
  .faq-list details p { padding-inline-end: 0; }
  .how-copy .lead { min-height: 0; }
}

@media (max-width: 899px) {
  :root { --header-h: 88px; --header-h-compact: 72px; }
  .header-inner { gap: 12px; padding-top: 0; }
  .brand { padding: 4px; }
  .brand img,
  .site-header.is-scrolled .brand img { width: 64px; height: 64px; }
  .site-header.is-scrolled .brand img { width: 56px; height: 56px; }
  .btn-waitlist,
  .site-header.is-scrolled .btn-waitlist { width: auto; height: 48px; padding-inline: 20px; font-size: 16px; border-radius: 14px; margin-inline-start: auto; }

  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 48px; height: 48px; padding: 12px;
    border: 1px solid var(--border); border-radius: 14px;
    background: var(--surface); cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; border-radius: 2px; background: var(--text); transition: transform 0.25s ease, opacity 0.2s ease; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .main-nav {
    position: absolute; top: 100%; inset-inline: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px var(--gutter) 20px;
    background: var(--bg);
    box-shadow: 0 16px 32px rgba(32, 33, 36, 0.1);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }
  .nav-open .main-nav { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .main-nav a { font-size: 18px; padding: 12px 16px; border-radius: 14px; }

  .section { padding-block: 44px; }
  .section-title { font-size: 28px; }
  .features .section-title { margin-bottom: 40px; }
  .why-cards { gap: 16px; }
}

@media (max-width: 639px) {
  :root { --gutter: 16px; }
  .hero-copy h1 { font-size: 30px; line-height: 44px; }
  .hero-copy > p { font-size: 15px; }
  .store-badge { width: 160px; border-radius: 9px; }
  .why-cards { grid-template-columns: 1fr; }
  .hero-copy .store-badges { margin-top: 28px; }
  .feature-list { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .footer-copy { max-width: none; }
  .footer-copy h2 { font-size: 20px; line-height: 32px; }
  .footer-copy p { font-size: 16px; margin-top: 8px; }
  .site-footer .store-badges { justify-content: center; }
  .site-footer { border-radius: 28px 28px 0 0; }
  .footer-legal { flex-direction: column; text-align: center; }
  .footer-legal nav { justify-content: center; }

  .legal-hero { padding: 28px 22px; border-radius: 22px; }
  .legal-hero h1 { font-size: 28px; }
  .legal-card { padding: 26px 20px 30px; border-radius: 20px; }
  .prose { font-size: 15px; }
  .prose em { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
