/* Thoraya, round 4: night all the way (ROUND4.md, ROUND4-DESIGN.md).
   One line of light through a real night: a blue-black sky lit from the top
   left at 135°, starlight for text, and one accent, the blue-white of
   al-Thurayya's own stars. No radial washes (build.mjs checks), no warm end
   on any gradient, no glow on hover. */

@font-face { font-family: 'Kufam'; src: url(/fonts/kufam-700.woff2) format('woff2'); font-weight: 700; font-display: swap;
  ascent-override: 92%; descent-override: 40%; line-gap-override: 0%; }
@font-face { font-family: 'Reem Kufi'; src: url(/fonts/reem-kufi-400-700.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url(/fonts/plex-arabic-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url(/fonts/plex-arabic-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url(/fonts/plex-arabic-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Schibsted'; src: url(/fonts/schibsted-grotesk-var.woff2) format('woff2'); font-weight: 400 900; font-display: swap; }

:root {
  --night-0: #05070D; --night-1: #0A1020; --surface-1: #0E1526; --surface-2: #152038;
  --line: #22304D; --line-strong: #5B6D95;
  /* round 4.2: the small text lighter, for Arabic (the owner: "a little dark, hard to read") */
  --star-0: #F2F5FC; --star-1: #C6CEDE; --star-2: #A4AFC6; --star-3: #4E5A75;
  --accent: #8EB2FF; --accent-hi: #B5CDFF; --on-accent: #05070D;
  --grad-night: linear-gradient(135deg, #0A1020 0%, #070B16 45%, #05070D 100%);
  --grad-star: linear-gradient(135deg, #DCE6FF 0%, #8EB2FF 60%, #7AA2F7 100%);
  --grad-edge: linear-gradient(135deg, rgba(220,230,255,.42) 0%, rgba(142,178,255,.12) 38%, rgba(142,178,255,0) 70%);
  --grad-surface: linear-gradient(135deg, #111A2E 0%, #0B1222 100%);
  --ease-out: cubic-bezier(.16,1,.3,1); --ease-move: cubic-bezier(.76,0,.24,1); --ease-in: cubic-bezier(.5,0,.75,0); --ease-line: cubic-bezier(.65,0,.35,1);
  --r-1: 8px; --r-2: 14px;
  /* the scale (round 4.2): display type a step smaller, the small sizes a step bigger */
  --t-d1: clamp(2.5rem, 1.5rem + 3.9vw, 5rem);
  --t-d2: clamp(1.75rem, 1.3rem + 1.9vw, 3rem);
  --t-title: clamp(1.25rem, 1.12rem + .55vw, 1.5rem);
  --t-lead: clamp(1.125rem, 1.06rem + .3vw, 1.3125rem);
  --t-body: clamp(1.0625rem, 1.03rem + .12vw, 1.125rem);
  --t-ui: 1rem;
  --t-label: .9375rem;
  --gut: clamp(16px, 4.4vw, 64px);
  --bar-h: 72px;
  --f-display: 'Kufam', 'Schibsted', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --f-text: 'IBM Plex Sans Arabic', 'Schibsted', system-ui, sans-serif;
  --f-lat: 'Schibsted', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  color-scheme: dark;
}
:root[lang="en"] { --f-display: 'Schibsted', system-ui, sans-serif; --f-text: 'Schibsted', 'IBM Plex Sans Arabic', system-ui, sans-serif; --t-label: .875rem; --t-ui: .9375rem; }
:root.font-reem[lang="ar"] { --f-display: 'Reem Kufi', 'Schibsted', 'IBM Plex Sans Arabic', system-ui, sans-serif; }
@media (max-width: 760px) { :root { --bar-h: 60px; } }

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 240ms; animation-timing-function: linear; }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night-0); color: var(--star-0); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 8px); }
body { margin: 0; min-height: 100vh; background: transparent; font: 400 var(--t-body)/1.8 var(--f-text); -webkit-font-smoothing: antialiased; overflow-x: clip; }
:root[lang="en"] body { line-height: 1.55; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; text-wrap: balance; }
p { text-wrap: pretty; }
bdi { unicode-bidi: isolate; }
.lat, [lang="en"] .lat { font-family: var(--f-lat); font-weight: 800; letter-spacing: -.03em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(142,178,255,.32); color: var(--star-0); }
.wrap { width: min(1280px, 100% - 2 * var(--gut)); margin-inline: auto; }
@media (max-width: 760px) { .wrap { width: calc(100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right)); } }

/* the night: a fixed layer, the same 135° light as the 3D sky, and its star tiles */
.night { position: fixed; inset: 0; height: 100lvh; z-index: -2; background: var(--grad-night); pointer-events: none; }
.night .tiles { position: absolute; inset: 0; background: url(/img/stars-near.svg) 0 0 / 512px 512px, url(/img/stars-far.svg) 137px 61px / 512px 512px; opacity: .9;
  transform: translate3d(0, calc(var(--sy, 0) * -0.03px), 0); }
/* the end of ThorayaEdu (round 4.4): black silk instead of the plain night, under the finished star
   (edu.js draws the same picture) and the sections after it; the picture loads near the end */
.silk { position: fixed; inset: 0; height: 100lvh; z-index: -2; background: var(--night-0) center / cover no-repeat; opacity: 0; transition: opacity .6s; pointer-events: none; }
.silk.load { background-image: url(/img/silk.jpg); }
.silk.on { opacity: 1; }
#world { position: fixed; inset: 0; width: 100vw; height: 100lvh; z-index: -1; display: block; opacity: 0; transition: opacity .3s linear; pointer-events: none; }
.has-3d #world { opacity: 1; }
/* the film is coming (boot.js): till it is ready the deck shows nothing, so its words never
   appear first in the plain layout and then jump (the owner, round 4.4). After 10 s without it,
   the plain page shows anyway */
.will-3d:not(.has-3d):not(.static) .deck { visibility: hidden; animation: show-late 0s linear 10s forwards; }
@keyframes show-late { to { visibility: visible; } }
/* ThorayaEdu's scene, starting under the flight from Thoraya (main.js) */
.world-next { position: fixed; inset: 0; width: 100vw; height: 100lvh; z-index: -1; display: block; opacity: 0; transition: opacity .25s linear; pointer-events: none; }

/* ---------- type */
.d1, h1 { font-size: var(--t-d1); line-height: 1.38; }
:root[lang="en"] .d1, :root[lang="en"] h1 { font-size: clamp(2.25rem, 1.3rem + 4vw, 4.75rem); line-height: 1.02; letter-spacing: -.035em; }
h2 { font-size: var(--t-d2); line-height: 1.4; }
:root[lang="en"] h2 { line-height: 1.06; letter-spacing: -.025em; }
h3 { font-size: var(--t-title); line-height: 1.5; }
:root[lang="en"] h3 { line-height: 1.2; letter-spacing: -.01em; }
.lead { font-size: var(--t-lead); line-height: 1.75; color: var(--star-1); max-inline-size: 34em; }
:root[lang="en"] .lead { line-height: 1.5; max-inline-size: 36em; }
.label, .kicker { font: 500 var(--t-label)/1.6 var(--f-text); color: var(--star-2); letter-spacing: 0; }
:root[lang="en"] .label, :root[lang="en"] .kicker { letter-spacing: .01em; line-height: 1.5; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding-inline: 22px; border-radius: var(--r-2);
  font: 700 var(--t-ui)/1.2 var(--f-text); white-space: nowrap;
  transition: transform .16s var(--ease-out), background-position .32s var(--ease-out), border-color .2s, color .2s, background-color .2s; }
.btn:active { transform: scale(.98); }
.btn .ico { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--grad-star); background-size: 180% 180%; background-position: 100% 100%; color: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255,255,255,.55); }
.btn-primary:focus-visible { outline-color: var(--star-0); }
.btn-secondary { background: transparent; color: var(--star-0); border: 1px solid var(--line-strong); }
.btn-sm { min-height: 40px; padding-inline: 14px; font-weight: 500; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background-position: 0 0; }
  .btn-secondary:hover { border-color: var(--accent); background-color: rgba(142,178,255,.06); }
}
.btn-go { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding-inline: 4px; color: var(--star-0); font: 700 var(--t-ui)/1.2 var(--f-text); }
.btn-go .streak { inline-size: 10px; block-size: 1.5px; background: currentColor; transition: inline-size .24s var(--ease-out); position: relative; }
.btn-go .streak::after { content: ''; position: absolute; inset-inline-end: -1px; top: -3px; width: 7px; height: 7px; border-block-start: 1.5px solid; border-inline-end: 1.5px solid; transform: rotate(45deg); }
:root[dir="rtl"] .btn-go .streak::after { transform: rotate(-45deg); }
@media (hover: hover) and (pointer: fine) { .btn-go:hover .streak { inline-size: 22px; } }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding-inline: 12px; border-radius: 999px; background: var(--surface-1); border: 1px solid var(--line);
  font: 500 var(--t-label)/1 var(--f-text); color: var(--star-1); width: max-content; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--star-2); }
.chip.live .dot { background: var(--accent); border-color: var(--accent); }
.prose a, .note a, .tel a, .mail a, .ans a { color: var(--star-0); text-decoration: underline 1px var(--accent); text-underline-offset: .32em; }
.note a:hover, .tel a:hover, .mail a:hover { text-decoration-thickness: 2px; color: var(--accent-hi); }

/* ---------- the bar */
.skip { position: fixed; inset-inline-start: 12px; top: -60px; z-index: 50; background: var(--star-0); color: var(--night-0); padding: 10px 14px; border-radius: var(--r-1); font-weight: 700; }
.skip:focus { top: 12px; }
.bar { position: fixed; inset-inline: 0; top: 0; z-index: 30; height: calc(var(--bar-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) var(--gut) 0;
  display: flex; align-items: center; gap: 28px; view-transition-name: bar; transition: background-color .3s linear, border-color .3s linear; border-bottom: 1px solid transparent; }
.bar.solid, .page-faq .bar, .page-lost .bar { background: rgba(5,7,13,.88); border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--star-0); flex: none; }
.brand .mark { height: 30px; width: auto; flex: none; }
:root[dir="rtl"] .brand .mark { transform: translateY(1px); }
.brand .word { font: 700 24px/1 var(--f-display); }
:root[lang="en"] .brand .word { font: 700 22px/1 var(--f-lat); letter-spacing: -.01em; }
.brand .sub { font: 800 15px/1 var(--f-lat); letter-spacing: -.02em; color: var(--star-1); padding-inline-start: 10px; border-inline-start: 1px solid var(--line-strong); }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .brand .mark path { stroke-dasharray: 100; stroke-dashoffset: 0; }
  .brand:hover .mark path { animation: redraw .7s var(--ease-line); }
}
@keyframes redraw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.menu { display: flex; align-items: center; gap: 26px; margin-inline-start: auto; font: 500 var(--t-ui)/1.2 var(--f-text); }
.menu a { color: var(--star-1); padding-block: 10px; transition: color .2s; }
.menu a:hover, .menu a[aria-current] { color: var(--star-0); }
.menu .menu-tel { display: none; }
/* contact, in the bar from the first screen on (round 4.4) */
.btn-contact { min-height: 44px; padding-inline: 20px; }
.btn-contact .short { display: none; }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: var(--r-2); border: 1px solid var(--line-strong); position: relative; flex: none; }
.menu-btn span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--star-0); transition: transform .3s var(--ease-out); }
.menu-btn span:first-child { top: 17px; } .menu-btn span:last-child { top: 25px; }
.menu-open .menu-btn span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .menu-btn span:last-child { transform: translateY(-4px) rotate(-45deg); }
@media (max-width: 900px) {
  .bar { gap: 10px; }
  .brand .mark { height: 24px; } .brand .word { font-size: 22px; } :root[lang="en"] .brand .word { font-size: 20px; }
  .brand .sub { font-size: 13px; padding-inline-start: 8px; }
  .menu-btn { display: block; }
  .btn-contact { margin-inline-start: auto; min-height: 40px; padding-inline: 16px; }
  .btn-contact .long { display: none; } .btn-contact .short { display: inline; }
  .menu { position: fixed; inset: calc(var(--bar-h) + env(safe-area-inset-top)) 0 auto; margin: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px;
    background: var(--surface-1); border-bottom: 1px solid var(--line); font-size: 18px; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .24s, transform .32s var(--ease-out), visibility 0s .32s; }
  .menu a { padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--star-0); }
  .menu .menu-tel { display: block; border-bottom: 0; color: var(--accent); }
  .menu-open .menu { visibility: visible; opacity: 1; transform: none; transition: opacity .24s, transform .32s var(--ease-out); }
}

/* ---------- the deck: Thoraya alone, star 1, star 2. Without 3D they are
   three plain sections; with 3D (.deck-3d) the words ride fixed over the sky
   and main.js shows each station's words at its station. */
.deck { position: relative; }
.st { position: relative; min-height: 100svh; padding: calc(var(--bar-h) + 24px) var(--gut) 40px; display: grid; align-items: center; }
.st-words { display: grid; gap: 20px; justify-items: start; max-inline-size: 640px; position: relative; z-index: 2; }
.st-words .brief { color: var(--star-1); font-size: var(--t-lead); line-height: 1.75; max-inline-size: 30em; }
:root[lang="en"] .st-words .brief { line-height: 1.5; }
.st-words .sub { font: 700 var(--t-title)/1.5 var(--f-display); }
.st-words h2.lat { font-size: var(--t-d2); line-height: 1.06; direction: ltr; }
.st-hero { grid-template-columns: 58fr 42fr; gap: 24px; }
.st-hero .st-words { max-inline-size: 860px; }
.st-hero .st-words { grid-column: 1; grid-row: 1; }
.st-hero .st-art { grid-column: 2; grid-row: 1; justify-self: center; width: min(46svh, 40vw); }
.st-hero h1 .ln { display: block; }
/* the hero's mark waits for the film, which draws it (round 4.2: "invisible till it loads").
   Without the film (html.static) it shows; if main.js never runs, it shows after 8 s. */
.st-hero .st-art { opacity: 0; }
.static .st-hero .st-art { opacity: 1; transition: opacity .4s; }
:root:not(.js) .st-hero .st-art { animation: showLate 0s 8s forwards; }
@keyframes showLate { to { opacity: 1; } }
.seven { color: var(--star-0); overflow: visible; }
.seven .ln { stroke: var(--star-0); opacity: .85; }
.seven .s { fill: var(--star-0); }
.cue { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: grid; justify-items: center; gap: 8px;
  font: 500 var(--t-label)/1 var(--f-text); color: var(--star-2); }
.cue i { width: 1px; height: 24px; background: linear-gradient(to bottom, var(--star-2), transparent); }
@media (prefers-reduced-motion: no-preference) { .cue i { animation: streak 1.6s var(--ease-in) infinite; transform-origin: top; } }
@keyframes streak { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1) translateY(12px); opacity: 0; } }
.st-edu { grid-template-columns: 1fr 1fr; gap: 24px; }
.st-edu .st-words { grid-column: 1; grid-row: 1; }
.phone-hit { grid-column: 2; grid-row: 1; display: block; justify-self: center; width: min(62svh, 44vw); border-radius: 24px; }
.phone-hit .still { width: 100%; height: auto; border-radius: 24px; }
.st-calls { grid-template-columns: 1fr 1fr; gap: 24px; }
.st-calls .st-words { grid-column: 1; grid-row: 1; }
.call { grid-column: 2; grid-row: 1; margin: 0; position: relative; min-height: 340px; width: 100%; max-width: 560px; justify-self: center; display: grid; align-content: start; gap: 14px; padding-top: 96px; }
.call-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.call-line line { stroke: var(--star-1); stroke-width: 1.5; stroke-linecap: round; }
.call-line .back { opacity: 0; stroke: var(--accent); }
.handset, .biz { position: absolute; top: 42px; width: 28px; height: 28px; display: grid; place-items: center; transform: translate(-50%, -50%); }
.handset { color: var(--star-1); }
[dir="rtl"] .call .handset { left: 6%; } [dir="rtl"] .call .biz { left: 70%; }
[dir="ltr"] .call .handset { left: 94%; } [dir="ltr"] .call .biz { left: 30%; }
.handset svg { width: 20px; height: 20px; }
.biz i { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--star-2); background: var(--night-0); transition: background-color .3s, border-color .3s, transform .14s var(--ease-out); }
.call.answered .biz i, .call.static .biz i { background: var(--star-0); border-color: var(--star-0); }
.timer { position: absolute; top: 66px; font: 500 var(--t-label)/1 var(--f-lat); color: var(--star-1); font-variant-numeric: tabular-nums; direction: ltr; transform: translateX(-50%); opacity: 0; transition: opacity .3s; }
.call.answered .timer { opacity: 1; }
.call figcaption { font: 500 var(--t-label)/1.5 var(--f-text); color: var(--star-2); }
.transcript { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-inline-size: 26em; }
.transcript li { display: grid; gap: 2px; }
.transcript b { font: 500 var(--t-label)/1.5 var(--f-text); color: var(--star-2); }
.transcript .said { font: 500 var(--t-body)/1.7 var(--f-text); color: var(--star-1); }
.transcript .by-ai .said { color: var(--star-0); }
@media (max-width: 760px) {
  .st, .st-hero, .st-edu, .st-calls { grid-template-columns: 1fr; align-content: start; gap: 24px; padding-top: calc(var(--bar-h) + 16px); padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .st-hero { grid-template-rows: calc(52svh - var(--bar-h) - 40px) auto; }
  .st-hero .st-art { grid-column: 1; grid-row: 1; width: 62vw; align-self: center; }
  .st-hero .st-words { grid-row: 2; }
  .phone-hit { grid-column: 1; grid-row: 1; width: 78vw; }
  .st-edu .st-words { grid-row: 2; }
  .call { grid-column: 1; grid-row: 1; min-height: 0; }
  .st-calls .st-words { grid-row: 2; }
  .acts .btn { flex: 1 1 auto; }
}

/* with 3D: the stations are spacers, the words ride over the sky */
.deck-3d .st { min-height: 100svh; height: 100svh; }
.deck-3d .st-art { visibility: hidden; }
.deck-3d .phone-hit .still { display: none; }
.deck-3d .st-words, .deck-3d .call, .deck-3d .phone-hit, .deck-3d .cue { position: fixed; z-index: 3; }
.deck-3d .st-words { top: calc(50% + (var(--bar-h) - 16px) / 2); inset-inline-start: var(--gut); width: min(44vw, 640px); transform: translateY(-50%); }
.deck-3d .st-words, .deck-3d .call { opacity: 0; visibility: hidden; }
.deck-3d .st.on .st-words, .deck-3d .st.on .call { visibility: visible; opacity: 1; }
.deck-3d .phone-hit { left: var(--px, -999px); top: var(--py, -999px); width: var(--pw, 0); height: var(--ph, 0); border-radius: 18px; visibility: hidden; cursor: pointer; }
.deck-3d .st-edu.on .phone-hit { visibility: visible; }
.deck-3d .call { inset: 0; max-width: none; padding: 0; min-height: 0; pointer-events: none; }
.deck-3d .call .handset { top: var(--cy, 46%); left: var(--cx, 6%); }
.deck-3d .call .biz { top: var(--by, 46%); left: var(--bx, 40%); }
.deck-3d .call .biz i { width: 22px; height: 22px; background: transparent; }
.deck-3d .call.answered .biz i { background: transparent; border-color: var(--star-0); }
.deck-3d .call .timer { top: calc(var(--by, 46%) + 28px); left: var(--bx, 40%); }
.deck-3d .call figcaption, .deck-3d .call .transcript { position: absolute; width: min(26em, 34vw); }
.deck-3d .call figcaption { top: calc(var(--by, 46%) + 64px); }
.deck-3d .call .transcript { top: calc(var(--by, 46%) + 92px); }
[dir="rtl"] .deck-3d .call figcaption, [dir="rtl"] .deck-3d .call .transcript { right: calc(100vw - var(--bx, 40%)); left: auto; }
[dir="ltr"] .deck-3d .call figcaption, [dir="ltr"] .deck-3d .call .transcript { left: var(--bx, 60%); right: auto; }
.deck-3d .call .transcript li { opacity: .0; transition: opacity .5s; }
.deck-3d .call .transcript li.on, .deck-3d .call .transcript li.said-done { opacity: 1; }
.deck-3d .call .transcript li.said-done:not(.on) { opacity: .5; } /* what was said before: dimmer */
.deck-3d .call .w { opacity: 0; transition: opacity .2s var(--ease-out); }
.deck-3d .call .w.on { opacity: 1; }
.deck-3d .cue { position: fixed; opacity: 0; transition: opacity .4s; }
.deck-3d.cue-on .cue { opacity: 1; }
@media (max-width: 760px) {
  .deck-3d .st-words { top: auto; bottom: calc(20px + env(safe-area-inset-bottom)); inset-inline: 16px; width: auto; transform: none; gap: 14px; }
  .st-hero h1 { font-size: clamp(2rem, 1.2rem + 3.4vw, 2.4rem); line-height: 1.4; }
  :root[lang="en"] .st-hero h1 { font-size: clamp(1.9rem, 1.1rem + 3.4vw, 2.3rem); line-height: 1.06; }
  .deck-3d .st-edu .st-words { top: 56svh; bottom: auto; }
  .deck-3d .st-calls .st-words { top: auto; bottom: calc(20px + env(safe-area-inset-bottom)); }
  .deck-3d .st-words .brief { font-size: var(--t-body); line-height: 1.7; }
  .deck-3d .st-words .sub { font-size: 18px; }
  .deck-3d .call figcaption { top: calc(var(--by) + 30px); inset-inline: 16px; width: auto; }
  /* the conversation builds up from the bottom of its room; a new line pushes the older up, and
     the oldest fade out at the top */
  .deck-3d .call .transcript { top: calc(var(--by) + 62px); inset-inline: 16px; width: auto; height: var(--room, 180px);
    display: flex; flex-direction: column; justify-content: flex-end; gap: 0; overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 44px); mask-image: linear-gradient(to bottom, transparent, #000 44px); }
  .deck-3d .call .transcript li { flex: none; max-height: 0; overflow: hidden; transition: max-height .6s var(--ease-out), margin-top .6s var(--ease-out), opacity .5s; }
  .deck-3d .call .transcript li.said-done { max-height: 160px; margin-top: 12px; }
  /* across the screen: the desktop's placement beside the star (set by [dir], so stronger) would squeeze each line to a word */
  [dir] .deck-3d .call figcaption, [dir] .deck-3d .call .transcript { left: 16px; right: 16px; width: auto; }
  .deck-3d .call .transcript li.said-done:not(.on) { opacity: .45; }
  .deck-3d .call .timer { top: calc(var(--by) - 34px); }
}
@media (max-width: 760px) and (max-height: 700px) {
  .deck-3d .st-edu .st-words { top: 50svh; }
}
@media (max-width: 760px) { .cue { display: none; } }
/* ---------- after it the page scrolls as a page (the owner, round 4.2: "no traveling after
   build, just normal scrolling"): the examples, how we work, the promises, contact */
.trades-sec h2 { margin-bottom: 40px; }
.promises .plist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
.promises .plist li, .promises .plist li:first-child { grid-template-columns: 14px 1fr; gap: 14px; padding: 24px 0 0; border: 0; position: relative; }
.promises .plist li::before { content: ''; position: absolute; inset-inline: 0; top: 0; height: 1px; background: var(--grad-edge); }
:root[dir="rtl"] .promises .plist li::before { transform: scaleX(-1); }
/* the promises end on one closing row: the years behind them, and ThorayaEdu's own terms */
.p-end { position: relative; margin-top: 64px; padding-top: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 48px; }
.p-end::before { content: ''; position: absolute; inset-inline: 0; top: 0; height: 1px; background: var(--line); }
.p-end .fact { font: 700 var(--t-title)/1.5 var(--f-display); color: var(--star-0); }
.p-end .note { font-size: var(--t-ui); max-inline-size: 40em; }
/* the homepage's sections sit closer than the ThorayaEdu page's */
.page-home .sec { padding-block: 112px; }
.page-home .contact { padding-bottom: 136px; }
.contact .composer { justify-items: center; width: 100%; max-width: 640px; text-align: center; margin-top: 8px; }
@media (max-width: 1100px) { .promises .plist { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .trades-sec h2 { margin-bottom: 28px; }
  .promises .plist { grid-template-columns: 1fr; gap: 24px; }
  .promises .plist li, .promises .plist li:first-child { padding-top: 16px; }
  .p-end { margin-top: 40px; padding-top: 20px; }
  .page-home .sec { padding-block: 80px; }
}

/* the hero (round 4.2): the words centred above the two hands */
.deck-3d .st-hero .st-words { top: calc(var(--bar-h) + 7svh); transform: none; inset-inline: var(--gut); width: auto; max-width: 1000px; margin-inline: auto; justify-items: center; text-align: center; }
.deck-3d .st-hero .acts { justify-content: center; }
.deck-3d .st-hero h1 { font-size: clamp(2.25rem, 1.4rem + 2.8vw, 4rem); }
@media (max-width: 760px) {
  .deck-3d .st-hero .st-words { top: calc(var(--bar-h) + 20px); bottom: auto; inset-inline: 16px; }
  .deck-3d .st-hero h1 { font-size: clamp(1.875rem, 1.2rem + 3vw, 2.25rem); }
}

/* entrances (CSS only: the H1, sub-line and buttons are there at first paint) */
@media (prefers-reduced-motion: no-preference) {
  .st-hero h1 .ln, .st-hero .lead, .st-hero .acts { animation: riseIn .6s var(--ease-out) both; }
  .st-hero h1 .ln:nth-child(1) { animation-delay: 80ms; } .st-hero h1 .ln:nth-child(2) { animation-delay: 150ms; }
  .st-hero .lead { animation-delay: 200ms; } .st-hero .acts { animation-delay: 300ms; }
}
@keyframes riseIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- the sections after the deck */
.sec { position: relative; padding-block: 160px; }
.sec-head { display: grid; gap: 16px; margin-bottom: 64px; max-inline-size: 760px; }
.js .rise { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); transition-delay: calc(var(--i, 0) * 60ms); }
.js .rise.in { opacity: 1; transform: none; }
.trades li { position: relative; padding-top: 24px; display: grid; gap: 10px; align-content: start; }
.trades li::before { content: ''; position: absolute; inset-inline: 0; top: 0; height: 1px; background: var(--grad-edge); }
:root[dir="rtl"] .trades li::before { transform: scaleX(-1); }
.trades p { color: var(--star-1); }
.trades { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.flow { width: 100%; height: 44px; overflow: visible; margin-top: 4px; }
.flow .ln { stroke: var(--star-1); stroke-width: 1.5; fill: none; }
.js .flow .ln { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .7s var(--ease-line) .15s; }
.flow .nd { fill: var(--star-0); transform-box: fill-box; transform-origin: center; }
.js .flow .nd { transform: scale(.6); opacity: 0; transition: transform .3s var(--ease-out), opacity .3s; transition-delay: calc(.3s + var(--i) * 80ms); }
.js .draw.in .flow .ln { stroke-dashoffset: 0; } .js .draw.in .flow .nd { transform: none; opacity: 1; }
.flow-labels { display: flex; justify-content: space-between; font: 500 var(--t-label)/1.4 var(--f-text); color: var(--star-2); margin-top: -20px; }
@media (max-width: 760px) { .sec { padding-block: 96px; } .sec-head { margin-bottom: 40px; } .trades { grid-template-columns: 1fr; gap: 32px; } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; padding-top: 40px; }
.steps::before, .steps::after { content: ''; position: absolute; top: 7px; inset-inline: 4px; height: 1.5px; background: var(--star-3); }
.steps::after { background: var(--accent); transform-origin: var(--from, right) center; transform: scaleX(var(--fill)); }
:root[dir="ltr"] .steps { --from: left; }
.steps li { display: grid; gap: 10px; align-content: start; }
.steps .node { position: absolute; top: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--night-0); border: 1.5px solid var(--star-3); z-index: 1; transition: border-color .3s, background-color .3s; }
.steps li { position: relative; }
.steps li .node { top: -40px; inset-inline-start: 0; }
.steps li.lit .node { border-color: var(--accent); background: var(--accent); }
.steps p { color: var(--star-1); }
.composer { display: grid; gap: 18px; justify-items: start; background: var(--grad-surface); border-radius: var(--r-2); padding: 32px; position: relative; max-width: 720px; }
.composer::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: var(--grad-edge); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.draft { font: 500 var(--t-title)/1.6 var(--f-text); color: var(--star-0); }
.blank { display: inline-block; width: 4.5em; height: 1.1em; vertical-align: -0.2em; border-bottom: 1.5px solid var(--star-1); position: relative; margin-inline: .2em; }
.caret { position: absolute; inset-inline-start: 4px; bottom: 3px; width: 1.5px; height: 1em; background: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .caret { animation: blink 1.1s steps(1) infinite; } }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; padding-top: 0; padding-inline-start: 36px; gap: 32px; }
  .steps::before, .steps::after { top: 4px; bottom: 4px; inset-inline-start: 7px; inset-inline-end: auto; width: 1.5px; height: auto; }
  .steps::after { transform-origin: center top; transform: scaleY(var(--fill)); }
  .steps li .node { top: 6px; inset-inline-start: -36px; }
  .composer { padding: 24px; }
  .composer .btn { width: 100%; }
}

.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: grid; grid-template-columns: 14px 1fr; gap: 20px; padding-block: 32px; border-bottom: 1px solid var(--line); }
.plist li:first-child { padding-top: 0; }
.pmark { width: 14px; height: auto; color: var(--accent); margin-top: .65em; }
.plist h3 { margin-bottom: 8px; }
.plist p { color: var(--star-1); }
.fact { font-size: var(--t-lead); line-height: 1.75; color: var(--star-0); }
.note { color: var(--star-2); }

.contact { text-align: center; }
.contact .wrap { display: grid; justify-items: center; gap: 24px; }
.contact .lead { max-inline-size: 30em; }
.contact h2.d1 { line-height: 1.45; }
:root[lang="en"] .contact h2.d1 { line-height: 1.02; }
.bookend { width: 160px; height: 160px; margin-bottom: 8px; }
@media (max-width: 760px) { .bookend { width: 112px; height: 112px; } }
.draw .ln { stroke-dasharray: 1; stroke-dashoffset: 0; }
.bookend .s { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .js .bookend.draw .ln { stroke-dashoffset: 1; transition: stroke-dashoffset .9s var(--ease-line) .1s; }
  .js .bookend.draw .s { opacity: 0; transition: opacity .3s; transition-delay: calc(.1s + var(--k, 0) * 90ms); }
  .js .bookend.draw.in .ln { stroke-dashoffset: 0; }
  .js .bookend.draw.in .s { opacity: 1; }
}
.tel { font: 600 var(--t-title)/1.4 var(--f-lat); color: var(--star-1); }
.tel a { color: var(--star-0); }
.mail { color: var(--star-2); }
.demo-note { margin-top: -6px; }

/* ---------- the footer */
.foot { border-top: 1px solid var(--line); background: var(--night-0); padding: 48px 0 calc(40px + env(safe-area-inset-bottom)); }
.foot-in { display: grid; grid-template-columns: auto 1fr; gap: 24px 48px; align-items: center; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: flex-end; font: 500 var(--t-ui)/1.2 var(--f-text); }
.foot-links a { color: var(--star-1); padding-block: 8px; }
.foot-links a:hover, .foot-legal a:hover { color: var(--star-0); }
.foot-legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 20px; font: 500 var(--t-label)/1.6 var(--f-text); }
.foot-legal a { color: var(--star-2); padding-block: 6px; }
.rights { grid-column: 1 / -1; font: 500 var(--t-label)/1.6 var(--f-text); color: var(--star-2); }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr; } .foot-links { justify-content: flex-start; } }

/* ---------- ThorayaEdu's page: a deck too (round 4.1). The hero, then one
   station per moment (one scroll = one slow flight), then the rise. Without
   3D each station is a plain section with its still. */
.edu-deck .st { align-content: center; }
.st-ehero { grid-template-columns: 1fr 1fr; gap: 24px; }
.st-ehero .st-words { grid-column: 1; grid-row: 1; max-inline-size: 640px; }
.st-ehero h1 { font-size: clamp(2.25rem, 1.3rem + 3.6vw, 4.75rem); line-height: 1.38; }
.st-ehero h1 .lat { line-height: 1; }
:root[lang="en"] .st-ehero h1 { line-height: 1.04; }
.hero-still { grid-column: 2; grid-row: 1; width: min(100%, 62svh); justify-self: center; border-radius: 24px; }
.m-head { display: grid; gap: 14px; padding: 96px var(--gut) 24px; }
.m-head h2 { font-size: var(--t-d2); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.tab { font: 500 15px/1.2 var(--f-text); color: var(--star-2); padding: 10px 0 8px; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.tab:hover { color: var(--star-1); }
.tab.on { color: var(--star-0); border-bottom-color: var(--accent); }
.m-count { display: none; }
.st-moment { grid-template-columns: 1fr 1fr; gap: 48px; }
.st-moment .still { grid-column: 2; grid-row: 1; width: 100%; max-width: 520px; border-radius: 24px; justify-self: center; }
.st-moment .m-words { grid-column: 1; grid-row: 1; display: grid; gap: 14px; max-inline-size: 34em; }
.m-words h3 { font-size: var(--t-d2); line-height: 1.4; }
:root[lang="en"] .m-words h3 { line-height: 1.06; }
.m-words p { color: var(--star-1); font-size: var(--t-lead); line-height: 1.75; }
:root[lang="en"] .m-words p { line-height: 1.5; }
.st-rise { min-height: 0; padding: 0; }
.static .st-rise { display: none; }
@media (max-width: 760px) {
  .st-ehero, .st-moment { grid-template-columns: 1fr; }
  .hero-still, .st-moment .still { grid-column: 1; width: 78vw; }
  .st-ehero .st-words, .st-moment .m-words { grid-row: 2; }
  .m-head { padding: 64px 16px 8px; }
}

/* with 3D: every station's words ride fixed over the film, shown only at their station */
.deck-3d .st-rise { height: 100svh; }
.deck-3d .hero-still, .deck-3d .st-moment .still { display: none; }
@media (min-width: 761px) { .deck-3d .st-moment[data-side="end"] .st-words { inset-inline-start: auto; inset-inline-end: var(--gut); } }
.deck-3d .m-head { position: fixed; z-index: 3; top: calc(var(--bar-h) + env(safe-area-inset-top) + 20px); inset-inline-start: var(--gut); width: min(640px, 50vw); padding: 0; gap: 10px; visibility: hidden; }
.deck-3d .m-head.on { visibility: visible; }
.deck-3d .m-head h2 { font-size: var(--t-title); line-height: 1.5; color: var(--star-1); }
.deck-3d .st-moment .m-words { width: min(40vw, 560px); }
@media (max-width: 760px) {
  .deck-3d .st-ehero .st-words { top: 47svh; bottom: auto; inset-inline: 16px; width: auto; transform: none; gap: 12px; }
  .deck-3d .st-ehero h1 { font-size: clamp(1.75rem, 1rem + 4vw, 2.25rem); line-height: 1.4; }
  .deck-3d .st-ehero .lead { font-size: var(--t-body); line-height: 1.7; }
  .deck-3d .m-head { inset-inline: 16px; width: auto; top: calc(var(--bar-h) + env(safe-area-inset-top) + 10px); gap: 2px; }
  .deck-3d .m-head h2 { font-size: 14px; line-height: 1.5; }
  .deck-3d .m-head .tabs { display: none; }
  .deck-3d .m-head .m-count { display: block; }
  .deck-3d .st-moment .m-words { inset-inline: 16px; width: auto; transform: none; }
  .deck-3d .m-words h3 { font-size: clamp(1.75rem, 1.1rem + 3vw, 2.125rem); }
  .deck-3d .m-words p { font-size: var(--t-body); line-height: 1.75; }
  /* the picture on top: the words together at the bottom */
  .deck-3d .st-moment[data-layout="top"] .m-words { top: auto; bottom: calc(28px + env(safe-area-inset-bottom)); }
  /* the picture in the middle: the title above it, the words below it */
  .deck-3d .st-moment[data-layout="mid"] .m-words { top: calc(var(--bar-h) + env(safe-area-inset-top) + 64px); bottom: calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; justify-content: space-between; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .deck-3d .st-ehero .st-words { top: 44svh; }
  .deck-3d .st-ehero .demo-note { display: none; }
}

/* the FAQ: rows, not cards */
.faq-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.qas { border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); transition: background-color .2s; }
.qa[open] { background: var(--surface-1); }
.qa summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 16px; font: 700 var(--t-body)/1.6 var(--f-text); color: var(--star-0); }
.qa summary::-webkit-details-marker { display: none; }
.qa-mark { width: 14px; height: auto; color: var(--star-2); flex: none; transition: transform .32s var(--ease-out); }
.qa[open] .qa-mark { transform: rotate(25.7deg); color: var(--accent); }
.qa .ans { padding: 0 16px 24px; }
.qa .ans p { color: var(--star-1); max-inline-size: 42em; }
.page-faq main { padding-top: calc(var(--bar-h) + 64px); padding-bottom: 96px; }
.page-head { display: grid; gap: 16px; justify-items: start; margin-bottom: 64px; }
.back-edu { font: 800 15px/1 var(--f-lat); color: var(--accent); letter-spacing: -.02em; padding-block: 8px; }
.themes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.theme { margin-bottom: 64px; scroll-margin-top: calc(var(--bar-h) + 16px); }
.theme h2 { font-size: var(--t-title); margin-bottom: 16px; color: var(--star-1); }
.faq-end { display: grid; justify-items: center; gap: 20px; padding-top: 64px; }

/* the 404 */
.lost-in { min-height: 100svh; padding-top: calc(var(--bar-h) + 96px); padding-bottom: 96px; display: grid; align-content: start; gap: 48px; }
.lost-mark { width: 72px; height: auto; color: var(--star-0); }
.lost { display: grid; gap: 18px; justify-items: start; }
.lost h1 { font-size: var(--t-d2); line-height: 1.4; }
.en-first .lost[lang="en"] { order: -1; }
.en-first .lost-mark { order: -2; }

/* ---------- reduced motion: everything at rest */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .rise { opacity: 1; transform: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 160ms !important; }
}

/* stills (tools/render-stills.mjs): only the 3D picture */
.still-mode main, .still-mode .bar, .still-mode .foot, .still-mode .skip { opacity: 0 !important; }
.still-mode #world { transition: none; }
