/* LingoLearn website. Tokens are the app's Storybook template (app/src/templates/storybook/tokens.ts):
   a cream dotted page, 2px ink rims, hard offset edges, tomato / teal / mustard. */
:root {
  --cream: #FFF5E8; --paper: #FFFDF8; --surface: #FFFFFF; --line: #EBDCC8; --track: #EADFCF;
  --ink: #2B2230; --ink2: #675A6B; --rim: #2B2230; --edge: #2B2230;
  --tomato: #E04A2F; --tomato-dark: #A9361F; --tomato-light: #FFE3DB;
  --teal: #177A77; --teal-dark: #0E5754; --teal-light: #D4EFEA;
  --mustard: #F3B534; --mustard-ink: #7A5200; --mustard-light: #FFF0C6;
  --pink: #E0566B; --pink-light: #FFDFE4; --pink-ink: #8E2237;
  --ok-bg: #CDEFE7; --ok-fg: #0E5754; --bad-bg: #FFD9CF; --bad-fg: #A9361F;
  --focus: #177A77; --dots: rgba(224, 74, 47, 0.13); --bezel: #2B2230;
  --r-btn: 18px; --r-card: 24px; --r-input: 20px; --r-pill: 99px;
  --display: "Bricolage Grotesque", "Vazirmatn", system-ui, sans-serif;
  --text: "Nunito Sans", "Vazirmatn", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cream: #171219; --paper: #241D2A; --surface: #2D2534; --line: #3F3446; --track: #3A3040;
    --ink: #F5ECE0; --ink2: #B7A9BA; --rim: #5A4C63; --edge: #0C080F;
    --tomato: #EC5B40; --tomato-dark: #FF9A86; --tomato-light: #4B2622;
    --teal: #2FA39E; --teal-dark: #7FE0D6; --teal-light: #1D3D3C;
    --mustard-ink: #F6C65A; --mustard-light: #43361A;
    --pink-light: #402229; --pink-ink: #FFA2B1;
    --ok-bg: #173C39; --ok-fg: #8FE6DC; --bad-bg: #4A2420; --bad-fg: #FFAA98;
    --focus: #7FE0D6; --dots: rgba(236, 91, 64, 0.08); --bezel: #0C080F;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  background-color: var(--cream);
  background-image: radial-gradient(var(--dots) 1.6px, transparent 1.7px);
  background-size: 28px 28px;
  color: var(--ink); font: 400 1.0625rem/1.6 var(--text);
}
:lang(fa) body, body:lang(fa) { line-height: 1.85; }
:lang(fa) * { letter-spacing: 0 !important; }
img, svg { max-width: 100%; display: block; }
a { color: var(--teal-dark); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--tomato-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; margin: 0; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 6.4vw, 3.75rem); line-height: 1.04; letter-spacing: -0.022em; }
h2 { font-size: clamp(1.75rem, 4.2vw, 2.5rem); line-height: 1.1; letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; line-height: 1.2; }
:lang(fa) h1, :lang(fa) h2, :lang(fa) h3 { line-height: 1.35; }
p { margin: 0; text-wrap: pretty; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: 12px; z-index: 50; }
.skip:focus { top: 12px; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
section { padding-block: clamp(40px, 6vw, 72px); }
.eyebrow {
  display: inline-block; font: 800 0.75rem/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--teal-light); color: var(--teal-dark); padding: 9px 14px; border-radius: var(--r-pill);
}
:lang(fa) .eyebrow { font-size: 0.85rem; text-transform: none; }
.lead { font-size: clamp(1.1rem, 2.4vw, 1.3rem); color: var(--ink2); max-width: 36em; }
.sec-head { max-width: 40rem; margin-bottom: clamp(28px, 5vw, 48px); display: grid; gap: 14px; justify-items: start; }

/* --- raised cards and buttons: 2px rim, hard offset edge */
.card {
  background: var(--paper); border: 2px solid var(--rim); border-radius: var(--r-card);
  box-shadow: 0 5px 0 var(--edge); padding: 24px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
  font: 800 1.2rem/1.1 var(--display); letter-spacing: 0.01em; text-decoration: none;
  color: #fff; background: var(--tomato); border: 2px solid var(--rim); border-radius: var(--r-btn);
  box-shadow: 0 5px 0 var(--edge); padding: 15px 26px; min-height: 56px;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { color: #fff; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--edge); }
.btn[disabled] { background: var(--track); color: var(--ink2); box-shadow: 0 5px 0 var(--line); border-color: var(--line); cursor: default; }
.btn-small { font-size: 1rem; padding: 10px 18px; min-height: 44px; background: var(--mustard); color: #2B2230; box-shadow: 0 4px 0 var(--edge); }
.btn-small:hover { color: #2B2230; }
.btn-small:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }

/* --- header */
.site-head { padding-block: 14px; }
.site-head .wrap { display: flex; align-items: center; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 1.5rem/1 var(--display); letter-spacing: -0.02em; margin-inline-end: auto; }
.brand:hover { color: var(--ink); }
.brand svg { width: 38px; height: 38px; }
.nav { display: none; gap: 24px; }
.nav a { color: var(--ink); font: 700 1rem var(--text); text-decoration: none; }
.nav a:hover { color: var(--tomato-dark); text-decoration: underline; }
.lang {
  font: 700 0.95rem/1 var(--text); text-decoration: none; color: var(--ink); background: var(--paper);
  border: 2px solid var(--rim); border-radius: var(--r-pill); padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center;
}
.lang:hover { background: var(--teal-light); color: var(--ink); }
.btn-small { white-space: nowrap; }
.btn-small .tiny { display: none; }
@media (max-width: 560px) { .btn-small .long { display: none; } .btn-small .tiny { display: inline; } }
@media (min-width: 860px) { .nav { display: flex; } }
@media (max-width: 420px) { .site-head .btn-small { padding-inline: 12px; font-size: 0.9rem; } .brand { font-size: 1.3rem; } .brand svg { width: 32px; height: 32px; } .site-head .wrap { gap: 8px; } }

/* --- hero */
.hero { padding-block: clamp(20px, 4vw, 40px) clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero-copy { display: grid; gap: 22px; justify-items: start; }
.hero-art { display: flex; justify-content: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 56px; } }

/* --- waitlist form */
.wl { width: 100%; max-width: 520px; display: grid; gap: 14px; background: var(--paper); border: 2px solid var(--rim); border-radius: var(--r-card); box-shadow: 0 5px 0 var(--edge); padding: 20px; }
.wl-title { font: 800 1.15rem/1.2 var(--display); }
.field { display: grid; gap: 6px; }
.field label { font: 700 0.9rem/1.3 var(--text); color: var(--ink); }
.field .opt { font-weight: 400; color: var(--ink2); }
.input {
  width: 100%; min-height: 56px; font: 700 1.0625rem var(--text); color: var(--ink); background: var(--surface);
  border: 2px solid var(--rim); border-radius: var(--r-input); padding: 12px 16px;
}
select.input { appearance: none; padding-inline-end: 44px; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-size: 6px 6px; background-repeat: no-repeat; background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; }
:lang(fa) select.input, [dir="rtl"] select.input { background-position: 16px 50%, 22px 50%; }

/* The language picker (js/picker.js) replaces the select; the same chevron, a panel in the card's own style. */
.picker { position: relative; }
.picker-btn {
  text-align: start; cursor: pointer; padding-inline-end: 44px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-size: 6px 6px; background-repeat: no-repeat; background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
}
:lang(fa) .picker-btn, [dir="rtl"] .picker-btn { background-position: 16px 50%, 22px 50%; }
.picker-btn.is-empty { color: var(--ink); }
.picker.is-open .picker-btn { box-shadow: 0 3px 0 var(--edge); }
.picker-list {
  position: absolute; z-index: 20; inset-inline: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none;
  max-height: min(320px, 55vh); overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); border: 2px solid var(--rim); border-radius: var(--r-input); box-shadow: 0 5px 0 var(--edge);
}
.picker-list[hidden] { display: none; }
.picker-list:focus { outline: none; }
.picker-list:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.picker-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 12px;
  border-radius: 14px; cursor: pointer; font: 700 1rem/1.3 var(--text); color: var(--ink);
}
.picker-opt.is-empty { font-weight: 400; color: var(--ink2); }
.picker-opt.is-active { background: var(--mustard-light); }
.picker-opt[aria-selected="true"] { background: var(--teal-light); color: var(--teal-dark); }
.picker-opt[aria-selected="true"]::after {
  content: ""; flex: none; width: 6px; height: 12px; margin-inline-end: 4px; border: solid var(--teal-dark); border-width: 0 3px 3px 0; transform: rotate(45deg) translateY(-2px);
}
.picker-opt[aria-selected="true"].is-empty::after { display: none; }
.input::placeholder { color: var(--ink2); font-weight: 400; opacity: 1; }
.input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.hp { position: absolute; inset-inline-start: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.wl-note { font-size: 0.875rem; color: var(--ink2); line-height: 1.5; }
.wl-status { min-height: 1.4em; font: 700 1rem/1.4 var(--text); }
.wl-status:empty { display: none; }
.wl-status.ok { background: var(--ok-bg); color: var(--ok-fg); border-radius: 14px; padding: 12px 14px; }
.wl-status.err { background: var(--bad-bg); color: var(--bad-fg); border-radius: 14px; padding: 12px 14px; }
.wl-status.wait { color: var(--ink2); }
.wl .btn { width: 100%; }
@media (min-width: 560px) { .wl .row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; } .wl .row .btn { width: auto; } }

/* --- phones */
.phone { background: var(--bezel); border: 2px solid var(--rim); border-radius: 36px; padding: 7px; box-shadow: 0 8px 0 var(--edge); width: 100%; }
.phone img { width: 100%; height: auto; aspect-ratio: 1179 / 2556; border-radius: 29px; background: var(--cream); }
.hero-phones { position: relative; width: min(100%, 500px); height: auto; display: grid; place-items: center; padding-block: 12px 18px; }
.hero-phones .phone { width: min(60%, 310px); }
.hero-phones .phone.back { position: absolute; inset-inline-start: 6px; top: 64px; width: min(44%, 230px); transform: rotate(-7deg); z-index: 0; opacity: 0.98; }
[dir="rtl"] .hero-phones .phone.back { transform: rotate(7deg); }
.hero-phones .phone.front { position: relative; z-index: 1; margin-inline-start: 22%; }
.sticker {
  position: absolute; z-index: 2; font: 800 0.9rem/1 var(--display); padding: 10px 14px; border: 2px solid var(--rim); border-radius: var(--r-pill);
  box-shadow: 0 3px 0 var(--edge); background: var(--mustard); color: #2B2230; white-space: nowrap;
}
.sticker.s1 { inset-inline-end: 0; top: 18%; background: var(--teal-light); color: var(--teal-dark); }
.sticker.s2 { inset-inline-start: 2%; bottom: 8%; }
@media (max-width: 380px) { .sticker { font-size: 0.8rem; padding: 8px 11px; } }

/* --- how it works */
.steps { display: grid; gap: 22px; padding: 0; margin: 0; list-style: none; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.step { display: grid; gap: 12px; align-content: start; }
.step .num {
  width: 52px; height: 52px; display: grid; place-items: center; font: 800 1.6rem/1 var(--display);
  border: 2px solid var(--rim); border-radius: 16px; box-shadow: 0 4px 0 var(--edge); margin-bottom: 4px;
}
.step:nth-child(1) .num { background: var(--mustard); color: #2B2230; }
.step:nth-child(2) .num { background: var(--teal); color: #fff; }
.step:nth-child(3) .num { background: var(--tomato); color: #fff; }
.step p { color: var(--ink2); }

/* --- inside a unit */
.bento { display: grid; gap: 22px; }
@media (min-width: 700px) { .bento { grid-template-columns: repeat(2, 1fr); } .bento .wide { grid-column: 1 / -1; } }
@media (min-width: 1000px) { .bento { grid-template-columns: repeat(6, 1fr); } .bento .wide { grid-column: span 6; } .bento .third { grid-column: span 2; } .bento .half { grid-column: span 3; } }
.feat { display: grid; gap: 10px; align-content: start; }
.feat p { color: var(--ink2); }
.icon { width: 48px; height: 48px; display: grid; place-items: center; border: 2px solid var(--rim); border-radius: 14px; background: var(--mustard-light); color: var(--mustard-ink); margin-bottom: 4px; }
.icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feat.t .icon { background: var(--teal-light); color: var(--teal-dark); }
.feat.r .icon { background: var(--tomato-light); color: var(--tomato-dark); }
.feat.p .icon { background: var(--pink-light); color: var(--pink-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 6px 0 0; list-style: none; }
.chips li { font: 700 0.9rem/1 var(--text); padding: 9px 13px; border-radius: var(--r-pill); background: var(--teal-light); color: var(--teal-dark); border: 2px solid transparent; }
.chips li:nth-child(3n+2) { background: var(--mustard-light); color: var(--mustard-ink); }
.chips li:nth-child(3n) { background: var(--pink-light); color: var(--pink-ink); }
.listen-demo { display: inline-flex; align-items: center; gap: 12px; margin-top: 6px; background: var(--surface); border: 2px solid var(--rim); border-radius: 18px; box-shadow: 0 4px 0 var(--edge); padding: 10px 14px; font: 800 1rem var(--display); width: fit-content; max-width: 100%; }
.listen-demo .play { width: 36px; height: 36px; border-radius: 50%; background: var(--tomato); display: grid; place-items: center; flex: none; }
.listen-demo .play svg { width: 16px; height: 16px; fill: #fff; margin-inline-start: 2px; }
[dir="rtl"] .listen-demo .play svg { transform: scaleX(-1); margin-inline-start: 0; margin-inline-end: 2px; }
.listen-demo .speed { font: 800 0.85rem var(--text); color: var(--ink2); }
.listen-demo .speed b { background: var(--teal); color: #fff; padding: 5px 9px; border-radius: 10px; margin-inline-start: 4px; }

/* --- screenshots */
.shots-sec { background: var(--paper); border-block: 2px solid var(--rim); }
.shots-scroll { overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 22px; -webkit-overflow-scrolling: touch; }
.shots { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 72vw); gap: 26px; margin: 0; padding: 0; list-style: none; width: max-content; }
.shots li { scroll-snap-align: center; display: grid; gap: 16px; align-content: start; }
.shots figure { margin: 0; display: grid; gap: 16px; }
.shots figcaption { font: 700 0.95rem/1.4 var(--text); color: var(--ink2); text-align: center; text-wrap: balance; }
.shots figcaption b { display: block; font: 800 1.05rem var(--display); color: var(--ink); margin-bottom: 2px; }
@media (min-width: 1000px) { .shots-scroll { overflow: visible; padding-inline: 0; } .shots { grid-auto-flow: row; grid-template-columns: repeat(5, 1fr); grid-auto-columns: auto; width: auto; } }
@media (min-width: 560px) and (max-width: 999px) { .shots { grid-auto-columns: 230px; } }
.shots-hint { font-size: 0.9rem; color: var(--ink2); margin-top: 4px; }
@media (min-width: 1000px) { .shots-hint { display: none; } }

/* --- languages */
.lang-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .lang-grid { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.note-card { background: var(--tomato-light); }
.note-card h3 { margin-bottom: 8px; }
.note-card p { color: var(--ink); }
.note-card p + p { margin-top: 10px; }

/* --- FAQ */
.faq { display: grid; gap: 14px; }
details { background: var(--paper); border: 2px solid var(--rim); border-radius: 20px; box-shadow: 0 4px 0 var(--edge); }
summary { cursor: pointer; list-style: none; font: 800 1.1rem/1.35 var(--display); padding: 18px 56px 18px 20px; position: relative; border-radius: 18px; }
:lang(fa) summary { padding: 18px 20px 18px 56px; }
[dir="rtl"] summary { padding: 18px 20px 18px 56px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; inset-inline-end: 18px; top: 50%; translate: 0 -50%; width: 28px; height: 28px; display: grid; place-items: center; font: 800 1.2rem/1 var(--display); background: var(--mustard); color: #2B2230; border: 2px solid var(--rim); border-radius: 50%; }
details[open] summary::after { content: "\2212"; background: var(--tomato); color: #fff; }
details .ans { padding: 0 20px 20px; color: var(--ink2); display: grid; gap: 10px; }
details .ans a { font-weight: 700; }

/* --- closing call */
.cta-sec .card { background: var(--mustard-light); display: grid; gap: 22px; justify-items: start; padding: clamp(24px, 5vw, 48px); }
.cta-sec .wl { background: var(--paper); }
@media (min-width: 900px) { .cta-sec .card { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; } }

/* --- footer */
.site-foot { border-top: 2px solid var(--rim); background: var(--paper); padding-block: 36px 48px; font-size: 0.95rem; color: var(--ink2); }
.foot-grid { display: grid; gap: 22px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 0; list-style: none; }
.foot-links a { color: var(--ink); font-weight: 700; }
@media (min-width: 800px) { .foot-grid { grid-template-columns: 1fr auto; align-items: start; } }

/* --- text pages (privacy, terms, support) */
.doc { padding-block: clamp(28px, 6vw, 64px) clamp(48px, 8vw, 96px); }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 16px; }
.doc h2 { font-size: 1.5rem; margin: 40px 0 10px; letter-spacing: -0.01em; }
.doc h3 { margin: 24px 0 6px; }
.doc p, .doc li { color: var(--ink); }
.doc p + p, .doc ul + p, .doc p + ul { margin-top: 12px; }
.doc ul { padding-inline-start: 1.3rem; margin: 10px 0; display: grid; gap: 6px; }
.draft { background: var(--mustard-light); color: var(--ink); border: 2px solid var(--rim); border-radius: 18px; box-shadow: 0 4px 0 var(--edge); padding: 16px 18px; margin-block: 18px 8px; font-weight: 600; }
.draft strong { font-family: var(--display); font-weight: 800; }
.todo { background: var(--mustard); color: #2B2230; border-radius: 6px; padding: 1px 6px; font-weight: 700; }
.updated { color: var(--ink2); font-size: 0.95rem; }
.contact-card { display: grid; gap: 8px; margin-block: 24px; }
.contact-card h2 { margin: 0; }
.contact-card a.mail { font: 800 clamp(1.25rem, 4vw, 1.75rem) var(--display); overflow-wrap: anywhere; }
table.t { width: 100%; border-collapse: collapse; margin-block: 14px; font-size: 0.97rem; }
table.t th, table.t td { text-align: start; padding: 10px 12px; border-bottom: 2px solid var(--line); vertical-align: top; }
table.t th { font-family: var(--display); font-weight: 800; }
.table-scroll { overflow-x: auto; }

/* --- logo (inline SVG) */
.logo-bg { fill: var(--tomato); stroke: var(--rim); stroke-width: 2.4; }
.logo-sh { fill: var(--edge); }
.logo-fg { fill: #fff; stroke: var(--rim); stroke-width: 2; stroke-linejoin: round; }
.logo-line { fill: none; stroke: var(--teal); stroke-width: 2.4; stroke-linecap: round; }
