/* =========================================================
   $fred — a day in Fred's life
   Palette pulled from the artwork: uniform navy, vest orange,
   scanner red, fluorescent white, 2021 monitor glow.
   ========================================================= */
:root {
  --ink: #0b0b0f;
  --navy: #1e2a4c;
  --navy-deep: #111832;
  --navy-night: #0c1126;
  --vest: #f07b1d;
  --vest-hi: #ff9a3c;
  --scan: #ff2d3d;
  --fluoro: #e8edf1;
  --paper: #f6f3ea;
  --glow-pink: #ff3b6b;
  --glow-green: #43f08f;
  --glow-violet: #5b3cc4;
  --line: 4px;
  --shadow: 7px 7px 0 var(--ink);
  --radius: 14px;
  --bar-h: 64px;
  --f-head: "Anton", "Impact", "Arial Narrow Bold", "Helvetica Neue", sans-serif;
  --f-hand: "Patrick Hand", "Comic Neue", "Chalkboard SE", "Comic Sans MS", ui-rounded, system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--bar-h); }
body {
  margin: 0;
  background: var(--navy-deep);
  color: var(--paper);
  font-family: var(--f-hand);
  font-size: 1.125rem;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--vest-hi); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--paper); color: var(--ink); padding: .5rem 1rem; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------------- Top bar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--bar-h);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 clamp(.75rem, 3vw, 2rem);
  background: var(--navy);
  border-bottom: var(--line) solid var(--ink);
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; flex-shrink: 0; }
.brand img { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--ink); background: var(--fluoro); object-fit: cover; }
.brand span { font-family: var(--f-head); font-size: 1.6rem; letter-spacing: .02em; color: #fff; }
.scene-clock {
  margin: 0 auto 0 .5rem;
  font-family: var(--f-mono); font-size: .8rem; letter-spacing: .08em;
  color: var(--fluoro); opacity: .85;
  padding: .3rem .6rem; border: 2px solid rgba(255,255,255,.25); border-radius: 6px;
  white-space: nowrap;
}

/* ---------------- Buttons ---------------- */
.cta-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.cta-row--bar { margin-left: auto; flex-wrap: nowrap; }
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; padding: .45rem 1rem;
  font-family: var(--f-head); font-size: 1.1rem; letter-spacing: .04em;
  color: var(--ink); background: var(--fluoro);
  border: 3px solid var(--ink); border-radius: 10px;
  box-shadow: 4px 4px 0 var(--ink);
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s;
}
.btn:hover { transform: translate(-1px,-1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px,3px); box-shadow: 1px 1px 0 var(--ink); }
.btn--buy {
  background: var(--vest); color: var(--ink);
  background-image: repeating-linear-gradient(90deg, transparent 0 14px, rgba(255,255,255,.0) 14px 16px);
}
.btn--buy:hover { background-color: var(--vest-hi); }
.btn--x { min-width: 48px; background: var(--ink); color: #fff; box-shadow: 4px 4px 0 var(--fluoro); border-color: var(--fluoro); }
.btn--x:hover { box-shadow: 5px 5px 0 var(--fluoro); }
.btn--lg { min-height: 56px; padding: .6rem 1.4rem; font-size: 1.35rem; }
.btn--buy.btn--lg { font-size: 1.6rem; padding: .6rem 2rem; box-shadow: 6px 6px 0 var(--ink); }

/* Pending (missing URL) */
.btn[aria-disabled="true"] {
  cursor: not-allowed; opacity: .78;
  background: repeating-linear-gradient(-45deg, #c9ced6 0 8px, #b7bcc6 8px 16px) !important;
  color: #2b2f3a !important; transform: none !important;
}
.btn__pending {
  font-family: var(--f-mono); font-size: .62rem; letter-spacing: .02em; text-transform: none;
  background: var(--ink); color: #fff; padding: .1rem .35rem; border-radius: 4px; white-space: nowrap;
}

/* ---------------- Scenes / panels ---------------- */
.scene { position: relative; padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 3rem); overflow: hidden; }
.scene__inner { max-width: 1180px; margin: 0 auto; }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.split--flip > :first-child { order: 2; }
.stack { display: flex; flex-direction: column; gap: 1.4rem; }

.panel {
  margin: 0; position: relative;
  border: var(--line) solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; background: var(--ink);
}
.panel img { width: 100%; }

.caption {
  margin: 0;
  font-family: var(--f-hand); font-size: clamp(1.45rem, 2.4vw, 2rem); line-height: 1.22;
  color: var(--ink); background: var(--paper);
  border: var(--line) solid var(--ink); border-radius: 6px;
  padding: .85rem 1.1rem;
  box-shadow: 5px 5px 0 var(--ink);
}
.caption--hot { background: #fff4f7; box-shadow: 5px 5px 0 var(--glow-pink); }
.caption--red { background: #fff0f0; box-shadow: 6px 6px 0 var(--scan); font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
.caption--wide { max-width: 860px; margin: 0 auto; text-align: center; font-size: clamp(1.5rem, 2.8vw, 2.3rem); }
.aside { margin: 0; font-family: var(--f-hand); font-size: 1.15rem; color: var(--fluoro); opacity: .85; font-style: italic; }
.aside::before { content: "(fred) "; font-style: normal; opacity: .6; }
.stamp {
  position: absolute; left: .75rem; bottom: .75rem;
  font-family: var(--f-mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase;
  background: var(--ink); color: var(--fluoro); padding: .3rem .55rem; border-radius: 4px;
}
.stamp--crt { color: var(--glow-green); text-shadow: 0 0 6px rgba(67,240,143,.6); }

/* ---------------- 1. Bed / hero ---------------- */
.scene--bed {
  min-height: calc(100svh - var(--bar-h));
  display: flex; align-items: center;
  padding-top: clamp(1.5rem, 4vw, 3.5rem);
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,.035) 0 22px, transparent 22px 60px),
    linear-gradient(180deg, var(--navy-night), var(--navy-deep));
}
.scene--bed .scene__inner { width: 100%; }
.hero { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.hero__copy { display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; }
.kicker { margin: 0; font-family: var(--f-mono); font-size: .85rem; letter-spacing: .2em; text-transform: uppercase; color: var(--vest-hi); }
.caption--lead { font-size: clamp(1.6rem, 3vw, 2.5rem); }
.scroll-cue { font-family: var(--f-mono); font-size: .85rem; letter-spacing: .06em; text-decoration: none; opacity: .75; }
.scroll-cue:hover { opacity: 1; }

/* Contract address */
.ca {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .6rem;
  max-width: 100%;
  background: rgba(0,0,0,.35); border: 2px dashed rgba(255,255,255,.35); border-radius: 10px;
  padding: .55rem .7rem;
}
.ca[hidden] { display: none; }
.ca__label { font-family: var(--f-head); font-size: 1rem; color: var(--vest-hi); letter-spacing: .06em; }
.ca__value { font-family: var(--f-mono); font-size: .82rem; word-break: break-all; color: #fff; flex: 1 1 14rem; min-width: 0; }
.ca__copy {
  font-family: var(--f-mono); font-weight: 600; font-size: .82rem;
  min-height: 40px; padding: .35rem .8rem; cursor: pointer;
  background: var(--fluoro); color: var(--ink); border: 2px solid var(--ink); border-radius: 8px; box-shadow: 3px 3px 0 var(--ink);
}
.ca__copy:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.ca__status { font-family: var(--f-mono); font-size: .8rem; color: var(--glow-green); min-height: 1em; }

/* ---------------- Hard cuts ---------------- */
.cut {
  display: grid; place-items: center;
  min-height: 34vh; padding: 3rem 1rem;
  border-top: var(--line) solid var(--ink); border-bottom: var(--line) solid var(--ink);
  text-align: center;
}
.cut__label { margin: 0; font-family: var(--f-head); text-transform: uppercase; line-height: 1; }
.cut__label strong { display: block; font-weight: 400; font-size: clamp(3rem, 11vw, 8rem); letter-spacing: .01em; }
.cut__label span { display: block; font-family: var(--f-mono); font-size: clamp(.9rem, 2vw, 1.1rem); letter-spacing: .35em; margin-bottom: .6rem; }
.cut--flash { background: #000; color: #fff; }
.cut--white { background: var(--fluoro); color: var(--ink); }
.cut--warehouse {
  background: linear-gradient(180deg, #cfd6dc, #aeb7c0); color: var(--ink);
}
.cut--warehouse .cut__label span { margin: .6rem 0 0; }
.cut--black { background: #000; color: var(--scan); }
.cut--orange { background: var(--vest); color: var(--ink); }

.glitch { position: relative; color: #fff; text-shadow: 3px 0 var(--glow-pink), -3px 0 var(--glow-green); }
.js .cut--flash.in .glitch { animation: glitch 2.4s steps(1) infinite; }
@keyframes glitch {
  0%, 86%, 100% { transform: none; text-shadow: 3px 0 var(--glow-pink), -3px 0 var(--glow-green); }
  88% { transform: translate(-4px, 2px) skewX(-8deg); text-shadow: -6px 0 var(--glow-pink), 6px 0 var(--glow-green); }
  91% { transform: translate(5px, -2px); text-shadow: 8px 0 var(--glow-violet), -2px 0 var(--glow-green); }
  94% { transform: none; }
}

/* ---------------- 2. 2021 ---------------- */
.scene--2021 {
  background:
    radial-gradient(60% 50% at 18% 30%, rgba(255,59,107,.28), transparent 70%),
    radial-gradient(40% 40% at 40% 40%, rgba(67,240,143,.16), transparent 70%),
    radial-gradient(70% 60% at 90% 90%, rgba(91,60,196,.35), transparent 70%),
    #120f2c;
}
.scene--2021::after { /* CRT scanlines */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px);
}
.panel--glow { box-shadow: 7px 7px 0 var(--ink), 0 0 60px rgba(255,59,107,.35); }
.extras-2021 { margin-top: clamp(3rem, 7vw, 5rem); align-items: start; }

/* Group chat */
.chat {
  position: relative; z-index: 1;
  background: #1b1840; border: var(--line) solid var(--ink); border-radius: 18px;
  box-shadow: 7px 7px 0 var(--ink), 0 0 40px rgba(91,60,196,.5);
  overflow: hidden; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 1rem;
}
.chat__head { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; background: #2a2560; border-bottom: 3px solid var(--ink); }
.chat__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--glow-green); box-shadow: 0 0 8px var(--glow-green); }
.chat__meta { margin-left: auto; font-size: .8rem; opacity: .7; }
.chat__log { list-style: none; margin: 0; padding: 1rem; display: flex; flex-direction: column; gap: .5rem; min-height: 22rem; }
.msg { max-width: 82%; padding: .5rem .75rem; border-radius: 14px 14px 14px 4px; background: #3a3478; color: #fff; line-height: 1.3; }
.msg b { display: block; font-size: .72rem; letter-spacing: .04em; opacity: .7; margin-bottom: .1rem; }
.msg--me { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--glow-green); color: var(--ink); }
.msg--sys { align-self: center; background: none; font-size: .78rem; opacity: .7; text-align: center; padding: .2rem; }
.js .chat .msg { opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease; }
.js .chat .msg.show { opacity: 1; transform: none; }

/* Resignation note (unfolds from the blank sheet in the panel) */
.note-wrap { display: flex; flex-direction: column; gap: 1rem; perspective: 1400px; z-index: 1; position: relative; }
.note {
  background: #fff; color: var(--ink);
  border: 3px solid var(--ink); border-radius: 4px; box-shadow: var(--shadow);
  font-family: var(--f-hand); font-size: 1.3rem; line-height: 1.35;
  transform-style: preserve-3d;
}
.note__fold { padding: 1.1rem 1.4rem; background: #fff; backface-visibility: hidden; transform-origin: top center; }
.note__fold + .note__fold { border-top: 1px dashed #c8c8c8; }
.note p { margin: 0 0 .4rem; }
.note__date { font-family: var(--f-mono); font-size: .8rem; color: #555; }
.note__sig { font-size: 1.6rem; margin-top: .4rem !important; }
.note__ps { color: #c21b4a; }
.js .note .note__fold--2 { transform: rotateX(-92deg); transition: transform .7s cubic-bezier(.3,1.3,.5,1) .15s; }
.js .note .note__fold--3 { transform: rotateX(92deg); transition: transform .7s cubic-bezier(.3,1.3,.5,1) .6s; }
.js .note.open .note__fold--2, .js .note.open .note__fold--3 { transform: none; }

/* ---------------- 3. Five years later ---------------- */
.scene--blank {
  background:
    linear-gradient(180deg, rgba(255,255,255,.65), rgba(255,255,255,0) 40%),
    linear-gradient(90deg, #dfe3e8, #f0f2f4 50%, #dfe3e8);
  color: var(--ink);
}
.scene--blank .aside { color: var(--ink); }
.resume {
  background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 4px;
  box-shadow: var(--shadow); padding: 1.2rem 1.4rem; font-family: var(--f-mono); font-size: .9rem;
}
.resume__head { border-bottom: 3px solid var(--ink); margin-bottom: .8rem; padding-bottom: .5rem; }
.resume h2 { margin: 0; font-family: var(--f-head); font-weight: 400; font-size: 2rem; letter-spacing: .06em; }
.resume__head p { margin: .2rem 0 0; font-size: .8rem; color: #555; }
.resume h3 { margin: .8rem 0 .4rem; font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: #666; }
.resume dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 0; }
.resume dt { font-weight: 600; white-space: nowrap; }
.resume dd { margin: 0; }
.redact {
  display: inline-block; cursor: pointer; color: var(--ink); background: var(--ink);
  letter-spacing: -.1em; border-radius: 2px; user-select: none; max-width: 100%; overflow: hidden;
}
.redact.revealed { background: #ffe14d; letter-spacing: 0; padding: 0 .3rem; }
.resume__stat { margin: 0; }
.resume__stat b { font-size: 1.2rem; }
.resume__hint { margin: .8rem 0 0; font-size: .75rem; color: #888; }

/* ---------------- 4. Warehouse ---------------- */
.scene--job {
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255,255,255,.9) 0 6px, transparent 6px) 0 40px / 100% 140px repeat-y,
    linear-gradient(180deg, #d6dde3, #b9c3cc);
}
.panel--job { box-shadow: 7px 7px 0 var(--ink), 0 0 0 10px rgba(240,123,29,.0); }
.scanline {
  position: absolute; left: 4%; right: 4%; top: 30%; height: 3px; background: var(--scan);
  box-shadow: 0 0 12px 2px var(--scan); opacity: 0; pointer-events: none;
}
.scanline.beep { animation: sweep .45s ease-out; }
@keyframes sweep { 0% { opacity: 1; top: 25%; } 100% { opacity: 0; top: 80%; } }

.scanner {
  display: grid; grid-template-columns: 1fr auto; gap: .9rem; align-items: center;
  background: #23262d; border: var(--line) solid var(--ink); border-radius: 14px; box-shadow: var(--shadow); padding: .9rem;
}
.scanner__screen {
  font-family: var(--f-mono); font-size: .82rem; color: #9ff7b8;
  background: #0e1a12; border: 2px solid #000; border-radius: 6px; padding: .6rem .8rem;
  display: grid; grid-template-columns: repeat(3, auto); gap: .2rem 1rem;
}
.scanner__screen p { margin: 0; display: flex; flex-direction: column; }
.scanner__screen span { font-size: .65rem; opacity: .7; letter-spacing: .1em; }
.scanner__screen b { font-size: 1.15rem; }
.scanner__msg { grid-column: 1 / -1; font-size: .78rem; color: #ffd36b; min-height: 1.2em; }
.scanner__btn {
  font-family: var(--f-head); font-size: 1.1rem; letter-spacing: .05em; text-transform: uppercase;
  min-height: 64px; padding: .5rem 1rem; cursor: pointer;
  background: #ffd23f; color: var(--ink); border: 3px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink);
}
.scanner__btn:active { transform: translate(3px,3px); box-shadow: 1px 1px 0 var(--ink); }

.punch { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.punch__card {
  position: relative; flex: 1 1 260px;
  background: #f4ecd2; color: var(--ink); border: 3px solid var(--ink); box-shadow: var(--shadow);
  padding: .9rem 1rem 1rem; font-family: var(--f-mono); font-size: .85rem;
  background-image: repeating-linear-gradient(180deg, transparent 0 27px, rgba(30,42,76,.18) 27px 28px);
}
.punch__title { margin: 0 0 .5rem; font-weight: 600; letter-spacing: .1em; font-size: .75rem; }
.punch table { width: 100%; border-collapse: collapse; }
.punch th { text-align: left; font-size: .7rem; letter-spacing: .1em; opacity: .7; }
.punch td { padding: .2rem 0; }
.punch__stamp {
  margin: .6rem 0 0; min-height: 2.6em;
  font-family: var(--f-head); font-size: 1.25rem; line-height: 1.1; letter-spacing: .03em; color: #b3121f; text-transform: uppercase;
}
.punch__stamp.hit { animation: stamp .35s cubic-bezier(.2,1.6,.4,1); }
@keyframes stamp { 0% { transform: scale(1.8) rotate(-8deg); opacity: 0; } 100% { transform: rotate(-3deg); opacity: 1; } }
.punch__stamp small { display: block; font-family: var(--f-mono); font-size: .75rem; color: var(--ink); text-transform: none; letter-spacing: 0; margin-top: .25rem; }
.btn--punch { background: var(--vest); }

/* ---------------- 5. Night ---------------- */
.scene--night {
  background:
    radial-gradient(45% 55% at 62% 50%, rgba(255,45,61,.32), transparent 70%),
    #05070f;
  padding-top: clamp(3rem, 8vw, 7rem); padding-bottom: clamp(4rem, 9vw, 8rem);
}
.night { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 3rem); align-items: center; }
.panel--night { box-shadow: 7px 7px 0 var(--ink), 0 0 90px rgba(255,45,61,.35); }
.night__side { display: flex; flex-direction: column; gap: 1.5rem; }
.notifs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.notif {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: .92rem;
  background: rgba(30,32,44,.92); color: #f1f1f4; border: 2px solid #000; border-left: 5px solid var(--scan);
  border-radius: 12px; padding: .55rem .8rem;
}
.notif b { display: block; font-size: .78rem; color: #ff8a93; letter-spacing: .03em; }

/* ---------------- Turn ---------------- */
.scene--turn {
  background: linear-gradient(180deg, #05070f, #1a1240 55%, #2b1658);
  text-align: center; padding-block: clamp(4rem, 10vw, 8rem);
}
.turn { display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.year { margin: 0; font-family: var(--f-head); font-size: clamp(5rem, 22vw, 15rem); line-height: .9; color: #fff; }
.year__num { display: inline-block; text-shadow: 6px 6px 0 var(--ink); }
.year.rewound .year__num { color: var(--glow-green); text-shadow: 6px 6px 0 var(--ink), 0 0 40px rgba(67,240,143,.6); }
.ticker { background: var(--vest); padding: 0 .3rem; border-radius: 4px; white-space: nowrap; }
.token {
  display: flex; align-items: center; gap: 1rem; text-align: left;
  background: var(--paper); color: var(--ink); border: var(--line) solid var(--ink); border-radius: 18px; box-shadow: var(--shadow);
  padding: .8rem 1.4rem .8rem .8rem;
}
.token img { width: 72px; height: 72px; border-radius: 50%; border: 3px solid var(--ink); object-fit: cover; }
.token__name { margin: 0; font-family: var(--f-head); font-size: 2rem; line-height: 1; }
.token__meta { margin: .2rem 0 0; font-family: var(--f-mono); font-size: .78rem; color: #444; }

/* ---------------- 6. Launch ---------------- */
.scene--launch {
  background:
    linear-gradient(180deg, rgba(255,255,255,.0), rgba(255,255,255,.08)),
    linear-gradient(160deg, #cfd3da, #eef0f3 50%, #c9ced6);
  color: var(--ink);
  padding-block: clamp(3rem, 7vw, 6rem);
}
.launch { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.launch__copy { display: flex; flex-direction: column; gap: 1.6rem; align-items: flex-start; }
.finale {
  margin: 0; font-family: var(--f-head); font-weight: 400;
  font-size: clamp(3.2rem, 8vw, 7rem); line-height: .98; letter-spacing: .005em;
  color: var(--navy); text-shadow: 4px 4px 0 var(--vest);
}
.scene--launch .ca { background: var(--navy); border-color: var(--ink); border-style: solid; }

/* ---------------- Footer ---------------- */
.foot { background: var(--ink); color: #9aa3b5; padding: 2rem clamp(1rem, 4vw, 3rem); font-family: var(--f-mono); font-size: .78rem; text-align: center; }
.foot p { max-width: 70ch; margin: 0 auto; }

/* ---------------- Reveal on scroll ---------------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .panel.reveal { transform: scale(.97); }
.js .panel.reveal.in { transform: none; }
.js .cut .cut__label { opacity: 0; transform: scale(1.15); transition: opacity .25s steps(2), transform .25s steps(2); }
.js .cut.in .cut__label { opacity: 1; transform: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 899px) {
  :root { --bar-h: 58px; --shadow: 5px 5px 0 var(--ink); }
  .split, .hero, .launch, .night { grid-template-columns: 1fr; }
  .split--flip > :first-child { order: 0; }
  .scene--bed { min-height: auto; padding-top: 1.1rem; }
  .hero { gap: 1.1rem; }
  /* keep the whole bed panel visible but leave room for the CTA on the first screen */
  .panel--bed { width: min(100%, 44svh); margin-inline: auto; }
  .hero__copy { gap: .9rem; }
  .cta-row--hero { width: 100%; }
  .cta-row--hero .btn { flex: 1 1 auto; }
  .cta-row--hero .btn--buy { flex: 1 1 100%; }
  .cut { min-height: 26vh; }
  .chat__log { min-height: 0; }
  .launch__copy { align-items: stretch; }
  .finale { text-align: center; }
}
@media (max-width: 640px) {
  .scene-clock { display: none; }
  .brand span { font-size: 1.3rem; }
  .brand img { width: 34px; height: 34px; }
  .topbar { gap: .5rem; }
  .cta-row--bar { gap: .4rem; }
  .cta-row--bar .btn { min-height: 40px; padding: .3rem .6rem; font-size: .9rem; box-shadow: 3px 3px 0 var(--ink); }
  .cta-row--bar .btn--x { min-width: 40px; box-shadow: 3px 3px 0 var(--fluoro); }
  .cta-row--bar .btn__pending { display: none; } /* bar stays compact; badge shows in the hero row */
  .scanner { grid-template-columns: 1fr; }
  .scanner__btn { width: 100%; }
  .stamp { font-size: .66rem; left: .5rem; bottom: .5rem; }
  .btn--buy.btn--lg { font-size: 1.45rem; }
}
@media (max-width: 360px) {
  .brand span { display: none; }
}

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .panel.reveal, .js .cut .cut__label, .js .chat .msg { opacity: 1 !important; transform: none !important; }
  .js .note .note__fold { transform: none !important; }
}
.scene--2021 .scene__inner { position: relative; z-index: 1; } /* keep scanlines behind panels + captions */

/* ---------------- Equal-size CTA buttons ---------------- */
.cta-row--bar { display: grid; grid-template-columns: repeat(3, 7rem); gap: .6rem; }
.cta-row--bar .btn { width: 100%; padding-inline: .4rem; }
.cta-row--hero {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem;
  width: min(100%, 30rem);
}
.cta-row--hero .btn,
.cta-row--hero .btn--buy.btn--lg {
  width: 100%; min-height: 56px; padding: .5rem .4rem;
  font-size: 1.3rem; box-shadow: 5px 5px 0 var(--ink);
  flex-wrap: wrap; text-align: center; row-gap: .15rem;
}
.cta-row--hero .btn--x { box-shadow: 5px 5px 0 var(--fluoro); }
@media (max-width: 899px) {
  .cta-row--hero { width: min(100%, 22rem); margin-inline: auto; gap: .75rem; }
  .cta-row--hero .btn, .cta-row--hero .btn--buy.btn--lg { font-size: 1.15rem; min-height: 52px; }
  .launch__copy { align-items: center; }
}
@media (max-width: 640px) {
  .cta-row--bar { grid-template-columns: repeat(3, 5.1rem); gap: .4rem; }
  .cta-row--bar .btn { padding-inline: .2rem; }
}
main, .cut { overflow-x: clip; } /* pre-reveal transforms must not cause sideways scroll */

/* Equal-button refinements: one line, same outline + shadow on all three */
.cta-row--bar .btn, .cta-row--hero .btn { white-space: nowrap; }
.cta-row--hero .btn__pending { flex-basis: auto; }
.btn--x, .cta-row--hero .btn--x {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.85), 4px 4px 0 var(--ink);
}
.btn--x:hover { box-shadow: inset 0 0 0 2px #fff, 5px 5px 0 var(--ink); }
.cta-row--hero .btn--x { box-shadow: inset 0 0 0 2px rgba(255,255,255,.85), 5px 5px 0 var(--ink); }
@media (max-width: 899px) {
  .cta-row--hero .btn, .cta-row--hero .btn--buy.btn--lg { font-size: 1.05rem; }
}
@media (max-width: 640px) {
  .cta-row--bar .btn--x { box-shadow: inset 0 0 0 2px rgba(255,255,255,.85), 3px 3px 0 var(--ink); }
}
@media (max-width: 480px) {
  .brand span { display: none; }
  .cta-row--bar { grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 20rem); }
  .cta-row--bar .btn { font-size: .95rem; }
}

/* ---------------- Night notifications: three distinct kinds ---------------- */
.notif { display: grid; align-items: center; }
/* Trading alerts: dark, red PnL */
.notif--token {
  grid-template-columns: 1fr auto; row-gap: .1rem;
  font-family: var(--f-mono); background: #15161d; border: 2px solid #000; border-left: 5px solid var(--scan);
}
.notif__tick { font-weight: 600; font-size: .9rem; color: #fff; letter-spacing: .03em; }
.notif__pnl {
  grid-row: span 2; align-self: center;
  font-family: var(--f-head); font-size: 1.7rem; line-height: 1; color: var(--scan);
  text-shadow: 0 0 14px rgba(255,45,61,.45);
}
.notif__msg { font-size: .78rem; color: #b7b9c6; }
/* Bank: light banking-app card */
.notif--bank {
  grid-template-columns: auto 1fr; column-gap: .75rem;
  background: #eef3f8; color: #12233d; border: 2px solid #000; border-left: 2px solid #000; border-radius: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.bank__icon {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px;
  background: #1c5b3a; color: #fff; font-weight: 800; font-size: 1.1rem; border: 2px solid #000;
}
.bank__body { display: flex; flex-direction: column; }
.bank__app { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: #5a6b82; font-weight: 700; }
.bank__bal { font-size: .95rem; }
.bank__bal b { font-size: 1.1rem; }
/* Alarm: lock-screen style, big time, amber */
.notif--alarm {
  grid-template-columns: auto 1fr auto; column-gap: .8rem;
  background: linear-gradient(180deg, #2a2007, #1a1404); color: #ffcf5a;
  border: 2px solid #000; border-left: 2px solid #000; border-radius: 18px; padding: .6rem .9rem;
}
.alarm__time { font-family: var(--f-head); font-size: 2rem; line-height: 1; color: #ffd76e; }
.alarm__time small { font-size: .8rem; margin-left: .2rem; letter-spacing: .05em; }
.alarm__label { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: .82rem; color: #e9c46a; }
.alarm__snooze {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: .75rem; font-weight: 700;
  background: #ffb02e; color: #1a1404; border: 2px solid #000; border-radius: 999px; padding: .25rem .7rem;
}
.notif--bank .bank__bal b { display: inline; color: #12233d; letter-spacing: 0; margin: 0; }
.notif__msg { font-family: var(--f-hand); font-size: 1rem; line-height: 1.2; color: #d6d8e2; padding-right: .5rem; }

/* ---------------- Added panels: morning-after loop + 2:17 AM desk ---------------- */
.night--loop { margin-top: clamp(2.5rem, 6vw, 5rem); }
.panel--loop { box-shadow: var(--shadow), 0 0 70px rgba(255,45,61,.22); }
@media (min-width: 900px) {
  .night--loop { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); max-width: 1180px; }
  .night--loop .panel--loop { order: 2; }
}
.panel--desk {
  width: min(100%, 860px);
  box-shadow: var(--shadow), 0 0 70px rgba(67,240,143,.2), 0 0 110px rgba(91,60,196,.45);
}
.night--loop .caption { box-shadow: 5px 5px 0 var(--scan); }
.panel--desk { width: min(100%, 720px); }

/* ---------------- Launch statement: no box, same lettering as the "Fred it back" finale ---------------- */
.turn__captions { display: flex; flex-direction: column; gap: 1.1rem; width: 100%; }
.statement {
  max-width: 21em; margin: clamp(.5rem, 2vw, 1.5rem) auto;
  font-family: var(--f-hand); font-weight: 400;
  font-size: clamp(1.9rem, 4.4vw, 3.6rem); line-height: 1.18;
  color: #fff; text-align: center; text-wrap: balance;
}
.statement .ticker { color: var(--ink); padding: 0 .3rem; }
.statement__glow { color: var(--glow-green); text-shadow: 0 0 22px rgba(67,240,143,.55), 3px 3px 0 var(--ink); }
