/* SteveB — Always moving forward
   Static experience site built from /assets (pixel journey).
   No external fonts, no frameworks, no trackers. */

:root {
  --ink: #0b0e1f;
  --navy: #11162f;
  --navy-2: #161c3a;
  --panel: rgba(13, 18, 40, 0.9);
  --cream: #fff3df;
  --muted: #c9c5da;
  --gold: #ffc857;
  --cyan: #7ee3f2;
  --lilac: #b9a7ff;
  --line: rgba(255, 243, 223, 0.16);
  --shadow: rgba(0, 0, 0, 0.38);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --hud-h: 64px;
  --pad-x: clamp(16px, 6vw, 88px);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--cyan);
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- HUD ---------- */

.hud {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--hud-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 clamp(12px, 3vw, 28px);
  background: rgba(9, 12, 27, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--cream);
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  flex: none;
  image-rendering: pixelated;
  background: #1a2044;
  border: 2px solid var(--line);
}

.brand-txt {
  min-width: 0;
  line-height: 1.15;
}

.brand-txt strong {
  display: block;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.brand-txt small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.hud-spacer {
  flex: 1;
}

.hud-year {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--gold);
  padding: 4px 10px;
  border: 1px solid rgba(255, 200, 87, 0.35);
  background: rgba(255, 200, 87, 0.08);
}

.lang {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.lang button {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  letter-spacing: 0.1em;
  padding: 6px 9px;
  cursor: pointer;
}

.lang button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--gold);
  border-color: var(--gold);
}

.lang button:not([aria-pressed="true"]):hover {
  color: var(--cream);
  border-color: var(--line);
}

.rail {
  position: fixed;
  inset: var(--hud-h) 0 auto 0;
  height: 3px;
  z-index: 61;
  background: rgba(255, 255, 255, 0.07);
}

.rail i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--cyan));
  transition: width 0.1s linear;
}

/* ---------- Shared world ---------- */

.scene-world {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: max(100%, 200svh);
  aspect-ratio: 2 / 1;
  transform: translateX(-50%);
  overflow: hidden;
  image-rendering: pixelated;
  background: #8fb7c9;
}

.lg {
  position: absolute;
  inset: 0;
  transform: translate3d(calc(var(--p, 0) * var(--m, 0) * -1%), 0, 0);
  will-change: transform;
}

.l {
  position: absolute;
  display: block;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  image-rendering: pixelated;
}

.actor {
  position: absolute;
  bottom: 8.8889%;
  z-index: 4;
  background-repeat: no-repeat;
  background-position-x: var(--fx, 0%);
  background-size: 100% 100%;
  image-rendering: pixelated;
  filter: drop-shadow(4px 6px 0 rgba(0, 0, 0, 0.25));
  will-change: transform, opacity;
}

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

.actor[data-mode="loop"] {
  animation: bob 0.8s steps(2, end) infinite;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--hud-h) + 6vh) var(--pad-x) 110px;
  overflow: hidden;
  isolation: isolate;
}

.hero .scene-world {
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11, 14, 31, 0.94) 0%, rgba(11, 14, 31, 0.62) 42%, rgba(11, 14, 31, 0.12) 72%, rgba(11, 14, 31, 0.3) 100%),
    linear-gradient(180deg, rgba(11, 14, 31, 0.86) 0%, rgba(11, 14, 31, 0.22) 38%, rgba(11, 14, 31, 0.12) 62%, rgba(11, 14, 31, 0.72) 100%);
}

.hero-inner {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: clamp(0.62rem, 1.3vw, 0.78rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6.6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
}

.lede {
  max-width: 48ch;
  margin: 20px 0 0;
  font-size: clamp(0.98rem, 1.6vw, 1.15rem);
  color: #e6e1f1;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 2px solid var(--gold);
  background: var(--gold);
  color: #1b1405;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.45);
}

.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
}

.btn.ghost {
  background: transparent;
  color: var(--cream);
  border-color: var(--line);
  box-shadow: none;
}

.btn.ghost:hover {
  border-color: var(--cream);
}

.portrait {
  justify-self: center;
  width: clamp(150px, 19vw, 232px);
  aspect-ratio: 1;
  position: relative;
  background: #1a2044;
  border: 3px solid rgba(255, 243, 223, 0.5);
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.42);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.portrait figcaption {
  position: absolute;
  left: 50%;
  bottom: -34px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.hero-foot {
  position: absolute;
  left: var(--pad-x);
  right: var(--pad-x);
  bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}

.route {
  color: var(--gold);
}

.scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.scroll-hint::after {
  content: "↓";
  animation: nudge 1.6s ease-in-out infinite;
}

@keyframes nudge {
  0%,
  100% {
    transform: translateY(-2px);
    opacity: 0.5;
  }
  50% {
    transform: translateY(3px);
    opacity: 1;
  }
}

/* ---------- Chapters ---------- */

.chapter {
  position: relative;
  background: var(--ink);
}

.pin {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100svh;
  margin-bottom: -100svh;
  overflow: hidden;
  background: var(--ink);
}

.pin::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 14, 31, 0.82) 0%, rgba(11, 14, 31, 0) 18%, rgba(11, 14, 31, 0) 72%, rgba(11, 14, 31, 0.6) 100%);
}

.scene-meta {
  position: absolute;
  left: clamp(14px, 4vw, 48px);
  bottom: clamp(14px, 3vh, 34px);
  z-index: 8;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 243, 223, 0.7);
}

.scene-meta b {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-weight: 500;
}

.scene-year {
  position: absolute;
  right: clamp(14px, 4vw, 48px);
  bottom: clamp(6px, 1.4vh, 18px);
  z-index: 5;
  font-family: var(--mono);
  font-size: clamp(2.4rem, 8vw, 6.4rem);
  line-height: 1;
  letter-spacing: 0.02em;
  color: rgba(255, 243, 223, 0.14);
  text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.25);
  pointer-events: none;
  user-select: none;
}

.cards {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 2vh;
  padding: 6svh 0 12svh;
}

.card-wrap {
  min-height: 88svh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 var(--pad-x);
}

.card {
  width: min(520px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  padding: clamp(18px, 2.4vw, 30px);
  box-shadow: 10px 10px 0 var(--shadow);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.js .card {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.js .card.in {
  opacity: 1;
  transform: none;
}

.card-date {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.card h2 {
  margin: 8px 0 6px;
  font-size: clamp(1.3rem, 2.4vw, 1.95rem);
  line-height: 1.16;
  letter-spacing: -0.01em;
}

.card .role {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.card .body {
  margin: 0;
  font-size: 0.94rem;
  color: #e2ddef;
}

.card .quote {
  margin: 18px 0 0;
  padding-left: 14px;
  border-left: 2px solid var(--cyan);
  font-size: 0.9rem;
  font-style: italic;
  color: #eaf7ff;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  color: var(--cyan);
  background: rgba(126, 227, 242, 0.08);
  border: 1px solid rgba(126, 227, 242, 0.28);
}

.chips li.plan {
  color: var(--lilac);
  background: rgba(185, 167, 255, 0.08);
  border-color: rgba(185, 167, 255, 0.3);
}

.chips-label {
  margin: 16px 0 0;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.card .team {
  margin: 16px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.card .team b {
  color: var(--cream);
  font-weight: 600;
}

.memory {
  margin: 20px 0 0;
}

.memory img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 2px solid rgba(255, 243, 223, 0.35);
  background: #1a2044;
  transform: rotate(-0.5deg);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.3);
}

.memory figcaption {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.6rem;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ---------- Memories ---------- */

.memories {
  position: relative;
  padding: clamp(64px, 11vh, 128px) var(--pad-x);
  background:
    radial-gradient(1200px 420px at 50% 0%, rgba(126, 227, 242, 0.08), transparent 70%),
    linear-gradient(180deg, #0b0e1f 0%, #101533 45%, #0b0e1f 100%);
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 1100px;
  margin: 0 auto clamp(28px, 5vh, 52px);
}

.section-head h2 {
  margin: 6px 0 10px;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1.1;
}

.section-head p {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
}

.polaroids {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: clamp(16px, 2.4vw, 26px);
}

.polaroid {
  margin: 0;
  padding: 8px 8px 12px;
  background: #f6eede;
  color: #211f2a;
  box-shadow: 6px 8px 0 rgba(0, 0, 0, 0.38);
  transform: rotate(var(--r, 0deg));
  transition: transform 0.2s ease;
}

.polaroid:hover {
  transform: rotate(0deg) scale(1.02);
}

.polaroid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #d9d2c4;
}

.polaroid figcaption {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 0.58rem;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: #403c4c;
}

/* ---------- Finale ---------- */

.finale {
  position: relative;
  padding: clamp(64px, 12vh, 140px) var(--pad-x) clamp(48px, 8vh, 90px);
  text-align: center;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(700px 340px at 50% 0%, rgba(255, 200, 87, 0.14), transparent 70%),
    radial-gradient(900px 420px at 80% 100%, rgba(185, 167, 255, 0.12), transparent 70%),
    #0b0e1f;
  overflow: hidden;
}

.finale-art {
  width: min(400px, 78vw);
  margin: 0 auto 8px;
}

.finale-art img {
  width: 100%;
  image-rendering: pixelated;
  filter: drop-shadow(0 26px 40px rgba(0, 0, 0, 0.5));
}

.finale .eyebrow {
  margin-top: 24px;
}

.finale blockquote {
  max-width: 34ch;
  margin: 6px auto 22px;
  font-size: clamp(1.1rem, 2.6vw, 1.7rem);
  line-height: 1.45;
  color: var(--cream);
}

.signoff {
  max-width: 52ch;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.94rem;
}

.ending {
  margin: clamp(28px, 5vh, 46px) 0 26px;
  font-family: var(--mono);
  font-size: clamp(1rem, 3vw, 1.7rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.finale-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.brand-mark {
  width: 56px;
  margin: 44px auto 0;
  opacity: 0.85;
  image-rendering: pixelated;
}

/* ---------- Footer ---------- */

.foot {
  padding: 26px var(--pad-x) 34px;
  border-top: 1px solid var(--line);
  background: #080b18;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.foot strong {
  color: var(--gold);
  font-weight: 500;
}

/* ---------- Responsive ---------- */

@media (max-width: 880px) {
  .hud {
    gap: 10px;
  }

  .brand-txt small {
    display: none;
  }

  .hud-year {
    display: none;
  }

  .hero {
    padding-bottom: 96px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .portrait {
    justify-self: start;
    width: 132px;
    order: -1;
  }

  .portrait figcaption {
    display: none;
  }

  .hero-foot {
    font-size: 0.56rem;
  }

  .scroll-hint {
    display: none;
  }

  .pin {
    position: relative;
    top: 0;
    height: 58vw;
    margin-bottom: 0;
  }

  .pin::after {
    background: linear-gradient(180deg, rgba(11, 14, 31, 0.35) 0%, rgba(11, 14, 31, 0) 40%, rgba(11, 14, 31, 0.35) 100%);
  }

  .scene-world {
    width: 100%;
  }

  .scene-year {
    font-size: clamp(2rem, 11vw, 3.4rem);
    bottom: 8px;
  }

  .scene-meta {
    bottom: 10px;
    font-size: 0.52rem;
  }

  .scene-meta b {
    font-size: 0.62rem;
  }

  .cards {
    padding: 0 0 12px;
    gap: 0;
  }

  .card-wrap {
    min-height: 0;
    padding: 16px 14px;
    justify-content: center;
  }

  .card {
    width: 100%;
    box-shadow: 5px 5px 0 var(--shadow);
  }

  .polaroids {
    grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .hud {
    height: 58px;
  }

  :root {
    --hud-h: 58px;
  }

  .eyebrow {
    letter-spacing: 0.16em;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .lg {
    transform: none !important;
  }

  .js .card {
    opacity: 1 !important;
    transform: none !important;
  }

  .scroll-hint::after {
    animation: none;
  }
}

@media print {
  .hud,
  .rail,
  .pin,
  .scroll-hint {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  .card {
    break-inside: avoid;
    box-shadow: none;
    border-color: #ccc;
    background: #fff;
    color: #111;
  }
}
