/* =========================================================
   $YARL — The Pepe Killer
   ========================================================= */

:root {
  --ink: #0b0b0a;
  --ink-2: #121210;
  --ink-3: #1b1b18;
  --paper: #f2eee3;
  --paper-2: #f8f6ef;
  --muted: #8d8a7f;
  --line: rgba(242, 238, 227, 0.12);
  --line-2: rgba(242, 238, 227, 0.22);
  --yarl: #fff200;
  --yarl-dim: rgba(255, 242, 0, 0.16);
  --blood: #ff3b30;
  --greentext: #9fc22e;
  --chan-name: #117743;

  --f-display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 64px);
  --radius: 28px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-display);
  font-size: 17px;
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
::selection { background: var(--yarl); color: var(--ink); }
:focus-visible { outline: 2px solid var(--yarl); outline-offset: 4px; border-radius: 6px; }

body.is-locked { overflow: hidden; }

/* ---------- utilities ---------- */
.section { padding: clamp(96px, 12vw, 180px) var(--gutter); position: relative; }
.eyebrow {
  margin: 0 0 1.4rem;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex; align-items: center; gap: 0.9rem;
}
.eyebrow b { color: var(--yarl); font-weight: 500; }
.eyebrow b::after { content: ""; display: inline-block; width: 28px; height: 1px; background: currentColor; margin-left: 0.9rem; vertical-align: middle; opacity: 0.6; }
.display {
  margin: 0;
  font-size: clamp(3rem, 8.4vw, 8.6rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
  font-weight: 700;
  font-stretch: 80%;
}
.display em { color: var(--yarl); font-size: 1.04em; letter-spacing: -0.02em; }
.lead { margin: 0; max-width: 34ch; font-size: clamp(1.05rem, 1.4vw, 1.3rem); color: rgba(242, 238, 227, 0.72); line-height: 1.45; }
.section__head { margin-bottom: clamp(48px, 7vw, 96px); display: grid; gap: 1.6rem; }
.section__head--row { grid-template-columns: 1fr auto; align-items: end; gap: 2rem 4rem; }

.post-check { display: inline-block; width: 11px; height: 11px; border: 1px solid currentColor; border-radius: 2px; opacity: 0.7; }
.post-name { color: var(--greentext); font-weight: 700; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- grain / progress / cursor ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: 0.075;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.9s steps(5) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-4%, 3%); } 40% { transform: translate(3%, -5%); }
  60% { transform: translate(-6%, -2%); } 80% { transform: translate(5%, 4%); } 100% { transform: translate(0, 0); }
}
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 80; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; background: var(--yarl); transform-origin: 0 50%; transform: scaleX(0); }

.cursor {
  position: fixed; top: 0; left: 0; z-index: 95; pointer-events: none;
  width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: var(--yarl); mix-blend-mode: difference;
  display: grid; place-items: center;
  transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease), opacity 0.3s;
  opacity: 0;
}
.cursor__label { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); opacity: 0; transition: opacity 0.2s; }
.has-cursor .cursor { opacity: 1; }
.cursor.is-big { width: 84px; height: 84px; margin: -42px 0 0 -42px; mix-blend-mode: normal; }
.cursor.is-big .cursor__label { opacity: 1; }
@media (pointer: coarse) { .cursor { display: none; } }

/* ---------- buttons ---------- */
.btn {
  --pad: 1.05rem 1.7rem;
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: var(--pad); border-radius: 999px;
  font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; line-height: 1;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
  will-change: transform;
}
.btn--sm { --pad: 0.7rem 1.15rem; font-size: 0.92rem; }
.btn--yellow { background: var(--yarl); color: var(--ink); box-shadow: 0 0 0 0 rgba(255, 242, 0, 0); }
.btn--yellow:hover { box-shadow: 0 14px 50px -12px rgba(255, 242, 0, 0.65); }
.btn--ghost { border: 1px solid var(--line-2); color: var(--paper); }
.btn--ghost:hover { border-color: var(--paper); background: rgba(242, 238, 227, 0.06); }
.btn__arrow { display: inline-block; transition: transform 0.4s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ---------- intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink);
  display: grid; place-items: center; padding: var(--gutter);
  transition: clip-path 1s var(--ease-in-out);
  clip-path: inset(0 0 0 0);
}
.intro.is-done { clip-path: inset(0 0 100% 0); pointer-events: none; }
.intro.is-gone { display: none; }
.intro__post { font-family: var(--f-mono); font-size: clamp(0.8rem, 1.6vw, 1rem); color: rgba(242, 238, 227, 0.6); max-width: 560px; width: 100%; }
.intro__post p { margin: 0 0 0.35rem; }
.intro__line { color: var(--paper); font-size: clamp(1.4rem, 3.6vw, 2.4rem); font-family: var(--f-display); font-weight: 600; letter-spacing: -0.02em; opacity: 0; transform: translateY(10px); animation: introLine 0.6s var(--ease) forwards; }
.intro__line--1 { font-family: var(--f-mono); font-size: 0.9rem; font-weight: 400; margin-top: 1rem !important; animation-delay: 0.15s; }
.intro__line--2 { animation-delay: 0.45s; }
.intro__line--3 { animation-delay: 0.95s; color: var(--yarl); }
.quotelink { color: #e0574f; text-decoration: underline; text-underline-offset: 2px; }
@keyframes introLine { to { opacity: 1; transform: none; } }
.intro__bar { position: absolute; left: var(--gutter); right: var(--gutter); bottom: var(--gutter); height: 1px; background: var(--line); }
.intro__bar span { display: block; height: 100%; background: var(--yarl); transform-origin: 0 50%; animation: introBar 1.9s var(--ease-in-out) forwards; transform: scaleX(0); }
@keyframes introBar { to { transform: scaleX(1); } }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 70;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 18px var(--gutter);
  transition: padding 0.4s var(--ease), background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { padding-top: 12px; padding-bottom: 12px; background: rgba(11, 11, 10, 0.72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-color: var(--line); }
.nav__logo { display: flex; align-items: center; gap: 0.6rem; font-weight: 800; font-stretch: 75%; font-size: 1.5rem; letter-spacing: -0.02em; }
.nav__logo img { width: 32px; height: 32px; transition: transform 0.6s var(--ease); }
.nav__logo:hover img { transform: rotate(-14deg) scale(1.1); }
.nav__links { display: flex; gap: 0.3rem; padding: 0.3rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(11, 11, 10, 0.4); }
.nav__links a { padding: 0.5rem 0.95rem; border-radius: 999px; font-size: 0.9rem; color: rgba(242, 238, 227, 0.75); transition: color 0.25s, background 0.25s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); background: var(--paper); }
.nav__right { display: flex; align-items: center; gap: 0.6rem; }
.nav__burger { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); position: relative; }
.nav__burger span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--paper); transition: transform 0.4s var(--ease), top 0.4s var(--ease); }
.nav__burger span:first-child { top: 17px; }
.nav__burger span:last-child { top: 25px; }
.nav__burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 65; background: var(--yarl); color: var(--ink);
  padding: 110px var(--gutter) var(--gutter); overflow: hidden;
  clip-path: circle(0% at calc(100% - 40px) 40px); transition: clip-path 0.7s var(--ease-in-out);
}
.menu.is-open { clip-path: circle(150% at calc(100% - 40px) 40px); }
.menu nav { display: grid; gap: 0.2rem; position: relative; z-index: 1; }
.menu nav a { font-size: clamp(2.6rem, 11vw, 4.4rem); font-weight: 800; font-stretch: 75%; letter-spacing: -0.04em; line-height: 1.02; display: flex; align-items: baseline; gap: 0.8rem; }
.menu nav small { font-family: var(--f-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.1em; opacity: 0.6; }
.menu__yarl { position: absolute; right: -30px; bottom: -10px; width: 52vw; max-width: 300px; opacity: 1; }
.menu.is-open ~ .nav .nav__logo, .nav.menu-open .nav__logo { color: var(--ink); }
.nav.menu-open .nav__burger { border-color: rgba(11, 11, 10, 0.3); }
.nav.menu-open .nav__burger span { background: var(--ink); }
.nav.menu-open { background: transparent; border-color: transparent; backdrop-filter: none; }
.nav.menu-open .btn--yellow { background: var(--ink); color: var(--yarl); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  padding: 140px var(--gutter) 0;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden; isolation: isolate;
}
.hero__glow {
  position: absolute; z-index: -1; right: -10vw; top: 8vh; width: 75vw; height: 75vw; max-width: 1100px; max-height: 1100px;
  background: radial-gradient(closest-side, rgba(255, 242, 0, 0.2), rgba(255, 242, 0, 0.06) 55%, transparent 75%);
  pointer-events: none;
  animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(1.08); opacity: 0.8; } }

.hero__content { position: relative; z-index: 3; max-width: 640px; padding-bottom: 22vh; }
.post-meta { font-family: var(--f-mono); font-size: 0.78rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem; margin: 0 0 1.6rem; }
.post-no { color: var(--paper); }
.hero__title { margin: 0; font-family: var(--f-serif); font-weight: 400; font-size: clamp(4.4rem, 11.5vw, 11.5rem); line-height: 0.84; letter-spacing: -0.035em; }
.hero__title em { color: var(--yarl); padding-right: 0.08em; }
.mask { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.mask > * { display: inline-block; transform: translateY(105%); transition: transform 1.2s var(--ease); }
.mask:nth-child(2) > * { transition-delay: 0.12s; }
.is-ready .mask > * { transform: none; }
.greentext { font-family: var(--f-mono); color: var(--greentext); font-size: clamp(1rem, 1.5vw, 1.2rem); margin: 1.6rem 0 0; }
.hero__sub { margin: 1.1rem 0 0; color: rgba(242, 238, 227, 0.7); max-width: 40ch; font-size: clamp(1rem, 1.3vw, 1.15rem); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.2rem; }

.ca {
  margin-top: 1.1rem; display: inline-flex; align-items: center; gap: 0.75rem; max-width: 100%;
  padding: 0.55rem 0.65rem 0.55rem 0.55rem; border-radius: 999px;
  border: 1px dashed var(--line-2); font-family: var(--f-mono); font-size: 0.8rem; color: rgba(242, 238, 227, 0.75);
  transition: border-color 0.3s, background 0.3s;
}
.ca:hover { border-color: var(--yarl); background: rgba(255, 242, 0, 0.05); }
.ca__label { background: var(--paper); color: var(--ink); border-radius: 999px; padding: 0.25rem 0.6rem; font-weight: 700; font-size: 0.7rem; letter-spacing: 0.08em; }
.ca__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca__icon { display: grid; place-items: center; color: var(--yarl); }

.hero__yarl {
  position: absolute; z-index: 2; margin: 0;
  right: max(-2vw, -40px); bottom: 0;
  width: min(54vw, 860px);
  transform-origin: 70% 100%;
}
.hero__yarl img {
  width: 100%;
  filter: drop-shadow(0 30px 80px rgba(255, 242, 0, 0.18));
  transform: translateY(14%) scale(0.96); opacity: 0;
  transition: transform 1.6s var(--ease) 0.25s, opacity 1.2s var(--ease) 0.25s;
}
.is-ready .hero__yarl img { transform: none; opacity: 1; }
.hero__yarl-inner { will-change: transform; }

.hero__word {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center; pointer-events: none;
  overflow: hidden; line-height: 0.74;
}
.hero__word span {
  display: block;
  font-size: 37vw; font-weight: 800; font-stretch: 75%; letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255, 242, 0, 0.32);
  transform: translateY(18%);
  transition: transform 1.8s var(--ease) 0.1s;
}
.is-ready .hero__word span { transform: translateY(9%); }

.hero__foot {
  position: absolute; z-index: 3; left: var(--gutter); right: var(--gutter); bottom: 22px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.hero__scroll { display: inline-flex; align-items: center; gap: 0.6rem; }
.hero__scroll i { width: 1px; height: 28px; background: linear-gradient(var(--yarl), transparent); animation: drip 2s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- bands ---------- */
.bands { position: relative; height: clamp(200px, 22vw, 300px); overflow: hidden; margin: -20px 0; z-index: 4; }
.band { position: absolute; left: -10%; width: 120%; white-space: nowrap; overflow: hidden; padding: 0.95rem 0; }
.band__track { display: inline-flex; align-items: center; gap: 2.2rem; padding-right: 2.2rem; animation: marquee 38s linear infinite; }
.band span { font-weight: 800; font-stretch: 75%; font-size: clamp(1.6rem, 3.4vw, 3rem); text-transform: uppercase; letter-spacing: -0.02em; line-height: 1; }
.band b { font-size: 1.4rem; font-weight: 400; }
.band--a { background: var(--yarl); color: var(--ink); top: 34%; transform: rotate(-3.2deg); z-index: 2; box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.8); }
.band--b { background: var(--paper); color: var(--ink); top: 36%; transform: rotate(2.6deg); }
.band--b span { font-family: var(--f-serif); font-style: italic; font-weight: 400; text-transform: none; letter-spacing: -0.01em; font-size: clamp(1.6rem, 3.2vw, 2.8rem); }
.band--b .band__track { animation-direction: reverse; animation-duration: 46s; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- lore ---------- */
.lore { display: grid; grid-template-columns: minmax(280px, 400px) 1fr; gap: clamp(40px, 7vw, 120px); align-items: start; }
.lore__side { position: sticky; top: 110px; }
.chanpost {
  background: #d6daf0; color: #000; border: 1px solid #b7c5d9; border-radius: 4px;
  font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.35;
  padding: 10px 12px 14px; transform: rotate(-1.6deg);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 8px rgba(255, 255, 255, 0.02);
}
.chanpost header { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chanpost .post-name { color: var(--chan-name); }
.chanpost .post-check { border-color: #555; }
.chanpost__file { margin: 4px 0 6px; font-size: 12px; }
.chanpost__body { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: start; }
.chanpost__body p { margin: 0 0 6px; }
.chanpost__body .quotelink { color: #d00; }
.chanpost__thumb { background: #fff; display: block; }
.chanpost__thumb img { width: 110px; height: auto; }
.facts { margin: 40px 0 0; display: grid; border-top: 1px solid var(--line); }
.facts div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line); font-family: var(--f-mono); font-size: 0.8rem; }
.facts dt { color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.72rem; }
.facts dd { margin: 0; display: flex; align-items: center; gap: 0.5rem; }
.swatch { width: 12px; height: 12px; background: var(--yarl); border-radius: 3px; display: inline-block; }
.lore__main { padding-top: 2.6rem; }
.manifesto { margin: 0; font-size: clamp(1.75rem, 3.5vw, 3.5rem); line-height: 1.1; letter-spacing: -0.03em; font-weight: 500; }
.manifesto--2 { margin-top: 1.1em; }
.manifesto em { color: var(--yarl); }
.manifesto .w { opacity: 0.14; transition: opacity 0.45s ease; }
.manifesto .w.on { opacity: 1; }
.lore__kicker { margin: clamp(48px, 7vw, 96px) 0 0; font-family: var(--f-mono); font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); max-width: 46ch; }
.lore__kicker span { color: var(--yarl); }

/* ---------- killer ---------- */
.killer { background: linear-gradient(180deg, var(--ink) 0%, #0e0e0c 100%); border-top: 1px solid var(--line); }
.killer__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.painting { position: relative; margin: 0 0 28px; }
.painting__frame {
  padding: clamp(10px, 1.3vw, 18px); border-radius: 4px;
  background: linear-gradient(145deg, #2c2822 0%, #16140f 55%, #221e18 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 242, 0, 0.14), inset 0 0 0 5px rgba(0, 0, 0, 0.35),
    0 60px 120px -50px rgba(0, 0, 0, 0.95), 0 0 140px -50px rgba(255, 242, 0, 0.22);
}
.painting__canvas { overflow: hidden; border-radius: 2px; outline: 1px solid rgba(0, 0, 0, 0.7); }
.painting__canvas img { width: 100%; transform: scale(1.08); transition: transform 2.6s var(--ease); }
.painting.in .painting__canvas img { transform: scale(1); }
.painting:hover .painting__canvas img { transform: scale(1.03); transition-duration: 1.2s; }
.plaque {
  position: absolute; right: clamp(-18px, -1.4vw, -8px); bottom: -28px; z-index: 2;
  display: grid; gap: 0.2rem; max-width: 270px; padding: 0.9rem 1.1rem 1rem;
  background: var(--paper-2); color: var(--ink); border-radius: 3px;
  box-shadow: 0 24px 50px -18px rgba(0, 0, 0, 0.85);
}
.plaque__title { font-family: var(--f-serif); font-style: italic; font-size: 1.45rem; line-height: 1; }
.plaque__meta { font-size: 0.85rem; line-height: 1.35; color: rgba(11, 11, 10, 0.7); }
.plaque__no { margin-top: 0.35rem; font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.08em; color: rgba(11, 11, 10, 0.5); }

.versus { border-top: 1px solid var(--line-2); }
.versus__head, .versus__row { display: grid; grid-template-columns: 0.8fr 1fr 1fr; gap: 1rem; align-items: center; padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.versus__head { font-weight: 800; font-stretch: 75%; font-size: clamp(1.6rem, 2.6vw, 2.4rem); letter-spacing: -0.02em; padding: 1.4rem 0; }
.versus__pepe { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--blood); text-decoration-thickness: 3px; }
.versus__yarl { color: var(--yarl); }
.versus__row > span:first-child { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.versus__row > span:nth-child(2) { color: rgba(242, 238, 227, 0.45); }
.versus__row > span:nth-child(3) { font-weight: 600; }
.versus__row:hover > span:nth-child(3) { color: var(--yarl); }
.versus .dead { color: var(--blood) !important; }
.versus .alive { display: inline-flex; align-items: center; gap: 0.5rem; }
.versus .alive i { width: 8px; height: 8px; border-radius: 50%; background: var(--yarl); box-shadow: 0 0 0 0 rgba(255, 242, 0, 0.6); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(255, 242, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 242, 0, 0); } }

/* ---------- thread (pinned horizontal gallery) ---------- */
.thread { position: relative; background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.thread__pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; overflow: hidden; padding-top: 104px; }
.thread__head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; padding: 0 var(--gutter); }
.thread__head .eyebrow { margin-bottom: 1rem; }
.thread__head .display { font-size: clamp(2.6rem, 6vw, 6rem); }
.thread__meta { text-align: right; font-family: var(--f-mono); font-size: 0.78rem; color: var(--muted); }
.thread__meta p { margin: 0; }
.thread__count { margin-top: 0.6rem !important; font-family: var(--f-display); color: var(--paper); font-size: clamp(2.6rem, 5vw, 4.6rem); font-weight: 700; font-stretch: 75%; line-height: 1; letter-spacing: -0.04em; }
.thread__count small { font-size: 0.4em; color: var(--muted); margin-left: 0.2em; }
.thread__viewport { flex: 1; display: flex; align-items: center; min-height: 0; }
.thread__track { display: flex; align-items: center; gap: clamp(28px, 4vw, 64px); padding: 0 var(--gutter); width: max-content; will-change: transform; }
.frame { margin: 0; flex: none; display: flex; flex-direction: column; gap: 1rem; }
.frame { --mh: min(46vh, 480px); --mp: clamp(14px, 2vh, 26px); }
.frame__matte {
  height: var(--mh); padding: var(--mp);
  background: var(--paper-2); border-radius: 6px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.4);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.frame__matte:hover { transform: translateY(-8px) rotate(-0.6deg); box-shadow: 0 50px 90px -40px rgba(255, 242, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.4); }
.frame__matte--dark { background: #000; }
.frame__matte img { height: calc(var(--mh) - 2 * var(--mp)); width: auto; max-width: none; flex: none; }
.frame__matte img.px { image-rendering: pixelated; }
.frame figcaption { display: grid; gap: 0.25rem; max-width: 340px; }
.frame__no { font-family: var(--f-mono); font-size: 0.72rem; color: var(--greentext); letter-spacing: 0.04em; }
.frame__cap { font-family: var(--f-serif); font-style: italic; font-size: clamp(1.3rem, 1.9vw, 1.7rem); line-height: 1.1; }
.frame__file { font-family: var(--f-mono); font-size: 0.68rem; color: var(--muted); }
.frame--end { height: min(46vh, 480px); width: min(60vw, 520px); display: grid; place-items: center; text-align: center; border: 1px dashed var(--line-2); border-radius: 6px; }
.frame--end p { margin: 0; font-size: clamp(2rem, 3.6vw, 3.4rem); font-weight: 700; font-stretch: 80%; letter-spacing: -0.03em; line-height: 1; }
.frame--end em { color: var(--yarl); }
.thread__progress { margin: 0 var(--gutter) 32px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.thread__progress span { display: block; height: 100%; background: var(--yarl); transform-origin: 0 50%; transform: scaleX(0); }

/* static (mobile / reduced motion) version */
.thread.is-static .thread__pin { position: relative; height: auto; padding: 96px 0 40px; }
.thread.is-static .thread__viewport { overflow-x: auto; scroll-snap-type: x mandatory; padding: 48px 0 32px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.thread.is-static .thread__viewport::-webkit-scrollbar { display: none; }
.thread.is-static .frame { scroll-snap-align: center; }
.thread.is-static .thread__track { transform: none !important; }

/* ---------- family ---------- */
.family__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 28px); perspective: 1200px; }
.card {
  position: relative; aspect-ratio: 3 / 4.1; border-radius: var(--radius); overflow: hidden;
  background: var(--ink-2); border: 1px solid var(--line);
  padding: clamp(20px, 2.4vw, 32px);
  display: flex; flex-direction: column;
  transform-style: preserve-3d;
  transition: background 0.5s var(--ease), color 0.5s var(--ease), border-color 0.5s, transform 0.6s var(--ease), opacity 1s var(--ease);
}
.card:hover { background: var(--yarl); color: var(--ink); border-color: var(--yarl); }
.card__top { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.7; }
.card__name { margin: 1.2rem 0 0; font-size: clamp(3.4rem, 7vw, 7rem); font-weight: 800; font-stretch: 75%; letter-spacing: -0.05em; line-height: 0.85; }
.card__role { margin: 0.8rem 0 0; font-family: var(--f-serif); font-style: italic; font-size: clamp(1.1rem, 1.5vw, 1.35rem); line-height: 1.2; max-width: 22ch; opacity: 0.85; }
.card__img { position: absolute; left: 50%; bottom: -2%; height: 58%; width: auto; max-width: 88%; object-fit: contain; object-position: bottom; transform: translateX(-50%) translateZ(40px); transition: transform 0.7s var(--ease); }
.card:hover .card__img { transform: translateX(-50%) translateY(-4%) translateZ(60px) scale(1.04); }

/* ---------- token ---------- */
.token { border-top: 1px solid var(--line); }
.token__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 1.6vw, 20px); }
.stat { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 2.4vw, 34px); display: flex; flex-direction: column; justify-content: space-between; gap: 2.2rem; min-height: 220px; background: var(--ink-2); overflow: hidden; transition: border-color 0.4s; }
.stat:hover { border-color: var(--line-2); }
.stat__label { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.stat__value { font-size: clamp(2rem, 3.4vw, 3.4rem); font-weight: 700; font-stretch: 80%; letter-spacing: -0.04em; line-height: 0.95; }
.stat__note { font-family: var(--f-serif); font-style: italic; font-size: 1.2rem; color: rgba(242, 238, 227, 0.65); }
.stat--big { grid-column: span 3; min-height: 300px; background: radial-gradient(120% 140% at 100% 0%, rgba(255, 242, 0, 0.14), transparent 55%), var(--ink-2); }
.stat--big .stat__value { font-size: clamp(3rem, 9vw, 9.5rem); color: var(--yarl); letter-spacing: -0.06em; font-variant-numeric: tabular-nums; }
.stat--yellow { background: var(--yarl); color: var(--ink); border-color: var(--yarl); }
.stat--yellow .stat__label, .stat--yellow .stat__note { color: rgba(11, 11, 10, 0.7); }
.token__grid .stat:nth-child(2), .token__grid .stat:nth-child(3), .token__grid .stat:nth-child(4) { grid-column: span 1; }
.token__grid .stat--yellow { grid-column: span 1; grid-row: 1; grid-column-start: 4; min-height: 300px; }

/* ---------- buy ---------- */
.buy { border-top: 1px solid var(--line); }
.buy__ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.ca--big { width: 100%; margin: 0 0 clamp(32px, 4vw, 56px); padding: 1rem 1rem 1rem 1.4rem; border-radius: 22px; border-style: solid; display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; font-size: clamp(0.8rem, 1.3vw, 1.05rem); background: var(--ink-2); }
.ca--big .ca__label { background: none; color: var(--muted); padding: 0; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; }
.ca--big .ca__value { color: var(--paper); text-align: left; }
.ca__btn { background: var(--yarl); color: var(--ink); padding: 0.7rem 1.2rem; border-radius: 14px; font-family: var(--f-display); font-weight: 700; font-size: 0.95rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 1.6vw, 20px); counter-reset: s; }
.step { border-top: 1px solid var(--line-2); padding: 1.6rem 0.4rem 0 0; }
.step__no { font-family: var(--f-mono); color: var(--yarl); font-size: 0.8rem; letter-spacing: 0.1em; }
.step h3 { margin: 1.4rem 0 0.7rem; font-size: clamp(1.5rem, 2.2vw, 2rem); font-weight: 700; font-stretch: 85%; letter-spacing: -0.03em; line-height: 1; }
.step p { margin: 0; color: rgba(242, 238, 227, 0.66); font-size: 0.98rem; max-width: 30ch; }

/* ---------- finale ---------- */
.finale {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(110px, 14vw, 200px) var(--gutter) 0;
  background: var(--yarl); color: var(--ink);
  display: flex; flex-direction: column; align-items: center;
}
.finale .eyebrow { color: rgba(11, 11, 10, 0.6); justify-content: center; }
.finale__title { margin: 0; font-size: clamp(4rem, 16vw, 17rem); line-height: 0.82; font-weight: 800; font-stretch: 75%; letter-spacing: -0.035em; }
.finale__title span { display: block; }
.finale__title em { display: block; font-size: 1.12em; letter-spacing: -0.04em; }
.finale__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-top: 2.4rem; position: relative; z-index: 2; }
.pill { padding: 0.8rem 1.3rem; border: 1.5px solid var(--ink); border-radius: 999px; font-weight: 600; transition: background 0.3s, color 0.3s; }
.pill:hover { background: var(--ink); color: var(--yarl); }
.finale__yarl { width: min(58vw, 470px); margin-top: clamp(28px, 4vw, 48px); margin-bottom: -6%; transform: translateY(var(--rise, 30%)); transition: transform 0.2s linear; }

/* ---------- footer ---------- */
.footer { padding: 40px var(--gutter) 48px; display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem 3rem; align-items: start; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.footer p { margin: 0; }
.footer__brand { display: flex; align-items: center; gap: 0.6rem; color: var(--paper); font-weight: 700; }
.footer__legal { max-width: 70ch; line-height: 1.55; }
.footer__egg { font-family: var(--f-mono); font-size: 0.75rem; }
kbd { display: inline-block; min-width: 1.5em; text-align: center; padding: 0.1em 0.35em; margin: 0 0.1em; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; font-family: var(--f-mono); color: var(--paper); }

/* ---------- lightbox ---------- */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 8, 7, 0.94); color: var(--paper); }
.lightbox[open] { display: grid; grid-template-columns: auto 1fr auto; align-items: center; animation: fadeIn 0.35s var(--ease); }
.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 1.2rem; padding: 64px 0; }
.lightbox__img { background: var(--paper-2); padding: clamp(12px, 2vw, 28px); border-radius: 6px; }
.lightbox__img.is-dark { background: #000; }
.lightbox__img img { max-height: 70vh; max-width: min(80vw, 1000px); width: auto; height: auto; min-height: min(40vh, 300px); object-fit: contain; }
.lightbox__img img.px { image-rendering: pixelated; }
.lightbox figcaption { display: grid; gap: 0.3rem; text-align: center; }
.lightbox__close { position: absolute; top: 20px; right: 20px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 1rem; }
.lightbox__nav { width: 56px; height: 56px; margin: 0 clamp(8px, 2vw, 32px); border-radius: 50%; border: 1px solid var(--line-2); font-size: 1.2rem; transition: background 0.3s, color 0.3s; }
.lightbox__nav:hover, .lightbox__close:hover { background: var(--yarl); color: var(--ink); border-color: var(--yarl); }
@keyframes fadeIn { from { opacity: 0; } }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 99; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; background: var(--paper); color: var(--ink); padding: 0.85rem 1.3rem; border-radius: 999px; font-weight: 600; font-size: 0.95rem; box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.8); transition: transform 0.5s var(--ease), opacity 0.5s var(--ease); width: max-content; max-width: calc(100vw - 32px); text-align: center; }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ---------- easter egg rain ---------- */
.rain { position: fixed; top: -160px; z-index: 96; pointer-events: none; width: var(--s, 90px); animation: fall var(--t, 3s) cubic-bezier(0.4, 0, 0.8, 0.6) forwards; }
@keyframes fall { to { transform: translateY(calc(100vh + 220px)) rotate(var(--r, 360deg)); } }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .nav__links { display: none; }
  .nav__burger { display: block; }
  .token__grid { grid-template-columns: repeat(2, 1fr); }
  .stat--big { grid-column: span 2; }
  .token__grid .stat--yellow { grid-row: auto; grid-column: span 1; grid-column-start: auto; min-height: 220px; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 2.6rem; }
}

@media (max-width: 900px) {
  .hero { padding-top: 120px; justify-content: flex-start; }
  .hero__content { padding-bottom: 0; }
  .hero__yarl { position: relative; right: auto; align-self: flex-end; width: min(86vw, 520px); margin: 1rem -6vw 0 0; }
  .hero__word span { font-size: 44vw; }
  .hero__foot { display: none; }
  .lore { grid-template-columns: 1fr; }
  .lore__side { position: relative; top: 0; }
  .lore__main { padding-top: 0; }
  .killer__grid { grid-template-columns: 1fr; row-gap: 48px; }
  .painting { margin-bottom: 0; }
  .plaque { position: relative; right: auto; bottom: auto; width: fit-content; margin: -12px 12px 0 auto; }
  .section__head--row { grid-template-columns: 1fr; }
  .family__grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .card { aspect-ratio: 4 / 4.2; }
  .thread__head { flex-direction: column; align-items: flex-start; }
  .thread__meta { text-align: left; }
  .footer { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .btn { --pad: 0.95rem 1.35rem; }
  .nav .btn--sm { display: none; }
  .hero__title { font-size: clamp(4rem, 22vw, 7rem); }
  .ca { font-size: 0.72rem; }
  .bands { height: 170px; }
  .chanpost__body { grid-template-columns: 84px 1fr; }
  .chanpost__thumb img { width: 84px; }
  .versus__head, .versus__row { grid-template-columns: 0.9fr 1fr 1fr; gap: 0.6rem; font-size: 0.95rem; }
  .token__grid { grid-template-columns: 1fr; }
  .stat--big, .token__grid .stat--yellow { grid-column: auto; }
  .stat { min-height: 170px; }
  .stat--big { min-height: 220px; }
  .steps { grid-template-columns: 1fr; }
  .ca--big { grid-template-columns: 1fr; gap: 0.7rem; padding: 1.1rem; }
  .ca--big .ca__value { white-space: normal; word-break: break-all; }
  .ca__btn { justify-self: start; }
  .frame { --mp: 12px; }
  .frame__matte { width: 82vw; height: auto; min-height: 46vh; }
  .frame__matte img { width: 100%; height: auto; max-height: 60vh; object-fit: contain; }
  .frame--end { width: 82vw; height: 46vh; }
  .band--b { top: 20%; }
  .band--a { top: 46%; }
  .frame figcaption { max-width: 78vw; }
  .lightbox[open] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; }
  .lightbox figure { grid-column: 1 / -1; grid-row: 1; padding-bottom: 0; }
  .lightbox__nav { grid-row: 2; justify-self: center; margin-bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .manifesto .w { opacity: 1; }
  .grain { display: none; }
}
