/* ═══════════════════════════════════════════════════════════════════════════════
   sections.css — landing page section layout only. Component internals live in
   components.css; anything reusable belongs there, not here.
   ═══════════════════════════════════════════════════════════════════════════════ */

.section {
  padding-block: clamp(72px, 9vw, 136px);
}

.section-tight { padding-block: clamp(var(--s5), 4.5vw, 72px); }

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  max-width: 760px;
  margin-block-end: clamp(var(--s5), 5vw, 64px);
}
.section-head.is-center {
  text-align: center;
  margin-inline: auto;
  align-items: center;
}
.section-head.is-center .eyebrow { align-self: center; }
.section-head .t-body-lg { max-width: 54ch; }

/* ── Hero ─────────────────────────────────────────────────────────────────────
   Solid brand yellow pulled up under the sticky nav, rounded off at the
   bottom. The line on one side; on the other the home screen, running off
   the hero's bottom edge, with tonight's plan lifted off it. */
.hero {
  position: relative;
  margin-block-start: calc(var(--nav-height) * -1);
  padding-block-start: calc(var(--nav-height) + clamp(var(--s4), 4vw, 56px));
  border-end-start-radius: 48px;
  border-end-end-radius: 48px;
  background: var(--accent);
  color: var(--accent-on);
  /* `clip`, not `hidden`: nothing may add sideways scroll, and clip creates
     no scroll container. `hidden` is the fallback for browsers without clip. */
  overflow: hidden;
  overflow: clip;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: var(--s5);
  align-items: stretch;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 28px;
  padding-block: var(--s5) clamp(var(--s6), 8vw, 112px);
}

/* The outlined-SVG headline, inlined so fill="currentColor" inherits the ink
   and the type follows the theme. The aspect-ratio values come from the viewBox
   that site/tools/make-headlines.py prints, and reserve the exact height so the
   hero never shifts as the page settles. */
.hero-headline {
  display: block;
  width: 100%;
  max-width: 600px;
  color: var(--accent-on);
}
.hero-headline svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3.8707;   /* headline-en.svg */
}
[lang="ar"] .hero-headline svg {
  aspect-ratio: 2.8089;   /* headline-ar.svg — taller: Arabic tails reach well
                             below the nominal descender */
}
[lang="ar"] .hero-headline { max-width: 520px; }

/* Live-text fallback, used when the SVG headline has not been generated. */
.hero-headline-text { max-width: 14ch; font-size: clamp(44px, 6vw, 76px); letter-spacing: -.04em; }

.hero-sub {
  max-width: 32ch;
  font-size: clamp(19px, 1.9vw, 23px);
  font-weight: var(--fw-medium);
  line-height: 1.5;
  text-wrap: balance;
  /* Ink on yellow at 80% still clears 10:1. */
  color: color-mix(in srgb, var(--accent-on) 80%, transparent);
}
.hero-sub .face-chip { margin-inline-start: 6px; }

.hero-tri {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: var(--fs-caption);
  font-weight: var(--fw-black);
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
[lang="ar"] .hero-tri {
  text-transform: none;
  letter-spacing: 0;
  font-size: var(--fs-body-sm);
}
.hero-tri-mark { inline-size: 12px; block-size: 12px; }

/* The visual column. Everything in it is placed against this box, and the
   phone hangs past its bottom, where the hero's own edge cuts it off. */
.hero-visual {
  position: relative;
  min-block-size: 620px;
}
.hero-visual > * { position: absolute; }

/* Centred with a logical inset and a --dir-signed shift, so it stays centred
   in both directions. */
.hero-phone {
  z-index: 1;
  inset-block-start: 36px;
  inset-inline-start: 50%;
  inline-size: 320px;
  translate: calc(-50% * var(--dir)) 0;
  rotate: calc(4deg * var(--dir));
}

.hero-lift {
  z-index: 2;
  inset-block-start: 150px;
  inset-inline-start: calc(50% - 260px);
  inline-size: 340px;
  rotate: calc(-6deg * var(--dir));
  animation: hero-lift-in 900ms var(--e-spring) 250ms both;
}
@keyframes hero-lift-in {
  from { opacity: 0; transform: translateY(24px) scale(.96); }
}

.hero-mascot {
  z-index: 3;
  inset-block-start: -14px;
  inset-inline-end: 0;
  inline-size: clamp(80px, 7.5vw, 104px);
  animation: mascot-float 4.5s var(--e-glide) infinite alternate;
}

.hero-float-1 { --spin: 6deg;   z-index: 3; inline-size: 88px; block-size: 88px; inset-block-start: 300px; inset-inline-end: -12px; animation-delay: -1s; }
.hero-float-2 { --spin: -6deg;  z-index: 3; inline-size: 68px; block-size: 68px; inset-block-start: 440px; inset-inline-start: 0; animation-delay: -2.4s; }
.hero-float-3 { --spin: 4deg;   z-index: 0; inline-size: 58px; block-size: 58px; inset-block-start: 46px;  inset-inline-start: 4%; animation-delay: -3.6s; }
.hero-float-4 { --spin: -10deg; z-index: 3; inset-block-start: 170px; inset-inline-end: -6px; animation-delay: -.6s; }
.hero-float-5 { --spin: 8deg;   z-index: 3; inset-block-start: 520px; inset-inline-end: 8%; animation-delay: -1.8s; inline-size: 60px; block-size: 60px; border-radius: 18px; font-size: 30px; }
.hero-float-6 { --spin: 8deg;   z-index: 0; inline-size: 40px; inset-block-start: 110px; inset-inline-start: 14%; }
.hero-float-7 { --spin: -6deg;  z-index: 0; inline-size: 28px; inset-block-start: 420px; inset-inline-end: 3%; animation-delay: -2s; }
.hero-float-8 { --spin: 12deg;  z-index: 0; inline-size: 26px; inset-block-start: 20px;  inset-inline-end: 34%; animation-delay: -3.2s; }

@media (prefers-reduced-motion: reduce) {
  .hero-mascot, .hero-lift { animation: none; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero-copy {
    align-items: center;
    text-align: center;
    padding-block: var(--s4) var(--s5);
  }
  .hero-copy .store-row,
  .hero-copy .hero-tri { justify-content: center; }
  .hero-headline { margin-inline: auto; max-width: 520px; }
  .hero-visual { min-block-size: 500px; inline-size: 100%; max-inline-size: 520px; margin-inline: auto; }
  .hero-phone { inline-size: 270px; inset-block-start: 20px; }
  .hero-lift { inline-size: 290px; inset-block-start: 110px; inset-inline-start: calc(50% - 200px); }
  .hero-mascot { inset-block-start: -6px; inset-inline-end: 2%; }
  .hero-float-1 { inline-size: 64px; block-size: 64px; inset-block-start: 290px; inset-inline-end: 0; }
  .hero-float-2 { inline-size: 54px; block-size: 54px; inset-block-start: 380px; }
  .hero-float-3, .hero-float-5, .hero-float-6, .hero-float-8 { display: none; }
  .hero-float-4 { inset-block-start: 180px; inline-size: 58px; block-size: 58px; border-radius: 17px; font-size: 28px; }
}

@media (max-width: 420px) {
  .hero-lift { inline-size: 270px; inset-inline-start: calc(50% - 172px); }
  .hero-float-4 { display: none; }
}

/* ── The loop: stacking step cards ────────────────────────────────────────── */
.step-stack {
  display: flex;
  flex-direction: column;
  gap: var(--s5);
  counter-reset: step;
}

.step-card {
  counter-increment: step;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s5);
  min-block-size: 580px;
  padding: clamp(var(--s5), 5vw, 64px);
  padding-block-end: 0;
  overflow: hidden;
  border-radius: 44px;
  box-shadow: 0 -18px 50px -24px rgba(var(--shadow-rgb), .45);
}
.step-card-blue   { background: var(--scene-blue);   color: var(--on-scene-dark); }
.step-card-lime   { background: var(--scene-lime);   color: var(--on-scene-light); }
.step-card-purple { background: var(--scene-purple); color: var(--on-scene-dark); }

.step-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--s3);
  padding-block-end: clamp(var(--s5), 5vw, 64px);
}

/* 01 / 02 / 03 — and ١ / ٢ / ٣ in Arabic, from the same counter. */
/* Solid and translucent rather than outlined: -webkit-text-stroke traces every
   contour of the system font's variable glyphs, overlaps included, and draws
   stray lines inside the 2 and the 3. */
.step-number {
  font-size: clamp(72px, 9vw, 128px);
  font-weight: var(--fw-black);
  line-height: .9;
  letter-spacing: -.05em;
  opacity: .3;
}
.step-number::before { content: counter(step, decimal-leading-zero); }
[lang="ar"] .step-number::before { content: counter(step, arabic-indic); }
[lang="ar"] .step-number { letter-spacing: 0; line-height: 1.1; }

.step-badge {
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, currentColor 16%, transparent);
  font-size: var(--fs-caption);
  font-weight: var(--fw-black);
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
[lang="ar"] .step-badge { text-transform: none; letter-spacing: 0; font-size: var(--fs-body-sm); }

.step-title {
  font-size: clamp(30px, 3.8vw, 48px);
  font-weight: var(--fw-black);
  line-height: 1.05;
  letter-spacing: -.03em;
  text-wrap: balance;
}
[lang="ar"] .step-title { line-height: var(--lh-tight); letter-spacing: 0; }

.step-body {
  max-width: 34ch;
  font-size: var(--fs-body-lg);
  line-height: 1.55;
  opacity: .86;
}

/* The phone rises out of the card's bottom edge and is cut off by it; one card
   from its screen is lifted off it, out toward the copy. */
.step-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-block-start: var(--s2);
}
.step-visual .phone {
  inline-size: 290px;
  margin-block-end: -240px;
  rotate: calc(3deg * var(--dir));
  transition: rotate var(--t-slow) var(--e-spring), translate var(--t-slow) var(--e-spring);
}
.step-card:hover .step-visual .phone { rotate: 0deg; translate: 0 -10px; }

.step-lift {
  position: absolute;
  z-index: 2;
  inline-size: min(330px, 86%);
  inset-inline-start: calc(50% - 235px);
  rotate: calc(-5deg * var(--dir));
  transition: rotate var(--t-slow) var(--e-spring), translate var(--t-slow) var(--e-spring);
}
.step-card:hover .step-lift { rotate: calc(-7deg * var(--dir)); translate: calc(-8px * var(--dir)) -6px; }
.lift-create.step-lift    { inset-block-start: 112px; }
.lift-invite.step-lift    { inset-block-start: 190px; inline-size: min(310px, 82%); }
.lift-chat-plan.step-lift { inset-block-start: 118px; }

/* On a tall-enough desktop each card sticks under the nav and the next slides
   over it, a little lower each time so the edges of the stack show. Short or
   narrow screens skip this: a card taller than the window would stick with its
   bottom out of view. */
@media (min-width: 900px) and (min-height: 760px) {
  .step-card {
    position: sticky;
    inset-block-start: calc(var(--nav-height) + var(--s3) + var(--stack-offset, 0px));
  }
  .step-card:nth-child(2) { --stack-offset: 18px; }
  .step-card:nth-child(3) { --stack-offset: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .step-visual .phone, .step-lift { transition: none; }
}

@media (max-width: 899px) {
  .step-card {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s2);
    min-block-size: 0;
    border-radius: 36px;
    padding: var(--s5) var(--s4) 0;
  }
  .step-copy { padding-block-end: 0; }
  .step-visual { block-size: 440px; overflow: hidden; margin-inline: calc(var(--s4) * -1); }
  .step-visual .phone { inline-size: 260px; margin-block-end: 0; }
  .step-lift { inset-inline-start: calc(50% - 160px); inline-size: min(280px, 76%); }
}

/* ── Features ─────────────────────────────────────────────────────────────── */
.bento {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.tile {
  position: relative;
  overflow: hidden;
  border-radius: 40px;
}

.tile-copy { display: flex; flex-direction: column; gap: var(--s2); max-width: 40ch; }
.tile-title {
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: var(--fw-black);
  line-height: 1.12;
  letter-spacing: -.02em;
}
[lang="ar"] .tile-title { letter-spacing: 0; line-height: var(--lh-snug); }
.tile-body { color: var(--text-faint-strong); font-size: var(--fs-body-md); }

/* Where a tile's lifted cards float. */
.tile-art { position: relative; }
.tile-art > .activity { position: absolute; z-index: 2; }

/* Calendar: copy above the month card. */
.tile-calendar {
  grid-column: span 7;
  display: flex;
  flex-direction: column;
  gap: var(--s5);
  padding: clamp(var(--s4), 4vw, 48px);
  background: var(--card);
  border: 1px solid var(--hairline);
}
.tile-calendar .tile-art { display: flex; justify-content: center; padding-block-end: var(--s3); }
.lift-month {
  inline-size: min(440px, 100%);
  rotate: calc(-3deg * var(--dir));
  transition: rotate var(--t-slow) var(--e-spring);
}
.tile-calendar:hover .lift-month { rotate: 0deg; }
.tile-activity-1 { inset-block-start: -18px; inset-inline-end: 4%;  rotate: calc(10deg * var(--dir)); }
.tile-activity-2 { inset-block-end: 0;      inset-inline-start: 2%; rotate: calc(-8deg * var(--dir)); inline-size: 60px; block-size: 60px; border-radius: 18px; font-size: 30px; }

/* The gaming scene, with the plan it would be. */
.tile-scene {
  grid-column: span 5;
  min-block-size: 420px;
  background: var(--scene-purple);
}
.tile-scene img {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: 40% 100%;
  background: none;
  transition: transform 1.2s var(--e-glide);
}
.tile-scene:hover img { transform: scale(1.04); }

.scene-chip {
  position: absolute;
  inset-block-start: var(--s4);
  inset-inline-start: var(--s4);
  display: flex;
  align-items: center;
  gap: 10px;
  max-inline-size: calc(100% - var(--s5));
  padding: 7px;
  padding-inline-end: 18px;
  border-radius: var(--r-pill);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-dialog);
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-bold);
  rotate: calc(-3deg * var(--dir));
}
.scene-chip .emoji-tile { border-radius: var(--r-pill); }

/* Chat: dark, the full width, copy beside the lifted poll and message. */
.tile-chat {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: var(--s5);
  padding: clamp(var(--s5), 5vw, 64px);
  background: var(--bg);
  color: var(--ink);
}
.tile-chat .tile-art {
  display: grid;
  justify-items: center;
  min-block-size: 360px;
}
.lift-poll {
  grid-area: 1 / 1;
  inline-size: min(380px, 78%);
  rotate: calc(3deg * var(--dir));
  translate: calc(40px * var(--dir)) 0;
}
.lift-message {
  grid-area: 1 / 1;
  align-self: end;
  z-index: 1;
  inline-size: min(420px, 86%);
  rotate: calc(-4deg * var(--dir));
  translate: calc(-50px * var(--dir)) 24px;
}
.tile-activity-3 { inset-block-start: -10px; inset-inline-start: 8%; rotate: calc(-10deg * var(--dir)); }

@media (max-width: 900px) {
  .tile-calendar, .tile-scene, .tile-chat { grid-column: 1 / -1; }
  .tile-scene { min-block-size: 0; aspect-ratio: 1 / .9; }
  .tile-chat { grid-template-columns: minmax(0, 1fr); }
  .tile-chat .tile-art { min-block-size: 0; padding-block: var(--s4) var(--s5); }
  .lift-poll { translate: calc(20px * var(--dir)) 0; }
  .lift-message { translate: calc(-20px * var(--dir)) 40px; }
}

/* ── FAQ ──────────────────────────────────────────────────────────────────── */
.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(var(--s5), 5vw, 80px);
  align-items: start;
}

.faq-head {
  position: sticky;
  inset-block-start: calc(var(--nav-height) + var(--s4));
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.faq-mascot {
  inline-size: clamp(110px, 12vw, 160px);
  margin-block-start: var(--s4);
  animation: mascot-float 4.5s var(--e-glide) infinite alternate;
}

@media (max-width: 900px) {
  .faq-layout { grid-template-columns: minmax(0, 1fr); }
  .faq-head { position: static; }
  .faq-mascot { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .faq-mascot { animation: none; }
}

/* ── Final CTA ────────────────────────────────────────────────────────────────
   The store's mascot header: the mascot in the middle, friends, activities and
   sparkles floating round the line, no illustration. */
.final-cta {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s4);
  overflow: hidden;
  padding: clamp(64px, 8vw, 112px) var(--gutter);
  border-radius: 48px;
  background: var(--accent);
  color: var(--accent-on);
  text-align: center;
}

.final-mascot {
  inline-size: clamp(104px, 11vw, 148px);
  animation: mascot-float 4.5s var(--e-glide) infinite alternate;
}

.final-title {
  font-size: clamp(48px, 7vw, 96px);
  font-weight: var(--fw-black);
  line-height: .95;
  letter-spacing: -.05em;
}
[lang="ar"] .final-title { line-height: 1.25; letter-spacing: 0; }

.final-body {
  max-width: 42ch;
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-medium);
  color: color-mix(in srgb, var(--accent-on) 80%, transparent);
}
.final-cta .store-row { justify-content: center; }

/* Behind the copy (z-index -1 inside the isolated panel). */
.final-floats { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.final-floats > * { position: absolute; }
.final-float-1 { --spin: -6deg;  inline-size: 104px; block-size: 104px; inset-block-start: 14%; inset-inline-start: 8%; animation-delay: -1s; }
.final-float-2 { --spin: 6deg;   inline-size: 86px;  block-size: 86px;  inset-block-end: 14%;   inset-inline-end: 9%; animation-delay: -2.6s; }
.final-float-3 { --spin: 4deg;   inline-size: 62px;  block-size: 62px;  inset-block-end: 16%;   inset-inline-start: 17%; animation-delay: -3.8s; }
.final-float-4 { --spin: 8deg;   inset-block-start: 12%; inset-inline-end: 14%; animation-delay: -.4s; }
.final-float-5 { --spin: -10deg; inset-block-start: 48%; inset-inline-start: 4%; animation-delay: -2s; inline-size: 60px; block-size: 60px; border-radius: 18px; font-size: 30px; }
.final-float-6 { --spin: 6deg;   inset-block-start: 44%; inset-inline-end: 4%; animation-delay: -3.2s; inline-size: 60px; block-size: 60px; border-radius: 18px; font-size: 30px; }
.final-float-7 { --spin: 10deg;  inline-size: 46px; inset-block-start: 34%; inset-inline-start: 20%; }
.final-float-8 { --spin: -8deg;  inline-size: 30px; inset-block-start: 9%;  inset-inline-start: 30%; animation-delay: -1.4s; }
.final-float-9 { --spin: 12deg;  inline-size: 36px; inset-block-end: 12%;   inset-inline-end: 26%; animation-delay: -2.8s; }

@media (max-width: 900px) {
  .final-cta { border-radius: 36px; }
  .final-float-3, .final-float-5, .final-float-6, .final-float-7, .final-float-9 { display: none; }
  .final-float-1 { inline-size: 64px; block-size: 64px; inset-block-start: 5%; inset-inline-start: 5%; }
  .final-float-2 { inline-size: 56px; block-size: 56px; inset-block-end: auto; inset-block-start: 6%; inset-inline-end: 6%; }
  .final-float-4 { inset-block-start: auto; inset-block-end: 4%; inset-inline-end: 6%; inline-size: 52px; block-size: 52px; border-radius: 16px; font-size: 26px; }
  .final-float-8 { inset-block-start: 20%; inset-inline-start: 22%; }
}

@media (prefers-reduced-motion: reduce) {
  .final-mascot { animation: none; }
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer {
  position: relative;
  overflow: hidden;
  margin-block-start: var(--s5);
  padding-block-start: clamp(56px, 6vw, 88px);
  border-radius: 48px 48px 0 0;
  background: var(--bg);
  color: var(--ink);
}

.footer-grid {
  display: grid;
  gap: var(--s5);
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  margin-block-end: var(--s6);
}

.footer-brand { display: flex; flex-direction: column; gap: var(--s3); }
.footer-brand .mark { width: 36px; }
.footer-brand .nav-brand { font-size: 24px; }
.footer-tagline { font-size: var(--fs-title-lg); font-weight: var(--fw-semibold); color: var(--text-faint-strong); }

.footer-col { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.footer-col h3 {
  font-size: var(--fs-caption);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  margin-block-end: var(--s1);
}
[lang="ar"] .footer-col h3 { text-transform: none; letter-spacing: 0; font-size: var(--fs-body-sm); }

.footer-col a {
  font-size: var(--fs-body-sm);
  color: var(--text-faint-strong);
  transition: color var(--t-fast), transform var(--t-fast) var(--e-spring);
}
.footer-col a:hover { color: var(--ink); transform: translateX(calc(3px * var(--dir))); }

.footer-bottom {
  display: flex;
  gap: var(--s3);
  flex-wrap: wrap;
  align-items: center;
  padding-block-start: var(--s4);
  border-block-start: 1px solid var(--hairline);
  font-size: var(--fs-caption);
  color: var(--text-faint-strong);
}
.footer-bottom .footer-legal-note { margin-inline-start: auto; }

/* The giant name, whole: room below for the descender of the p, and the
   Arabic artwork's swash tail sits inside its own viewBox. */
.footer-giant {
  display: flex;
  justify-content: center;
  margin-block-start: var(--s4);
  padding-block-end: .1em;
  font-size: clamp(110px, 27vw, 400px);
  line-height: 1;
  color: var(--accent);
  user-select: none;
  pointer-events: none;
}
.footer-giant-en {
  font-weight: var(--fw-black);
  letter-spacing: -.06em;
  direction: ltr;
}
.footer-giant-ar { display: block; inline-size: 78%; padding-block-end: var(--s5); }
.footer-giant-ar svg { display: block; inline-size: 100%; block-size: auto; }

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: span 2; }
  .footer-bottom .footer-legal-note { margin-inline-start: 0; }
  .footer { border-radius: 32px 32px 0 0; }
}

/* ── 404 and the invite fallback ───────────────────────────────────────────── */
.notfound {
  padding-block: var(--s4) var(--s6);
}
.notfound-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s5);
  min-block-size: 70vh;
  padding: clamp(var(--s6), 7vw, 96px) var(--gutter);
  border-radius: 48px;
  background: var(--accent);
  color: var(--accent-on);
  text-align: center;
}
.notfound-mascot { inline-size: clamp(96px, 12vw, 140px); animation: mascot-float 4.5s var(--e-glide) infinite alternate; }
.notfound-code {
  font-size: clamp(96px, 18vw, 220px);
  font-weight: var(--fw-black);
  line-height: .85;
  letter-spacing: -.06em;
}
/* This page serves both trees, so both languages are stacked and each block sets
   its own dir. A hairline separates them. */
.notfound-block { display: flex; flex-direction: column; gap: var(--s3); align-items: center; max-inline-size: 460px; }
.notfound-block .dim { color: color-mix(in srgb, var(--accent-on) 74%, transparent); }
.notfound-block + .notfound-block {
  padding-block-start: var(--s5);
  border-block-start: 1px solid color-mix(in srgb, var(--accent-on) 16%, transparent);
  inline-size: min(460px, 100%);
}
.notfound-panel .btn-filled { background: var(--accent-on); color: var(--accent); }
.notfound-home { font-weight: var(--fw-bold); text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .notfound-mascot { animation: none; }
}
