/* ================================================================
   Glitch Cat Club — Hero stylesheet v2
   Hero is one screen (100vh). Designed for 1920×1080 first.
   Illustration is large + absolutely positioned, anchored to the
   bottom-right of the hero frame.
   ================================================================ */

/* ---------- TOKENS ---------- */
:root {
  --bg:          #000000;       /* matches PNG black so no edge seam */
  --ink:         #070707;
  --ink-2:       #111111;
  --paper:       #f3e6c8;
  --paper-dim:   rgba(243, 230, 200, 0.84);
  --paper-mute:  rgba(243, 230, 200, 0.42);
  --line:        rgba(243, 230, 200, 0.22);

  --pink:        #ef4f7a;
  --teal:        #138f83;
  --teal-bright: #26b7aa;
  --yellow:      #f6bd33;

  --accent:        var(--pink);
  --accent-2:      var(--teal);    /* secondary accent (opposite-coloured) */
  --accent-pink:   #ef4f7a;
  --accent-teal:   #26b7aa;
  --accent-yellow: #f6bd33;

  /* hue-rotate + saturation applied to the hero PNG per theme */
  --art-hue:       0deg;
  --art-sat:       1;

  --font-display: 'Changa One', Impact, 'Arial Narrow Bold', sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'DM Mono', ui-monospace, monospace;
  --font-pixel:   'Pixelify Sans', monospace;

  --frame-max:   1800px;
  --frame-pad-x: 60px;
  --frame-pad-t: 36px;
  --frame-pad-b: 60px;
}

body[data-theme="teal"] {
  --accent:   var(--accent-teal);
  --accent-2: var(--pink);
  --art-hue:  62deg;
  --art-sat:  0.95;
}
body[data-theme="yellow"] {
  --accent:   var(--accent-yellow);
  --accent-2: var(--accent-teal);
  --art-hue:  -20deg;
  --art-sat:  1.1;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

html, body { background: var(--bg); }
body {
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ---------- HERO ----------
   Hero is its NATURAL content height (no 100vh stretch). On a 1920×1080
   monitor the rest of the viewport is just page bg (black) — the user
   wants the page to end where the hero ends.

   Layout: nav at top, then a relative-positioned body. Copy flows
   normally in the top-left. Art is absolutely positioned with
   bottom: 0 so its bottom edge always equals the body's bottom edge
   (which equals the copy block's bottom edge — i.e., the curious-builders row). */
/* ---------- HERO ----------
   100vh fill at 1920×1080. Content scales to feel substantial. */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: var(--bg);
  overflow: hidden;
}

.hero__frame {
  position: relative;
  width: 100%;
  max-width: var(--frame-max);
  min-height: 100vh;
  margin: 0 auto;
  padding: var(--frame-pad-t) var(--frame-pad-x) var(--frame-pad-b);
  display: flex;
  flex-direction: column;
}

.hero__body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: clamp(16px, 3vh, 48px);
}

/* ---------- NAV ---------- */
.nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 64px;
}
.nav__right { margin-left: auto; }   /* pushes CTA to the right edge */

.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__brand { display: flex; align-items: center; gap: 14px; }
.nav__brand-mark {
  display: grid;
  place-items: center;
  width: clamp(38px, 2.4vw, 52px);
  flex-shrink: 0;
}
.nav__brand-mark img {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}
.nav__brand-name {
  font-family: 'Archivo Black', Impact, sans-serif;
  font-size: clamp(15px, 1.05vw, 19px);
  line-height: 0.95;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--paper);
  /* Same RGB-fringe glitch the hero display lines and foot shout use.
     Duration + offset are unique to this element so the brand-mark
     doesn't glitch in sync with the others (24s loop, 14s offset). */
  animation: word-glitch 24s ease-out 14s infinite;
}

.nav__links {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: flex-start;
}
.nav__link {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  padding: 8px 2px;
  position: relative;
  transition: color 180ms ease;
}
.nav__link:hover { color: var(--accent); }
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms ease;
}
.nav__link:hover::after { transform: scaleX(1); }

.nav__pill {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  padding: 6px 10px;
  border-radius: 4px;
  transition: background-color 180ms ease, color 180ms ease;
}
.nav__pill:hover { background: var(--accent); color: var(--ink); }

.nav__right { display: flex; align-items: center; gap: 12px; }

.nav__burger {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  width: 42px; height: 38px;
  padding: 10px;
  flex-direction: column;
  justify-content: space-between;
}
.nav__burger span {
  display: block;
  height: 2px;
  background: var(--paper);
}

/* ---------- COPY (left, top-anchored, natural height) ---------- */
.hero__copy {
  position: relative;
  z-index: 6;
  width: min(900px, 100%);
  flex: 1;                          /* fill body vertically */
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 1.8vh, 26px);
}
.hero__copy .eyebrow + .display { margin-top: -4px; }   /* even tighter between eyebrow & headline */

.eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(13px, 1.05vw, 20px);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-teal);
}

.display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(56px, 6.6vw, 126px);   /* much bigger — fills 1920×1080 */
  line-height: 0.86;
  letter-spacing: -0.018em;
  text-wrap: balance;
  white-space: nowrap;
  /* Per-line glitch defined on individual .display__line classes below. */
}
.display__line { display: block; }
.display__line--cream { color: var(--paper);     animation: word-glitch 17s ease-out infinite;        }
.display__line--teal  { color: var(--accent-2);  animation: word-glitch 19s ease-out 6.4s infinite;   }
.display__line--pink  { color: var(--accent);    animation: word-glitch 23s ease-out 12.1s infinite;  }

/* Aggressive per-word glitch: 7 sub-frames over ~700ms, big chromatic
   offsets + horizontal jitter + skew. Different animation durations on each
   line mean they almost never glitch simultaneously — feels random. */
@keyframes word-glitch {
  0%, 92%      { text-shadow: none; transform: translateX(0) skewX(0); clip-path: none; }
  92.2%        { text-shadow: 4px 0 var(--accent), -4px 0 var(--accent-2); transform: translateX(-3px) skewX(-3deg); }
  92.6%        { text-shadow: -6px 0 var(--accent), 5px 0 var(--accent-2); transform: translateX(4px) skewX(2deg); }
  93%          { text-shadow: 3px 0 var(--accent), -3px 0 var(--accent-2); transform: translateX(-2px) skewX(0); }
  93.4%        { text-shadow: -5px 0 var(--accent), 4px 0 var(--accent-2); transform: translateX(3px) skewX(-2deg); }
  93.8%        { text-shadow: 2px 0 var(--accent), -2px 0 var(--accent-2); transform: translateX(-1px) skewX(1deg); }
  94.2%        { text-shadow: -2px 0 var(--accent), 1px 0 var(--accent-2); transform: translateX(0); }
  94.6%, 100%  { text-shadow: none; transform: translateX(0) skewX(0); }
}

.cursor {
  display: inline-block;
  color: var(--accent);
  margin-left: 4px;
  /* Irregular terminal-style blink: steady blinks, occasional pause,
     occasional double-tap. 8s loop with varied within. */
  animation: blink-real 8s steps(1, end) infinite;
}
@keyframes blink-real {
  0%,   6.6%  { opacity: 1; }
  6.7%, 13.2% { opacity: 0; }
  13.3%,19.8% { opacity: 1; }
  19.9%,26.4% { opacity: 0; }
  26.5%,33%   { opacity: 1; }
  33.1%,39.6% { opacity: 0; }
  39.7%,72%   { opacity: 1; }   /* long idle on (thinking) */
  72.1%,74%   { opacity: 0; }   /* quick double-tap */
  74.1%,76%   { opacity: 1; }
  76.1%,78%   { opacity: 0; }
  78.1%,84.7% { opacity: 1; }
  84.8%,91.3% { opacity: 0; }
  91.4%,100%  { opacity: 1; }
}

.sub {
  margin: 0;
  font-family: 'Space Mono', monospace;
  font-size: clamp(15px, 1.35vw, 24px);
  line-height: 1.5;
  color: var(--paper);
  max-width: 560px;
}

/* ---------- BUTTONS (cutout — torn print) ---------- */
.btn {
  --fill: var(--paper);
  --text: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: clamp(10px, 0.8vw, 14px);
  font-family: var(--font-mono);
  font-size: clamp(13px, 0.95vw, 17px);
  font-weight: 700;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  padding: clamp(14px, 1.1vw, 20px) clamp(20px, 1.6vw, 30px);
  background: var(--fill);
  color: var(--text);
  border: 2px solid #000;
  position: relative;
  user-select: none;
  white-space: nowrap;
  transition: transform 180ms cubic-bezier(.2,.7,.3,1.2), box-shadow 180ms ease, filter 180ms ease;
}

.btn__icon { display: inline-grid; place-items: center; }

.btn--cutout {
  border-radius: 6px 14px 7px 13px;
  box-shadow: 7px 7px 0 #000, inset -4px -4px 0 rgba(0,0,0,0.22), inset 3px 3px 0 rgba(255,255,255,0.22);
  overflow: hidden;
}
.btn--cutout::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.38), rgba(255,255,255,0.04) 36%, rgba(0,0,0,0.10) 100%),
    repeating-linear-gradient(-8deg, rgba(255,255,255,0.18) 0 1px, transparent 1px 7px);
  mix-blend-mode: overlay;
}

.btn--primary { --fill: var(--accent); --text: var(--ink); transform: rotate(-1deg); }
.btn--primary:hover { transform: rotate(-1deg) translateY(-3px) translateX(-1px);
  box-shadow: 9px 9px 0 #000, inset -4px -4px 0 rgba(0,0,0,0.24), inset 3px 3px 0 rgba(255,255,255,0.24);
  filter: saturate(1.08);
}
.btn--primary:active { transform: rotate(-1deg) translateY(2px) translateX(2px) scale(0.985);
  box-shadow: 3px 3px 0 #000, inset -3px -3px 0 rgba(0,0,0,0.26), inset 2px 2px 0 rgba(255,255,255,0.12);
}

.btn--ghost {
  --fill: transparent;
  --text: var(--paper);
  border-color: rgba(243,230,200,0.55);
  box-shadow: 7px 7px 0 #000, inset -2px -2px 0 rgba(255,255,255,0.04);
  transform: rotate(1deg);
}
.btn--ghost::after { display: none; }
.btn--ghost:hover { transform: rotate(1deg) translateY(-3px) translateX(1px); border-color: var(--paper);
  box-shadow: 9px 9px 0 #000, inset -2px -2px 0 rgba(255,255,255,0.06);
}
.btn--ghost:active { transform: rotate(1deg) translateY(2px) translateX(-2px) scale(0.985);
  box-shadow: 3px 3px 0 #000;
}

/* ---------- Cat icon inside JOIN button (SVG asset) ---------- */
.btn__icon--cat img {
  width: 26px; height: 20px;
  display: block;
  object-fit: contain;
}

/* hover wiggles the cat icon */
.btn--glitch:hover .btn__icon--cat { animation: cat-wiggle 420ms steps(3, end); }
@keyframes cat-wiggle {
  0%   { transform: translate(0,0) rotate(0); }
  25%  { transform: translate(1px,-1px) rotate(-4deg); }
  50%  { transform: translate(-1px,1px) rotate(3deg); }
  75%  { transform: translate(1px,0) rotate(-2deg); }
  100% { transform: translate(0,0) rotate(0); }
}

/* star wiggles on the nav button */
.btn__icon--star {
  font-family: 'Arial Black', sans-serif;
  font-size: 16px;
  line-height: 1;
  color: var(--ink);
  display: inline-block;
}
.btn--glitch-star:hover .btn__icon--star { animation: star-spin 600ms ease; }
@keyframes star-spin {
  0%   { transform: rotate(0); }
  60%  { transform: rotate(72deg) scale(1.15); }
  100% { transform: rotate(0) scale(1); }
}

/* nav variant: a bit smaller */
.btn--nav {
  padding: 11px 16px;
  font-size: 12px;
}

/* ---------- CTA row ---------- */
.cta-row {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* ---------- PROOF (avatars + count) — natural flow under CTAs ---------- */
.proof {
  display: flex;
  align-items: center;
  gap: clamp(16px, 1.2vw, 24px);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: clamp(13px, 1vw, 17px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--paper);
}

/* CTAs + proof together as one bottom-anchored block.
   margin-top:auto on the cta-row pushes the entire CTAs+proof group
   to the bottom of the copy column (which fills the hero vertically). */
.cta-row { margin-top: auto; }

/* ---------- Cat glitch sprite ----------
   Sprite is 1729×910, 6 frames in a horizontal row (~288.17px each in
   source). Frames tell a story: cat trains an AI on a CRT → sees it work
   → celebrates → the screen glitches out. Loop ≈10s.

   The container shows the full frame (no vertical crop). overflow:hidden
   guards against sub-pixel bleed at the 1729/6 non-integer frame boundary. */
/* ---------- Cat blink ----------
   Sprite 1 (cat-sprite-glitch.jpg) — 1774×887, 6 frames.

   Coordinates measured directly from the source (pixel scan):
     Cat 1: cols 54–311 (width 258, center 182.5)
     Cat 2: cols 340–597 (width 258, center 468.5)
     Gap between cat 1 right edge and cat 2 left edge: 28 cols

   Max symmetric window centered on each cat without bleeding into the
   neighbor = 313 cols. Using 310 for a small safety margin:

     bg-size  = 1774 / 310 × 100% = 572.26%
     Available shift = (1774 − 310) = 1464 source cols → 0–100% position

     Frame 1 window: col 27.5 → 337.5  →  position 27.5/1464 = 1.88%
     Frame 2 window: col 313.5 → 623.5 →  position 313.5/1464 = 21.41%

   Positioned absolutely above the Join the Club button (see .join-stack) —
   removed from flex column flow so it doesn't push other elements down. */
.join-stack, .watch-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;          /* centers avatars/link horizontally under each button */
  gap: clamp(10px, 1.2vw, 18px);
}
.watch-stack .proof__link { padding-left: 4px; }   /* tiny visual indent matches button text */

.cat-glitch {
  position: absolute;
  bottom: calc(100% + 8px);    /* just above the Join button */
  left: 50%;
  transform: translateX(-50%); /* horizontally centered over the button */
  width: clamp(72px, 4.6vw, 100px);
  aspect-ratio: 310 / 887;
  background-image: url('assets/cat-sprite-glitch.jpg');
  background-repeat: no-repeat;
  background-size: 572.26% 100%;
  background-position: 1.88% 0;
  animation: cat-blink 5s step-end infinite;
  overflow: hidden;
  pointer-events: none;
}

@keyframes cat-blink {
  0%, 94%, 100% { background-position:  1.88% 0; }   /* frame 1: eyes open */
  95%, 96%      { background-position: 21.41% 0; }   /* frame 2: blink */
}

@keyframes cat-blink {
  0%, 94%, 100% { background-position:  1.88% 0; }   /* frame 1: eyes open */
  95%, 96%      { background-position: 21.41% 0; }   /* frame 2: blink */
}

@keyframes cat-glitch {
  /* 6 frames, 400ms each, equal cadence \u2192 smooth playthrough */
  0%      { background-position:   0% 0; }   /* frame 1: rest */
  16.67%  { background-position:  20% 0; }   /* frame 2: excited */
  33.33%  { background-position:  40% 0; }   /* frame 3: curious */
  50%     { background-position:  60% 0; }   /* frame 4: AHA flash */
  66.67%  { background-position:  80% 0; }   /* frame 5: celebrate */
  83.33%  { background-position: 100% 0; }   /* frame 6: glitch */
  100%    { background-position:   0% 0; }   /* seamless loop back */
}

/* Note: this animation intentionally runs even with prefers-reduced-motion.
   The motion is small (a few pixels of artwork shift), brief (~5s of a 10s
   loop is the held resting frame), and non-strobing. If a future variant
   adds aggressive flashing, gate THAT variant behind the media query. */

/* ---------- Community avatars (single strip image) ----------
   Source PNG is 214×41 with 5 cats, but the 5th cat is truncated by the
   image canvas (cols 188–213, only 26 wide vs ~33 for the others). We
   crop the displayed strip to show ONLY the 4 complete cats. Cat 4 ends
   at source col 176; using 180 as the crop boundary gives a small right
   margin. Display ratio = 180 / 41 = 4.39 (width / height). */
.avatars { display: flex; align-items: center; }
.avatars__strip {
  height: clamp(30px, 2.2vw, 42px);
  width: calc(clamp(30px, 2.2vw, 42px) * 4.39);
  object-fit: cover;
  object-position: left center;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  transition: transform 220ms cubic-bezier(.2,.7,.3,1.2);
}
.avatars:hover .avatars__strip { transform: translateY(-2px); }

.proof__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  /* Pixel layer per typography system v1 — tiny pixel accents only */
  font-family: var(--font-pixel);
  font-size: clamp(15px, 1.2vw, 20px);
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--teal-bright);
  transition: color 180ms ease, gap 220ms ease;
}
.proof__link:hover { color: var(--accent); gap: 14px; }
.proof__count { color: var(--accent); font-weight: 700; }
.proof__arrow { transition: transform 220ms ease; }
.proof__link:hover .proof__arrow { transform: translateX(4px); }

/* ---------- ART (right column, fills hero height) ----------
   New PNG aspect 0.945. Container fills body vertically (top:0 bottom:0)
   and a width-clamped right column. object-fit: contain preserves aspect. */
.hero__art {
  position: absolute;
  top: 0;
  bottom: 0;
  right: clamp(0px, 1.5vw, 30px);
  width: clamp(620px, 47vw, 880px);
  z-index: 2;
  pointer-events: none;
  transform: translateY(clamp(-80px, -6vh, -40px));   /* shifts whole image up so X center aligns with eyebrow middle */
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.art {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  animation: float 10s ease-in-out infinite;
}

.art__layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* main image — always visible. Hue-rotate + sat shift with theme so the
   illustration's pink/teal mass feels in-family with the active accent.
   The same rules apply to a <video> here — the element is styled identically
   so theme cycling continues to tint the hero animation. */
.art__layer--main {
  opacity: 1;
  filter: hue-rotate(var(--art-hue)) saturate(var(--art-sat));
  transition: filter 600ms ease;
}
/* Video-specific: cover the slot, kill any inline UI. JS modulates
   playbackRate so the boomerang turning points decelerate naturally. */
video.art__layer--main {
  object-fit: cover;
  background: transparent;
}

/* ---------- Theme-cycle "glitch" at boomerang turning points ----------
   The boomerang's reversal moment is masked by rapidly cycling the video's
   hue through the theme palette (pink → teal → yellow → back). Combined
   with the JS playback-rate ease, the eye reads the moment as "the page
   glitched theme for a beat" rather than "the animation reversed." */
.art.is-glitching video.art__layer--main {
  animation: theme-glitch 320ms steps(5, end);
}
@keyframes theme-glitch {
  /* Hue rotations land roughly on each theme's accent: 0/+60/-30 from base.
     The 5-step animation hits each ~64ms then snaps back to the theme's
     base hue at the end. Saturation pumps slightly so the flicker feels
     punchy without flashing. */
  0%   { filter: hue-rotate( 80deg) saturate(1.4); }
  20%  { filter: hue-rotate(-100deg) saturate(1.5); }
  40%  { filter: hue-rotate( 160deg) saturate(1.5); }
  60%  { filter: hue-rotate(-40deg) saturate(1.3); }
  80%  { filter: hue-rotate( 30deg) saturate(1.2); }
  100% { filter: hue-rotate(var(--art-hue)) saturate(var(--art-sat)); }
}

/* Sprite-sheet hero animation (legacy — kept for the sprite-driven hero
   experiment; not currently used since the hero is back on <video>). */
.art__layer--sprite {
  background-image: url('assets/hero-v3.webp');
  background-size: cover;
  background-position: 0% 0%;
  background-repeat: no-repeat;
  filter: none;
}

/* ---------- THEME VARIABLES STAY, BUTTON REMOVED ---------- */
/* body[data-theme] still drives accent colors but there's no UI cycler. */

/* ---------- RESPONSIVE ---------- */

/* large desktop tightening */
@media (min-width: 1700px) {
  .hero__body { margin-top: 14px; }
}

/* laptop / smaller desktop */
@media (max-width: 1280px) {
  :root { --frame-pad-x: 40px; }
  .hero__copy { width: min(680px, 100%); }
  .hero__art {
    width: clamp(620px, 56vw, 820px);
    right: clamp(40px, 7vw, 120px);
  }
}

/* small laptop / tablet landscape */
@media (max-width: 1100px) {
  .hero__copy { width: min(580px, 100%); }
  .hero__art {
    width: clamp(520px, 60vw, 720px);
    right: clamp(20px, 4vw, 80px);
    opacity: 0.9;
  }
}

/* tablet / mobile — stack the art below copy */
@media (max-width: 900px) {
  :root { --frame-pad-x: 28px; }
  /* Hide desktop nav-only items but keep nav__links in the DOM —
     on mobile it becomes a fullscreen sheet, toggled by .nav.is-open. */
  .btn--nav { display: none; }
  .nav__links {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    padding: 80px 28px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 200ms ease, transform 200ms ease;
  }
  .nav__links .nav__link,
  .nav__links .nav__pill {
    font-size: clamp(20px, 5vw, 28px);
    padding: 12px 20px;
  }
  .nav.is-open .nav__links {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav.is-open { position: relative; z-index: 60; }
  .nav__burger {
    display: flex;
    position: relative;
    z-index: 70;
  }
  /* burger → X transform when open */
  .nav.is-open .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav__burger span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav__burger span { transition: transform 200ms ease, opacity 200ms ease; }

  .nav { grid-template-columns: auto 1fr auto; gap: 16px; }
  .hero__body { margin-top: 20px; min-height: auto; }
  .hero__copy {
    width: 100%;
    min-height: auto;
    gap: 20px;
  }
  .proof { margin-top: 4px; }
  .display {
    font-size: clamp(46px, 11vw, 78px);
    white-space: normal;
  }
  .sub { font-size: 15px; }
  .cta-row { gap: 16px; }
  .proof { gap: 16px; flex-direction: column; align-items: flex-start; }
  .hero__art {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    margin: 28px 0 0;
    opacity: 1;
  }
  .art {
    aspect-ratio: 3 / 2;
    animation: none;
  }
  .art__layer { object-fit: contain; object-position: center; }
}

@media (max-width: 560px) {
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { justify-content: center; }
}

/* phone-specific tightening */
@media (max-width: 480px) {
  :root { --frame-pad-x: 20px; }
  .hero__copy { gap: 16px; }
  .display { font-size: clamp(40px, 12vw, 68px); }
  .sub { font-size: 14px; }
  /* hide the cat-blink sprite on phones — too crowded above the Join button */
  .cat-glitch { display: none; }
  /* tighter section paddings */
  .sec__frame { padding: 56px var(--frame-pad-x); }
  .sec__title { font-size: clamp(36px, 11vw, 52px); }
  .sec__lede { font-size: 14px; }
  /* Why cards: tighter padding, shorter min-height */
  .why-card { min-height: auto; padding: 28px 22px; }
  .why-card__num { font-size: 40px; }
  .why-card__title { font-size: clamp(20px, 5.5vw, 26px); }
  /* footer cols stack fully on phones */
  .foot__cols { grid-template-columns: 1fr; gap: 28px; }
  /* tap-target floor */
  .nav__link, .nav__pill, .vid__title, .why-card__link, .foot__col li a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  /* horizontal scroll guard */
  body { overflow-x: hidden; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .art, .cursor { animation: none; }
  .art__layer--main { transition-duration: 200ms; }
}

/* ================================================================
   SHARED SECTION CHROME
   New scroll sections below the hero share the same horizontal frame
   so their content lines up with the nav and hero copy.
   ================================================================ */
.sec__frame {
  width: 100%;
  max-width: var(--frame-max);
  margin: 0 auto;
  padding: clamp(80px, 9vh, 140px) var(--frame-pad-x);
}

.sec__head {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.6vh, 22px);
  margin-bottom: clamp(40px, 5vh, 64px);
  max-width: 980px;
}
.sec__head--row {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  max-width: none;
  gap: 32px;
  flex-wrap: wrap;
}

.sec__kicker {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: clamp(12px, 0.9vw, 15px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-dim);
}
.sec__bullet {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  border-radius: 4px;
  font-size: 11px;
  line-height: 1;
  transform: rotate(-4deg);
}

.sec__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(46px, 5.6vw, 104px);
  line-height: 0.88;
  letter-spacing: -0.018em;
  color: var(--paper);
  text-wrap: balance;
}
.sec__title-line { display: block; }
.sec__title-line--accent { color: var(--accent); }
.sec__title-line--teal   { color: var(--accent-teal); }

.sec__lede {
  margin: 0;
  font-family: 'Space Mono', monospace;
  font-size: clamp(15px, 1.2vw, 21px);
  line-height: 1.55;
  color: var(--paper-dim);
  max-width: 620px;
}

.sec__more {
  font-family: var(--font-mono);
  font-size: clamp(13px, 1vw, 16px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper);
  border-bottom: 2px solid var(--paper-mute);
  padding-bottom: 4px;
  transition: color 180ms ease, border-color 180ms ease, gap 220ms ease;
  display: inline-flex;
  gap: 10px;
  align-items: center;
}
.sec__more:hover { color: var(--accent); border-color: var(--accent); gap: 14px; }

/* ================================================================
   WHY JOIN
   4 torn-print cards, slight irregular rotations + hard shadow,
   matching the cutout button vocabulary. Each card has its own
   accent color so the row reads like a stack of stickers.
   ================================================================ */
.why { background: var(--bg); }

.why__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 2vw, 36px);
}

.why-card {
  --card-fill: var(--ink-2);
  --card-text: var(--paper);
  --card-accent: var(--accent);
  position: relative;
  background: var(--card-fill);
  color: var(--card-text);
  border: 2px solid #000;
  border-radius: 6px 14px 7px 13px;
  padding: clamp(24px, 1.8vw, 34px) clamp(22px, 1.7vw, 30px) clamp(22px, 1.7vw, 28px);
  box-shadow: 7px 7px 0 #000;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1vh, 16px);
  min-height: 320px;
  overflow: hidden;
  transition: transform 220ms cubic-bezier(.2,.7,.3,1.2), box-shadow 220ms ease;
}
/* Previous `.why-card::after { inset: 0; opacity: .1; mix-blend-mode: overlay; ... }`
   (subtle riso shimmer) removed: it collided with the bottom deckle
   `.why-card::after` rule below (also targeting ::after), causing the
   bottom torn edge to inherit inset:0 + opacity:0.10 + mix-blend-mode
   from the shimmer rule. The visible artifact was a faint white outline
   along the top of cards (especially the paper card). Pseudo-elements
   are single-use; only one ::after rule can fully own the element.
   The deckle is more load-bearing visually, so the shimmer is dropped. */
.why-card:nth-child(1) { transform: rotate(-1.2deg); }
.why-card:nth-child(2) { transform: rotate(0.8deg); }
.why-card:nth-child(3) { transform: rotate(-0.6deg); }
.why-card:nth-child(4) { transform: rotate(1.3deg); }
.why-card:hover {
  transform: rotate(0) translateY(-4px);
  box-shadow: 10px 10px 0 #000;
}

.why-card--pink   { --card-accent: var(--pink); }
.why-card--teal   { --card-accent: var(--teal-bright); }
.why-card--yellow { --card-accent: var(--yellow); }
.why-card--paper  {
  --card-fill: var(--paper);
  --card-text: var(--ink);
  --card-accent: var(--pink);
}
/* Paper card has no torn deckle. The other three cards rely on
   black-on-black blending (deckle bg = section bg = card body) so
   only the jagged shape reads. On the cream paper card, the same
   black deckle shows its clean straight top edge as a visible thin
   line — an outline that reads as an artifact. Cleaner to let the
   paper card be a clean rectangle and keep the torn aesthetic for
   the dark cards only. */
.why-card--paper::before,
.why-card--paper::after {
  display: none;
}

/* Demoted, kept large per the cards' visual rhythm. */
.why-card__num {
  font-family: var(--font-display);
  font-size: clamp(40px, 3.4vw, 64px);
  line-height: 1;
  color: var(--card-accent);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.why-card__tag {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--card-accent);
  display: inline-flex;
  width: max-content;
  padding: 4px 10px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

.why-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 1.7vw, 30px);
  line-height: 1;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--card-text);
}

.why-card__body {
  margin: 0;
  font-family: 'Space Mono', monospace;
  font-size: clamp(13px, 0.95vw, 15px);
  line-height: 1.6;
  color: var(--card-text);
  opacity: 0.78;
  flex: 1;
}
.why-card--paper .why-card__body { opacity: 0.72; }

/* Illustrated mark per card (eye / hand / book / question). Sits in
   the top-right corner as a "stuck-on sticker" with per-card rotation.
   Card 4 is the cream paper card — its mark has a black background
   that reads as an intentional dark sticker on cream. */
.why-card__mark {
  position: absolute;
  top: 12px;
  right: 12px;
  width: clamp(84px, 7vw, 110px);
  height: clamp(84px, 7vw, 110px);
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  z-index: 2;
  border-radius: 10px;
  transition: transform 220ms cubic-bezier(.2,.7,.3,1.2);
}
.why-card:nth-child(1) .why-card__mark { transform: rotate(5deg); }
.why-card:nth-child(2) .why-card__mark { transform: rotate(-4deg); }
.why-card:nth-child(3) .why-card__mark { transform: rotate(6deg); }
.why-card:nth-child(4) .why-card__mark { transform: rotate(-7deg); }
.why-card:hover .why-card__mark { transform: rotate(0); }

.why-card__link {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--card-accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-top: 1.5px dashed currentColor;
  padding-top: 12px;
  transition: gap 200ms ease, color 200ms ease;
}
.why-card__link:hover { gap: 14px; }

/* ================================================================
   WATCH / LATEST
   4-card row of video + journal links. SVG-stripe placeholders so the
   real thumbnails can drop in later.
   ================================================================ */
.watch { background: var(--bg); }
.watch .sec__frame { padding-top: 0; }   /* tighter against Why */

.watch__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 1.8vw, 32px);
}

.vid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
}

.vid__thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: 4px 10px 5px 9px;
  overflow: hidden;
  border: 2px solid #000;
  box-shadow: 6px 6px 0 #000;
  background: var(--ink-2);
  transition: transform 200ms cubic-bezier(.2,.7,.3,1.2), box-shadow 200ms ease;
}
.vid:nth-child(1) .vid__thumb { transform: rotate(-0.8deg); }
.vid:nth-child(2) .vid__thumb { transform: rotate(0.6deg); }
.vid:nth-child(3) .vid__thumb { transform: rotate(-0.5deg); }
.vid:nth-child(4) .vid__thumb { transform: rotate(0.9deg); }
.vid:hover .vid__thumb {
  transform: rotate(0) translateY(-3px);
  box-shadow: 9px 9px 0 #000;
}

.vid__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-color: #1a1a1a;
  background-image:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.06) 0 1px,
      transparent 1px 14px);
}
.vid__placeholder--pink   { background-color: #3a1a25; }
.vid__placeholder--teal   { background-color: #0e2b29; }
.vid__placeholder--yellow { background-color: #3a2c10; }
.vid__placeholder--paper  { background-color: #2a261f; }

.vid__placeholder-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-mute);
  background: rgba(0,0,0,0.4);
  padding: 4px 9px;
  border: 1px solid var(--paper-mute);
  border-radius: 2px;
}

.vid__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--paper);
  color: var(--ink);
  padding: 5px 9px;
  border: 1.5px solid #000;
  border-radius: 3px;
  box-shadow: 2px 2px 0 #000;
}
.vid__badge--live { background: var(--pink); color: var(--ink); }
.vid__badge--read { background: var(--ink); color: var(--paper); }
.vid__pulse {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 0 rgba(0,0,0,0.6);
  animation: vid-pulse 1.4s ease-out infinite;
}
@keyframes vid-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0,0,0,0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(0,0,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
}

.vid__play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid #000;
  border-radius: 50%;
  box-shadow: 2px 2px 0 #000;
  transition: transform 200ms ease, background 200ms ease;
}
.vid__play--read {
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 700;
}
.vid:hover .vid__play { background: var(--accent); transform: scale(1.06) rotate(-4deg); }

.vid__meta {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-mute);
}
.vid__meta .dot { opacity: 0.6; }

.vid__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(18px, 1.35vw, 24px);
  line-height: 1.02;
  letter-spacing: -0.005em;
  color: var(--paper);
  text-wrap: balance;
}
.vid:hover .vid__title { color: var(--accent); }

/* ================================================================
   FOOTER
   Big closing shout, three nav columns, social row, brand bar.
   ================================================================ */
.foot {
  background: var(--bg);
  color: var(--paper);
  position: relative;
}
.foot .sec__frame { padding-top: clamp(40px, 5vh, 70px); padding-bottom: clamp(40px, 4vh, 60px); }

.foot__top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(40px, 4vw, 80px);
  align-items: start;
  padding-bottom: clamp(40px, 5vh, 64px);
}

.foot__pitch { display: flex; flex-direction: column; gap: clamp(16px, 2vh, 26px); }

.foot__shout {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(48px, 5.8vw, 108px);
  line-height: 0.86;
  letter-spacing: -0.018em;
  color: var(--paper);
}
.foot__shout-line { display: block; }
.foot__shout-line--pink { color: var(--pink);     animation: word-glitch 21s ease-out 3s infinite; }
.foot__shout-line--teal { color: var(--accent-teal); animation: word-glitch 19s ease-out 9s infinite; }

.foot__cta { display: flex; align-items: center; gap: 22px; margin-top: 6px; flex-wrap: wrap; }
.foot__cta-note {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-mute);
}

.foot__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2vw, 40px);
}
/* Desktop only (>= 1281px, where foot__top is side-by-side): nudge the
   nav/connect columns down so their headers line up with the top of
   the "BUILD WEIRD." shout, not with the small kicker above it.
   42px = measured height of .sec__kicker + the .foot__pitch row gap. */
@media (min-width: 1281px) {
  .foot__cols { margin-top: 42px; }
}
.foot__col ul { display: flex; flex-direction: column; gap: 10px; }
.foot__col li a {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  color: var(--paper);
  opacity: 0.78;
  transition: opacity 180ms ease, color 180ms ease, transform 180ms ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.foot__col li a:hover { opacity: 1; color: var(--accent); transform: translateX(3px); }

.foot__col-title {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-mute);
}

.foot__sock {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 22px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid #000;
  border-radius: 3px;
  box-shadow: 1.5px 1.5px 0 #000;
  flex-shrink: 0;
  transition: background 180ms ease, transform 180ms ease;
}
.foot__social li:nth-child(1) .foot__sock { background: var(--pink); }
.foot__social li:nth-child(2) .foot__sock { background: var(--accent-teal); color: var(--paper); }
.foot__social li:nth-child(3) .foot__sock { background: var(--paper); }
.foot__social li:nth-child(4) .foot__sock { background: var(--yellow); }
.foot__social li:nth-child(5) .foot__sock { background: var(--paper); }
.foot__social li:nth-child(6) .foot__sock { background: var(--pink); }
.foot__social li a:hover .foot__sock { transform: rotate(-6deg) scale(1.05); }

.foot__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: clamp(28px, 3vh, 40px);
  flex-wrap: wrap;
}

.foot__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.foot__brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  flex-shrink: 0;
}
.foot__brand-mark img { width: 100%; height: auto; }
.foot__brand-name {
  font-family: 'Archivo Black', Impact, sans-serif;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  /* Same RGB-fringe glitch the rest of the brand-typography uses.
     Unique duration + offset (27s loop, 18s offset) so it stays out
     of sync with the nav brand and the foot shout lines. */
  animation: word-glitch 27s ease-out 18s infinite;
}

.foot__copy {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--paper-mute);
}

.foot__legal {
  display: flex;
  gap: 22px;
}
.foot__legal a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-mute);
  transition: color 180ms ease;
}
.foot__legal a:hover { color: var(--accent); }

@media (max-width: 1280px) {
  .why__grid    { grid-template-columns: repeat(2, 1fr); }
  .watch__grid  { grid-template-columns: repeat(2, 1fr); }
  .foot__top    { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .sec__frame { padding-top: clamp(56px, 8vh, 80px); padding-bottom: clamp(40px, 5vh, 60px); }
  .why__grid, .watch__grid { grid-template-columns: 1fr; }
  .foot__cols { grid-template-columns: 1fr 1fr; }
  .sec__head--row { align-items: flex-start; }
  .foot__bar { flex-direction: column; align-items: flex-start; gap: 16px; }
  .foot__legal { gap: 18px; }
  .vid__thumb { aspect-ratio: 16 / 10; }
}

/* ================================================================
   WHY STAGE — neutral wrapper. Cards carry the torn-paper texture.
   ================================================================ */
.why__stage {
  position: relative;
  margin-top: clamp(8px, 1.5vh, 24px);
}

/* Torn-paper top/bottom on every Why card. We render two zig-jagged
   "deckle" strips inside the card border using clip-path on ::before
   and ::after, filled with the page background so they punch holes in
   the card's top and bottom edges. The card itself stays a clean
   rectangle (so content positioning math doesn't change), but reads
   as a torn slip of paper at the edges. */
.why-card {
  border-radius: 4px;                /* tighter; the torn edges do the work */
  padding-top: clamp(36px, 2.6vw, 48px);
  padding-bottom: clamp(34px, 2.5vw, 44px);
}
.why-card::before,
.why-card::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  height: 14px;
  background: var(--bg);
  pointer-events: none;
  z-index: 3;
}
.why-card::before {
  top: -1px;
  clip-path: polygon(
    0 0, 100% 0, 100% 55%,
    97% 78%, 93% 50%, 89% 82%, 85% 55%, 81% 78%, 77% 48%, 73% 80%,
    69% 56%, 65% 82%, 61% 50%, 57% 78%, 53% 54%, 49% 82%, 45% 50%,
    41% 78%, 37% 55%, 33% 80%, 29% 48%, 25% 78%, 21% 56%, 17% 82%,
    13% 50%, 9% 78%, 5% 54%, 2% 80%, 0 55%
  );
}
.why-card::after {
  bottom: -1px;
  clip-path: polygon(
    0 100%, 100% 100%, 100% 45%,
    97% 22%, 93% 50%, 89% 18%, 85% 45%, 81% 22%, 77% 52%, 73% 20%,
    69% 44%, 65% 18%, 61% 50%, 57% 22%, 53% 46%, 49% 18%, 45% 50%,
    41% 22%, 37% 45%, 33% 20%, 29% 52%, 25% 22%, 21% 44%, 17% 18%,
    13% 50%, 9% 22%, 5% 46%, 2% 20%, 0 45%
  );
}
/* Paper card has its torn edges showing the page bg (black) too — looks
   like a sticker ripped along its long edges. */
