/* The Black Unicorn: scroll-driven story site. */
:root {
  --bg: #050506; --ink: #f3ecdc; --muted: #a79f8d; --gold: #e3b866; --gold-2: #f6dc9c; --gold-ink: #1a1206;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --pad: clamp(20px, 5vw, 72px);
}
* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; overflow-x: clip; -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.02; letter-spacing: -.01em; text-wrap: balance; }
em { font-style: italic; color: var(--gold-2); }
a { color: inherit; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 100; background: var(--gold); color: var(--gold-ink); padding: .6rem 1rem; border-radius: 6px; transition: top .2s; }
.skip:focus { top: 12px; }
.eyebrow { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .8rem 1.6rem; border-radius: 999px; font: 600 .95rem/1 var(--sans); text-decoration: none; transition: transform .4s var(--ease), background .3s, box-shadow .4s; }
.btn--gold { background: var(--gold); color: var(--gold-ink); box-shadow: 0 10px 30px -12px rgb(227 184 102 / .6); }
.btn--gold:hover, .btn--gold:focus-visible { transform: translateY(-2px) scale(1.03); background: var(--gold-2); box-shadow: 0 16px 38px -10px rgb(227 184 102 / .75); }
.btn--lg { min-height: 56px; padding: 1rem 2.1rem; font-size: 1.05rem; }

/* top bar: glass, like apple.com */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; gap: 1.5rem; padding: 0 var(--pad); height: 56px; background: rgb(5 5 6 / .55); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid rgb(243 236 220 / .08); transition: transform .5s var(--ease), background .4s; }
.bar.is-hidden { transform: translateY(-100%); }
.bar__brand { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; margin-right: auto; }
.bar__nav { display: flex; gap: 1.8rem; }
.bar__nav a { font-size: .85rem; color: var(--muted); text-decoration: none; transition: color .25s; }
.bar__nav a:hover { color: var(--ink); }
.bar__buy { font-size: .82rem; font-weight: 600; text-decoration: none; padding: .5rem 1.05rem; border-radius: 999px; background: var(--gold); color: var(--gold-ink); transition: background .25s, transform .3s var(--ease); }
.bar__buy:hover { background: var(--gold-2); transform: scale(1.04); }

/* hero */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; display: grid; place-items: center; text-align: center; }
.hero__media { position: absolute; inset: 0; transform-origin: 50% 60%; will-change: transform; }
.hero__video { width: 100%; height: 100%; object-fit: cover; }
.fog { position: absolute; inset: -10% -20%; background: url("assets/img/fog.png") repeat-x 0 0 / 1400px auto; opacity: .55; animation: fogdrift 90s linear infinite; mix-blend-mode: screen; pointer-events: none; }
@keyframes fogdrift { to { background-position: -1400px 0; } }
.embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero__shade { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 45%, rgb(5 5 6 / .1) 0%, rgb(5 5 6 / .55) 65%, rgb(5 5 6 / .92) 100%), linear-gradient(180deg, rgb(5 5 6 / .5) 0%, transparent 28%, transparent 62%, var(--bg) 100%); }
.hero__copy { position: relative; z-index: 2; padding: 0 var(--pad); display: grid; gap: 1.4rem; justify-items: center; will-change: transform, opacity; }
.hero__title { font-size: clamp(3.2rem, 10.5vw, 9.5rem); font-weight: 600; letter-spacing: -.02em; line-height: .95; text-shadow: 0 6px 60px rgb(0 0 0 / .7); }
.hero__sub { max-width: 34ch; font-family: var(--serif); font-style: italic; font-size: clamp(1.25rem, 2.4vw, 1.9rem); color: #e6dcc3; text-wrap: balance; }
.hero__cue { position: absolute; z-index: 3; bottom: 28px; left: 50%; translate: -50% 0; display: grid; justify-items: center; gap: .6rem; text-decoration: none; font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.hero__cue i { width: 1px; height: 46px; background: linear-gradient(var(--gold), transparent); transform-origin: top; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.split-c { display: inline-block; will-change: transform, opacity, filter; }
.split-w { display: inline-block; white-space: nowrap; }

/* prologue */
.prologue { position: relative; height: 240svh; }
.prologue__stage { position: sticky; top: 0; height: 100svh; display: grid; place-content: center; justify-items: center; gap: 2.4rem; padding: 0 var(--pad); text-align: center; }
.prologue__line { max-width: 20ch; font-family: var(--serif); font-weight: 600; font-size: clamp(2.2rem, 6.4vw, 6rem); line-height: 1.04; letter-spacing: -.015em; }
.prologue__line .w { opacity: .14; transition: opacity .5s var(--ease), color .5s; }
.prologue__line .w.is-on { opacity: 1; }
.prologue__after { max-width: 38ch; color: var(--muted); font-size: clamp(1.05rem, 1.7vw, 1.35rem); opacity: 0; transform: translateY(24px); }

/* scenes: pinned, the camera travels down the pencil drawing */
.scene { position: relative; height: 620svh; }
.scene__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; background: #000; }
.scene__art { position: absolute; left: 50%; top: 0; width: max(100vw, 62.5svh); max-width: none; height: auto; translate: -50% 0; will-change: transform; transform-origin: 50% 0; }
.scene__shade { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(130% 100% at 50% 50%, transparent 40%, rgb(0 0 0 / .72) 100%); }
.beat { position: absolute; z-index: 3; left: var(--pad); right: var(--pad); top: 50%; display: grid; gap: 1.1rem; max-width: 560px; opacity: 0; will-change: transform, opacity; transform: translateY(-50%); }
.beat::before { content: ""; position: absolute; inset: -90px -110px; z-index: -1; background: radial-gradient(closest-side, rgb(0 0 0 / .94) 0%, rgb(0 0 0 / .82) 55%, transparent 100%); filter: blur(14px); }
.beat--l { margin-right: auto; }
.beat--r { margin-left: auto; text-align: left; }
.beat--intro { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; padding: 0; border: 0; }
.beat--intro::before { display: none; }
.beat--end { max-width: 880px; margin-inline: auto; text-align: center; justify-items: center; }
.beat__title { font-size: clamp(2.8rem, 8vw, 7rem); text-shadow: 0 4px 50px rgb(0 0 0 / .8); }
.beat__big { font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 4.2vw, 3.8rem); line-height: 1.06; text-shadow: 0 2px 30px rgb(0 0 0 / .85); }
.beat__mid { font-size: clamp(1.15rem, 1.8vw, 1.55rem); line-height: 1.5; font-weight: 500; color: #e9e1cd; text-shadow: 0 2px 20px rgb(0 0 0 / .9); }
.beat__actions { margin-top: .8rem; }

/* twenty-three winters */
.winters { position: relative; height: 320svh; }
.winters__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; place-content: center; justify-items: center; text-align: center; gap: .4rem; padding: 0 var(--pad); }
.winters__bg { position: absolute; inset: -6%; width: 112%; height: 112%; object-fit: cover; object-position: 78% 40%; opacity: .9; will-change: transform; }
.winters__shade { position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 52%, rgb(5 5 6 / .72), rgb(5 5 6 / .2) 100%), linear-gradient(180deg, var(--bg) 0%, transparent 25%, transparent 75%, var(--bg) 100%); }
.winters__num, .winters__text, .winters__sub { position: relative; }
.winters__num { font-family: var(--serif); font-weight: 600; font-size: clamp(8rem, 30vw, 26rem); line-height: .85; letter-spacing: -.04em; color: var(--ink); font-variant-numeric: tabular-nums; text-shadow: 0 0 80px rgb(227 184 102 / .25); }
.winters__text { font-family: var(--serif); font-style: italic; font-size: clamp(1.8rem, 4.5vw, 3.6rem); color: var(--gold-2); }
.winters__sub { margin-top: 1.4rem; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.3rem); opacity: 0; }

/* the world forgets */
.forget { position: relative; height: 340svh; }
.forget__stage { position: sticky; top: 0; height: 100svh; display: grid; place-content: center; justify-items: center; gap: 2rem; text-align: center; padding: 0 var(--pad); will-change: filter; }
.forget__title { font-size: clamp(2.4rem, 7vw, 6.4rem); max-width: 16ch; }
.forget__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem clamp(1.2rem, 4vw, 3.4rem); font-family: var(--serif); font-style: italic; font-size: clamp(1.8rem, 4.4vw, 3.6rem); color: var(--gold-2); }
.forget__list li { will-change: opacity, filter, transform; }
.forget__sub { max-width: 36ch; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.25rem); }

/* the rule */
.rule { min-height: 150svh; display: grid; place-content: center; justify-items: center; gap: 2rem; text-align: center; padding: 22svh var(--pad); }
.rule__pre, .rule__post { color: var(--muted); font-size: clamp(1.05rem, 1.7vw, 1.4rem); max-width: 34ch; }
.rule__text { font-family: var(--serif); font-weight: 700; font-size: clamp(3.4rem, 12.5vw, 12rem); line-height: .95; letter-spacing: -.025em; background: linear-gradient(100deg, var(--gold) 0%, var(--gold-2) 40%, var(--ink) 60%, var(--gold) 100%) 0 0 / 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }

/* the company: a horizontal pinned track */
.company { position: relative; }
.company__stage { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 76px 0 40px; }
.company__head { padding: 0 var(--pad); display: grid; gap: 1rem; margin-bottom: clamp(28px, 5vh, 60px); }
.company__head h2 { font-size: clamp(2.4rem, 6.4vw, 5.6rem); }
.company__track { display: flex; gap: clamp(14px, 2vw, 28px); padding: 0 var(--pad); will-change: transform; width: max-content; }
.card { position: relative; height: min(58svh, 540px); aspect-ratio: 4 / 5.2; border-radius: 22px; overflow: hidden; background: #0d0c0b; box-shadow: 0 30px 70px -30px rgb(0 0 0 / .95), inset 0 0 0 1px rgb(243 236 220 / .08); flex: none; }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 1.2s var(--ease); }
.card:hover img { transform: scale(1.14); }
.card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 38%, rgb(5 5 6 / .94) 92%); }
.card__body { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 1.5rem 1.5rem 1.7rem; display: grid; gap: .5rem; }
.card h3 { font-size: clamp(1.7rem, 2.4vw, 2.3rem); }
.card p { font-size: .95rem; line-height: 1.5; color: #d9d0bb; }
.card--text { background: radial-gradient(120% 90% at 30% 10%, #241b0e 0%, #0c0a07 70%); }
.card--text::after { display: none; }
.card--text .card__body { top: 0; align-content: end; }
.card .card__mark { font-family: var(--serif); font-weight: 700; font-size: clamp(7rem, 14vw, 11rem); line-height: .8; color: rgb(227 184 102 / .16); position: absolute; right: 1.2rem; top: 1rem; }

/* the books */
.books { padding: clamp(90px, 16vh, 180px) var(--pad); }
.books__head { display: grid; gap: 1rem; justify-items: center; text-align: center; margin-bottom: clamp(40px, 8vh, 90px); }
.books__head h2 { font-size: clamp(2.4rem, 6.4vw, 5.6rem); }
.books__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 4vw, 64px); max-width: 1200px; margin: 0 auto; }
.book { display: grid; gap: .8rem; justify-items: center; text-align: center; align-content: start; perspective: 1200px; }
.book__cover { display: block; width: 100%; border-radius: 6px; overflow: hidden; transform-style: preserve-3d; transition: transform .6s var(--ease), box-shadow .6s; box-shadow: 0 40px 70px -30px rgb(0 0 0 / .95), 0 0 0 1px rgb(243 236 220 / .08); will-change: transform; }
.book__cover img { width: 100%; height: auto; aspect-ratio: 5 / 8; object-fit: cover; }
.book__n { margin-top: 1rem; font-size: .75rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }
.book h3 { font-size: clamp(1.6rem, 2.4vw, 2.2rem); }
.book > p:not(.book__n) { color: var(--muted); max-width: 26ch; }
.book .btn { margin-top: .6rem; }

/* close */
.close { position: relative; min-height: 100svh; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(24px, 6vw, 100px); padding: 12svh var(--pad); max-width: 1300px; margin: 0 auto; }
.close__spines { justify-self: end; width: auto; height: min(78svh, 760px); max-width: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 50px 90px -40px rgb(0 0 0 / .95), 0 0 0 1px rgb(243 236 220 / .08); }
.close__copy { display: grid; gap: 2rem; justify-items: start; }
.close__copy h2 { font-size: clamp(2.6rem, 6.4vw, 5.8rem); }

/* footer */
.foot { padding: 60px var(--pad) 70px; display: grid; gap: .9rem; justify-items: center; text-align: center; color: var(--muted); font-size: .9rem; border-top: 1px solid rgb(243 236 220 / .08); }
.foot__brand { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.foot__legal { font-size: .8rem; opacity: .75; }

/* mobile */
@media (max-width: 860px) {
  .bar__nav { display: none; }
  .scene { height: 520svh; }
  .scene__art { width: max(100vw, 62.5svh); }
  .beat { left: 20px; right: 20px; max-width: none; text-align: center; justify-items: center; }
  .beat--l, .beat--r { margin-inline: 0; }
  .books__row { grid-template-columns: 1fr; max-width: 360px; }
  .company__stage { min-height: 0; padding: 90px 0 60px; }
  .card { height: auto; width: 74vw; max-width: 340px; aspect-ratio: 4 / 5.2; }
  .company__track { padding-bottom: 16px; scrollbar-width: none; }
  .close { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .close__spines { justify-self: center; height: min(56svh, 520px); }
  .close__copy { justify-items: center; }
  .winters { height: 280svh; }
  .forget { height: 300svh; }
}

/* reduced motion and no-JS: everything simply readable, no pinned scenes */
@media (prefers-reduced-motion: reduce) {
  .fog, .hero__cue i { animation: none; }
  .scene, .winters, .forget, .prologue { height: auto; }
  .scene__stage, .winters__stage, .forget__stage, .prologue__stage { position: relative; height: auto; min-height: 100svh; padding-block: 12svh; }
  .scene__art { position: relative; left: auto; top: auto; translate: none; width: min(100%, 520px); margin: 0 auto 40px; }
  .scene__stage { display: grid; align-content: center; justify-items: center; gap: 28px; }
  .beat { position: relative; top: auto; transform: none; opacity: 1; max-width: 720px; margin-inline: auto; }
  .beat::before { display: none; }
  .prologue__line .w, .prologue__after, .winters__sub { opacity: 1; transform: none; }
  .company__track { width: auto; flex-wrap: wrap; justify-content: center; }
}
.no-motion .scene, .no-motion .winters, .no-motion .forget, .no-motion .prologue { height: auto; }
