@font-face {
  font-family: "Cormorant Garamond";
  src: url("../assets/fonts/CormorantGaramond.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Sahel;
  src: url("../assets/fonts/Sahel-Light.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: Sahel;
  src: url("../assets/fonts/Sahel.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Sahel;
  src: url("../assets/fonts/Sahel-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --void: #080D19;
  --midnight: #121F38;
  --moonlight: #7388A8;
  --ivory: #D5C9B4;
  --gold: #D6A65D;
  --text: var(--ivory);
  --text-muted: #9AA9C1;
  --hairline: rgb(115 136 168 / 25%);
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: Sahel, system-ui, sans-serif;
  --font-utility: Sahel, system-ui, sans-serif;
  /* Base scroll length for a scene. Each scene scales it instead of setting its
     own absolute height, so the whole journey can be retimed from one number
     while the scenes keep their relative pace. Higher multiplier = slower. */
  --scene-track: 480svh;
  /* Scene 02: one sentence to read, so it needs less ground than a chapter. */
  --scene-tempo-language: 0.72;
  /* Scenes 03 and 05: three beats and a comet crossing need more ground, so the
     words and the light can be read while they arrive. */
  --scene-tempo-before-october: 1.35;
  --scene-tempo-beyond: 1.35;
  --type-display: clamp(3.5rem, 8.2vw, 9rem);
  --type-heading: clamp(2.4rem, 5vw, 5rem);
  --type-body: clamp(1rem, 1.15vw, 1.15rem);
  --type-caption: 0.625rem;
  --page-gutter: clamp(1.5rem, 4vw, 4.5rem);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --ease-camera: cubic-bezier(0.22, 0.61, 0.36, 1);
  --duration-ui: 180ms;
  --perspective: 1200px;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--void); scrollbar-color: var(--moonlight) var(--void); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; color: var(--text); background: var(--void); font-family: var(--font-body); font-size: var(--type-body); line-height: 1.65; }
button, input, summary { font: inherit; }
button, a, summary, input { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-underline-offset: 0.3em; }
button:disabled { cursor: default; }
button, summary { touch-action: manipulation; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--moonlight); outline-offset: 6px; }
::selection { background: var(--moonlight); color: var(--void); }
h1, h2, h3, p { margin-block: 0; }
h1, h2 { font-family: var(--font-display); font-weight: 400; line-height: 0.99; }
:lang(fa) { font-family: var(--font-body); letter-spacing: normal; line-height: 2; }
[dir="rtl"] { text-align: start; unicode-bidi: plaintext; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; inset: 1rem auto auto 1rem; padding: 0.75rem 1rem; background: var(--ivory); color: var(--void); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.eyebrow { font-family: var(--font-utility); font-size: var(--type-caption); font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-muted); line-height: 1.5; }
.global-ui { position: absolute; z-index: 30; inset: calc(var(--page-gutter) + var(--safe-top)) calc(var(--page-gutter) + var(--safe-right)) auto calc(var(--page-gutter) + var(--safe-left)); display: flex; justify-content: space-between; align-items: center; gap: 1rem; pointer-events: none; }
.global-ui > * { pointer-events: auto; }
.preview-marker { display: flex; align-items: center; gap: 0.8rem; }
.preview-marker span { opacity: 0.4; }
.sound-controller { display: flex; align-items: center; gap: 0.25rem; font-family: var(--font-utility); font-size: 0.6875rem; color: var(--text-muted); }
.sound-toggle { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; border: 0; background: none; padding: 0.5rem; font-size: inherit; }
.sound-toggle:hover, .volume-control summary:hover { color: var(--ivory); }
.sound-toggle[aria-pressed="false"] .sound-waves, .sound-toggle[aria-pressed="true"] .sound-slash { display: none; }
.volume-control { position: relative; }
.volume-control summary { display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; list-style: none; }
.volume-control summary::-webkit-details-marker { display: none; }
.volume-popover { position: absolute; inset: calc(100% + 0.5rem) 0 auto auto; width: min(240px, calc(100vw - 3rem)); padding: 1.1rem 1.25rem; border: 1px solid var(--hairline); background: var(--void); box-shadow: 0 1rem 3rem rgb(0 0 0 / 20%); }
.volume-popover label { display: flex; justify-content: space-between; color: var(--ivory); }
.volume-popover input { display: block; width: 100%; min-height: 44px; margin: 0; accent-color: var(--moonlight); cursor: pointer; touch-action: pan-y; }
.volume-popover p { font-size: 0.6875rem; line-height: 1.7; }
.holding-frame { position: relative; display: grid; place-items: center; min-height: 100vh; min-height: 100svh; overflow: hidden; padding: calc(8rem + var(--safe-top)) var(--page-gutter) calc(9rem + var(--safe-bottom)); isolation: isolate; }
.foundation-light { position: absolute; z-index: -1; inset: 0; background: radial-gradient(ellipse at 68% 35%, rgb(18 31 56 / 82%), transparent 61%), linear-gradient(130deg, transparent 38%, rgb(115 136 168 / 3%) 60%, transparent 78%); }
.holding-copy { width: 100%; text-align: center; }
.holding-copy h1 { font-size: var(--type-display); letter-spacing: -0.035em; margin-block: 2.25rem 0; }
.holding-copy h1 span { font-weight: 300; color: var(--moonlight); }
.holding-rule { width: 1px; height: 3rem; background: linear-gradient(var(--moonlight), transparent); margin: 2rem auto 1.25rem; }
.preview-note { font-family: var(--font-utility); font-size: 0.75rem; color: var(--text-muted); line-height: 1.8; }
.preview-footer { position: absolute; inset: auto calc(var(--page-gutter) + var(--safe-right)) calc(var(--page-gutter) + var(--safe-bottom)) calc(var(--page-gutter) + var(--safe-left)); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.quiet-link { display: inline-flex; align-items: center; gap: 0.75rem; min-height: 44px; font-family: var(--font-utility); font-size: 0.75rem; text-decoration: none; color: var(--text-muted); }
.quiet-link:hover { color: var(--ivory); }
.noscript-notice { padding: 1rem var(--page-gutter); text-align: center; }
.scene-host { position: relative; isolation: isolate; min-height: 100svh; }
.scene { position: absolute; inset: 0; overflow: hidden; background: var(--void); }
.scene[data-state="active"] { z-index: 2; }
.scene[data-state="entering"] { z-index: 3; }
.scene[data-state="leaving"] { z-index: 1; }
.camera-stage { position: absolute; inset: 0; perspective: var(--perspective); perspective-origin: 50% 50%; }
.camera-rig, .camera-layer { position: absolute; inset: 0; transform-style: preserve-3d; }
.camera-layer { --depth: 0; transform: translateZ(calc(var(--depth) * 1px)); pointer-events: none; }
.camera-layer[data-layer="background"] { --depth: -240; }
.camera-layer[data-layer="midground"] { --depth: 0; }
.camera-layer[data-layer="foreground"] { --depth: 160; }
.camera-bloom { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at var(--light-x, 50%) var(--light-y, 40%), rgb(115 136 168 / 32%), transparent 65%); opacity: var(--bloom, 0); }
.transition-veil { position: fixed; z-index: 25; inset: 0; pointer-events: none; opacity: 0; background: var(--void); }
.transition-veil[data-kind="bloom"] { background: radial-gradient(ellipse at 50% 40%, var(--moonlight), var(--midnight)); }
.transition-veil[data-kind="atmosphere"] { background: radial-gradient(ellipse at 20% 80%, var(--midnight), transparent 68%), linear-gradient(130deg, var(--void), var(--midnight), var(--void)); }
.transition-veil[data-kind="birthday"] { background: radial-gradient(ellipse 70% 52% at 50% 78%, rgb(255 206 148 / 62%), rgb(120 58 28 / 26%) 36%, transparent 68%); }
@supports not (transform-style: preserve-3d) {
  .camera-stage { perspective: none; }
  .camera-rig, .camera-layer { transform: none !important; }
}
@media (max-width: 600px) {
  :root { --page-gutter: 1.5rem; --type-display: clamp(3.1rem, 11.8vw, 5rem); --perspective: 900px; }
  .global-ui { inset-block-start: calc(1.25rem + var(--safe-top)); }
  .preview-marker { font-size: 0.5625rem; letter-spacing: 0.13em; gap: 0.5rem; }
  .sound-controller { gap: 0; }
  .sound-toggle { gap: 0.35rem; font-size: 0.625rem; }
  .holding-frame { place-items: center start; padding-block: calc(8rem + var(--safe-top)) calc(10rem + var(--safe-bottom)); }
  .holding-copy { text-align: start; }
  .holding-copy > .eyebrow { max-width: 15rem; font-size: 0.5625rem; line-height: 1.8; }
  .holding-copy h1 { margin-block-start: 1.5rem; line-height: 1.04; }
  .holding-rule { height: 2.5rem; margin: 2rem 0 1rem; }
  .preview-footer { flex-direction: column; align-items: start; gap: 0.65rem; }
  .foundation-light { background: radial-gradient(ellipse at 90% 30%, var(--midnight), transparent 70%); }
}
@media (prefers-reduced-motion: reduce) {
  :root { --duration-ui: 0ms; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0ms !important; }
}
[data-motion="paused"] .ambient { animation-play-state: paused; }
