@import url("/fonts/fonts.css");

/* ---------------------------------------------------------------- tokens */
:root {
  --paper:      #FAFAF7;
  --surface:    #F1F1EC;
  --ink:        #101014;
  --ink-2:      #3A3A44;
  --ink-3:      #6B6B78;
  --accent:     #4D3DF7;
  --highlight:  #B8F227;
  --hairline:   rgba(16, 16, 20, 0.10);

  /* Her Next Move product language */
  --hnm-stage:  #0C0B0A;
  --hnm-ink:    #F2EFEA;
  --hnm-ink-2:  rgba(242, 239, 234, 0.72);
  --hnm-ink-3:  rgba(242, 239, 234, 0.62);
  --hnm-line:   rgba(242, 239, 234, 0.14);

  --display: "Bricolage Grotesque", Inter, system-ui, sans-serif;
  --body:    Inter, system-ui, -apple-system, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, monospace;
  --serif:   "Bodoni Moda", Didot, Georgia, serif;

  --instant: 100ms cubic-bezier(0.2, 0, 0.4, 1);
  --quick:   220ms cubic-bezier(0.2, 0, 0.2, 1);
  --smooth:  400ms cubic-bezier(0.16, 1, 0.3, 1);
  --slow:    800ms cubic-bezier(0.16, 1, 0.3, 1);

  --gutter: 24px;
  --max:    1280px;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
::selection { background: rgba(77, 61, 247, 0.16); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip {
  position: absolute; left: var(--gutter); top: -64px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 20px;
  border-radius: 999px; font: 600 0.875rem var(--body); transition: top var(--instant);
}
.skip:focus { top: 16px; text-decoration: none; }

/* ------------------------------------------------------------ typography */
.eyebrow {
  margin: 0; font: 400 0.8125rem/1.4 var(--mono);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
}
.hero-title {
  margin: 0; font-family: var(--display); font-weight: 700;
  font-size: min(clamp(3.5rem, 9.5vw, 9rem), 13.4vw);
  line-height: 0.92; letter-spacing: -0.03em; color: var(--ink);
  font-variation-settings: "opsz" 48, "wdth" 100, "wght" 760;
}
.hero-title span { display: block; }
.display {
  margin: 0; font-family: var(--display); font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 5rem); line-height: 1;
  letter-spacing: -0.025em; color: var(--ink);
}
.h2 {
  margin: 0; font-family: var(--display); font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.05;
  letter-spacing: -0.02em; color: var(--ink);
}
.lead {
  font: 400 clamp(1.25rem, 1.8vw, 1.5rem)/1.5 var(--body);
  color: var(--ink-2); max-width: 34em;
}
.prose { margin: 0; max-width: 56ch; }

/* --------------------------------------------------------- marker accent */
.mark { position: relative; display: inline-block; }
.mark i {
  position: absolute; inset: 0.04em -0.1em 0 0; background: var(--highlight);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 300ms cubic-bezier(0.2, 0, 0.2, 1) 150ms;
}
.mark b { position: relative; font-weight: inherit; color: var(--ink); }

/* -------------------------------------------------------------- controls */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: #fff; font: 600 1.0625rem var(--body);
  border-radius: 999px; padding: 16px 32px;
  transition: background-color var(--instant), transform var(--instant);
}
.btn:hover { background: #3A2BD4; text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn--light { background: var(--hnm-ink); color: var(--hnm-stage); }
.btn--light:hover { background: #fff; }
.btn--ghost {
  background: none; color: var(--ink); border: 1px solid rgba(16,16,20,0.18);
  font: 600 0.9375rem var(--body); padding: 10px 20px; border-radius: 999px;
}
.btn--ghost:hover { background: var(--surface); text-decoration: none; }

/* ------------------------------------------------------------ structure */
header.top {
  max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.wordmark {
  font-family: var(--display); font-weight: 700; font-size: 1.375rem;
  letter-spacing: -0.02em; color: var(--ink);
  font-variation-settings: "opsz" 24, "wdth" 100, "wght" 700;
  transition: font-variation-settings var(--quick);
}
.wordmark:hover { font-variation-settings: "opsz" 24, "wdth" 88, "wght" 800; text-decoration: none; }
nav a { font: 400 0.9375rem var(--body); color: var(--ink-2); }

section { padding-top: clamp(80px, 10vw, 128px); }
.hero {
  position: relative; min-height: 86vh; display: flex; flex-direction: column;
  justify-content: center; overflow: hidden; padding: clamp(48px, 7vw, 96px) 0;
}
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(640px at 72% 18%, rgba(77, 61, 247, 0.06), transparent 70%);
}

.rule-list { list-style: none; margin: 0; padding: 0; }
.rule-list > li { border-top: 1px solid var(--hairline); }

.facts {
  list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 32px 24px;
}
.facts li {
  border-top: 1px solid var(--hairline); padding-top: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.facts strong {
  font-family: var(--display); font-weight: 700; font-size: 1.375rem;
  letter-spacing: -0.015em; line-height: 1.15; color: var(--ink);
}

.manifesto { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: clamp(40px, 5vw, 56px); }
.manifesto li {
  border-top: 1px solid var(--hairline); padding-top: 32px; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 16px 64px; align-items: start;
}
.manifesto h2 {
  margin: 0; font-family: var(--display); font-weight: 700;
  font-size: clamp(1.75rem, 3.2vw, 3rem); line-height: 1.1;
  letter-spacing: -0.02em; color: var(--ink);
}

.spec { margin: 0; max-width: 880px; display: flex; flex-direction: column; }
.spec > div {
  border-top: 1px solid var(--hairline); padding: 16px 0;
  display: grid; grid-template-columns: minmax(104px, 200px) 1fr; gap: 16px;
}
.spec > div:last-child { border-bottom: 1px solid var(--hairline); }
.spec dt { font: 400 0.8125rem/1.7 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.spec dd { margin: 0; font: 400 0.9375rem/1.7 var(--mono); color: var(--ink); }

.mail {
  align-self: flex-start; font-family: var(--display); font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 3.5rem); letter-spacing: -0.015em;
  line-height: 1.15; color: var(--accent); overflow-wrap: anywhere;
  text-decoration: underline 2px; text-underline-offset: 6px;
}

/* ------------------------------------------- the Her Next Move room (6.6) */
.room {
  margin-top: clamp(80px, 10vw, 128px); background-color: var(--hnm-stage);
  transition: background-color var(--smooth);
}
.room .inner {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(80px, 10vw, 128px) var(--gutter);
  transition: opacity var(--smooth);
}
.room, .room h1, .room h2, .room h3 { color: var(--hnm-ink); }
.room p, .room dd { color: var(--hnm-ink-2); }
.room .eyebrow, .room figcaption { color: var(--hnm-ink-3); }
.room .serif { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; }
.room h2.serif { font-size: clamp(3rem, 6vw, 5.5rem); line-height: 1.02; margin: 0; }
.room h3.serif,
.room h2.serif.sub { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.1; margin: 0; }
/* Only the page's own title gets display size; a subsection never outranks it. */
.room > .inner > section { padding-top: 0; }
.room .rule-list > li { border-top-color: var(--hnm-line); }
.room .steps { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; }
.room .steps li {
  border-top: 1px solid var(--hnm-line); padding: 24px 0;
  display: grid; grid-template-columns: 56px 1fr; gap: 16px;
}
.room .steps li:last-child { border-bottom: 1px solid var(--hnm-line); }
.room .steps h3 { margin: 0; font: 600 1.25rem/1.3 var(--body); }
.room .steps span { font: 400 0.8125rem/1.7 var(--mono); letter-spacing: 0.08em; color: var(--hnm-ink-3); }
.room .num { font: 400 0.8125rem/1.7 var(--mono); letter-spacing: 0.08em; color: var(--hnm-ink-3); }

.refusals { list-style: none; margin: clamp(32px,4vw,48px) 0 0; padding: 0; display: flex; flex-direction: column; gap: clamp(32px, 4vw, 48px); }
.refusals li {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 12px 64px; align-items: baseline;
}
.refusals .word {
  position: relative; display: inline-block; justify-self: start;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.25rem, 4.5vw, 3.5rem); line-height: 1.05; color: var(--hnm-ink);
}
.refusals .word i {
  position: absolute; left: -0.08em; right: -0.08em; top: 54%; height: 1px;
  background: rgba(242, 239, 234, 0.9); transform: scaleX(0);
  transform-origin: left center; transition: transform var(--smooth);
}

.shot {
  margin: 0; justify-self: center; display: flex; flex-direction: column; gap: 16px;
  will-change: transform;
}
/* The device already carries its own frame, so no border and no crop here. */
.shot .device { width: min(320px, 74vw); height: auto; }
figcaption { font: 400 0.8125rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }

/* --------------------------------------------------------------- footer */
.footmark { max-width: var(--max); margin: 0 auto; padding: clamp(48px,7vw,96px) var(--gutter) 8px; overflow: hidden; }
.footmark p {
  margin: 0; font-family: var(--display); font-weight: 700;
  font-size: min(12.8vw, 10.5rem); line-height: 0.9; letter-spacing: -0.03em;
  color: var(--ink); white-space: nowrap;
  font-variation-settings: "opsz" 96, "wdth" 75, "wght" 300;
}
footer.site { border-top: 1px solid var(--hairline); }
footer.site .wrap {
  padding-top: 32px; padding-bottom: 32px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px 32px; flex-wrap: wrap;
}
footer.site nav { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }

/* -------------------------------------------------------- article pages */
.doc { max-width: 72ch; margin: 0 auto; padding: 0 var(--gutter); }
.doc h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.015em; color: var(--ink); margin: 48px 0 16px; }
.doc p { margin: 0 0 16px; }
.doc ul { margin: 0 0 16px; padding-left: 1.2em; }

/* ---------------------------------------------------------------- motion
   Everything below is additive. No rule here may be the only reason a piece
   of content is visible: without CSS, without JS, or without scroll-timeline
   support, the page reads in full. That is why the reveals live inside
   @supports and the marker/strike fills default to their finished state. */
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.06); } }
.breathe { animation: breathe 14s ease-in-out infinite alternate; }

@keyframes reveal-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes wipe-in   { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes hero-in   { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes room-in   { from { opacity: 0; } to { opacity: 1; } }

/* The marker and the strike are drawn finished; the animation only replays
   them on scroll where the browser can. */
.mark i, .refusals .word i { transform: scaleX(1); }

@media (prefers-reduced-motion: no-preference) {
  [data-hero-line] { animation: hero-in 800ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  [data-hero-line]:nth-of-type(1) { animation-delay: 0ms; }
  .hero-title span:nth-child(1) { animation-delay: 80ms; }
  .hero-title span:nth-child(2) { animation-delay: 160ms; }
  .hero-title span:nth-child(3) { animation-delay: 240ms; }
  .hero .lead { animation-delay: 320ms; }
  .hero .lead + div { animation-delay: 400ms; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    [data-reveal] {
      animation: reveal-in 220ms cubic-bezier(0.2, 0, 0.2, 1) both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
    .mark i {
      animation: wipe-in 300ms cubic-bezier(0.2, 0, 0.2, 1) both;
      animation-timeline: view();
      animation-range: entry 25% entry 70%;
    }
    .refusals .word i {
      animation: wipe-in 400ms cubic-bezier(0.16, 1, 0.3, 1) both;
      animation-timeline: view();
      animation-range: entry 30% entry 80%;
    }
    .refusals li:nth-child(2) .word i { animation-range: entry 35% entry 85%; }
    .refusals li:nth-child(3) .word i { animation-range: entry 40% entry 90%; }
    .refusals li:nth-child(4) .word i { animation-range: entry 45% entry 95%; }
    .room .inner {
      animation: room-in 400ms cubic-bezier(0.16, 1, 0.3, 1) both;
      animation-timeline: view();
      animation-range: entry 0% entry 25%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .mark i, .refusals .word i { transform: scaleX(1) !important; }
  .shot { transform: none !important; }
}

@media (max-width: 640px) {
  .facts { gap: 24px 16px; }
  footer.site .wrap { flex-direction: column; align-items: flex-start; }
}

/* ------------------------------------------------------------- the mark */
.wordmark { display: inline-flex; align-items: center; gap: 10px; }
.mark-glyph { flex: none; color: var(--ink); }
.mark-glyph rect { transition: transform var(--smooth); transform-origin: 32px 32px; }
.wordmark:hover .mark-glyph rect { transform: rotate(0deg); }

/* The room's own title. Explicit rather than inline, so a subsection heading
   can never outrank it — which is exactly what happened once. */
.room h1.room-title {
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1.02;
  margin: 40px 0 0;
}

/* ====================================================================
   Shades: soft light that sits behind content, never over it.
   Every one is aria-hidden and pointer-events none.
   ==================================================================== */
.shade { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.shade--hero {
  background:
    radial-gradient(760px 520px at 78% 12%, rgba(77, 61, 247, 0.09), transparent 68%),
    radial-gradient(520px 420px at 8% 82%, rgba(184, 242, 39, 0.13), transparent 70%);
}
.shade--stage {
  background: radial-gradient(340px 240px at 50% 62%, rgba(16, 16, 20, 0.10), transparent 72%);
}
.shade--room {
  background:
    radial-gradient(680px 460px at 84% 8%, rgba(242, 239, 234, 0.07), transparent 66%),
    radial-gradient(520px 380px at 6% 92%, rgba(242, 239, 234, 0.05), transparent 70%);
}
.shade--contact {
  background: radial-gradient(620px 420px at 12% 40%, rgba(77, 61, 247, 0.08), transparent 70%);
}
.hero > .wrap, .room > .inner, #contact > .wrap { position: relative; z-index: 1; }
.u-contact { position: relative; overflow: hidden; padding-bottom: clamp(80px, 10vw, 128px); }

/* -------------------------------------------------------- two column split */
.split {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 24px 64px; align-items: start;
}
.stack24 { display: flex; flex-direction: column; gap: 24px; }
.stack16 { display: flex; flex-direction: column; gap: 16px; }
.h3 {
  margin: 0; font-family: var(--display); font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2.125rem); line-height: 1.12;
  letter-spacing: -0.015em; color: var(--ink);
}

/* ------------------------------------------------------- the slab sculpture */
.stage {
  position: relative; margin: clamp(48px, 6vw, 80px) 0 0;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.slabs { width: min(320px, 76vw); height: auto; position: relative; z-index: 1; }
.slab { transform-origin: 160px 130px; }
.slab-1 { transform: rotate(-9deg); }
.slab-2 { transform: rotate(-6deg); }
.slab-3 { transform: rotate(-3deg); }
.slab-4 { transform: rotate(0deg); }
@media (prefers-reduced-motion: no-preference) {
  .slab { animation: settle 9s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
  .slab-1 { animation-delay: 0s; }
  .slab-2 { animation-delay: .28s; }
  .slab-3 { animation-delay: .56s; }
  .slab-4 { animation-delay: .84s; }
}
@keyframes settle {
  0%, 8%   { transform: rotate(var(--from, -9deg)) translateY(0); }
  38%, 82% { transform: rotate(0deg) translateY(-2px); }
  100%     { transform: rotate(var(--from, -9deg)) translateY(0); }
}
.slab-1 { --from: -9deg; } .slab-2 { --from: -6deg; }
.slab-3 { --from: -3deg; } .slab-4 { --from: -1deg; }

/* ------------------------------------------------------------------ tiles */
.tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px; margin-top: clamp(40px, 5vw, 56px);
}
.tile {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px;
  padding: 24px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 1px 2px rgba(16,16,20,.04), 0 12px 28px -18px rgba(16,16,20,.28);
  transition: transform var(--quick), box-shadow var(--quick);
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(16,16,20,.05), 0 22px 42px -22px rgba(16,16,20,.34); }
.tile strong {
  font-family: var(--display); font-weight: 700; font-size: 1.125rem;
  letter-spacing: -0.01em; color: var(--ink);
}
.tile p { margin: 0; font-size: 0.9375rem; }

/* ------------------------------------------------------- the quiet notice */
.quietcard {
  border: 1px solid var(--hairline); border-radius: 16px;
  background: linear-gradient(180deg, var(--surface), rgba(241,241,236,0));
  padding: clamp(28px, 4vw, 44px); display: flex; flex-direction: column;
  gap: 24px; align-items: flex-start; max-width: 760px;
  box-shadow: 0 1px 2px rgba(16,16,20,.03), 0 24px 48px -32px rgba(16,16,20,.30);
}
.quiet {
  font: 400 1rem var(--body); color: var(--ink-2);
  text-decoration: underline; text-underline-offset: 5px;
  text-decoration-color: rgba(16,16,20,.28);
}
.quiet:hover { color: var(--accent); text-decoration-color: currentColor; }
.quiet--light { color: var(--hnm-ink); text-decoration-color: rgba(242,239,234,.4); }
.quiet--light:hover { color: #fff; }

/* a little more depth on the device, now that shades are allowed */
.shot .device { filter: drop-shadow(0 40px 60px rgba(0,0,0,.45)); }

/* The header nav had no gap, so "Work" and "Notes" ran together. */
header.top nav { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
/* At 26px four outlines turn into a smudge; the small mark carries three. */
.mark-glyph { width: 28px; height: 28px; }

/* The slab sculpture, drifting the way the app portrait breathes. */
.sculpt { width: min(420px, 82vw); height: auto; position: relative; z-index: 1; }
@media (prefers-reduced-motion: no-preference) {
  .sculpt { animation: drift 11s ease-in-out infinite alternate; }
}
@keyframes drift {
  from { transform: translateY(-6px) rotate(-0.4deg); }
  to   { transform: translateY(8px) rotate(0.4deg); }
}
.stage--block { margin-top: clamp(40px, 5vw, 64px); }
.sculpt--block { width: min(300px, 62vw); }
@media (prefers-reduced-motion: no-preference) {
  .sculpt--block { animation-duration: 14s; }
}

/* ====================================================================
   Dark theme. Every value re-measured against the new paper, because a
   palette that passed on #FAFAF7 says nothing about #1E1E25.
   The Her Next Move room keeps its own near-black so it still reads as
   somewhere else, and gains hairlines to make that separation legible.
   ==================================================================== */
:root[data-theme="dark"] {
  --paper:     #1E1E25;   /* room #0C0B0A sits 1.19:1 below it */
  --surface:   #26262E;
  --ink:       #F2F2EE;   /* 14.8:1 */
  --ink-2:     #B9B9C2;   /*  8.5:1 */
  --ink-3:     #93939D;   /*  5.4:1 on paper, 4.9:1 on surface, which is
                             the pair that matters: the eyebrow inside a tile
                             sits on the lighter of the two */
  --accent:    #8B7DFF;   /*  5.1:1, the light-mode indigo fails here at 2.9 */
  --accent-ink: #101014;  /* tint on top of the accent, 5.9:1 */
  --hairline:  rgba(255, 255, 255, 0.12);
}
:root[data-theme="dark"] body { color: var(--ink-2); }
:root[data-theme="dark"] .btn { color: var(--accent-ink); }
:root[data-theme="dark"] .btn:hover { background: #A99BFF; }
:root[data-theme="dark"] .mark b { color: #101014; }
:root[data-theme="dark"] .room { border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
:root[data-theme="dark"] .tile,
:root[data-theme="dark"] .quietcard {
  box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 18px 40px -24px rgba(0,0,0,.7);
}
:root[data-theme="dark"] .quietcard {
  background: linear-gradient(180deg, var(--surface), rgba(38,38,46,0));
}
:root[data-theme="dark"] .shade--hero {
  background:
    radial-gradient(760px 520px at 78% 12%, rgba(139, 125, 255, 0.14), transparent 68%),
    radial-gradient(520px 420px at 8% 82%, rgba(184, 242, 39, 0.10), transparent 70%);
}
:root[data-theme="dark"] .shade--stage {
  background: radial-gradient(340px 240px at 50% 62%, rgba(255, 255, 255, 0.07), transparent 72%);
}
:root[data-theme="dark"] .shade--contact {
  background: radial-gradient(620px 420px at 12% 40%, rgba(139, 125, 255, 0.12), transparent 70%);
}
:root[data-theme="dark"] .skip { background: var(--ink); color: var(--paper); }
:root[data-theme="dark"] .btn--ghost { border-color: rgba(255,255,255,0.22); }
:root[data-theme="dark"] .btn--ghost:hover { background: var(--surface); }
:root[data-theme="dark"] .quiet { text-decoration-color: rgba(255,255,255,.3); }
:root[data-theme="dark"] ::selection { background: rgba(139, 125, 255, 0.28); }
:root[data-theme="dark"] .sculpt { filter: drop-shadow(0 24px 40px rgba(0,0,0,.55)); }

/* --------------------------------------------------------- theme switch */
.themetoggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 999px; flex: none;
  border: 1px solid var(--hairline); background: none; cursor: pointer;
  color: var(--ink-2); padding: 0;
  transition: background-color var(--instant), color var(--instant), border-color var(--instant);
}
.themetoggle:hover { background: var(--surface); color: var(--ink); }
.themetoggle svg { width: 17px; height: 17px; }
.themetoggle .sun { display: none; }
:root[data-theme="dark"] .themetoggle .sun { display: block; }
:root[data-theme="dark"] .themetoggle .moon { display: none; }

/* colour transition, but only after the first paint (see app.js) */
html.theme-ready body,
html.theme-ready .room,
html.theme-ready .tile,
html.theme-ready .quietcard,
html.theme-ready .themetoggle {
  transition: background-color 260ms cubic-bezier(0.2,0,0.2,1),
              color 260ms cubic-bezier(0.2,0,0.2,1),
              border-color 260ms cubic-bezier(0.2,0,0.2,1);
}

/* the sculptures tilt under the pointer; the transition is the return home.
   The tilt lives on .tilt so the drift animation on .sculpt keeps running. */
.tilt { display: block; transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1); will-change: transform; }
.stage { cursor: default; }

.copied {
  display: block; font: 400 0.8125rem/1.4 var(--mono); letter-spacing: 0.06em;
  color: var(--ink-3); opacity: 0; transform: translateY(-4px);
  transition: opacity var(--quick), transform var(--quick); min-height: 1.2em;
}
.copied.on { opacity: 1; transform: none; }

/* the spec sheet reads better beside the instruments than under them */
.specwrap {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.stage--tools { margin-top: 0; order: 2; }
.sculpt--tools { width: min(360px, 74vw); }
@media (prefers-reduced-motion: no-preference) { .sculpt--tools { animation-duration: 13s; } }
@media (max-width: 860px) { .stage--tools { order: 0; } }

/* --------------------------------------------------------------- the film */
.filmwrap {
  margin-top: clamp(64px, 8vw, 112px); border-top: 1px solid var(--hnm-line);
  padding-top: clamp(48px, 6vw, 64px); display: flex; flex-direction: column; gap: 24px;
}
.film { margin: 0; display: flex; flex-direction: column; gap: 16px; }
/* Full bleed: the 2.35:1 cut wants the whole width of the room, the way a
   cinema strip does. The negative margin cancels the room's gutter. */
.filmvid {
  width: calc(100% + var(--gutter) * 2); max-width: none;
  margin-left: calc(var(--gutter) * -1);
  aspect-ratio: 1920 / 818; height: auto; display: block;
  background: #0C0B0A; border-block: 1px solid var(--hnm-line);
}
@media (min-width: 900px) {
  .filmvid {
    width: 100%; margin-left: 0; border-radius: 14px; border: none;
    box-shadow: 0 40px 80px -40px rgba(0,0,0,.85);
  }
}
.film figcaption {
  font: 400 0.8125rem/1.4 var(--mono); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--hnm-ink-3);
}
