@font-face { font-family: Hanken; src: url('/assets/fonts/hanken-grotesk-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Hanken; src: url('/assets/fonts/hanken-grotesk-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Playfair; src: url('/assets/fonts/playfair-display-regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  color-scheme: dark;
  --charcoal: #171411;
  --lamp: #eee4d2;
  --brass: #e9c69b;
  --gold-accent: #e9c69b;
  --ink: #231a15;
  --muted: #c7b6a7;
  --line: #514237;
  --wrap: 1320px;
  background: var(--charcoal);
  color: var(--lamp);
  font-family: Hanken, system-ui, sans-serif;
  font-synthesis: none;
  scroll-behavior: smooth;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
img { display: block; width: 100%; height: auto; }
figure, p, h1, h2, h3 { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold-accent); outline-offset: 4px; }
.paper :focus-visible { outline-color: #70420f; }
.wrap { width: min(var(--wrap), calc(100% - clamp(2.4rem, 9vw, 10rem))); margin-inline: auto; }
.skip { position: fixed; z-index: 10; inset: .75rem auto auto .75rem; padding: .65rem .9rem; background: var(--lamp); color: var(--ink); }
.skip:not(:focus) { width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); padding: 0; white-space: nowrap; }
.top { border-bottom: 1px solid #3e332b; }
.top-inner { min-height: 4.6rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem 1.5rem; padding-block: .45rem; }
.brand { display: inline-flex; align-items: center; gap: .62rem; font-weight: 600; font-size: .93rem; letter-spacing: .16em; white-space: nowrap; text-decoration: none; }
.brand img { width: 2.125rem; flex: 0 0 2.125rem; }
.top nav { display: flex; gap: clamp(1.15rem, 3.2vw, 2.75rem); color: var(--muted); }
.top nav a, .top-action { text-decoration: none; white-space: nowrap; }
.top nav a:hover, .top-action:hover { color: var(--brass); }
.top-action { border-bottom: 1px solid var(--gold-accent); padding-block: .45rem .33rem; font-weight: 600; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(1.5rem, 5.8vw, 6rem);
  padding-block: clamp(2.4rem, 6vw, 5rem) clamp(3.4rem, 7vw, 6.5rem);
}
.hero-copy { min-width: 0; }
.intro-label { display: flex; align-items: center; gap: .6rem; color: var(--muted); margin-bottom: 1.2rem; }
.intro-label::before { content: ''; width: 1.4rem; height: 1px; background: var(--gold-accent); }
h1, h2 { font: 400 clamp(2.45rem, 5.6vw, 5.55rem)/1.02 Playfair, Georgia, serif; letter-spacing: -.054em; text-wrap: balance; }
h1 { font-size: clamp(4.35rem, 9.15vw, 9.4rem); line-height: .9; letter-spacing: -.068em; text-wrap: initial; }
.deck { margin-top: clamp(1.45rem, 3vw, 2.4rem); font-size: clamp(1.22rem, 2vw, 1.72rem); line-height: 1.18; font-weight: 600; }
.lede { max-width: 36ch; margin-top: .82rem; color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.18rem); line-height: 1.58; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin-top: 1.7rem; }
.button { min-height: 46px; padding: .68rem 1.07rem; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 1px solid transparent; border-radius: 4px; font: 600 .96rem/1.22 Hanken, system-ui, sans-serif; text-decoration: none; cursor: pointer; transition: background-color .17s, border-color .17s; }
.button.primary { background: var(--brass); color: var(--ink); }
.button.primary:hover { background: #f9dbb7; }
.button.outline { color: var(--lamp); border-color: #7b6757; background: transparent; }
.button.outline:hover { border-color: var(--brass); background: #e9c69b0e; }
.button:disabled { cursor: default; opacity: .55; }
.hero-image { min-width: 0; }
.hero-image img { aspect-ratio: 1; object-fit: cover; object-position: center 49%; background: #221a15; border: 1px solid #473528; }
.hero-image figcaption, .film figcaption, .mechanism-images figcaption { display: flex; justify-content: space-between; gap: .4rem 1rem; flex-wrap: wrap; padding-top: .72rem; font-size: .92rem; }
.hero-image figcaption span, .film figcaption span { color: var(--muted); }
.paper { color-scheme: light; color: var(--ink); background: #e8decd; }
.story, .demo-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center; gap: clamp(2rem, 7.5vw, 7.25rem); padding-block: clamp(3.4rem, 9vw, 8.6rem); }
.section-label { font-size: .95rem; font-weight: 600; color: var(--brass); margin-bottom: .8rem; }
.paper .section-label { color: #73422a; }
.story-copy > p:not(.section-label), .demo-copy > p:not(.section-label), .section-head > p { font-size: 1.12rem; line-height: 1.56; margin-top: 1.15rem; max-width: 43ch; }
.ritual-steps { list-style: none; padding: 0; margin: 1.6rem 0 0; counter-reset: steps; }
.ritual-steps li { display: flex; align-items: baseline; gap: 1rem; padding: .75rem 0; border-top: 1px solid #bbae9b; counter-increment: steps; }
.ritual-steps li::before { content: counter(steps, decimal-leading-zero); font-weight: 600; color: #7b4830; font-variant-numeric: tabular-nums; }
h3 { font-size: 1.23rem; line-height: 1.22; font-weight: 600; }
.ritual-steps p { color: #564a40; margin-top: .22rem; font-size: 1rem; line-height: 1.43; }
.story-image img { aspect-ratio: 1.08; object-fit: cover; object-position: 51% 50%; background: #2a1c12; }
.story-image figcaption, .image-note { color: #5b4b40; font-size: .9rem; padding-top: .66rem; }
.research-section { padding-block: clamp(2.8rem, 7vw, 6rem); }
.research-detail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem clamp(1rem, 4vw, 3rem); padding-top: 1.15rem; border-top: 1px solid var(--line); }
.research-detail p { color: var(--muted); font-size: 1.02rem; line-height: 1.52; }
.research-detail strong { color: var(--lamp); }
.research-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: .85rem; color: var(--brass); text-underline-offset: .25em; }
.demo-section { background: #221913; border-bottom: 1px solid #49382c; }
.demo-copy > p:not(.section-label), .section-head > p, .closing p { color: var(--muted); }
.demo-copy #message { color: var(--muted); min-height: 1.4em; font-size: .92rem; margin-top: .75rem; }
#message:empty { visibility: hidden; }
#sound-indicator { width: .49rem; height: .49rem; border-radius: 50%; border: 1px solid #c1a68e; }
#sound[aria-pressed='true'] #sound-indicator { background: var(--gold-accent); border-color: var(--gold-accent); }
.demo-visual { max-width: 37rem; width: 100%; justify-self: center; border: 1px solid #614736; background: #31251c; border-radius: 7px; overflow: hidden; }
.demo-visual figcaption { display: flex; align-items: center; justify-content: space-between; padding: .72rem .9rem; gap: 1rem; border-top: 1px solid #614736; color: var(--muted); }
.demo-visual output { letter-spacing: .105em; font-weight: 600; color: var(--lamp); }
:root[data-desk='night'] .demo-visual { border-color: #956345; }
.stage { position: relative; aspect-ratio: 399 / 465; isolation: isolate; background: #dad9d4; }
:root[data-desk='night'] .stage { background: #171313; }
canvas { display: block; width: 100%; height: 100%; }
.stage:not([data-rendered]) { background: #bcb4a9; }
.stage:not([data-rendered]) canvas { visibility: hidden; }
#rail {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20.26%;
  height: 17.38%;
  transform: translate(-50%, -50%);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#rail[data-dragging] { cursor: grabbing; }
.film-section, .development { padding-block: clamp(3.6rem, 9vw, 8.4rem); }
.section-head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 1rem 2.4rem; align-items: end; margin-bottom: clamp(1.5rem, 3.5vw, 2.8rem); }
.section-head > p { margin-top: 0; padding-bottom: .26rem; }
.film { max-width: min(100%, calc((100svh - 6rem) * 1.78)); margin-inline: auto; border-top: 1px solid #5c4738; }
.film-frame { position: relative; }
.film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #0f0c0a; }
.film-play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  padding-inline: clamp(.8rem, 3vw, 1.35rem);
  white-space: nowrap;
  color: var(--ink);
  background: var(--brass);
  border: 1px solid #f0d9b7;
  box-shadow: 0 6px 22px #0f0c0a8c;
}
.film-play:hover { background: #f9dbb7; }
.play-icon { border-block: .33rem solid transparent; border-left: .5rem solid currentColor; width: 0; height: 0; }
.development-head > p { color: #514338; }
.mechanism-images { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.6rem, 1.8vw, 1.5rem); }
.mechanism-images img { aspect-ratio: 1; object-fit: cover; background: #29221e; }
.mechanism-images figcaption { font-weight: 600; }
.mechanism-images figcaption span { font-weight: 400; color: #594b40; }
.image-note { margin: .34rem 0 1.4rem; }
.milestones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem clamp(1rem, 4vw, 3rem); border-top: 1px solid #a89a87; padding-top: 1.4rem; }
.milestones p, .companion p { margin-top: .52rem; color: #514338; font-size: 1.02rem; line-height: 1.48; }
.companion { margin-top: 1.75rem; border-top: 1px solid #a89a87; padding-top: 1.3rem; max-width: 64ch; }
.materials { display: grid; grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr); gap: 1.2rem clamp(1.3rem, 6vw, 5.4rem); padding-block: clamp(3rem, 7vw, 6rem); border-bottom: 1px solid var(--line); }
.materials h2 { font-size: clamp(2.35rem, 4.1vw, 4.25rem); }
.materials-copy p { max-width: 40ch; margin-top: .9rem; color: var(--muted); line-height: 1.55; }
.materials-list { margin: 0; padding: 0; list-style: none; }
.materials-list li { border-bottom: 1px solid var(--line); }
.materials-list li:first-child { border-top: 1px solid var(--line); }
.materials-list a { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 56px; padding-block: .6rem; font-weight: 600; text-decoration: none; }
.materials-list a:hover span:first-child { text-decoration: underline; text-underline-offset: .25em; }
.materials-list a span:last-child { color: var(--brass); font-size: .9rem; }
.closing { display: grid; grid-template-columns: 4rem minmax(0, 1fr) auto; gap: clamp(1rem, 3vw, 2.3rem); align-items: center; padding-block: clamp(3.3rem, 7vw, 6.3rem); }
.closing h2 { font-size: clamp(2.2rem, 4.1vw, 4.3rem); }
.closing p { margin-top: .65rem; line-height: 1.5; }
.foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; padding-block: 1.02rem 1.55rem; border-top: 1px solid #4b3c31; color: var(--muted); font-size: .92rem; }
@media (max-width: 860px) {
  .hero { gap: 1.8rem; }
  .hero .actions .button { padding-inline: .8rem; }
  .closing { grid-template-columns: 3rem minmax(0, 1fr); }
  .closing > a { grid-column: 2; justify-self: start; }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - clamp(2.2rem, 10vw, 4.4rem)); }
  .top-inner { min-height: 3.75rem; gap: .2rem .65rem; }
  .top-action { margin-inline-start: auto; }
  .top nav { display: none; }
  .top-action { font-size: .9rem; }
  .hero, .story, .demo-layout, .section-head, .materials { grid-template-columns: minmax(0, 1fr); gap: 1.35rem; }
  .hero { padding-block: 2.25rem 2.8rem; }
  .hero h1 { font-size: clamp(4.05rem, 14vw, 6.3rem); }
  .hero .actions, .demo-copy .actions { margin-top: 1.25rem; }
  .story, .demo-layout { padding-block: 3.25rem; }
  .story-image img { aspect-ratio: 1.2; }
  .demo-copy #message { min-height: auto; }
  .demo-copy #message:empty { display: none; }
  .demo-visual { max-width: 30rem; }
  .research-detail { grid-template-columns: minmax(0, 1fr); }
  .section-head > p { padding: 0; }
  .film { max-width: 100%; }
  .mechanism-images { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem .65rem; }
  .mechanism-open { grid-area: 1 / 1; }
  .mechanism-nope { grid-area: 1 / 2; }
  .mechanism-turn { grid-column: 1 / -1; }
  .mechanism-turn img { aspect-ratio: 5 / 3; object-position: center 22%; }
  .mechanism-images figcaption { display: block; font-size: .89rem; }
  .mechanism-images figcaption span { display: block; }
  .milestones { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 681px) and (max-height: 600px) {
  .demo-layout { padding-block: 2rem; }
  .demo-visual { max-width: min(100%, calc((100svh - 4.5rem) * .858)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
