:root {
  --red: #e4000f;
  --red-hot: #ff1a2a;
  --deep: #7a0008;
  --ink: #140306;
  --cream: #fff4e8;
  --zero: #0e0e0f;
  --silver: #c9cdd2;
  --cherry: #6e0a2a;
  --white: #ffffff;

  --bg: var(--red);
  --fg: var(--cream);

  --f-display: "Archivo", system-ui, sans-serif;
  --f-script: "Yellowtail", cursive;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --t-mega: clamp(5rem, 18vw, 18rem);
  --t-h1: clamp(3rem, 9vw, 8.5rem);
  --t-h2: clamp(2.2rem, 5vw, 4.5rem);
  --t-h3: clamp(1.4rem, 2.4vw, 2rem);
  --t-body: 1.125rem;
  --t-micro: 0.72rem;

  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2.5rem;
  --s-5: 4rem;
  --s-6: 6rem;

  --gutter: clamp(16px, 4vw, 56px);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-display);
  font-size: var(--t-body);
  line-height: 1.5;
  font-variation-settings: "wdth" 100;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
.backdrop {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-color: var(--red);
  transition: background-color 0.6s var(--ease-out);
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }

::selection { background: var(--cream); color: var(--red); }

:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 4px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* grain: real print texture over everything */
.grain {
  position: fixed; inset: 0;
  z-index: 50; pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><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.2 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* vignette that keeps the drench from looking flat */
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 40%, rgba(0, 0, 0, 0.38) 100%),
    radial-gradient(60% 50% at 50% 40%, rgba(255, 255, 255, 0.10), transparent 70%);
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 16px; left: 50%; z-index: 40;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: var(--s-3);
  padding: 8px 8px 8px 22px;
  border-radius: 9999px;
  background: rgba(20, 3, 6, 0.5);
  border: 1px solid rgba(255, 244, 232, 0.16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  width: max-content; max-width: calc(100vw - 32px);
}
.nav__mark {
  font-family: var(--f-script);
  font-size: 1.7rem; line-height: 1;
  text-decoration: none; color: var(--cream);
  padding-bottom: 2px;
}
.nav__links { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  display: block; padding: 10px 16px; border-radius: 9999px;
  font-size: 0.86rem; font-weight: 600; letter-spacing: 0.01em;
  text-decoration: none; color: rgba(255, 244, 232, 0.82);
  transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.nav__links a:hover { color: var(--cream); background: rgba(255, 244, 232, 0.1); }
.nav__links a[aria-current="page"] { background: var(--cream); color: var(--red); }

/* ---------- stage (the fixed 3D can) ---------- */
#stage {
  position: fixed; inset: 0; z-index: 3;
  width: 100vw; height: 100vh; height: 100svh;
  pointer-events: none;
}
.poster-can { display: none; }
.no-webgl #stage { display: none; }
.no-webgl .poster-can {
  display: block; position: fixed; z-index: 3; pointer-events: none;
  left: 50%; top: 50%; width: min(32vw, 220px); aspect-ratio: 66 / 122;
  transform: translate(-50%, -50%);
  border-radius: 14% / 6%;
  background:
    linear-gradient(90deg, rgba(0,0,0,.45), rgba(255,255,255,.35) 22%, rgba(255,255,255,.05) 38%, rgba(0,0,0,.25) 70%, rgba(255,255,255,.18) 86%, rgba(0,0,0,.5)),
    var(--red);
  box-shadow: 0 40px 80px rgba(0,0,0,.4);
}
.no-webgl .poster-can::after {
  content: "Qurn Cola"; position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--f-script); font-size: clamp(2rem, 7vw, 3.4rem); color: #fff;
  transform: rotate(-90deg);
}

/* ---------- layout primitives ---------- */
main { position: relative; }
.scene { position: relative; }
.sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  display: grid; place-items: center;
}
.layer-back { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; pointer-events: none; }
.layer-front { position: relative; z-index: 4; }

.mega {
  font-size: var(--t-mega);
  font-weight: 900;
  font-variation-settings: "wdth" 125;
  line-height: 0.82;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0;
  white-space: nowrap;
}
.outline {
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 244, 232, 0.55);
  -webkit-text-stroke-color: color-mix(in srgb, var(--fg) 55%, transparent);
}
.h1 {
  font-size: var(--t-h1); font-weight: 900;
  font-variation-settings: "wdth" 125;
  line-height: 0.88; letter-spacing: -0.025em;
  margin: 0;
}
.h2 {
  font-size: var(--t-h2); font-weight: 900;
  font-variation-settings: "wdth" 118;
  line-height: 0.92; letter-spacing: -0.02em;
  margin: 0;
}
.script { font-family: var(--f-script); font-weight: 400; letter-spacing: 0; text-transform: none; }
.line { font-size: clamp(1.05rem, 1.6vw, 1.35rem); max-width: 30ch; margin: var(--s-2) 0 0; opacity: 0.9; }
.micro {
  font-family: var(--f-mono); font-size: var(--t-micro);
  letter-spacing: 0.14em; text-transform: uppercase;
  opacity: 0.75;
}

/* corner readouts: pure atmosphere */
.hud { position: fixed; z-index: 30; pointer-events: none; transition: opacity 0.3s; }
.at-footer .hud { opacity: 0; }
.hud--bl { left: var(--gutter); bottom: 20px; }
.hud--br { right: var(--gutter); bottom: 20px; text-align: right; }
.hud--edge {
  right: 14px; top: 50%;
  writing-mode: vertical-rl; transform: translateY(-50%) rotate(180deg);
}

/* ---------- buttons ---------- */
.btn {
  --mx: 0px; --my: 0px;
  display: inline-flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 28px;
  border-radius: 9999px; border: 0;
  font-weight: 800; font-size: 1rem; letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer;
  transform: translate(var(--mx), var(--my));
  transition: transform 0.35s var(--ease-out), background-color 0.3s, color 0.3s, box-shadow 0.3s;
}
.btn:active { transform: translate(var(--mx), var(--my)) scale(0.97); }
.btn--cream { background: var(--cream); color: var(--red); box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.btn--cream:hover { box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.btn--ghost { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 2px rgba(255,244,232,.6); }
.btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--cream); }
.btn__arrow { transition: transform 0.35s var(--ease-out); }
.btn:hover .btn__arrow { transform: translate(3px, -3px); }

/* ---------- reveal ---------- */
.reveal-words .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.06em; }
.reveal-words .w > span {
  display: inline-block; transform: translateY(105%);
  transition: transform 0.9s var(--ease-out);
  transition-delay: calc(var(--i) * 55ms);
}
.reveal-words.in .w > span { transform: none; }
.reveal {
  opacity: 0; transform: translate3d(0, 24px, 0);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- footer ---------- */
.footer {
  position: relative; z-index: 5;
  background: var(--ink); color: var(--cream);
  padding: var(--s-5) var(--gutter) var(--s-4);
  display: grid; gap: var(--s-4);
}
.footer__big { font-family: var(--f-script); font-size: clamp(4rem, 14vw, 12rem); line-height: 0.9; margin: 0; color: var(--red-hot); }
.footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); align-items: end; }
.footer__links { display: flex; flex-wrap: wrap; gap: var(--s-3); list-style: none; margin: 0; padding: 0; }
.footer__links a { text-decoration: none; font-weight: 700; opacity: .85; }
.footer__links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.footer__legal { font-size: 0.82rem; opacity: 0.72; max-width: 60ch; margin: 0; }

/* ---------- loading screen (covers the one-time GPU warm-up) ---------- */
html.is-loading, html.is-loading body { overflow: hidden; }
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; align-content: center; gap: 22px;
  background: var(--red); color: var(--cream);
  transition: opacity 0.6s var(--ease-out), visibility 0s linear 0.6s;
}
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__mark { font-family: var(--f-script); font-size: clamp(3rem, 9vw, 6rem); line-height: 1; margin: 0; }
.loader__bar {
  position: relative; width: min(220px, 50vw); height: 3px; border-radius: 3px; overflow: hidden;
  background: rgba(255, 244, 232, 0.25);
}
.loader__bar::after {
  content: ""; position: absolute; inset: 0; width: 40%; border-radius: inherit; background: var(--cream);
  animation: loaderSlide 1.1s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes loaderSlide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ---------- "Made By Panther" lanyard badge ---------- */
.tag-rig {
  position: fixed; top: 0; left: 0; width: 0; height: 0; z-index: 45; pointer-events: none;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.tag-strap { position: absolute; top: 0; left: 0; max-width: none; overflow: hidden; will-change: transform; }
.tag-strap__band { fill: none; stroke: #140306; stroke-width: var(--strap-w, 15px); stroke-linecap: round; stroke-linejoin: round; }
.tag-strap__edge { fill: none; stroke: rgba(255, 244, 232, 0.18); stroke-width: var(--strap-w, 15px); stroke-dasharray: 2 5; stroke-linecap: butt; }
.tag-strap__text {
  font-family: var(--f-mono); font-size: 8.5px; font-weight: 500; letter-spacing: 0.22em;
  fill: #fff4e8;
}
.tag-card {
  --sheen: 50%;
  position: absolute; left: 0; top: 0;
  width: var(--tag-w, 132px); height: var(--tag-h, 188px);
  transform-origin: 50% 6px;
  border-radius: 14px;
  padding: 34px 14px 14px;
  display: flex; flex-direction: column; gap: 4px;
  color: #140306;
  background:
    radial-gradient(120% 70% at 30% 0%, rgba(255, 255, 255, 0.9), transparent 60%),
    linear-gradient(160deg, #fffaf3 0%, #f6eadc 60%, #e7d6c4 100%);
  box-shadow:
    0 18px 40px rgba(20, 3, 6, 0.42),
    0 2px 6px rgba(20, 3, 6, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 0 rgba(0, 0, 0, 0.25);
  pointer-events: auto; cursor: grab; touch-action: none; user-select: none;
  will-change: transform;
  backface-visibility: hidden;
}
.is-grabbed .tag-card { cursor: grabbing; }
.tag-card__clip {
  position: absolute; left: 50%; top: -14px; width: 26px; height: 24px; transform: translateX(-50%);
  border-radius: 6px 6px 4px 4px;
  background: linear-gradient(90deg, #8b9096, #f1f3f5 35%, #c3c8ce 55%, #7d8288);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.18);
}
.tag-card__slot {
  position: absolute; left: 50%; top: 14px; width: 34px; height: 8px; transform: translateX(-50%);
  border-radius: 9999px; background: rgba(20, 3, 6, 0.75);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.25);
}
.tag-card__kicker { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.26em; opacity: 0.85; margin-top: 8px; }
.tag-card__name {
  font-weight: 900; font-variation-settings: "wdth" 100;
  font-size: calc(var(--tag-w, 132px) * 0.15); line-height: 0.95; letter-spacing: -0.01em;
  color: #d8000c;
  text-decoration: none; cursor: pointer; align-self: flex-start;
  text-underline-offset: 3px; text-decoration-thickness: 2px;
}
.tag-card__name:hover { text-decoration: underline; }
.tag-card__name:focus-visible { outline: 2px solid #d8000c; outline-offset: 3px; border-radius: 3px; }
.tag-card__rule { height: 2px; width: 34px; background: #d8000c; margin: 6px 0 2px; border-radius: 2px; }
.tag-card__bars {
  margin-top: auto; height: 18px; border-radius: 3px; opacity: 0.8;
  background: repeating-linear-gradient(90deg, #140306 0 2px, transparent 2px 4px, #140306 4px 5px, transparent 5px 8px, #140306 8px 11px, transparent 11px 13px);
}
.tag-card__sheen {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent calc(var(--sheen) - 22%), rgba(255, 255, 255, 0.28) var(--sheen), transparent calc(var(--sheen) + 22%));
  mix-blend-mode: soft-light;
}
@media (max-width: 720px) {
  .tag-card { padding: 24px 10px 10px; border-radius: 11px; gap: 2px; }
  .tag-card__slot { top: 10px; width: 26px; height: 6px; }
  .tag-card__kicker { font-size: 7px; margin-top: 4px; }
  .tag-card__bars { height: 12px; }
  .tag-strap__text { font-size: 6.5px; }
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .nav { gap: var(--s-1); padding: 6px 6px 6px 14px; }
  .nav__mark { font-size: 1.35rem; }
  .nav__links a { padding: 9px 10px; font-size: 0.78rem; }
  .hud { display: none; }
  .outline { -webkit-text-stroke-width: 1.5px; }
}
@media (max-width: 400px) {
  .nav__links a { padding: 8px 8px; font-size: 0.74rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal, .reveal-words .w > span { opacity: 1; transform: none; }
}
