/* DV65 · ATELIER H., stage 4 — scroll is the motor: the scroll cue that fades once you scroll, the phone's chevron
   and its three-step progress rail. Dark only. */
:root {
  color-scheme: dark;
  --ink: #f4f1ec;
  --ink-2: rgba(244, 241, 236, .62);
  --ink-3: rgba(244, 241, 236, .38);
  --velvet: #050403;
  --rose: #e2c3a2;
  --rose-2: #c9a27c;
  --rule: #2a2622;
  --focus: #f0d2b0;
  --pad: clamp(16px, 2.2vw, 40px);
  --nav-h: 72px;
  --tiles-h: min(22vh, 230px);
  --serif-free: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  --ui: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--velvet); -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--velvet); font: 400 15px/1.5 var(--ui); overflow-x: hidden; }
button { font: inherit; color: inherit; }
a { color: inherit; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 calc(var(--pad) - 8px); pointer-events: none; }
.nav > * { pointer-events: auto; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; background: none; border: 0; border-radius: 22px; cursor: pointer; position: relative; transition: background-color .2s; }
.icon-btn:hover { background: rgba(255, 255, 255, .07); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wordmark { justify-self: center; display: grid; justify-items: center; text-decoration: none; line-height: 1; padding: 6px 10px; }
.wm-main { font: 400 27px/1 var(--serif-free); letter-spacing: .09em; padding-left: .09em; }
.wm-sub { font: 700 8.5px/1 var(--ui); letter-spacing: .07em; margin-top: 5px; color: var(--ink); }
.nav-right { justify-self: end; display: flex; gap: 2px; }
.badge { position: absolute; top: 6px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--rose); color: #1a1410; font: 700 10.5px/17px var(--ui); text-align: center; }

/* ---------- the build: one tall section, a sticky stage ---------- */
.build { position: relative; height: 560vh; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.velvet { position: absolute; inset: 0; background: radial-gradient(120% 95% at 30% 62%, #0b0907 0%, #040302 72%); }
.velvet .spot { position: absolute; width: 95vw; height: 120vh; right: -28vw; top: -46vh; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(232, 206, 172, .78), rgba(178, 140, 100, .4) 40%, rgba(96, 70, 44, .14) 70%, rgba(0, 0, 0, 0) 100%);
  transform-origin: 70% 30%; animation: drift 19s ease-in-out infinite alternate; will-change: transform, opacity; }
.velvet .nap { position: absolute; inset: 0; opacity: .5; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .45 0 0 0 0 .4 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); opacity: .92; } to { transform: translate3d(-4vw, 3vh, 0) scale(1.07); opacity: 1; } }
#watch { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* copy column */
.copy { position: absolute; left: 7vw; top: 0; bottom: 0; width: min(34vw, 520px); pointer-events: none; }
.copy > * { pointer-events: auto; }
h1 { position: absolute; left: 0; top: 27vh; margin: 0; font: 400 clamp(28px, 4.75vh, 62px)/1.07 var(--serif-free); letter-spacing: .01em; text-transform: uppercase; color: var(--ink); text-shadow: 0 2px 24px rgba(0, 0, 0, .6); }
h1 span { display: block; }
.cue { position: absolute; left: 0; top: 52vh; width: 44px; height: 12vh; margin-left: -14px; display: grid; justify-items: center; color: var(--ink-2); transition: color .2s, opacity .4s; }
.cue:hover { color: var(--ink); }
.cue svg { width: 16px; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.chev { display: none; }
.cue.gone { opacity: 0; pointer-events: none; }

.rail { display: none; }

.foot { padding: 48px var(--pad) 56px; border-top: 1px solid var(--rule); color: var(--ink-3); font: 400 13px/1.6 var(--ui); text-align: center; }
.foot p { max-width: 62ch; margin: 0 auto; }

/* ---------- short desktop screens ---------- */
@media (max-height: 760px) and (min-aspect-ratio: 82/100) {
  :root { --tiles-h: 17vh; --nav-h: 64px; }
  h1 { top: 23vh; font-size: clamp(24px, 4.6vh, 48px); }
  .cue { top: 46vh; height: 9vh; }
}
@media (max-height: 560px) and (min-aspect-ratio: 82/100) {
  .rail { display: flex; }
}

/* ---------- portrait: phone and tablet (the concept phone) ---------- */
@media (max-aspect-ratio: 82/100) {
  :root { --nav-h: 64px; }
  .nav { padding: 0 8px; }
  #search-btn { display: none; }
  .wm-main { font-size: 24px; }
  .wm-sub { font-size: 7.5px; }
  .copy { left: 16px; right: 16px; width: auto; }
  h1 { left: 0; right: 0; top: auto; bottom: calc(10vh + 34px); text-align: center; font-size: clamp(20px, 5.5vw, 34px); line-height: 1.18; }
  h1 span { display: inline; }
  h1 span:nth-child(2)::after { content: '\A'; white-space: pre; }
  h1 span:nth-child(3)::after { content: '\A'; white-space: pre; }
  .cue { left: 50%; top: auto; bottom: calc(3.2vh + 26px); height: 44px; width: 44px; margin-left: -22px; }
  .cue svg { display: none; }
  .chev { display: block; position: absolute; left: 50%; bottom: calc(3.2vh + 38px); width: 22px; height: 12px; margin-left: -11px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; transition: opacity .4s; }
  .cue.gone + .chev { opacity: 0; }
  .rail { position: absolute; left: 16px; right: 16px; bottom: calc(2.4vh + 6px); display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
}
.rail i { display: block; width: 46px; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, .16); position: relative; overflow: hidden; }
.rail i::after { content: ''; position: absolute; inset: 0; background: var(--rose); transform-origin: 0 50%; transform: scaleX(var(--f, 0)); }
.rail span { flex-basis: 100%; text-align: center; font: 500 11px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-top: 8px; }
@media (max-aspect-ratio: 82/100) and (min-width: 700px) {
  h1 { font-size: clamp(28px, 4.2vw, 44px); bottom: calc(9vh + 40px); }
}
/* landscape phones: the copy column narrows, tiles become the rail */
@media (max-height: 560px) and (min-aspect-ratio: 82/100) {
  h1 { top: 20vh; font-size: clamp(20px, 6.2vh, 34px); }
  .cue { display: none; }
  .rail { position: absolute; right: 16px; left: auto; bottom: 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; width: 200px; justify-content: flex-end; }
  .rail span { text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  .velvet .spot { animation: none; }
  .cue { transition: none; }
}
