/* MadPrompter. Everything happens on one walnut desk: prints, paper, pencil.
   Bone-white type, and one fixed colour for the one action. */
:root {
  --bg: #120E0B;          /* walnut black, the desk the prints sit on */
  --text: #EDEAE3;
  --text-2: #A39F96;
  --rule: rgba(237, 234, 227, .14);
  --lift: rgba(237, 234, 227, .045);
  --ink: #0D0D0C;
  --buy: #FF5A2A;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --ease: cubic-bezier(.7, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.55 var(--sans); overflow-x: hidden; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: .98; letter-spacing: -.02em; font-variation-settings: "SOFT" 30, "WONK" 0; }
h2 { font-size: clamp(2.5rem, 6.4vw, 5.6rem); }
h1 em, h2 em { font-style: italic; font-weight: 300; font-variation-settings: "SOFT" 80, "WONK" 1; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--buy); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lede { max-width: 30em; margin-top: 1.25rem; font-size: 1.15rem; color: var(--text-2); }
section { position: relative; }

/* the paper itself carries a faint latent noise */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 60; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3.1rem; padding: .75rem 1.4rem; border: 1.5px solid var(--text); border-radius: 999px;
  font: 500 1rem/1 var(--sans); text-decoration: none; cursor: pointer; background: none; color: var(--text);
  transition: transform .2s var(--ease), background-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }
.btn-buy { background: var(--buy); border-color: var(--buy); color: #0D0D0C; }
.btn-ink { background: var(--text); border-color: var(--text); color: var(--ink); }
.btn-line:hover { background: var(--text); color: var(--ink); }
.btn-line-light { border-color: #fff; color: #fff; }
.btn-line-light:hover { background: #fff; color: #000; }

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .9rem var(--gutter); pointer-events: none;
}
.topbar a { pointer-events: auto; }
/* past the hero the bar gets a surface, so text never runs under the brand */
.topbar::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(18, 13, 9, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); opacity: 0; transition: opacity .3s; }
.topbar.solid::before { opacity: 1; }
.topbar nav .nav-join { background: var(--buy); color: var(--ink); font-weight: 500; }
.topbar nav .nav-join:hover { background: var(--text); }
section[id], form[id] { scroll-margin-top: 4.5rem; }
.brand { font: italic 300 1.5rem/1 var(--serif); font-variation-settings: "SOFT" 80, "WONK" 1; text-decoration: none; }
.topbar nav { display: flex; align-items: center; gap: 1.2rem; font-size: .95rem; }
/* the bar stays one line at every width: labels never wrap, and the in-page links drop out before space runs short */
.brand, .topbar nav a { white-space: nowrap; }
.topbar nav a { text-decoration: none; padding: .35rem .7rem; border-radius: 999px; background: rgba(13, 13, 12, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.topbar nav a:hover { background: var(--text); color: var(--ink); }
.show-sm { display: none; }
@media (max-width: 720px) { .hide-sm { display: none; } .show-sm { display: inline; } .topbar nav { gap: .4rem; } }
@media (max-width: 400px) { .brand { font-size: 1.25rem; } .topbar nav { font-size: .88rem; } }

/* =================================================================== the print pile */
.pile { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: #120d09; }
.pile-gl, .pile-fallback { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pile-gl { touch-action: pan-y; outline: none; }
.pile-fallback { object-fit: cover; opacity: .9; }
.pile.gl-on .pile-fallback { display: none; }
.pile:not(.gl-on) .pile-ui { visibility: hidden; }  /* the controls only work once the prints are on the desk */
.pile-copy {
  position: absolute; left: var(--gutter); top: 0; bottom: 0; width: min(36rem, 40%);
  display: flex; flex-direction: column; justify-content: center; gap: 1.4rem; pointer-events: none;
}
.pile-copy > * { pointer-events: auto; }
.pile h1 { font-size: clamp(3.6rem, 7.6vw, 8.6rem); text-shadow: 0 2px 30px rgba(0, 0, 0, .5); }
.pile-lede { max-width: 24em; font-size: 1.1rem; color: #CFC8BB; text-shadow: 0 1px 12px #000; }
.pile-ui {
  position: absolute; right: var(--gutter); bottom: max(1.4rem, env(safe-area-inset-bottom));
  display: grid; justify-items: end; gap: .55rem; text-align: right; max-width: 30rem; outline: none;
}
.pile-ui:focus-visible { outline: 2px solid var(--buy); outline-offset: 8px; }
.pile-no { font: 400 .8rem/1 var(--mono); color: #A39F96; }
.pile-title { font: italic 300 1.9rem/1 var(--serif); font-variation-settings: "SOFT" 80, "WONK" 1; }
.pile-buttons { display: flex; gap: .5rem; margin-top: .3rem; }
.pile-buttons .btn { min-height: 2.6rem; padding: .55rem 1rem; font-size: .92rem; background: rgba(18, 13, 9, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pile-buttons .btn:hover { background: var(--text); color: #120d09; }
.pile-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.pile-chips[hidden] { display: none; }
.chip {
  min-height: 2.4rem; padding: .45rem .85rem; border: 1.5px solid rgba(237, 234, 227, .3); border-radius: 999px;
  background: rgba(18, 13, 9, .5); color: var(--text); font: 400 .88rem/1 var(--mono); cursor: pointer;
}
.chip:hover { border-color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--ink); }
.pile-hint { font-size: .82rem; color: #A39F96; }
@media (max-width: 860px), (max-aspect-ratio: 4/5) {
  .pile-copy { top: 4.4rem; bottom: auto; width: auto; right: var(--gutter); justify-content: flex-start; gap: .8rem; }
  .pile h1 { font-size: clamp(2.6rem, 12vw, 4.4rem); }
  .pile-lede { font-size: .95rem; }
  .pile-copy .hero-cta { display: none; }
  .pile-ui { left: var(--gutter); justify-items: start; text-align: left; }
  .pile-chips { flex-wrap: nowrap; justify-content: flex-start; max-width: calc(100vw - 2 * var(--gutter)); overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .pile-chips .chip { flex: none; }
  .pile-title { font-size: 1.5rem; }
}

/* =================================================================== the working sheet */
.sheet-sec { padding: clamp(5rem, 10vw, 8rem) var(--gutter); }
.sheet {
  --paper: #EFEBE2; --pencil: #2f2c28; --red: #C43022;
  position: relative; max-width: 78rem; margin: 0 auto; padding: clamp(1.4rem, 4vw, 3.5rem);
  display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: center;
  background: var(--paper); color: var(--ink); transform: rotate(-.4deg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 30px 60px -20px rgba(0, 0, 0, .7), 0 8px 18px rgba(0, 0, 0, .35);
}
@media (min-width: 900px) { .sheet { grid-template-columns: 1.15fr 1fr; } }
.sheet-print { position: relative; margin: 0; padding: clamp(.5rem, 1.2vw, .9rem); background: #F6F3EC; transform: rotate(1.2deg); box-shadow: 0 12px 26px -8px rgba(0, 0, 0, .45); }
.sheet-print img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.tape { position: absolute; top: -.9rem; left: 50%; width: 7rem; height: 1.8rem; transform: translateX(-50%) rotate(-3deg); background: rgba(236, 226, 196, .72); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.mark {
  position: absolute; width: 2.1rem; height: 2.1rem; margin: -1.05rem 0 0 -1.05rem; display: grid; place-items: center;
  border: 2px solid var(--red); border-radius: 50% 46% 52% 48%; color: var(--red); background: rgba(246, 243, 236, .78);
  font: 600 1.25rem/1 "Caveat", cursive; transition: transform .3s var(--ease), background-color .3s, color .3s;
}
.mark.on { transform: scale(1.25); background: var(--red); color: #fff; }
.sheet h2 { font-size: clamp(2rem, 3.8vw, 3.4rem); }
.sheet-prompt { margin-top: 1.6rem; font: 400 clamp(1.3rem, 2.1vw, 1.75rem)/1.45 "Caveat", cursive; color: var(--pencil); }
.clause { padding: 0 .1em; background-image: linear-gradient(transparent 62%, rgba(196, 48, 34, .22) 62%); background-repeat: no-repeat; background-size: 0 100%; transition: background-size .45s var(--ease); }
.clause.on { background-size: 100% 100%; }
.clause::before { content: attr(data-k); margin-right: .2em; font-size: .7em; color: var(--red); vertical-align: super; }
.sheet-notes { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: .7rem; }
.sheet-notes li { display: grid; grid-template-columns: 1.6rem 1fr; font-size: .98rem; line-height: 1.45; color: #4a463f; transition: color .3s; }
.sheet-notes li::before { content: attr(data-k); font: 600 1.2rem/1.1 "Caveat", cursive; color: var(--red); }
.sheet-notes li.on { color: var(--ink); }
.sheet-foot { margin-top: 1.8rem; padding-top: 1rem; border-top: 1px solid rgba(13, 13, 12, .18); font-size: .95rem; color: #5d584f; }
@media (max-width: 560px) { .sheet { transform: none; } .mark { width: 1.7rem; height: 1.7rem; margin: -.85rem 0 0 -.85rem; font-size: 1.05rem; } }

/* =================================================================== packs */
.packs { padding: clamp(5rem, 10vw, 8rem) var(--gutter); }
.packs-row { display: grid; gap: clamp(3rem, 5vw, 2.5rem); margin-top: 3.5rem; }
@media (min-width: 900px) { .packs-row { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }
.pack { display: flex; flex-direction: column; gap: 1.6rem; }
.pack:nth-child(1) .pack-print { --tilt: -1.4deg; }
.pack:nth-child(2) .pack-print { --tilt: .9deg; }
.pack:nth-child(3) .pack-print { --tilt: -.6deg; }
.pack-print {
  position: relative; aspect-ratio: 4 / 5; perspective: 1400px; cursor: pointer;
  transform: rotate(var(--tilt, 0deg)); transition: transform .5s var(--ease);
}
.pack-print:hover { transform: rotate(0deg) translateY(-4px); }
.face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transition: transform .9s var(--ease); box-shadow: 0 22px 40px -14px rgba(0, 0, 0, .75), 0 4px 10px rgba(0, 0, 0, .35);
}
.face.front { padding: 3.5%; background: #F3EFE6; }
.face.front picture, .face.front img { display: block; width: 100%; height: 100%; }
.face.front img { object-fit: cover; }
.face.back {
  transform: rotateY(180deg); padding: 9% 9% 14%; display: flex; flex-direction: column; justify-content: center; gap: 1.1rem;
  background: #ECE6DA; color: #2f2c28; font-family: "Caveat", cursive;
}
.pack-print.turned .front { transform: rotateY(-180deg); }
.pack-print.turned .back { transform: rotateY(0deg); }
.back-title { font-size: 1.9rem; font-weight: 600; line-height: 1; }
.back-prompt { font-size: clamp(1.5rem, 2.3vw, 2.1rem); line-height: 1.22; }
.back-note { font-size: clamp(1.25rem, 1.7vw, 1.5rem); line-height: 1.2; color: #B02A1D; }
.back-seed { position: absolute; left: 9%; bottom: 6%; font: 400 .78rem/1 var(--mono); color: rgba(47, 44, 40, .7); }
.pack-label { display: flex; flex-direction: column; gap: .7rem; flex: 1; }
.card-meta { display: flex; justify-content: space-between; font-size: .82rem; color: var(--text-2); }
.pack h3 { font-size: clamp(1.9rem, 3vw, 2.5rem); }
.pack ul { margin: 0; padding-left: 1.1rem; color: var(--text-2); }
.pack li + li { margin-top: .3rem; }
.card-buy { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--rule); }
.card-buy .btn { min-height: 2.7rem; padding: .6rem 1.1rem; font-size: .95rem; }
.price { font-weight: 500; }
@media (max-width: 899px) { .pack-print { aspect-ratio: 3 / 2; } .face.back { padding: 5% 7% 11%; gap: .5rem; } .back-seed { left: 7%; } .back-title { font-size: 1.5rem; } .back-prompt { font-size: 1.25rem; } .back-note { font-size: 1.1rem; } }

/* =================================================================== course */
.course { padding: clamp(5rem, 10vw, 8rem) var(--gutter); border-top: 1px solid var(--rule); }
.run-label { font-size: .85rem; color: #9C9A92; }
.course h2 { margin-top: .8rem; max-width: 12em; }
.course .lede { color: #B9B8B1; }
.lessons { list-style: none; counter-reset: l; max-width: 60rem; margin: 3.5rem 0 0; padding: 0; }
.lessons li {
  counter-increment: l; display: grid; grid-template-columns: 4rem 1fr; gap: .2rem 1rem; align-items: baseline;
  padding: 1.15rem 0; border-top: 1px solid var(--rule);
}
.lessons li::before { content: counter(l, decimal-leading-zero); grid-row: span 2; font: 400 .9rem/1 var(--mono); color: #9C9A92; }
.lessons span { font: 400 clamp(1.5rem, 2.8vw, 2.3rem)/1.1 var(--serif); }
.lessons small { font-size: .98rem; color: #B9B8B1; }
.course-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; margin-top: 2.5rem; }

/* =================================================================== faq */
.faq { padding: clamp(4rem, 9vw, 7rem) var(--gutter); border-top: 1px solid var(--rule); }
.faq h2 { font-size: clamp(2.2rem, 5vw, 4rem); }
.faq details { max-width: 48rem; border-bottom: 1px solid var(--rule); }
.faq details:first-of-type { margin-top: 2.4rem; border-top: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 1.1rem 0; font-size: 1.12rem; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.3rem/1 var(--mono); color: var(--text-2); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 1.2rem; color: var(--text-2); }

/* =================================================================== close */
.close { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; background: #111; color: #fff; }
.close-img, .close-img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.close-img img { object-fit: cover; }
.close::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .65), rgba(0, 0, 0, 0) 55%); }
.close-copy { position: relative; z-index: 1; padding: var(--gutter); padding-bottom: calc(var(--gutter) + 1rem); }
.close h2 { font-size: clamp(2.8rem, 8vw, 7.5rem); text-shadow: 0 2px 30px rgba(0, 0, 0, .35); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.close .hero-cta { margin-top: 2rem; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1.2rem; padding: 1.4rem var(--gutter) calc(1.4rem + env(safe-area-inset-bottom)); font-size: .9rem; color: var(--text-2); }

@media (prefers-reduced-motion: reduce) {
  .btn, .clause, .face, .pack-print, .mark { transition: none; }
}

/* nothing is on sale yet: buy buttons sit there, visibly off */
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* course waitlist */
.waitlist .price { flex-basis: 100%; margin: 0; }
.wl-email {
  flex: 1 1 16rem; max-width: 24rem; min-height: 3.1rem; padding: .75rem 1.2rem;
  border: 1.5px solid var(--rule); border-radius: 999px; background: var(--lift);
  font: 400 1rem/1 var(--sans); color: var(--text);
}
.wl-email::placeholder { color: var(--text-2); }
.wl-email:focus-visible { outline: 2px solid var(--buy); outline-offset: 2px; border-color: transparent; }
.wl-msg { flex-basis: 100%; margin: 0; min-height: 1.4em; color: var(--text-2); }
.wl-msg.ok { color: var(--text); }
.waitlist.done .wl-email, .waitlist.done button { display: none; }
.hp { position: absolute; left: -9999px; }
.wl-note { flex-basis: 100%; max-width: 40rem; margin: 0; font-size: .85rem; color: var(--text-2); }
.wl-note a, .legal a:not(.btn) { color: var(--text); text-underline-offset: .2em; }
.foot-links { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.foot > p:first-child { white-space: nowrap; }

/* privacy page */
.legal { max-width: 40rem; margin: 0 auto; padding: 8rem var(--gutter) 5rem; }
.legal h1 { font-size: clamp(3rem, 8vw, 5rem); }
.legal-date { margin-top: 1rem; font: 400 .85rem/1 var(--mono); color: var(--text-2); }
.legal-lede { margin-top: 2.2rem; font: 400 clamp(1.3rem, 2.4vw, 1.6rem)/1.35 var(--serif); }
.legal h2 { margin-top: 2.6rem; font-size: 1.5rem; line-height: 1.15; }
.legal p:not(.legal-date, .legal-lede, .legal-back) { margin-top: .7rem; color: #CFC9BE; }
.legal-back { margin-top: 3rem; }
.card-meta .soon { color: var(--buy); }

/* waitlist switch: <html class="waitlist-off"> hides everything marked data-wl="on" and shows data-wl="off" */
.waitlist-off [data-wl="on"], html:not(.waitlist-off) [data-wl="off"] { display: none !important; }
.course-soon { display: block; font-weight: 500; } /* a sentence, not a button row: let it wrap like text */
.course-soon a, .faq details p a { color: var(--text); text-underline-offset: .2em; }

/* =================================================================== who makes these */
.maker {
  display: grid; gap: clamp(2.5rem, 5vw, 5rem); align-items: center;
  padding: clamp(5rem, 10vw, 8rem) var(--gutter); border-top: 1px solid var(--rule);
}
@media (min-width: 900px) { .maker { grid-template-columns: minmax(0, 26rem) 1fr; } }
.maker-print {
  position: relative; margin: 0; max-width: 26rem; padding: clamp(.6rem, 1.4vw, 1rem) clamp(.6rem, 1.4vw, 1rem) clamp(2.2rem, 5vw, 3.2rem);
  background: #F3EFE6; transform: rotate(-2deg);
  box-shadow: 0 26px 50px -16px rgba(0, 0, 0, .8), 0 6px 14px rgba(0, 0, 0, .4);
}
.maker-print img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.maker-k { font: 600 1.6rem/1 "Caveat", cursive; color: var(--buy); }
.maker h2 { margin-top: .8rem; font-size: clamp(2.6rem, 6vw, 5rem); }
.maker-bio { max-width: 26em; margin: 1.4rem 0 2rem; font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: #CFC9BE; }
@media (max-width: 899px) { .maker-print { width: min(80vw, 22rem); justify-self: center; } }

/* =================================================================== bio page (madprompter.com) */
.bio-page { background: #120d09 url("img/desk.webp") center / cover; }
.bio-page::before { content: ""; position: fixed; inset: 0; z-index: -1; background: radial-gradient(ellipse at 30% 30%, rgba(18, 13, 9, .25), rgba(18, 13, 9, .88) 70%); }
.bio { padding: 0 var(--gutter); }
.bio-hero {
  min-height: 100vh; min-height: 100svh; display: grid; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; align-content: center;
  padding: 6rem 0 4rem; max-width: 76rem; margin: 0 auto;
}
@media (min-width: 900px) { .bio-hero { grid-template-columns: minmax(0, 26rem) 1fr; } }
.bio h1 { font-size: clamp(3.4rem, 9vw, 7.5rem); text-shadow: 0 2px 30px rgba(0, 0, 0, .5); }
.bio-role { margin-top: 1rem; font: 400 .95rem/1.4 var(--mono); color: #CFC8BB; }
.bio-role a { color: var(--text); text-underline-offset: .2em; }
.bio-lines { margin: 1.6rem 0 2.2rem; font: italic 300 clamp(1.5rem, 2.8vw, 2.3rem)/1.25 var(--serif); font-variation-settings: "SOFT" 80, "WONK" 1; }
.trailer-replay { margin-top: 1.4rem; padding: 0; border: 0; background: none; color: var(--text-2); font: 400 .85rem/1 var(--mono); text-decoration: underline; text-underline-offset: .25em; cursor: pointer; }
.trailer-replay:hover { color: var(--text); }
.develop::after { content: ""; position: absolute; inset: 0; background: rgba(196, 48, 34, .4); mix-blend-mode: multiply; opacity: 0; pointer-events: none; }
@media (max-width: 899px) { .bio-hero { padding-top: 5.5rem; } .bio-hero .maker-print { justify-self: start; width: min(70vw, 18rem); } }

/* ---------- the trailer (html.play): ~20s of worlds and title cards, then the end card develops */
.trailer, .trailer-ctrl { display: none; }
.play:not(.t-done) body { overflow: hidden; }
.play .trailer { display: block; position: fixed; inset: 0; z-index: 80; background: #000; animation: t-out .9s ease 20.5s forwards; }
.play .trailer::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55)); animation: flicker 1.8s ease-in-out infinite alternate; }
@keyframes t-out { to { opacity: 0; visibility: hidden; } }
/* a slow, faint breathing of the vignette: far below the WCAG 2.3.1 flash threshold (3 per second) */
@keyframes flicker { to { opacity: .93; } }
.frame { position: absolute; left: 0; right: 0; top: 50%; width: 100%; aspect-ratio: 2.39; max-height: 100%; transform: translateY(-50%); overflow: hidden; }
/* phones: full-bleed vertical, like a Reel; captions move clear of the buttons */
@media (max-aspect-ratio: 4/5) {
  .frame { inset: 0; aspect-ratio: auto; max-height: none; transform: none; }
  .frame .slug { bottom: auto; top: calc(7% + env(safe-area-inset-top)); }
  .frame .phrase { bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
}
.shot { position: absolute; inset: 0; background: #000 var(--wide) center / cover no-repeat; opacity: 0; animation: shot var(--dur) linear var(--at) both; }
@media (max-aspect-ratio: 4/5) { .shot { background-image: var(--tall); } }
.shot.fast { animation-name: shot-cut; }
/* the opening shot fades up from black under the first titles (and paints early, which keeps LCP fast) */
.shot.open { animation-name: shot-open; }
/* the film and the stills cut from its first frame share one framing, so the hand-off from still to moving picture is invisible */
.film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; opacity: 0; animation: cut var(--dur) linear var(--at) both; }
.shot.open, .poster .still { background-position: 50% 35%; }
/* phones: the crop follows each shot's subject, jumping on the film's own cuts (storm at 1.79s, diver at 4.06s of 8.08s) */
@media (max-aspect-ratio: 4/5) {
  .film { object-position: 50% 50%; animation: cut var(--dur) linear var(--at) both, film-crop var(--dur) step-end var(--at) both; }
  .shot.open, .poster .still { background-position: 50% 50%; }
}
@keyframes film-crop { 0% { object-position: 50% 50%; } 22.2% { object-position: 63% 50%; } 50.3% { object-position: 52% 50%; } 100% { object-position: 52% 50%; } }
@keyframes shot-open { 0% { opacity: 1; filter: brightness(.04); transform: scale(1.16) translate(var(--px, 0), var(--py, 0)); } 40% { filter: brightness(.5); } 58% { filter: none; } 96% { opacity: 1; } 100% { opacity: 0; filter: none; transform: none; } }
@keyframes shot { 0% { opacity: 0; transform: scale(1.16) translate(var(--px, 0), var(--py, 0)); } 6% { opacity: 1; } 94% { opacity: 1; } 100% { opacity: 0; transform: scale(1.03); } }
@keyframes shot-cut { 0% { opacity: 0; transform: scale(1.1); } 1% { opacity: 1; } 99% { opacity: 1; } 100% { opacity: 0; transform: scale(1.02); } }
.card {
  position: absolute; inset: 0; margin: 0; padding: 0 8vw; display: grid; place-items: center; text-align: center;
  font: 300 clamp(1.7rem, 4.2vw, 3.6rem)/1.15 var(--serif); color: #EDEAE3; opacity: 0; animation: card var(--dur) ease var(--at) both;
  /* words sit over the pictures: a soft dark pool behind them keeps them readable */
  background: radial-gradient(ellipse 55% 38% at center, rgba(0, 0, 0, .5), transparent 72%); text-shadow: 0 2px 28px rgba(0, 0, 0, .7);
}
.card em { font-style: italic; font-variation-settings: "SOFT" 80, "WONK" 1; }
.card-sm { font: 500 clamp(.72rem, 1.1vw, .9rem)/1 var(--sans); letter-spacing: .42em; text-transform: uppercase; color: #CFC8BB; }
.card-lg { font-size: clamp(2.4rem, 6.4vw, 5.8rem); line-height: 1.02; }
@keyframes card { 0% { opacity: 0; transform: translateY(10px); } 25% { opacity: 1; transform: none; } 78% { opacity: 1; } 100% { opacity: 0; } }
.slug { position: absolute; left: 4%; bottom: 7%; margin: 0; padding: .45rem .8rem; border-radius: 999px; background: rgba(13, 13, 12, .55); font: 400 clamp(.72rem, 1vw, .85rem)/1 var(--mono); letter-spacing: .08em; color: #EDEAE3; opacity: 0; animation: card var(--dur) ease var(--at) both; }
.phrase {
  position: absolute; left: 50%; bottom: 9%; margin: 0; padding: .55rem 1rem; transform: translateX(-50%); white-space: nowrap;
  border-radius: 999px; background: rgba(13, 13, 12, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font: 400 clamp(.8rem, 1.4vw, 1.05rem)/1 var(--mono); color: #EDEAE3; opacity: 0; animation: cut var(--dur) linear var(--at) both;
}
@keyframes cut { 0% { opacity: 0; } 1% { opacity: 1; } 99% { opacity: 1; } 100% { opacity: 0; } }
.leak { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: 0; background: radial-gradient(circle at 82% 28%, rgba(255, 150, 70, .65), transparent 55%), radial-gradient(circle at 10% 90%, rgba(255, 70, 40, .35), transparent 45%); animation: leak 1.3s ease var(--at) both; }
@keyframes leak { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }
.gate .trailer-ctrl, .play .trailer-ctrl { display: flex; gap: .6rem; position: fixed; z-index: 82; right: var(--gutter); bottom: calc(1.2rem + env(safe-area-inset-bottom)); }
.play .trailer-ctrl { animation: t-out .5s ease 20.3s forwards; }
.gate .trailer-sound { display: none; }
.trailer-ctrl button {
  min-height: 44px; padding: .6rem 1.1rem; border: 1px solid rgba(237, 234, 227, .35); border-radius: 999px; background: rgba(0, 0, 0, .4); color: #EDEAE3;
  font: 400 .85rem/1 var(--mono); cursor: pointer;
}
.trailer-ctrl button:hover, .trailer-sound[aria-pressed="true"] { border-color: #EDEAE3; }
/* the sound button: a pulsing cream pill while it waits for the first tap, moving bars while the music plays */
.trailer-sound { position: relative; display: inline-flex; align-items: center; gap: .55rem; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i { width: 2px; height: 25%; border-radius: 1px; background: currentColor; transition: height .3s; }
.trailer-sound[data-state="waiting"] { border-color: var(--text); background: var(--text); color: var(--ink); }
.trailer-sound[data-state="waiting"]::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; border: 1.5px solid var(--text); pointer-events: none; animation: invite 1.8s ease-out infinite; }
.trailer-sound[data-state="waiting"] .eq i:nth-child(2) { height: 55%; }
.trailer-sound[data-state="waiting"] .eq i:nth-child(3) { height: 40%; }
.trailer-sound[data-state="on"] .eq i { animation: eq .8s ease-in-out infinite alternate; }
.trailer-sound[data-state="on"] .eq i:nth-child(2) { animation-duration: .55s; animation-delay: -.2s; }
.trailer-sound[data-state="on"] .eq i:nth-child(3) { animation-duration: .7s; animation-delay: -.45s; }
.trailer-sound[data-state="on"] .eq i:nth-child(4) { animation-duration: .6s; animation-delay: -.1s; }
@keyframes invite { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.18, 1.5); } }
@keyframes eq { from { height: 20%; } to { height: 100%; } }
/* the end card arrives: the print drops onto the desk and develops under a red safelight, then the title resolves */
.play .bio-hero .maker-print { animation: drop .9s var(--ease) 20.4s both; }
.play .develop img { animation: develop 3s ease-out 20.7s both; }
.play .develop::after { animation: safelight 3.4s ease 20.5s both; }
.play .bio h1 { animation: title 1.4s cubic-bezier(.22, 1, .36, 1) 21.3s both; }
.play .bio-text > :not(h1) { animation: rise .8s cubic-bezier(.22, 1, .36, 1) both; }
.play .bio-role { animation-delay: 22s !important; }
.play .bio-lines { animation-delay: 22.3s !important; }
.play .bio-text .hero-cta { animation-delay: 22.7s !important; }
.play .trailer-replay { animation-delay: 23s !important; }
.play .topbar { animation: rise .6s ease 22.8s both; }
@keyframes drop { from { opacity: 0; transform: translateY(-40px) rotate(-7deg); } to { opacity: 1; transform: rotate(-2deg); } }
@keyframes develop { 0% { filter: brightness(2.7) contrast(.2); } 55% { filter: brightness(1.2) contrast(.8); } 100% { filter: none; } }
@keyframes safelight { 0% { opacity: 0; } 15% { opacity: 1; } 70% { opacity: .85; } 100% { opacity: 0; } }
@keyframes title { from { opacity: 0; letter-spacing: .18em; filter: blur(10px); } to { opacity: 1; letter-spacing: -.02em; filter: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- first visit (html.gate): a poster with a play button. Pressing it is the tap browsers need before they allow sound */
.gate body { overflow: hidden; }
.gate .trailer { display: block; position: fixed; inset: 0; z-index: 80; background: #000; }
.poster, .gate-ui { display: none; }
.gate .frame:not(.poster), .gate .leak { display: none; }
.gate .poster { display: block; }
.still { position: absolute; inset: 0; background: #000 var(--wide) center / cover no-repeat; filter: brightness(.42); transform: scale(1.06); animation: breathe 9s ease-in-out infinite alternate; }
@media (max-aspect-ratio: 4/5) { .still { background-image: var(--tall); } }
@keyframes breathe { to { transform: scale(1.12); } }
.gate .gate-ui { display: grid; place-content: center; justify-items: center; gap: 1.8rem; position: fixed; inset: 0; z-index: 81; padding: 0 var(--gutter); text-align: center; }
.gate-kicker { margin: 0; font: 500 clamp(.72rem, 1.1vw, .9rem)/1 var(--sans); letter-spacing: .42em; text-transform: uppercase; color: #CFC8BB; }
.trailer-play { display: grid; justify-items: center; gap: .9rem; padding: .5rem; border: 0; background: none; color: #EDEAE3; cursor: pointer; }
.play-disc { position: relative; display: grid; place-items: center; width: 6rem; height: 6rem; border: 1.5px solid #EDEAE3; border-radius: 50%; background: rgba(0, 0, 0, .3); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); transition: background .25s, color .25s, transform .25s; }
.play-disc svg { margin-left: 4px; }
.play-disc::after { content: ""; position: absolute; inset: -1.5px; border-radius: 50%; border: 1.5px solid #EDEAE3; pointer-events: none; animation: ring 2s ease-out infinite; }
@keyframes ring { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.5); } }
.trailer-play:hover .play-disc, .trailer-play:focus-visible .play-disc { background: #EDEAE3; color: var(--ink); transform: scale(1.05); }
.trailer-play:focus-visible { outline: none; }
.play-t { font: 300 clamp(1.7rem, 3.6vw, 2.6rem)/1.1 var(--serif); }
.play-s { font: 400 .85rem/1 var(--mono); color: #CFC8BB; }
