/* Object3 teaser - one object, one light. docs/TEASER-SITE.md is the plan. */

:root {
  --ground: #cfcdc8;          /* the page; tinted towards the screen's light per section (main.js) */
  --ink: #121212;
  --graphite: #5a5955;
  --rule: #b6b4ae;
  --night: #0d0d0e;
  --paper: #f3f1ec;            /* type on night */
  --glow: #e9a36a;             /* the screen's light: eyebrows and the join dot, nothing else */

  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.86rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1: clamp(1.25rem, 1.1rem + 0.7vw, 1.7rem);
  --step-2: clamp(1.8rem, 1.4rem + 2vw, 3.2rem);
  --step-3: clamp(2.4rem, 1.6rem + 4vw, 5.2rem);

  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.6s ease;
  overflow-x: hidden;
}
img, video, svg { max-width: 100%; display: block; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
h1, h2 { text-wrap: balance; margin: 0; }
p { margin: 0; }
.visually-hidden, .trap {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ── the stage: the one object, fixed behind everything ─────────────── */

#stage {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
main, .bar, .foot { position: relative; z-index: 1; }
.no-webgl #stage { display: none; }

/* ── loader: the wheel turning up to 100% ───────────────────────────── */

.loader {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-content: center; justify-items: center; gap: 14px;
  background: var(--ground);
  transition: opacity 0.7s ease, visibility 0.7s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-track { fill: none; stroke: var(--rule); stroke-width: 1.5; }
.loader-ring {
  fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round;
  stroke-dasharray: 100; stroke-dashoffset: 100;
  transform: rotate(-90deg); transition: stroke-dashoffset 0.25s linear;
}
.loader-knob { fill: var(--ink); }
.loader-tick { stroke: var(--ground); stroke-width: 2.5; stroke-linecap: round; }
#loader-knob { transition: transform 0.18s cubic-bezier(.3,1.6,.5,1); }
.loader-pct { font: 500 var(--step--1) var(--mono); letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.loader-line { font: 400 var(--step--1) var(--sans); color: var(--graphite); }

/* ── top bar ─────────────────────────────────────────────────────────── */

.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) var(--gutter) 30px;
  color: var(--ink);
  /* a soft fade of the page's own ground, so text scrolling underneath never collides with it */
  background: linear-gradient(to bottom, var(--ground) 0 45%, color-mix(in srgb, var(--ground) 0%, transparent));
}
.bar.over-band { background: transparent; color: var(--paper); }
.bar { transition: color 0.25s ease; }
.bar-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.bar-mark { font: 500 1.25rem/1 var(--serif); letter-spacing: -0.01em; }
.bar-by { display: inline-flex; align-items: center; gap: 6px; font: 400 0.7rem/1 var(--mono); letter-spacing: 0.08em; opacity: 0.72; }
.bar-by > span:first-child { text-transform: lowercase; }
.djm { width: 16px; height: 16px; flex: none; display: block; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; }
.foot-brand .djm { width: 14px; height: 14px; }
.bar-nav { display: flex; gap: 28px; font: 400 var(--step--1) var(--sans); }
.bar-nav a { text-decoration: none; opacity: 0.8; }
.bar-nav a:hover { opacity: 1; }

/* ── shared ──────────────────────────────────────────────────────────── */

section { padding-inline: var(--gutter); }
.eyebrow {
  font: 500 0.72rem/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--graphite); display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--glow); }
.lede { color: var(--graphite); max-width: 36ch; font-size: var(--step-1); line-height: 1.4; }
.statement-lead { font-size: var(--step-1); line-height: 1.4; color: var(--graphite); max-width: 30ch; }
.statement-lead strong { color: var(--ink); font-weight: 500; }
.fine { font: 400 0.75rem var(--mono); color: var(--graphite); letter-spacing: 0.02em; }

/* ── join form: one field, one button ────────────────────────────────── */

.join { display: flex; flex-wrap: wrap; gap: 8px; max-width: 460px; position: relative; }
.join input[type=email] {
  flex: 1 1 220px; min-width: 0; height: 52px; padding: 0 18px;
  border: 1px solid var(--ink); border-radius: 999px; background: transparent;
  font-size: 1rem;
}
.join input[type=email]::placeholder { color: var(--graphite); opacity: 0.8; }
.join button[type=submit] {
  height: 52px; padding: 0 26px; border: 0; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-weight: 500; cursor: pointer;
  transition: transform 0.15s ease;
}
.join button[type=submit]:active { transform: scale(0.98); }
.join-msg { flex-basis: 100%; min-height: 1.4em; font-size: 0.9rem; color: var(--graphite); padding-left: 18px; }
.join-msg.error { color: #8a2b1d; }
.join.done input, .join.done button[type=submit] { display: none; }
.join.done .join-msg { font: 500 var(--step-1)/1.3 var(--sans); color: var(--ink); padding-left: 0; }

.price { flex-basis: 100%; display: grid; gap: 10px; margin-top: 6px; }
.price-q { font-size: 0.92rem; color: var(--graphite); }
.price-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.price-chips button {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--rule);
  background: transparent; cursor: pointer; font-size: 0.9rem;
}
.price-chips button:hover { border-color: var(--ink); }
.price-chips button[aria-pressed=true] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ── hero ────────────────────────────────────────────────────────────── */

.hero {
  min-height: 100svh; display: grid; align-content: end;
  padding-block: 120px clamp(40px, 8vh, 96px); position: relative; overflow: hidden;
}
.hero-name {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%);
  font: 400 clamp(6rem, 25vw, 26rem)/0.8 var(--serif);
  font-variation-settings: "opsz" 96; letter-spacing: -0.045em;
  /* a soft solid tone, not an outline: the sound rings are the page's only linework */
  color: color-mix(in srgb, var(--ink) 6%, transparent);
  white-space: nowrap; z-index: -1; user-select: none;
}
.hero-fallback { display: none; }
.no-webgl .hero-fallback { display: block; width: min(760px, 100%); margin: 0 auto 32px; }
.hero-copy { display: grid; gap: 18px; max-width: 520px; }
.hero h1 { font: 400 clamp(2.2rem, 1.5rem + 2.8vw, 4.2rem)/1.02 var(--serif); letter-spacing: -0.02em; font-variation-settings: "opsz" 96; max-width: 12ch; }

/* ── statement: words turn from graphite to ink as you scroll ────────── */

.statement {
  min-height: 130svh; display: grid; align-content: center; gap: 28px;
  padding-block: 20vh;
}
.reveal {
  font: 500 var(--step-2)/1.18 var(--sans); letter-spacing: -0.02em;
  max-width: min(22ch, 50vw);
}
.reveal .w { color: color-mix(in srgb, var(--graphite) 45%, transparent); transition: color 0.35s ease; }
.reveal .w.on { color: var(--ink); }

/* ── bands: the film chapters, where the object steps aside ──────────── */

.band {
  position: relative; background: var(--night); color: var(--paper);
  padding: 0; overflow: hidden; aspect-ratio: 21 / 9; max-height: 92svh; min-height: 420px;
}
.band-media { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--zoom, 1.06)); transition: transform 0.2s linear; }
.band-caption {
  position: absolute; left: var(--gutter); bottom: clamp(20px, 5vh, 48px);
  font: 400 var(--step-1)/1.3 var(--serif); max-width: 28ch; text-shadow: 0 1px 24px rgba(0,0,0,0.5);
}

/* ── features: copy on one side, the object on the other ─────────────── */

.feature { min-height: 120svh; display: grid; align-content: center; padding-block: 18vh; }
.feature-copy { display: grid; gap: 20px; max-width: min(460px, 42vw); }
.feature-right .feature-copy { margin-left: auto; }
.feature h2 { font: 400 var(--step-3)/1.02 var(--serif); letter-spacing: -0.02em; font-variation-settings: "opsz" 96; }
.click-btn {
  justify-self: start; display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 999px; border: 1px solid var(--ink);
  background: transparent; cursor: pointer; font-weight: 500;
}
.click-btn:active { transform: scale(0.98); }

.profile { width: 100%; max-width: 420px; margin-top: 12px; overflow: visible; }
.profile-body, .profile-feet { fill: var(--ink); }
.profile-wheel { fill: #1c1c1d; stroke: #3d3d3a; stroke-width: 0.2; }
.profile-seam { stroke: #3a3a38; stroke-width: 0.3; }     /* where the lid meets the walls */
.profile-rim { stroke: #6f6e69; stroke-width: 0.3; stroke-linecap: round; }   /* light catching the face edge */
.dim line, .dim path { stroke: var(--graphite); stroke-width: 0.35; fill: none; }
.dim .dim-ref { stroke-dasharray: 1.2 1.2; }
.dim text { font: 400 3px var(--mono); fill: var(--graphite); }

/* ── compare: real numbers ───────────────────────────────────────────── */

.compare { min-height: 100svh; display: grid; align-content: center; gap: 40px; padding-block: 16vh; }
.compare-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.compare-cell { padding: 32px 32px 0 0; display: grid; gap: 10px; align-content: start; }
.compare-cell + .compare-cell { border-left: 1px solid var(--rule); padding-left: 32px; }
.compare-num { font: 400 clamp(4rem, 12vw, 10rem)/0.9 var(--serif); letter-spacing: -0.03em; color: var(--graphite); font-variant-numeric: tabular-nums; }
.compare-us .compare-num { color: var(--ink); }
.compare-label { font: 500 0.78rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.compare-note { color: var(--graphite); max-width: 34ch; }

/* ── specs: the name typed out, the sheet ────────────────────────────── */

.specs { min-height: 100svh; display: grid; align-content: space-between; padding-block: 14vh 8vh; gap: 4vh; }
.specs-name {
  font: 400 clamp(4.5rem, 21vw, 22rem)/0.85 var(--serif); letter-spacing: -0.045em;
  font-variation-settings: "opsz" 96; white-space: nowrap; min-height: 0.85em;
}
.specs-name .caret { display: inline-block; width: 0.04em; height: 0.72em; background: var(--ink); margin-left: 0.04em; animation: blink 1s steps(1) infinite; vertical-align: baseline; }
@keyframes blink { 50% { opacity: 0; } }
/* Klimt's closing layout: the line on the left, the sheet on the right, the object standing between */
.specs-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 30vw) minmax(0, 1fr); gap: 32px; align-items: end; }
.specs-list { grid-column: 3; }
.specs-line { font: 500 var(--step-2)/1.15 var(--sans); letter-spacing: -0.02em; max-width: 14ch; }
.specs-list { margin: 0; font: 400 0.86rem/1.4 var(--mono); border-top: 1px solid var(--rule); }
.specs-list div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.specs-list dt { color: var(--graphite); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; padding-top: 2px; }
.specs-list dd { margin: 0; }

/* ── final join ──────────────────────────────────────────────────────── */

.final { min-height: 100svh; display: grid; align-content: end; gap: 20px; padding-block: 20vh 14vh; }
.final h2 { font: 400 var(--step-3)/1.02 var(--serif); letter-spacing: -0.02em; font-variation-settings: "opsz" 96; }

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 28px var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 96px);
  border-top: 1px solid var(--rule); font: 400 0.75rem var(--mono); color: var(--graphite);
}

/* ── the pill: joining is always one tap away ────────────────────────── */

.pill {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  transform: translate(-50%, 140%); z-index: 20; transition: transform 0.5s cubic-bezier(.2,.8,.2,1);
  max-width: calc(100vw - 32px);
}
.pill.show { transform: translate(-50%, 0); }
.pill [hidden] { display: none !important; }
.pill-open {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px;
  border-radius: 999px; border: 0; background: var(--ink); color: var(--paper);
  font-weight: 500; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--glow); }
.pill-form {
  width: min(420px, calc(100vw - 32px)); padding: 6px; border-radius: 999px;
  background: var(--ink); box-shadow: 0 10px 30px rgba(0,0,0,0.18); flex-wrap: nowrap;
}
.pill-form input[type=email] {
  height: 44px; border: 0; color: var(--paper); background: transparent; flex: 1 1 auto;
}
.pill-form input[type=email]::placeholder { color: #9a988f; }
.pill-form button[type=submit] { height: 44px; width: 44px; padding: 0; background: var(--paper); color: var(--ink); font-size: 1.1rem; flex: none; }
.pill-form .join-msg { position: absolute; bottom: calc(100% + 10px); left: 0; right: 0; text-align: center; padding: 0; }
.pill-form.done { border-radius: 999px; padding: 12px 20px; justify-content: center; }
.pill-form.done .join-msg { position: static; color: var(--paper); font-size: 0.95rem; text-align: center; }
.pill-form.done .price { display: none; }

/* ── phones ──────────────────────────────────────────────────────────── */

@media (max-width: 760px) {
  .bar-nav { display: none; }
  .bar-brand { gap: 10px; }
  .reveal { max-width: 22ch; }
  .feature-copy { max-width: 460px; }
  .hero { align-content: end; padding-top: 55svh; }
  .hero-name { top: 24%; font-size: 30vw; }
  .statement, .feature, .compare, .specs, .final { min-height: auto; padding-block: 38svh 14vh; }
  .feature-right .feature-copy { margin-left: 0; }
  .band { aspect-ratio: 4 / 5; min-height: 0; }
  .compare-row { grid-template-columns: 1fr; }
  .compare-cell { padding: 28px 0; }
  .compare-cell + .compare-cell { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; }
  .specs { gap: 30svh; }
  .specs-grid { grid-template-columns: 1fr; }
  .specs-list { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
  .reveal .w { color: var(--ink); }
}
