
:root{color-scheme:dark;--ink:#f0f0e6;--quiet:#b5bdb2;--bg:#0b0e0c}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.5 system-ui,sans-serif}h1,h2,p{margin:0}a{color:inherit}
:focus-visible{outline:2px solid #faf8df;outline-offset:5px}
.opening{min-height:100svh;isolation:isolate;display:grid;align-content:center;position:relative;overflow:hidden;padding:clamp(26px,7.2vw,124px)}
.slit{position:absolute;z-index:-2;top:0;bottom:0;right:0;width:70%;margin:0}
.slit svg{height:100%;width:100%;display:block;object-fit:cover}
.fade{position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#0b0e0c 0%,#0b0e0c 29%,#0b0e0c 36%,#0b0e0cea 42%,#0b0e0c48 60%,#0b0e0c00 70%);pointer-events:none}
.copy{padding-bottom:20px;width:max-content;max-width:100%}
.eyebrow,.chapter{font:11px/1.4 system-ui,sans-serif;letter-spacing:.19em;text-transform:uppercase;color:var(--quiet);font-weight:600}
h1{font:650 clamp(54px,7.75vw,118px)/.90 system-ui,sans-serif;letter-spacing:-.057em;word-spacing:.025em;margin:.22em 0 .25em;position:relative}
.copy p:not(.eyebrow):not(.wake-up-heading){max-width:29ch;color:var(--quiet);font-size:17px;line-height:1.56}
.jump{display:inline-flex;padding:12px 0 10px;align-items:center;min-height:48px;gap:28px;margin-top:23px;border-bottom:1px solid #b4bdac;text-decoration:none;font-weight:680}
.jump:hover{border-color:#fff;color:#fff}.jump .arrow{font-size:21px;font-weight:400;transition:transform .16s ease-out}.jump:hover .arrow{transform:translate(2px,2px)}
.frame-number{position:absolute;right:clamp(24px,4.6vw,90px);bottom:36px;color:#b5bdb2;font-size:10px;letter-spacing:.15em}
#cloth{transform-box:fill-box;transform-origin:right;animation:rustle .72s .10s ease-out both}
@keyframes rustle{0%{transform:rotate(.85deg) scaleX(.985)}50%{transform:rotate(-.5deg)}100%{transform:none}}
.exercise{background:#141813;border-top:1px solid #292f28;padding:clamp(42px,8vw,120px) clamp(24px,12vw,180px);min-height:47vh}
.exercise[hidden]{display:none}.exercise h2{font-size:clamp(36px,5.7vw,70px);line-height:1.03;letter-spacing:-.052em;margin:.2em 0 .3em}.exercise p:not(.chapter){color:var(--quiet);max-width:53ch}.exercise p+p{margin-top:14px}.exercise .jump{margin-top:15px}
@media(max-width:730px){.opening{min-height:100svh;padding:36px 24px 52px;align-content:end}.slit{width:100%;height:min(66vh,560px);bottom:auto;overflow:hidden}.slit svg{height:100%;width:100%;margin:0;object-fit:cover}.fade{background:linear-gradient(180deg,transparent 10%,#0b0e0c02 30%,#0b0e0c78 44%,#0b0e0cf5 60%,#0b0e0c 73%)}.copy{width:auto;padding:0}.copy p:not(.eyebrow):not(.wake-up-heading){font-size:15px}h1{font-size:clamp(48px,11.8vw,77px);margin:.23em 0 .24em}.jump{margin-top:12px}.frame-number{display:none}}
@media(max-height:600px) and (max-width:730px){.slit{height:58vh}.opening{padding-top:31vh;padding-bottom:25px}}
@media(prefers-reduced-motion:reduce){#cloth,.jump .arrow{animation:none;transition:none}}

.skip{position:fixed;z-index:2;top:8px;left:8px;padding:12px;background:#0b0e0c;transform:translateY(-200%)}.skip:focus{transform:none}
.exercise-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:clamp(20px,5vw,75px);max-width:1180px;margin:auto}
.exercise-intro p:not(.chapter){max-width:39ch}
.wizard{padding:0 0 7px;border-top:1px solid #546052;min-width:0}
[hidden]{display:none!important}.progress{border-bottom:1px solid #374139;padding-block:12px}
.step{padding-top:18px}.step h3{font-size:clamp(23px,3vw,33px);line-height:1.15;letter-spacing:-.035em;margin:0 0 8px}
.step fieldset{display:grid;gap:8px;border:0;padding:0;margin:18px 0 0}
.step label{display:flex;align-items:center;gap:10px;min-height:44px;cursor:pointer;color:var(--ink);padding:5px 0;border-bottom:1px solid #374139}
.step input{width:17px;height:17px;accent-color:#e0e8d8;margin:0}
.actions{display:flex;flex-wrap:wrap;gap:16px;margin-top:12px;align-items:center}
.actions button{color:var(--ink);font:600 15px/1.25 system-ui,sans-serif;cursor:pointer}
.next{min-height:44px;background:#e1e7da;color:#101511!important;border:0;padding:9px 14px}.next:hover{background:#f3f5ee}
.prev{min-height:44px;background:none;border:0;text-decoration:underline;text-underline-offset:4px;padding-inline:6px}
.plan{margin-top:14px!important;border-inline-start:1px solid #96a298;padding-left:14px;color:var(--ink)!important}
.fallback{padding:16px 0;border-top:1px solid #546052}
footer{background:#101410;border-top:1px solid #30382e;color:var(--quiet);padding:22px clamp(24px,12vw,180px);font-size:13px}footer p{max-width:1180px;margin:auto}
@media(max-width:730px){.exercise-layout{grid-template-columns:1fr}.exercise{padding-top:52px}}

/* Reserve the same line height for every translation. Keep script direction
   local and reveal the complete shaped word, never isolated characters. */
.wake-up-row {
  display:flex; align-items:center; gap:clamp(4px,1vw,12px);
  min-height:1.4em; margin:-.18em 0 .32em;
  color:var(--ink);
  font:700 clamp(38px,4.4vw,67px)/1.28 system-ui,"Noto Sans Arabic","Geeza Pro","Arabic UI Display",Tahoma,sans-serif;
  letter-spacing:normal; word-spacing:normal; text-transform:none;
}
.copy .wake-up-heading { min-width:0; white-space:nowrap; margin:0 }
.wake-up-reveal { display:inline-block; position:relative; isolation:isolate }
.wake-up-reveal[data-compact="true"] { font-size:.83em }
.wake-up-reveal [lang="fa"],
.wake-up-reveal [lang="ar"],
.wake-up-reveal [lang="ur"] {
  font-family:"Noto Sans Arabic","Geeza Pro","Arabic UI Display",Tahoma,sans-serif;
}
.wake-up-reveal.is-scanning #wake-up-word { animation:wake-reveal .42s cubic-bezier(.2,.68,.3,1) both }
.wake-up-scan {
  position:absolute; left:0; right:0; top:12%; bottom:12%;
  color:#d0e6d5; opacity:0; pointer-events:none; overflow:hidden;
  font:600 10px/1 ui-monospace,monospace; letter-spacing:.12em;
}
.wake-up-scan::after {
  content:""; position:absolute; inset:0 auto 0 0; width:1px;
  background:#a9beae;
}
.wake-up-reveal.is-scanning .wake-up-scan { animation:wake-scan .39s ease-out both }
@keyframes wake-reveal {
  from { clip-path:inset(-18% 100% -18% 0); opacity:.65 }
  to { clip-path:inset(-18% 0 -18% 0); opacity:1 }
}
@keyframes wake-scan {
  0% { transform:translateX(0); opacity:0 }
  21% { opacity:.70 }
  100% { transform:translateX(100%); opacity:0 }
}
@media(max-width:730px) {
  .wake-up-row { font-size:clamp(32px,10vw,48px); margin:-.17em 0 .25em }
}
@media(max-width:355px) {
  .wake-up-reveal[data-compact="true"] { font-size:.77em }
}
@media(prefers-reduced-motion:reduce) {
  .wake-up-reveal.is-scanning #wake-up-word,.wake-up-reveal.is-scanning .wake-up-scan { animation:none }
}

/* Session threshold only. Before reveal, content is neither visible nor focusable.
   If JavaScript is off or cannot load at all, the original site remains visible. */
.name-pending #site-shell { display:none }
.name-gate {
  position:relative; isolation:isolate; display:grid; place-items:center;
  min-height:100vh; min-height:100svh;
  padding:clamp(24px,6vw,100px);
  background:radial-gradient(ellipse at 62% 43%,#151e19 0%,#0b0e0c 41%,#080b09 82%);
}
.name-gate::before {
  content:""; position:absolute; z-index:-1; top:11%; bottom:10%;
  left:clamp(25px,16.8vw,32%); width:1px; pointer-events:none;
  background:linear-gradient(180deg,transparent,#a6bfaa66 47%,transparent);
}
.name-gate-interior { inline-size:min(100%,40rem) }
.name-gate h1 {
  font-size:clamp(2.5rem,8vw,5.55rem); line-height:.99;
  letter-spacing:-.066em; margin:0 0 clamp(28px,6vw,54px);
}
.name-form-row {
  display:grid; grid-template-columns:minmax(0,1fr) 52px; align-items:center;
  gap:10px; border-bottom:1px solid #8e9d90; padding-bottom:8px;
}
.name-gate input,.name-gate button { font:inherit; color:inherit; border-radius:0 }
.name-gate input {
  inline-size:100%; min-inline-size:0; background:none; border:0;
  padding:9px 8px; font-size:clamp(1.125rem,3.5vw,1.46rem);
  min-block-size:48px;
}
.name-gate input:focus { outline:2px solid #cbd8c1; outline-offset:1px }
.name-gate button {
  display:grid; place-items:center; padding:0; min-block-size:48px; cursor:pointer;
  background:#121a15; border:1px solid #56675a; font-size:1.5rem;
}
.name-gate button:hover { background:#26362b; border-color:#c7d7c7 }
#name-error { margin:12px 0 0; color:var(--quiet) }
.hero-name {
  display:block; max-inline-size:min(100%,31rem); margin-block-end:.30em;
  font-size:clamp(1.65rem,4.4vw,3.6rem); line-height:1.1;
  letter-spacing:-.035em; color:#c2d0bf; overflow-wrap:anywhere;
}
@media(max-width:730px) { .hero-name { margin-block-end:.24em } }
@media(prefers-reduced-motion:no-preference) {
  .name-revealed .copy { animation:hero-arrives .34s ease-out both }
  @keyframes hero-arrives {
    from { opacity:.22; transform:translateY(7px) }
    to { opacity:1; transform:none }
  }
}

/* The heading receives programmatic focus after entry; it is not a control. */
#title[tabindex="-1"]:focus{outline:none}

/* The new scene is the hero background itself, with the static original as a fallback. */
.cinema{display:none;position:absolute;inset:0;overflow:hidden;z-index:-2;background:#0b0e0c;pointer-events:none}
.has-cinema .cinema{display:block}
.cinema svg{display:block;width:100%;height:100%;filter:blur(var(--zoom-blur,0px));transform:scale(1.004)}
/* The aligned artwork follows the existing daylight, camera and reverse beats.
   During the interactive crossing the original procedural hall remains visible. */
.prism-plates{display:none;position:absolute;inset:0;overflow:hidden;pointer-events:none}
.has-prism .prism-plates{display:block}
.prism-plates img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:60% 50%;transform-origin:60% 53%;transform:scale(var(--prism-scale,1))}
#prism-open{opacity:var(--prism-open,0)}
html.shadow-crossing .prism-plates{display:none}
.cinema span{position:absolute;inset:0}
.cinema-gold{background:radial-gradient(ellipse at 60% 47%,#fffbea 4%,#fbf1ce 49%,#eadbb1 100%);opacity:var(--gold-fill,0)}
.cinema-reset{background:#0b0e0c;opacity:var(--reset-opacity,0)}
.cinema-scan{background:repeating-linear-gradient(to bottom,transparent 0 5px,#b0dac044 5px 6px);opacity:var(--scan-opacity,0);mix-blend-mode:screen}
.film-texture{mix-blend-mode:soft-light}
.opening.has-cinema:not(.is-gold) .fade{background:linear-gradient(90deg,#0b0e0cfb 0%,#0b0e0cda 26%,#0b0e0c9b 52%,#0b0e0c05 87%)}
.opening.is-gold{--ink:#191811;--quiet:#302a1d;color:var(--ink)}
.opening.is-gold .fade{background:linear-gradient(90deg,#f7eed1ee,#f7eed1a0 53%,transparent 86%)}
.opening.is-gold .jump{border-color:#3a3325}.opening.is-gold .jump:hover{color:#090805;border-color:#090805}
.opening.is-gold .frame-number{color:#322c1d}
.opening.is-gold :focus-visible{outline-color:#302a1d}
@media(max-width:730px){
 .opening.has-cinema:not(.is-gold) .fade{background:linear-gradient(180deg,transparent 5%,#0b0e0c22 38%,#0b0e0cdd 58%,#0b0e0c 86%)}
 .opening.is-gold .fade{background:linear-gradient(180deg,transparent 9%,#f7eed1c7 52%,#f7eed1 87%)}
}
@media(prefers-reduced-motion:reduce){.opening .cinema{display:none!important}}
.opening.is-gold .hero-name{color:#383123}

/* Approved cinematic loop; the existing SVG remains the load/error/crossing fallback. */
.hero-film{display:none;position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 50%;filter:blur(var(--zoom-blur,0px));pointer-events:none}
.has-film .hero-film{display:block}
.has-film .prism-plates,.has-film #cinema-frame{visibility:hidden}
@media(prefers-reduced-motion:reduce){.hero-film{display:none!important}}

/* Use the actual film opening frame while the video loads, not the old illustration. */
.opening .slit{inset:0;width:100%;height:100%;margin:0}
.opening .slit img{width:100%;height:100%;object-fit:cover;object-position:50% 50%;display:block}
.hero-film{transform-origin:55% 52%;transform:scale(var(--film-scale,1));will-change:transform}

/* Portrait cinema: keep the source doorway centred throughout the approved loop.
   Movie and poster share the crop so the first frame never jumps. */
@media (max-aspect-ratio: 3/4) {
 .opening .slit img,.hero-film{height:76%;object-position:62% 50%}
 .hero-film{transform-origin:50% 52%}
 .prism-plates img{object-position:60.5% 50%;transform-origin:50% 53%}
}
