/* ==========================================================================
   DAYLIGHT STUDIO — Md Abu Baten portfolio
   Layout: a fixed 3D photo studio (white infinity cove, soft shadows) fills
   the screen; the page scrolls over it as six "scenes". Each scene holds one
   white card, anchored left on desktop (the 3D subject sits right) and
   rising from the bottom on phones.

   Colour system — monochrome + acid lime:
   • Off-white, white and true black carry the page. Neutral greys only.
   • Acid lime (#d4ff3f) is the ONE accent, and it is only ever a FILL with
     black on it (or lime on black). Lime text on white is never used — it has
     almost no contrast. Links are black with a lime underline.
   • Everything interactive follows the same pattern: black, and lime when
     it is active, selected or hovered.
   • Every text colour passes WCAG AA.
   • No glows. Depth comes from soft shadows.
   ========================================================================== */
:root {
  /* Neutrals — true greys */
  --paper: #f4f4f1;        /* page + 3D backdrop */
  --paper-deep: #e9e9e4;
  --surface: rgba(255, 255, 255, 0.88);   /* white card over the 3D studio */
  --surface-solid: #ffffff;
  --ink: #111111;          /* black */
  --ink-2: #3a3a37;        /* body copy on cards — 11:1 */
  --muted: #5e5e5a;        /* secondary text — 6.5:1 on white, 5.9:1 on paper */
  --line: rgba(17, 17, 17, 0.09);
  --line-strong: rgba(17, 17, 17, 0.17);

  /* The one accent: acid lime — a FILL only, always with black on it */
  --lime: #d4ff3f;
  --lime-soft: #f2ffc9;    /* quiet lime wash */
  --on-lime: #111111;      /* 17:1 on lime */

  --shadow-sm: 0 1px 2px rgba(17, 17, 17, 0.06), 0 2px 8px -2px rgba(17, 17, 17, 0.07);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 2px 6px rgba(17, 17, 17, 0.04), 0 24px 60px -28px rgba(17, 17, 17, 0.22);

  /* Type: a tight modern display + a highly readable text face */
  --font-display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --step-3: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem);
  --step-4: clamp(2.6rem, 1.5rem + 4vw, 4.8rem);

  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 8px); background: var(--paper); }
html:not(.reduce-motion) { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--lime); color: var(--on-lime); }
img, video { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; box-shadow: 0 0 0 5px var(--lime); }
.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-link {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--ink); color: #fff;
  border-radius: 10px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ── 3D stage ─────────────────────────────────────────────────────────── */
.stage { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.stage-canvas { width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.2s var(--ease); }
.stage.is-live .stage-canvas { opacity: 1; }
/* Shown until (or instead of) WebGL: a soft daylight cove */
.stage-fallback {
  position: absolute; inset: 0;
  background:
    radial-gradient(45% 38% at 74% 42%, rgba(212, 255, 63, 0.18), transparent 70%),
    linear-gradient(to bottom, #f8f8f6 0%, var(--paper) 62%, var(--paper-deep) 100%);
  transition: opacity 1.2s var(--ease);
}
.stage.is-live .stage-fallback { opacity: 0; }

/* ── Header ──────────────────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--gutter-r) 0 var(--gutter);
  display: flex; align-items: center; gap: 28px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(244, 244, 241, 0.82);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: 0 1px 0 var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-avatar { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 3px var(--line-strong); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; letter-spacing: -0.015em; }
.site-nav { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.7); box-shadow: inset 0 0 0 1px var(--line); }
.site-nav a {
  padding: 7px 14px; border-radius: 999px; text-decoration: none;
  font-weight: 500; font-size: 0.92rem; color: var(--muted);
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.is-current { color: var(--lime); background: var(--ink); box-shadow: var(--shadow-sm); }
.menu-button { display: none; }

/* ── Buttons & links ─────────────────────────────────────────────────── */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  font: 600 0.96rem/1 var(--font-body); letter-spacing: -0.005em; text-decoration: none; cursor: pointer;
  border: 1px solid var(--ink); background: var(--ink); color: #fff;
  transition: transform 0.25s var(--ease), background-color 0.2s ease, color 0.2s ease, box-shadow 0.25s var(--ease), border-color 0.2s ease;
}
.button:hover { transform: translateY(-1px); background: var(--lime); border-color: var(--ink); color: var(--on-lime); box-shadow: 0 10px 24px -12px rgba(17, 17, 17, 0.45); }
.button--gel { background: var(--ink); border-color: var(--ink); color: var(--lime); }
.button--gel:hover { background: var(--lime); border-color: var(--ink); color: var(--on-lime); }
.button--ghost { background: var(--surface-solid); color: var(--ink); border-color: var(--line-strong); }
.button--ghost:hover { background: var(--lime); border-color: var(--ink); color: var(--on-lime); box-shadow: var(--shadow-sm); }
.button--small { min-height: 36px; padding: 0 14px; font-size: 0.88rem; }
.button svg { flex: none; }
.button:disabled { opacity: 0.6; cursor: progress; }
.header-cta { min-height: 40px; padding: 0 18px; }
.text-link { color: var(--ink); font-weight: 600; text-decoration-color: var(--lime); text-decoration-thickness: 0.28em; text-underline-offset: 1px; text-decoration-skip-ink: none; }
.text-link:hover { background: var(--lime); text-decoration-color: transparent; }
.icon-button {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--surface-solid); color: var(--ink); cursor: pointer;
}
.icon-button:hover { background: var(--lime); border-color: var(--ink); color: var(--on-lime); }

/* ── Scenes & cards ──────────────────────────────────────────────────── */
main { position: relative; z-index: 2; }
.scene {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding-block: calc(var(--header-h) + 48px) 72px;
  padding-left: var(--gutter); padding-right: var(--gutter-r);
}
.scene > .panel { margin-left: max(0px, calc((100vw - 1320px) / 2)); }
.panel {
  position: relative;
  width: min(520px, 100%);
  min-width: 0;
  background: var(--surface);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-card), 0 0 0 1px var(--line);
  border-radius: 24px;
  padding: clamp(24px, 3vw, 40px);
  display: flex; flex-direction: column; gap: 20px;
}
/* A small eyebrow tick in the scene's colour */
.panel::before {
  content: ""; width: 30px; height: 8px; border-radius: 8px; background: var(--lime);
  box-shadow: inset 0 0 0 1.5px var(--ink); margin-bottom: -8px;
}
.panel--wide { width: min(640px, 100%); }
.panel--hero {
  background: none; border: 0; box-shadow: none; padding: 0;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  width: min(640px, 100%); gap: 24px;
}
.panel--hero::before { content: none; }

.scene-title {
  margin: 0; font-family: var(--font-display); font-weight: 700;
  font-size: var(--step-3); line-height: 1.02; letter-spacing: -0.035em;
}
.scene-lede { margin: 0; color: var(--muted); font-size: 1.04rem; max-width: 60ch; }

/* Hero */
.hero-role {
  margin: 0; align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
  font-weight: 500; font-size: 0.92rem; color: var(--ink-2);
}
.hero-role::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: var(--lime); box-shadow: 0 0 0 1.5px var(--ink);
}
.hero-title {
  margin: 0; font-family: var(--font-display); font-weight: 800;
  font-size: var(--step-4); line-height: 0.98; letter-spacing: -0.045em; color: var(--ink);
}
.hero-title .hl { background: var(--lime); color: var(--on-lime); padding: 0 0.1em; margin: 0 -0.02em; border-radius: 0.1em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero-intro { margin: 0; font-size: 1.12rem; line-height: 1.55; color: var(--ink-2); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-where { margin: 0; color: var(--muted); font-size: var(--step--1); }
.gen-status {
  margin: 0; display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  padding: 6px 14px 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.82); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.84rem; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums;
}
.gen-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 1.5px var(--ink); }
html:not(.reduce-motion) .gen-dot { animation: pulse 1.4s ease-in-out infinite; }
html:not(.reduce-motion) .gen-status.is-tick { animation: tick 0.6s var(--ease); }
@keyframes pulse { 50% { opacity: 0.3; } }
@keyframes tick { from { opacity: 0.2; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.scroll-cue {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--muted); font-size: 0.8rem; text-decoration: none;
}
.scroll-cue span { width: 1px; height: 34px; background: linear-gradient(var(--ink), transparent); }
html:not(.reduce-motion) .scroll-cue span { animation: cue 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.scene--hero { position: relative; }

/* About */
.about-head { display: flex; align-items: flex-end; gap: 18px; }
.about-portrait {
  flex: none; width: 96px; height: 128px; object-fit: cover; object-position: top;
  border-radius: 16px; box-shadow: 0 0 0 4px var(--surface-solid), 0 0 0 5px var(--line), var(--shadow-sm);
}
.about-body p { margin: 0 0 12px; color: var(--ink-2); }
.about-body p:last-child { margin-bottom: 0; }
.principles { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 14px; }
.principles li { display: grid; gap: 2px; padding-top: 14px; border-top: 1px solid var(--line); }
.principles strong { font-weight: 600; }
.principles span { color: var(--muted); font-size: 0.95rem; }

/* Work */
.films { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.film {
  display: grid; grid-template-columns: 76px 1fr; gap: 16px; align-items: start;
  padding: 14px 0; border-top: 1px solid var(--line);
}
.film:first-child { border-top: 0; padding-top: 0; }
.film-poster {
  position: relative; width: 76px; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden;
  background: var(--paper-deep); border: 0; padding: 0; cursor: pointer;
  box-shadow: 0 0 0 1px var(--line), var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.film-poster:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--ink), 0 0 0 5px var(--lime), 0 12px 24px -12px rgba(17, 17, 17, 0.4); }
.film-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.film-poster:hover img { transform: scale(1.05); }
.film-poster::after {
  content: ""; position: absolute; inset: auto 6px 6px auto; width: 24px; height: 24px; border-radius: 50%;
  background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7v10l8-5z' fill='%23111111'/%3E%3C/svg%3E") center / 16px no-repeat;
  box-shadow: var(--shadow-sm);
}
.film-body { min-width: 0; display: grid; gap: 4px; }
.film-title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1.1; letter-spacing: -0.025em; }
.film-meta { margin: 0; color: var(--muted); font-size: var(--step--1); }
.film-summary { margin: 2px 0 6px; font-size: 0.95rem; color: var(--ink-2); }
.film-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.film details { margin-top: 6px; }
.film summary {
  cursor: pointer; font-weight: 600; font-size: 0.9rem; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 0.28em; text-underline-offset: 1px;
  list-style: none; display: inline-flex; align-items: center; gap: 6px;
}
.film summary::-webkit-details-marker { display: none; }
.film summary::after { content: "+"; font-size: 1.1rem; line-height: 1; }
.film details[open] summary::after { content: "−"; }
.case { display: grid; gap: 10px; margin: 10px 0 0; font-size: 0.93rem; }
.case div { display: grid; gap: 1px; }
.case dt { font-weight: 600; }
.case dd { margin: 0; color: var(--ink-2); }
.work-note { margin: 4px 0 0; font-size: var(--step--1); color: var(--muted); }

/* Services */
.services { list-style: none; margin: 0; padding: 0; display: grid; }
.service { border-top: 1px solid var(--line); }
.service:last-child { border-bottom: 1px solid var(--line); }
.service button {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 0; background: none; border: 0; cursor: pointer; text-align: left; color: var(--ink);
  font: 600 1.04rem/1.3 var(--font-body); letter-spacing: -0.01em;
}
.service button:hover { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 0.3em; text-underline-offset: 1px; text-decoration-skip-ink: none; }
.service button[aria-expanded="true"] { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 0.3em; text-underline-offset: 1px; text-decoration-skip-ink: none; }
.service button::after {
  content: ""; flex: none; width: 10px; height: 10px;
  border-right: 1.75px solid currentColor; border-bottom: 1.75px solid currentColor;
  transform: rotate(45deg) translateY(-3px); transition: transform 0.3s var(--ease);
}
.service button[aria-expanded="true"]::after { transform: rotate(-135deg) translateY(-3px); }
.service-detail { padding: 0 0 18px; display: grid; gap: 12px; }
.service-detail p { margin: 0; color: var(--ink-2); font-size: 0.97rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 5px 11px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink-2); font-size: 0.83rem; font-weight: 500; }
.industries { margin: 0; font-size: var(--step--1); color: var(--muted); }
.industries strong { color: var(--ink); font-weight: 600; }

/* Process: numbered — each number matches its gaffer-tape mark in the studio */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: step; }
.step { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding-bottom: 20px; }
.step::before {
  counter-increment: step; content: counter(step);
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--lime);
  background: var(--ink); box-shadow: 0 0 0 4px var(--surface-solid), 0 0 0 5px var(--line);
  position: relative; z-index: 1;
}
.step:not(:last-child)::after { content: ""; position: absolute; left: 21.5px; top: 44px; bottom: 0; width: 1px; background: var(--line-strong); }
.step h3 { margin: 8px 0 4px; font-size: 1.04rem; font-weight: 600; letter-spacing: -0.01em; }
.step p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.step small { display: inline-block; margin-top: 8px; font-size: 0.8rem; font-weight: 600; color: var(--muted); }

/* Contact: the slate */
.panel--slate { width: min(600px, 100%); padding: 0; overflow: hidden; gap: 0; }
.panel--slate::before { content: none; }
.slate-sticks {
  height: 30px;
  background: repeating-linear-gradient(-45deg, var(--ink) 0 22px, var(--surface-solid) 22px 44px);
  border-bottom: 1px solid var(--line-strong);
}
.slate-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.slate-grid div { padding: 10px 16px; border-right: 1px solid var(--line); min-width: 0; }
.slate-grid div:last-child { border-right: 0; }
.slate-grid dt { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.slate-grid dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.slate-grid div:last-child dd { background: var(--lime); padding: 0 6px; border-radius: 4px; width: fit-content; white-space: nowrap; overflow-wrap: normal; }
.slate-body { padding: clamp(22px, 3vw, 34px); display: grid; gap: 18px; }
.form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .field legend { font-size: 0.85rem; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface-solid); color: var(--ink); font: 400 1rem/1.4 var(--font-body);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input::placeholder, .field textarea::placeholder { color: #9b9b96; }
.field textarea { min-height: 112px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: rgba(17, 17, 17, 0.32); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px var(--lime); }
fieldset.field { border: 0; padding: 0; margin: 0; }
.types { display: flex; flex-wrap: wrap; gap: 8px; }
.types label { position: relative; cursor: pointer; }
.types input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.types span {
  display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface-solid); font-size: 0.88rem; font-weight: 500; color: var(--ink-2);
  transition: all 0.2s ease;
}
.types label:hover span { border-color: var(--ink); color: var(--ink); }
.types input:checked + span { background: var(--ink); color: var(--lime); border-color: var(--ink); font-weight: 600; }
.types input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 5px var(--lime); }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.form-status { margin: 0; padding: 12px 14px; border-radius: 12px; font-size: 0.93rem; }
.form-status[data-tone="ok"] { background: var(--lime-soft); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--lime); }
.form-status[data-tone="warn"] { background: #fff4f2; color: #9f2a14; box-shadow: inset 0 0 0 1px rgba(159, 42, 20, 0.28); }
.form-status a { color: inherit; }
.direct { display: grid; gap: 6px; font-size: 0.94rem; padding-top: 16px; border-top: 1px solid var(--line); }
.direct p { margin: 0; color: var(--muted); }
.direct-links { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.email-copy { display: inline-flex; align-items: center; gap: 8px; }
.email-copy code { font: 600 0.96rem var(--font-body); user-select: all; }

/* Footer */
.site-footer {
  position: relative; z-index: 2;
  padding: 28px var(--gutter-r) calc(28px + env(safe-area-inset-bottom, 0px)) var(--gutter);
  background: var(--surface-solid); border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between;
  font-size: var(--step--1); color: var(--muted);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { text-decoration: none; font-weight: 500; color: var(--ink); }
.site-footer a:hover { background: var(--lime); }

/* Scene rail */
.scene-rail {
  position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%);
  z-index: 20; list-style: none; margin: 0; padding: 0; display: grid; gap: 10px;
}
.scene-rail a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; text-decoration: none; color: var(--muted); font-size: 0.78rem; font-weight: 500; }
.scene-rail a span { opacity: 0; transform: translateX(6px); transition: opacity 0.25s ease, transform 0.25s var(--ease); }
.scene-rail a::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgba(17, 17, 17, 0.22); transition: all 0.25s var(--ease); }
.scene-rail a:hover span, .scene-rail a:focus-visible span, .scene-rail a.is-current span { opacity: 1; transform: none; }
.scene-rail a.is-current { color: var(--ink); }
.scene-rail a.is-current::after { background: var(--lime); transform: scale(1.5); box-shadow: 0 0 0 1.5px var(--ink); }

/* Film dialog */
.film-dialog {
  width: min(960px, calc(100% - 32px)); max-height: calc(100svh - 32px); padding: 0; border: 0; border-radius: 22px;
  background: var(--surface-solid); color: var(--ink); box-shadow: 0 40px 100px -30px rgba(17, 17, 17, 0.4), 0 0 0 1px var(--line);
}
.film-dialog::backdrop { background: rgba(233, 233, 228, 0.86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.film-dialog-inner { padding: 18px; display: grid; gap: 14px; }
.film-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.film-dialog-head h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.03em; }
.film-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0d0d0d; border-radius: 14px; overflow: hidden; margin-inline: auto; }
.film-frame.is-vertical { aspect-ratio: 9 / 16; width: min(100%, calc((100vh - 180px) * 9 / 16)); width: min(100%, calc((100svh - 180px) * 9 / 16)); }
.film-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.notice {
  position: relative; z-index: 5; max-width: 560px; margin: 120px auto; padding: 24px; border-radius: 18px;
  background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow-card);
}
.noscript { position: relative; z-index: 5; padding: 120px 24px; max-width: 640px; margin: 0 auto; }

/* ── Phones & tablets ────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .site-nav, .scene-rail { display: none; }
  .menu-button {
    display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.85); cursor: pointer; color: var(--ink);
  }
  .menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 16px; height: 1.75px; background: currentColor; border-radius: 2px; position: relative; transition: transform 0.25s var(--ease); }
  .menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
  .menu-icon::before { top: -5px; }
  .menu-icon::after { top: 5px; }
  .menu-button[aria-expanded="true"] .menu-icon { background: transparent; }
  .menu-button[aria-expanded="true"] .menu-icon::before { transform: translateY(5px) rotate(45deg); }
  .menu-button[aria-expanded="true"] .menu-icon::after { transform: translateY(-5px) rotate(-45deg); }
  .mobile-menu {
    position: fixed; z-index: 29; left: 0; right: 0; top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
    padding: 8px var(--gutter-r) 20px var(--gutter);
    background: rgba(244, 244, 241, 0.97); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    box-shadow: 0 1px 0 var(--line), 0 24px 40px -24px rgba(17, 17, 17, 0.22); display: grid;
  }
  .mobile-menu[hidden] { display: none; }
  .mobile-menu a { padding: 14px 4px; font-weight: 600; font-size: 1.05rem; text-decoration: none; border-bottom: 1px solid var(--line); }
  .mobile-menu a:last-child { border-bottom: 0; color: var(--on-lime); background: var(--lime); border-radius: 999px; padding: 12px 18px; margin-top: 10px; justify-self: start; }
}
@media (max-width: 720px) {
  :root { --header-h: 60px; }
  .header-cta { display: none; }
  .brand-name { font-size: 1rem; }
  /* The 3D subject sits in the top of the screen; cards rise from the bottom. */
  .scene { align-items: flex-end; padding-block: 46svh 28px; }
  .scene--hero { padding-block: 38svh 72px; }
  .scene > .panel { margin-left: 0; }
  .panel { border-radius: 20px; padding: 22px; background: rgba(255, 255, 255, 0.95); }
  .panel--hero { padding: 0; background: none; }
  .panel--slate { padding: 0; }
  .hero-title { font-size: clamp(2.4rem, 10.5vw, 3.2rem); }
  .hero-intro { font-size: 1rem; }
  .about-portrait { width: 72px; height: 96px; }
  .form-row { grid-template-columns: 1fr; }
  .slate-grid dd { font-size: 1rem; }
  .slate-grid div { padding: 8px 10px; }
  .film { grid-template-columns: 64px 1fr; gap: 12px; }
  .film-poster { width: 64px; }
  .film-title { font-size: 1.2rem; }
  .scroll-cue { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}
