/*
 * Noura landing page: one sheet for both languages.
 *
 * Direction is never assumed: spacing and alignment use logical properties (inline-start/end), so
 * the Persian page (dir="rtl") and the English one (dir="ltr") share every rule. The few things CSS
 * has no logical form for (gradients, transform-origin) are paired under [dir] at the point of use.
 *
 * Every colour is a token below, and every token is the app's own (Caloriyab/app/globals.css), light
 * and dark. Macro colours are fixed roles exactly as in the app: protein pomegranate, carbs saffron,
 * fat firoozeh. Graphics take --protein / --carb / --fat; text on the page takes the -ink forms.
 *
 * Type floor: nothing under 12.75px (0.797rem), the app's own floor.
 */

/* ---------- Fonts ---------- */

/* Darbareh Pro, FaNum cut (licensed by the owner from fontiran.com; see Darbareh Pro/License.pdf).
   FaNum draws even stray Latin digits as Persian, the same choice the app makes. */
@font-face { font-family: "Darbareh"; src: url("../fonts/darbareh/DarbarehFaNum-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Darbareh"; src: url("../fonts/darbareh/DarbarehFaNum-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Darbareh"; src: url("../fonts/darbareh/DarbarehFaNum-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Darbareh"; src: url("../fonts/darbareh/DarbarehFaNum-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Darbareh"; src: url("../fonts/darbareh/DarbarehFaNum-ExtraBold.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Darbareh"; src: url("../fonts/darbareh/DarbarehFaNum-Black.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
/* The English faces (SIL OFL 1.1, fonts/latin/OFL.txt): Latin-only variable cuts. */
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/latin/BricolageGrotesque-VF.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/latin/Figtree-VF.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */

:root {
  color-scheme: light;

  --page: #FFF4E9;
  --page-rgb: 255 244 233;
  --paper: #FFFAF6;            /* cards on the page */
  --sand: #F4EADF;             /* the quiet band */
  --ink-1: #1F1B18;
  --ink-2: #2E2926;
  --ink-3: #5C544E;
  --ink-4: #6E645C;
  --ink-5: #D9D0C7;            /* non-text: dividers, leaders */
  --hairline: rgba(92, 80, 70, .14);

  --amber: #FF8F00;            /* the brand FILL */
  --amber-glass: rgba(255, 143, 0, .95);      /* the app's --accent-glass */
  --amber-glass-edge: rgba(255, 214, 150, .55);
  --on-amber: #FFF7EE;         /* white on amber: the owner's call (2.29:1), large bold labels only */
  --amber-text: #995600;       /* the accent as TEXT: 5.26:1 on the page */
  --amber-soft: rgba(255, 143, 0, .14);

  --protein: #C51E3A; --protein-ink: #8C2F39;
  --carb:    #FFD700; --carb-ink:    #7A6100;
  --fat:     #1B7FA8; --fat-ink:     #13617F;
  --fiber:   #4F7A3F; --fiber-ink:   #3A5B2E;
  --on-protein: #FFF7EE; --on-carb: #1F1B18; --on-fat: #FFF7EE;

  --glass: rgba(255, 250, 246, .62);
  --glass-strong: rgba(255, 250, 246, .84);
  --glass-edge: rgba(255, 255, 255, .72);
  --glass-shadow: 0 24px 60px -24px rgba(48, 40, 34, .30), 0 1px 3px -1px rgba(48, 40, 34, .08);
  --card-shadow: 0 1px 2px rgba(48, 40, 34, .03), 0 10px 30px -18px rgba(48, 40, 34, .18);
  --field: rgba(255, 255, 255, .58);
  --field-edge: rgba(255, 255, 255, .80);

  /* the hero's CSS ground: shown until the silk's first frame, and for good without WebGL.
     From the page cream to the light amber the silk is painted in. */
  --hero-fallback: radial-gradient(120% 90% at 30% 20%, #FFFAF6 0%, #FFF0DA 34%, #FFDDA6 64%, #FFC978 100%);
  --hero-wash: rgba(255, 244, 233, .55);
  --finale-fallback: radial-gradient(120% 120% at 70% 10%, #5E3811 0%, #33291F 55%, #1D1A18 100%);

  --ring-focus: 0 0 0 3px rgba(255, 143, 0, .45);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;

  /* Persian by default; the English page swaps these (html[lang="en"]). */
  --font-body: "Darbareh", Tahoma, system-ui, sans-serif;
  --font-display: "Darbareh", Tahoma, system-ui, sans-serif;
  --lh-body: 1.9;
  --lh-display: 1.24;
  --track-display: 0;
  --w-display: 900;
  --w-strong: 800;
}

html[lang="en"] {
  /* Darbareh stays in the stack: Persian inside the English page (the demo, the dish names)
     falls through to it, since neither Latin face has Arabic-script glyphs. */
  --font-body: "Figtree", "Darbareh", system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", "Figtree", "Darbareh", system-ui, sans-serif;
  --lh-body: 1.62;
  --lh-display: 1.0;
  --track-display: -0.032em;
  --w-display: 800;
  --w-strong: 700;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #1D1A18;
    --page-rgb: 29 26 24;
    --paper: #26211E;
    --sand: #221E1B;
    --ink-1: #F6EFE9;
    --ink-2: #E4DAD2;
    --ink-3: #B0A49B;
    --ink-4: #A1958C;
    --ink-5: #4A423D;
    --hairline: rgba(249, 232, 212, .12);

    --amber-text: #FFB74D;
    --amber-soft: rgba(255, 143, 0, .16);

    --protein: #E8536B; --protein-ink: #F593A4;
    --carb:    #FFD700; --carb-ink:    #FFE066;
    --fat:     #4FA3C7; --fat-ink:     #8FC8DE;
    --fiber:   #8FAD76; --fiber-ink:   #B4C9A2;
    --on-protein: #1D1A18; --on-carb: #1D1A18; --on-fat: #1D1A18;

    --glass: rgba(29, 26, 24, .66);
    --glass-strong: rgba(38, 33, 30, .88);
    --glass-edge: rgba(249, 232, 212, .16);
    --glass-shadow: 0 24px 60px -20px rgba(0, 0, 0, .70), 0 2px 10px -4px rgba(0, 0, 0, .45);
    --card-shadow: 0 12px 34px -20px rgba(0, 0, 0, .70);
    --field: rgba(255, 244, 233, .08);
    --field-edge: rgba(255, 244, 233, .16);

    --hero-fallback: radial-gradient(120% 90% at 30% 20%, #453922 0%, #33291F 40%, #241E19 70%, #1D1A18 100%);
    --hero-wash: rgba(29, 26, 24, .45);
  }
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* clip, not hidden: hidden makes body a scroll container and breaks position: sticky */
  overflow-x: clip;
  font-feature-settings: "kern";
}

img, svg, canvas { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; color: var(--ink-1); font-family: var(--font-display); font-weight: var(--w-display); line-height: var(--lh-display); letter-spacing: var(--track-display); text-wrap: balance; }
ol, ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: none; box-shadow: var(--ring-focus); border-radius: 12px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--ink-1); color: var(--page); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

[lang="fa"] { font-family: "Darbareh", Tahoma, system-ui, sans-serif; }
html[lang="en"] [lang="fa"] { line-height: 1.8; direction: rtl; unicode-bidi: isolate; }
/* Persian quoted inside English keeps the English column's left edge; only the field the demo
   types into reads from the right, as it does in the app. Isolation is what puts «» and ؟ on
   the correct side of a Persian phrase inside an English line. */
html[lang="en"] [lang="fa"]:not(.demo-text) { text-align: left; }
.num { font-variant-numeric: tabular-nums; }

/* The separator between facts. Drawn, never a «·» or «•» character: in Darbareh both read as «۰». */
.dot { display: inline-block; width: .28em; height: .28em; border-radius: 50%; background: currentColor; opacity: .55; vertical-align: middle; margin-inline: .5em; }

/* The three macro colours, as a small mark: used before each section's eyebrow. */
.triad { display: inline-flex; gap: 4px; vertical-align: middle; }
.triad i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.triad i:nth-child(1) { background: var(--protein); }
.triad i:nth-child(2) { background: var(--carb); box-shadow: inset 0 0 0 1px rgba(122, 97, 0, .35); }
.triad i:nth-child(3) { background: var(--fat); }

.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
/* An arrow that points "forward" in either direction. */
[dir="rtl"] .icon-fwd { transform: scaleX(-1); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 52px; padding: 0 1.4em;
  border-radius: 999px; border: 0;
  font-weight: var(--w-strong); font-size: 1.0625rem; line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), background-color .18s;
}
.btn .icon { width: 20px; height: 20px; stroke-width: 2.4; }
.btn:active { transform: scale(.98); }
/* The app's own primary button (Caloriyab .btn-primary): thick amber glass, a hairline edge and a
   soft glow. NEVER a solid darker ledge under it that squashes on press: that is the Duolingo look,
   which the owner rejected (2026-09-24) and the app already retired (.btn-chunky is a no-op). */
.btn-primary {
  background: var(--amber-glass); color: var(--on-amber);
  border: 1px solid var(--amber-glass-edge);
  backdrop-filter: blur(14px) saturate(180%); -webkit-backdrop-filter: blur(14px) saturate(180%);
  box-shadow: 0 10px 30px -8px rgba(255, 143, 0, .30), inset 0 1px 0 rgba(255, 255, 255, .34);
}
.btn-primary:hover { background: var(--amber); box-shadow: 0 14px 34px -10px rgba(255, 143, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .34); }
.btn-primary:focus-visible { box-shadow: var(--ring-focus), inset 0 1px 0 rgba(255, 255, 255, .34); }
.btn-ghost { background: var(--glass); color: var(--ink-1); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--card-shadow); backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%); }
.btn-ghost:hover { background: var(--glass-strong); }
.btn-sm { min-height: 42px; padding: 0 1.1em; font-size: .9375rem; }

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

.nav { position: fixed; top: 12px; inset-inline: 0; z-index: 50; padding-inline: var(--gutter); pointer-events: none; }
.nav-inner {
  pointer-events: auto;
  max-width: var(--max); margin-inline: auto;
  display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding-block: 8px; padding-inline: 18px 8px;
  border-radius: 999px;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--glass-edge), 0 10px 30px -18px rgba(48, 40, 34, .35);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  transition: background-color .3s;
}
.nav.is-scrolled .nav-inner { background: var(--glass-strong); }
.brand { display: inline-flex; align-items: baseline; gap: .5em; text-decoration: none; color: var(--amber-text); font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; line-height: 1; letter-spacing: var(--track-display); }
html[lang="en"] .brand { font-weight: 800; }
.nav-links { display: none; gap: 4px; margin-inline-start: 14px; }
.nav-links a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-3); font-size: .9375rem; font-weight: 600; }
.nav-links a:hover { color: var(--ink-1); background: var(--field); }
.nav-end { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.lang { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: .9375rem; }
.lang:hover { background: var(--field); }
.lang .icon { width: 18px; height: 18px; }
@media (min-width: 960px) { .nav-links { display: flex; } }
@media (max-width: 420px) { .nav-inner { padding-inline: 14px 6px; } .lang span.lang-long { display: none; } }

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

.hero { position: relative; isolation: isolate; overflow: hidden; min-height: min(100svh, 1000px); display: flex; align-items: center; padding-block: 112px 104px; }
.hero-bg { position: absolute; inset: 0 0 -2px; z-index: -1; background: var(--hero-fallback); }
.hero-bg canvas, .finale-bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.1s var(--ease-out); }
.hero-bg canvas[data-silk="on"], .finale-bg canvas[data-silk="on"] { opacity: 1; }
/* A light wash on the side the words sit on, and a fade into the page at the foot, so the cloth
   never ends in a hard edge and the headline never has to fight a fold. */
.hero-bg::before, .hero-bg::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; }
[dir="rtl"] .hero-bg::before { background: linear-gradient(to left, var(--hero-wash) 0%, rgb(var(--page-rgb) / 0) 62%); }
[dir="ltr"] .hero-bg::before { background: linear-gradient(to right, var(--hero-wash) 0%, rgb(var(--page-rgb) / 0) 62%); }
.hero-bg::after { background: linear-gradient(to bottom, rgb(var(--page-rgb) / 0) 64%, rgb(var(--page-rgb)) 99%); }

.hero-grid { display: grid; gap: 44px; align-items: center; }
.hero-grid > * { min-width: 0; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 64px; } }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .9375rem; font-weight: 700; color: var(--amber-text); letter-spacing: 0; }
html[lang="en"] .eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8125rem; font-weight: 700; }
.hero .eyebrow { color: var(--ink-2); }

.display { font-size: clamp(2.5rem, 1.1rem + 4.6vw, 4.6rem); margin-top: 18px; color: var(--ink-1); }
html[lang="en"] .display { font-size: clamp(2.7rem, 1.1rem + 5.2vw, 5.3rem); }
/* The headline's food: one line of its own, so a longer or shorter name never reflows the rest of
   the headline. The script cycles it through dishes the app's database knows; without the script
   it stays قورمه‌سبزی. The amber marker stroke draws in under the name once its letters have landed. */
.rot { display: block; white-space: nowrap; }
.rot-word { position: relative; display: inline-block; isolation: isolate; padding-inline: .06em; }
.rot-word::after {
  content: ""; position: absolute; z-index: -1; inset-inline: 0; top: 62%; bottom: 10%;
  background: rgba(255, 143, 0, .38);
  /* leaves as quickly as the word fades out (.2s), draws in slower once the letters have landed */
  transform: scaleX(0); transition: transform .2s ease-in;
}
[dir="rtl"] .rot-word::after { transform-origin: right center; }
[dir="ltr"] .rot-word::after { transform-origin: left center; }
.rot-word.is-marked::after { transform: scaleX(1); transition: transform .55s var(--ease-out); }
html:not(.js) .rot-word::after { transform: scaleX(1); }

/* Split Text (assets/landing.js): a box per word so lines only break between words, and a box per
   letter to animate. The visible copy is aria-hidden; screen readers get the sr-only sentence. */
.split-word { display: inline-block; white-space: nowrap; }
.split-char { display: inline-block; }
/* Hidden until the script has split it, so the letters don't flash in whole first. If the script
   never runs, the failsafe shows the headline after a moment anyway. */
.js .split-vis:not(.is-split) { opacity: 0; animation: split-failsafe 0s linear 1.5s forwards; }
@keyframes split-failsafe { to { opacity: 1; } }
.lede { margin-top: 22px; font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); color: var(--ink-2); max-width: 36em; }
html[lang="en"] .lede { max-width: 32em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
/* ink-2, not ink-3: small type over a moving cloth needs the margin (ink-3 measured 4.39:1 at its worst pixel). */
.hero-note { margin-top: 18px; font-size: .875rem; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.hero-note .icon { width: 18px; height: 18px; color: var(--ink-2); }

/* ---------- The demo card (the hero's thesis: say it, get the numbers) ---------- */

.demo {
  position: relative; width: 100%; max-width: 460px; justify-self: center;
  padding: 14px;
  border-radius: 30px;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--glass-edge), var(--glass-shadow);
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
}
.demo-top { display: flex; align-items: center; gap: 8px; padding: 2px 2px 12px; }
.demo-tabs { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--field); box-shadow: inset 0 0 0 1px var(--field-edge); }
.demo-tab { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font-size: .875rem; font-weight: 700; color: var(--ink-3); cursor: pointer; min-height: 34px; }
.demo-tab[aria-pressed="true"] { background: var(--ink-1); color: var(--page); }
@media (max-width: 400px) { .demo-tab { padding: 6px 11px; } .demo { padding: 12px; } }
.demo-pause { margin-inline-start: auto; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--field); box-shadow: inset 0 0 0 1px var(--field-edge); color: var(--ink-2); cursor: pointer; }
.demo-pause .icon { width: 16px; height: 16px; fill: currentColor; stroke-width: 0; }
.demo-pause .i-play { display: none; }
.demo-pause[aria-pressed="true"] .i-play { display: block; }
.demo-pause[aria-pressed="true"] .i-pause { display: none; }

.demo-field { padding: 14px 16px 16px; border-radius: 22px; background: var(--field); box-shadow: inset 0 0 0 1px var(--field-edge); }
.demo-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .8125rem; font-weight: 700; color: var(--ink-3); }
.demo-label .icon { width: 18px; height: 18px; color: var(--amber-text); }
.demo-text { margin-top: 6px; min-height: 3.6em; font-family: "Darbareh", Tahoma, sans-serif; font-weight: 700; font-size: 1.1875rem; line-height: 1.8; color: var(--ink-1); }
.demo-caret { display: inline-block; width: 2px; height: 1.15em; margin-inline-start: 2px; vertical-align: -.2em; background: var(--amber); border-radius: 2px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.demo-gloss { margin-top: 2px; font-size: .8125rem; line-height: 1.45; color: var(--ink-3); min-height: 2.9em; }

.demo-items { margin-top: 10px; display: grid; gap: 2px; }
.demo-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; }
.demo-item + .demo-item { box-shadow: inset 0 1px 0 var(--hairline); border-radius: 0; }
.demo-item-name { display: block; font-weight: 800; color: var(--ink-1); font-size: 1rem; line-height: 1.5; }
.demo-item-sub { display: block; font-size: .8125rem; color: var(--ink-3); line-height: 1.5; }
.demo-item-kcal { font-weight: 800; color: var(--ink-1); font-size: 1rem; white-space: nowrap; }
.demo-item-kcal small { font-weight: 600; color: var(--ink-3); font-size: .8125rem; margin-inline-start: 3px; }

.demo-total { margin-top: 6px; padding: 14px 14px 12px; border-radius: 22px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--hairline); }
.demo-total-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.demo-total-label { font-size: .875rem; font-weight: 700; color: var(--ink-3); }
.demo-total-kcal { font-family: var(--font-display); font-weight: 900; font-size: 2.25rem; line-height: 1; color: var(--ink-1); letter-spacing: var(--track-display); }
html[lang="en"] .demo-total-kcal { font-weight: 800; }
.demo-total-kcal small { font-family: var(--font-body); font-size: .9375rem; font-weight: 700; color: var(--ink-3); margin-inline-start: 6px; letter-spacing: 0; }

.bar { display: flex; gap: 3px; height: 12px; margin-top: 12px; border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; flex-basis: 0; }
.bar .p { background: var(--protein); }
.bar .c { background: var(--carb); }
.bar .f { background: var(--fat); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: .8125rem; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend b { color: var(--ink-1); font-weight: 800; }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.legend .p i { background: var(--protein); } .legend .c i { background: var(--carb); } .legend .f i { background: var(--fat); }

.demo-note { margin-top: 10px; padding-inline: 6px; font-size: .8125rem; color: var(--ink-3); line-height: 1.5; }

/* States the script steps through. Without the script the card shows its first meal, complete. */
.js .demo .demo-item, .js .demo .demo-total { opacity: 0; transform: translateY(8px); transition: opacity .45s var(--ease-out), transform .45s var(--ease-out); }
.js .demo .demo-item.is-in, .js .demo .demo-total.is-in { opacity: 1; transform: none; }
.js .demo .bar { transform: scaleX(0); transition: transform .9s var(--ease-out); }
[dir="rtl"] .bar { transform-origin: right center; }
[dir="ltr"] .bar { transform-origin: left center; }
.js .demo .demo-total.is-in .bar { transform: scaleX(1); }

/* ---------- Sections ---------- */

.section { padding-block: clamp(76px, 9vw, 132px); }
.section-head { max-width: 760px; }
.section-head h2, .h2 { font-size: clamp(2rem, 1.2rem + 2.8vw, 3.4rem); margin-top: 14px; }
html[lang="en"] .section-head h2, html[lang="en"] .h2 { font-size: clamp(2.1rem, 1.1rem + 3.2vw, 3.7rem); }
.section-head p { margin-top: 18px; font-size: 1.125rem; color: var(--ink-3); max-width: 40em; }
html[lang="en"] .section-head p { max-width: 36em; }

/* Three ways to log */
.ways { display: grid; gap: 16px; margin-top: 48px; }
@media (min-width: 860px) { .ways { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.way { display: flex; flex-direction: column; padding: 26px; border-radius: 28px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--hairline), var(--card-shadow); }
.way-mark { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--amber); color: var(--on-amber); }
.way-mark .icon { width: 26px; height: 26px; stroke-width: 2.25; }
.way h3 { margin-top: 22px; font-size: 1.5rem; }
html[lang="en"] .way h3 { font-size: 1.6rem; }
.way p { margin-top: 12px; color: var(--ink-3); }
.way-foot { margin-top: auto; padding-top: 18px; }
.way-foot span { display: inline-block; margin-top: 18px; padding: 6px 12px; border-radius: 999px; background: var(--amber-soft); color: var(--amber-text); font-size: .875rem; font-weight: 700; }

/* The menu board */
.food { display: grid; gap: 44px; margin-top: 48px; align-items: start; }
@media (min-width: 980px) { .food { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; } }
.food-facts { font-size: 1.1875rem; color: var(--ink-2); }
.food-note { margin-top: 18px; font-size: 1rem; color: var(--ink-3); }
.food-facts b { font-family: var(--font-display); font-weight: var(--w-display); color: var(--ink-1); font-size: 1.35em; letter-spacing: var(--track-display); }

.menu { padding: clamp(22px, 3vw, 36px); border-radius: 32px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--hairline), var(--card-shadow); }
.menu-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 14px; margin-bottom: 6px; box-shadow: inset 0 -1px 0 var(--hairline); font-size: .8125rem; font-weight: 700; color: var(--ink-3); }
.menu ul { display: grid; column-gap: 40px; }
@media (min-width: 640px) { .menu ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.menu li { display: flex; align-items: baseline; gap: 10px; padding-block: 13px; box-shadow: inset 0 -1px 0 var(--hairline); }
.m-name { font-weight: 800; color: var(--ink-1); line-height: 1.35; }
/* The line under a dish: its region, and on the English page its Persian name first. */
.m-sub { display: block; font-weight: 600; font-size: .8125rem; color: var(--ink-3); line-height: 1.6; }
.m-lead { flex: 1; min-width: 12px; border-bottom: 2px dotted var(--ink-5); transform: translateY(-5px); }
.m-portion { font-size: .875rem; color: var(--ink-3); white-space: nowrap; }
.m-kcal { font-weight: 800; color: var(--ink-1); white-space: nowrap; min-width: 2.6em; text-align: end; }
.menu-foot { margin-top: 16px; font-size: .8125rem; color: var(--ink-3); }

/* Three colours */
.plate-band { background: var(--sand); }
.tiles { display: grid; gap: 14px; margin-top: 48px; }
@media (min-width: 760px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
.tile { position: relative; overflow: hidden; min-height: 210px; padding: 24px; border-radius: 30px; display: flex; flex-direction: column; justify-content: space-between; }
.tile-p { background: var(--protein); color: var(--on-protein); }
.tile-c { background: var(--carb); color: var(--on-carb); }
.tile-f { background: var(--fat); color: var(--on-fat); }
.tile-role { font-size: 1rem; font-weight: 800; }
.tile-name { font-family: var(--font-display); font-weight: var(--w-display); font-size: clamp(2.6rem, 2rem + 2.4vw, 3.8rem); line-height: 1.1; letter-spacing: var(--track-display); }
/* "Pomegranate" is the longest word on the page; sized so it fits a third of the row. */
html[lang="en"] .tile-name { font-size: clamp(2.2rem, 1.4rem + 1.6vw, 3rem); }
.tile-name [lang="fa"] { display: block; font-family: "Darbareh", sans-serif; font-size: 1.125rem; font-weight: 700; letter-spacing: 0; line-height: 1.6; opacity: .92; }
/* a quiet echo of a ring: the one shape every macro takes in the app */
.tile::after { content: ""; position: absolute; width: 190px; height: 190px; border-radius: 50%; border: 18px solid currentColor; opacity: .10; inset-block-start: -56px; inset-inline-end: -56px; }
.plate-split { margin-top: 18px; padding: 22px 24px; border-radius: 28px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--hairline); display: grid; gap: 16px; }
@media (min-width: 860px) { .plate-split { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: 36px; } }
.plate-split .bar { height: 16px; margin-top: 12px; }
.plate-split-title { font-weight: 800; color: var(--ink-1); }
.plate-split p { color: var(--ink-3); }

/* The rest of the day */
.day { display: grid; gap: 14px; margin-top: 48px; }
@media (min-width: 640px) { .day { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .day { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
.day-card { padding: 22px 22px 24px; border-radius: 26px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--hairline), var(--card-shadow); }
.day-card .icon { width: 26px; height: 26px; color: var(--amber-text); }
.day-card h3 { margin-top: 16px; font-size: 1.25rem; line-height: 1.35; }
html[lang="en"] .day-card h3 { font-size: 1.375rem; line-height: 1.1; }
.day-card h3 [lang="fa"] { font-size: .875rem; font-weight: 700; color: var(--ink-3); margin-inline-start: 6px; letter-spacing: 0; }
.day-card p { margin-top: 8px; color: var(--ink-3); font-size: 1rem; }

/* Never scolds */
.kind { text-align: center; }
.kind .display-2 { font-size: clamp(2.3rem, 1.2rem + 4.4vw, 4.8rem); margin-inline: auto; max-width: 14em; }
html[lang="en"] .kind .display-2 { font-size: clamp(2.5rem, 1.1rem + 5vw, 5.3rem); }
.kind-lines { display: grid; gap: 0; margin: 44px auto 0; max-width: 980px; }
@media (min-width: 860px) { .kind-lines { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.kind-lines li { padding: 22px 20px; font-size: 1.125rem; font-weight: 600; color: var(--ink-2); box-shadow: inset 0 1px 0 var(--hairline); }
@media (min-width: 860px) { .kind-lines li + li { box-shadow: inset 0 1px 0 var(--hairline), inset -1px 0 0 var(--hairline); } [dir="ltr"] .kind-lines li + li { box-shadow: inset 0 1px 0 var(--hairline), inset 1px 0 0 var(--hairline); } }
.kind-foot { margin-top: 26px; color: var(--ink-3); font-size: 1rem; }

/* Privacy */
.privacy { display: grid; gap: 44px; align-items: start; }
@media (min-width: 980px) { .privacy { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 64px; } }
.facts { display: grid; gap: 14px; }
@media (min-width: 640px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fact { display: flex; gap: 14px; padding: 20px; border-radius: 24px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--hairline); }
.fact .icon { width: 24px; height: 24px; color: var(--amber-text); margin-top: 4px; }
.fact p { color: var(--ink-2); font-size: 1rem; }
.link { display: inline-flex; align-items: center; gap: 6px; margin-top: 24px; font-weight: 700; color: var(--amber-text); text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }
.link .icon { width: 18px; height: 18px; }

/* Install */
.install { display: grid; gap: 16px; margin-top: 48px; }
@media (min-width: 860px) { .install { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
.install-card { padding: 28px; border-radius: 28px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--hairline), var(--card-shadow); }
.install-card h3 { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; }
.install-card h3 .icon { color: var(--amber-text); }
.steps { margin-top: 20px; display: grid; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; color: var(--ink-2); }
.step-n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber-text); font-weight: 800; font-size: .9375rem; line-height: 1; }
.steps .icon { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; color: var(--ink-3); }
.kbd { display: inline-block; padding: 0 .45em; border-radius: 8px; background: var(--field); box-shadow: inset 0 0 0 1px var(--hairline); font-weight: 700; color: var(--ink-1); }

/* FAQ */
.faq { margin-top: 44px; max-width: 860px; display: grid; gap: 10px; }
.faq details { border-radius: 22px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--hairline); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; font-weight: 800; color: var(--ink-1); font-size: 1.125rem; line-height: 1.5; border-radius: 22px; }
.faq summary::-webkit-details-marker { display: none; }
/* physical borders on purpose: a chevron points DOWN in both directions, so it must not mirror */
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2.5px solid var(--ink-3); border-bottom: 2.5px solid var(--ink-3); transform: translateY(-3px) rotate(45deg); transition: transform .25s var(--ease-out); }
.faq details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq details p { padding: 0 22px 22px; color: var(--ink-3); }

/* Finale: the second silk */
.finale-wrap { padding-block: 24px clamp(40px, 6vw, 72px); }
.finale { position: relative; isolation: isolate; overflow: hidden; border-radius: clamp(28px, 4vw, 44px); min-height: 440px; display: grid; place-items: center; text-align: center; padding: 72px 24px; color: #F6EFE9; }
.finale-bg { position: absolute; inset: 0; z-index: -1; background: var(--finale-fallback); }
.finale-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 70% at 50% 50%, rgba(29, 26, 24, .35), rgba(29, 26, 24, 0) 70%); }
.finale h2 { color: #FCF0E2; font-size: clamp(2.4rem, 1.2rem + 4.4vw, 4.6rem); }
html[lang="en"] .finale h2 { font-size: clamp(2.6rem, 1.2rem + 5vw, 5.1rem); }
.finale p { margin-top: 16px; color: #E4DAD2; font-size: 1.1875rem; }
.finale .btn { margin-top: 30px; }

/* Footer */
.footer { padding-block: 36px 48px; box-shadow: inset 0 1px 0 var(--hairline); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; }
.footer .brand { font-size: 1.375rem; }
.footer-tag { font-size: .9375rem; color: var(--ink-3); margin-inline-start: 12px; font-weight: 600; font-family: var(--font-body); letter-spacing: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: .9375rem; }
.footer-links a { color: var(--ink-3); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--ink-1); text-decoration: underline; text-underline-offset: 4px; }
/* The owner's statement about the company behind Noura (2026-09-27): bold, as asked. */
.footer-legal { width: 100%; padding-top: 18px; border-top: 1px solid var(--hairline); font-size: 1rem; font-weight: 800; color: var(--ink-1); }
.footer-copy { width: 100%; margin-top: -10px; font-size: .875rem; color: var(--ink-4); }

/* ---------- Scroll reveals ---------- */

.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal-2 { transition-delay: .08s; } .js .reveal-3 { transition-delay: .16s; }

/* Reduced motion: things still arrive, by fading only; the caret stops blinking. The silk keeps
   moving, slowed (assets/silk.js), and the demo keeps typing: letters appearing are not movement. */
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .demo .demo-item, .js .demo .demo-total { transform: none; }
  .js .demo .bar { transform: none; transition: none; }
  .rot-word::after { transition: none; }
  .demo-caret { animation: none; }
  .btn, .btn:hover, .btn:active { transform: none; }
}
