:root {
  --bg: #000;
  --fg: #f5f5f7;
  --muted: #86868b;
  --field: #1d1d1f;
  --line: rgba(255, 255, 255, 0.1);
  --focus: #2997ff;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--fg); font-family: var(--font);
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
video { display: block; width: 100%; height: 100%; object-fit: cover; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.eyebrow { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.35rem); color: #c7c7cc; line-height: 1.45; }
.num { font-variant-numeric: tabular-nums; font-size: 0.85rem; font-weight: 600; color: var(--muted); }

.pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.8em 1.5em; border-radius: 999px; background: var(--fg); color: #000;
  font-weight: 600; font-size: 1rem; transition: transform 0.2s, background 0.2s;
}
.pill:hover { background: #fff; transform: scale(1.03); }
.pill:active { transform: scale(0.98); }
.pill-sm { padding: 0.45em 1.05em; font-size: 0.85rem; }
.pill-lg { padding: 0.95em 2.2em; font-size: 1.05rem; }
.link-arrow { font-weight: 500; color: var(--fg); opacity: 0.85; }
.link-arrow::after { content: " ↓"; }
.link-arrow:hover { opacity: 1; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(20px, 4vw); padding-top: env(safe-area-inset-top);
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(0, 0, 0, 0.6); border-color: var(--line);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.brand { font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 0.9rem; }
.nav-links > a:not(.pill) { color: #d2d2d7; }
.nav-links > a:not(.pill):hover { color: #fff; }

/* ---------- Hero ---------- */
.hero { height: 260vh; position: relative; }
.hero-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero-frame {
  position: absolute; left: 50%; top: 50%; overflow: hidden; background: #0a0a0a;
  transform: translate(-50%, -50%); will-change: transform, border-radius;
  width: 100vw; height: 100svh; /* JS sizes this to the final framed box */
}
.hero-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.35), rgba(0,0,0,0.7));
}
.hero-copy {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 18px; padding: 0 24px;
  will-change: opacity, transform;
}
.hero-copy h1 {
  font-size: clamp(3.2rem, 10vw, 8.5rem); font-weight: 700; letter-spacing: -0.045em; line-height: 0.95;
}
.hero-copy .eyebrow { color: #d2d2d7; }
.actions { display: flex; align-items: center; gap: 26px; margin-top: 10px; }
.hero-caption {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  opacity: 0; pointer-events: none;
}
.hero-caption.on { pointer-events: auto; }
.hero-caption > div { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.cap-title { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; }
.cap-meta { color: var(--muted); font-size: 0.95rem; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: #aeaeb2;
}
.scroll-cue span { width: 1px; height: 36px; background: linear-gradient(transparent, #fff); animation: cue 2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Sound button (with playback progress ring) ---------- */
.sound {
  position: relative; width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: rgba(40, 40, 42, 0.55); border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
  transition: transform 0.2s, background 0.2s;
}
.sound:hover { transform: scale(1.08); background: rgba(60, 60, 64, 0.7); }
.sound svg.icon { width: 18px; height: 18px; }
.sound svg.ring { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); transform: rotate(-90deg); }
.sound svg.ring circle { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.sound .wave { opacity: 0; transition: opacity 0.2s; }
.sound .x { transition: opacity 0.2s; }
.sound.unmuted .wave { opacity: 1; }
.sound.unmuted .x { opacity: 0; }

/* ---------- Statement ---------- */
.statement { height: 220vh; }
.statement-sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: grid; place-items: center; padding: 0 max(24px, 8vw);
}
.reveal {
  max-width: 1100px; font-size: clamp(1.9rem, 4.4vw, 4rem); font-weight: 600;
  letter-spacing: -0.03em; line-height: 1.12;
}
.reveal .w { opacity: 0.16; transition: opacity 0.25s; }
.reveal .w.lit { opacity: 1; }

/* ---------- Work ---------- */
.work-head { text-align: center; padding: 14vh 24px 0; }
.work-head h2, .book h2 { font-size: clamp(2.6rem, 6.5vw, 5.5rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; margin-top: 12px; }

.piece { height: 210vh; position: relative; }
.piece-sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: grid; grid-template-columns: minmax(0, 440px) auto; justify-content: center; align-items: center;
  gap: clamp(32px, 8vw, 140px); padding: 56px max(24px, 8vw) 0;
  max-width: 1400px; margin: 0 auto;
}
.piece.flip .piece-sticky { grid-template-columns: auto minmax(0, 440px); }
.piece.flip .piece-copy { order: 2; }
.piece-copy { display: flex; flex-direction: column; gap: 14px; }
.piece-copy > * { will-change: opacity, transform; }
.piece-copy h3 { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; }
.piece-copy .desc { color: #a1a1a6; font-size: 1.08rem; line-height: 1.5; }
.meta { display: flex; gap: 36px; margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.meta dt { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.meta dd { font-size: 1rem; font-weight: 500; margin-top: 4px; }

.device {
  position: relative; height: min(80vh, 860px); aspect-ratio: 9 / 16;
  padding: 9px; border-radius: 54px;
  background: linear-gradient(160deg, #3a3a3c, #121214 40%, #0b0b0c);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset, 0 50px 100px -30px rgba(0,0,0,0.9);
  will-change: transform, opacity; transform-origin: 50% 60%;
}
.device::before { /* ambient glow tinted per piece */
  content: ""; position: absolute; inset: -18%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(var(--glow) / 0.28), transparent);
  filter: blur(40px); opacity: var(--glow-o, 0);
}
.device video { border-radius: 45px; background: #111; }
.device .sound { position: absolute; right: 22px; bottom: 22px; }

/* ---------- Booking ---------- */
.book {
  max-width: 760px; margin: 0 auto; padding: 22vh 24px 16vh; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.form { width: 100%; display: grid; gap: 14px; margin-top: 36px; text-align: left; }
.chips { border: 0; display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.chips legend { width: 100%; font-size: 0.9rem; color: var(--muted); margin-bottom: 12px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: inline-block; padding: 0.6em 1.15em; border-radius: 999px; font-size: 0.95rem;
  border: 1px solid #424245; color: #d2d2d7; transition: all 0.2s;
}
.chips label:hover span { border-color: #86868b; }
.chips input:checked + span { background: var(--fg); color: #000; border-color: var(--fg); }
.chips input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form input:not([type=radio]), .form textarea {
  width: 100%; padding: 16px 18px; border-radius: 14px; border: 1px solid transparent;
  background: var(--field); color: var(--fg); font: inherit; font-size: 1rem; resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form ::placeholder { color: #6e6e73; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 4px rgba(41,151,255,0.2); }
.form .invalid { border-color: #ff453a !important; }
.form .pill { justify-self: center; margin-top: 12px; }
.status { text-align: center; color: var(--muted); min-height: 1.4em; }

.footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 28px max(24px, 4vw) calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem;
}
.footer a:hover { color: var(--fg); }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .nav-links > a:not(.pill) { display: none; }
  .hero { height: 220vh; }
  .actions { flex-direction: column; gap: 18px; }
  .hero-caption > div { gap: 4px 10px; }
  .cap-title { font-size: 1.15rem; }
  .cap-meta { width: 100%; font-size: 0.85rem; }

  .statement { height: 180vh; }

  .piece { height: 180vh; }
  .piece-sticky {
    grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: center; justify-items: center;
    gap: 22px; padding: 64px 22px 20px;
  }
  .piece.flip .piece-sticky { grid-template-columns: 1fr; }
  .piece.flip .piece-copy { order: 0; }
  .piece-copy, .piece.flip .piece-copy { justify-self: center; text-align: center; align-items: center; gap: 8px; max-width: 420px; }
  .piece-copy .num { display: none; }
  .piece-copy h3 { font-size: 1.9rem; }
  .piece-copy .desc { font-size: 0.95rem; }
  .meta { display: none; }
  .device { height: min(62svh, 140vw); padding: 7px; border-radius: 40px; }
  .device video { border-radius: 34px; }
  .device .sound { right: 16px; bottom: 16px; }

  .row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .piece-copy .desc { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue span { animation: none; }
}
