/* Haluan universe page. A dark, cinematic sibling of the asfarLAB home page:
   navy space, crimson hull, gold trim, amber engine light. */

:root {
  --void: #05070f;
  --navy: #0a1124;
  --navy-2: #101a35;
  --line: rgba(200, 214, 245, .14);
  --ink: #eef1f8;
  --ink-soft: #a9b2c8;
  --ink-faint: #6f7893;
  --crimson: #c8101f;
  --crimson-deep: #8e0a16;
  --gold: #e3b45a;
  --amber: #ffb547;
  --ice: #cfe2f5;
  --edge: clamp(16px, 5vw, 64px);
  --wrap: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --display: "Saira", "Urbanist", system-ui, sans-serif;
  --body: "Urbanist", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1px 1px at 68% 42%, rgba(255,255,255,.4), transparent 60%),
    radial-gradient(1px 1px at 34% 76%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(1.5px 1.5px at 86% 82%, rgba(207,226,245,.5), transparent 60%),
    radial-gradient(1px 1px at 52% 8%, rgba(255,255,255,.4), transparent 60%),
    var(--void);
  background-size: 420px 420px, 560px 560px, 380px 380px, 640px 640px, 500px 500px, auto;
  color: var(--ink);
  font: 400 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--ink); color: var(--void); padding: 8px 14px; border-radius: 4px; font: 500 14px var(--body); }
.skip:focus { left: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--edge); }

/* ---------------------------------------------------------------- topbar */
.topbar {
  position: absolute; inset: 0 0 auto 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px var(--edge);
}
.home { text-decoration: none; }
.home-mark { font: 600 21px/1 "Bricolage Grotesque", var(--body); letter-spacing: -.02em; color: var(--ink); }
.home-mark b { font-weight: 600; color: var(--ink); }
.home:hover .home-mark { color: var(--amber); }
.home:hover .home-mark b { color: var(--amber); }
.topbar-meta { font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative; isolation: isolate;
  min-height: min(100svh, 980px);
  display: flex; align-items: flex-end;
  padding: 120px var(--edge) clamp(110px, 14vh, 140px);
}
.hero-art { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 40%; transform-origin: 80% 45%; animation: drift 30s var(--ease) infinite alternate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(5,7,15,.92) 0%, rgba(5,7,15,.55) 38%, rgba(5,7,15,0) 70%),
    linear-gradient(0deg, var(--void) 0%, rgba(5,7,15,.6) 22%, rgba(5,7,15,0) 48%),
    linear-gradient(180deg, rgba(5,7,15,.7) 0%, rgba(5,7,15,0) 18%);
}
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.05); } }

.hero-copy { max-width: 760px; width: 100%; }
.plate {
  display: inline-block; margin: 0 0 18px;
  padding: 6px 22px 7px;
  background: var(--crimson); border: 2px solid #fff;
  transform: skewX(-14deg);
  font: italic 800 clamp(13px, 1.6vw, 17px)/1 var(--display);
  letter-spacing: .14em; text-transform: uppercase; color: #fff;
  box-shadow: 0 6px 24px rgba(200,16,31,.35);
}
h1 { margin: 0; }
.wordmark { width: min(100%, 720px); filter: drop-shadow(0 10px 30px rgba(0,0,0,.55)) drop-shadow(0 0 1px rgba(255,255,255,.6)); }
.hero-line { margin: 22px 0 0; font: 500 clamp(19px, 2.3vw, 26px)/1.35 var(--body); color: var(--ink); max-width: 30ch; }
.telemetry { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 30px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); }
.telemetry li { font: 500 14px/1.2 var(--mono); color: var(--ice); }
.telemetry span { display: block; margin-bottom: 6px; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }

/* ------------------------------------------------------------ scroll cue */
.scroll-cue {
  position: absolute; left: 50%; bottom: 22px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transform: translateX(-50%); text-decoration: none;
  transition: opacity .5s var(--ease);
}
.scroll-label { font: 500 10.5px/1 var(--mono); letter-spacing: .28em; text-transform: uppercase; color: var(--ink-soft); padding-left: .28em; }
.scroll-line { position: relative; width: 1px; height: 44px; overflow: hidden; background: linear-gradient(180deg, rgba(227,180,90,.55), rgba(227,180,90,.08)); }
.scroll-line::after {
  content: ""; position: absolute; left: -2px; top: -8px; width: 5px; height: 8px; border-radius: 3px;
  background: var(--amber); box-shadow: 0 0 10px var(--amber), 0 0 3px #fff;
  animation: run-light 2.2s cubic-bezier(.5, 0, .3, 1) infinite;
}
@keyframes run-light { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(56px); opacity: 0; } }
.scroll-cue:hover .scroll-label { color: var(--amber); }
.scroll-cue.is-gone { opacity: 0; pointer-events: none; }

/* ---------------------------------------------------------------- origin */
.origin { position: relative; max-width: 820px; margin: 0 auto; padding: clamp(80px, 12vw, 150px) var(--edge) clamp(64px, 9vw, 110px); text-align: center; }
.dawn-ring {
  width: 64px; height: 64px; margin: 0 auto 34px; border-radius: 50%;
  background: radial-gradient(circle, #fff6d8 0 12%, var(--amber) 24%, rgba(255,181,71,.15) 46%, transparent 62%);
  box-shadow: inset 0 0 0 2px rgba(227,180,90,.6), 0 0 0 9px rgba(227,180,90,.08), 0 0 0 10px rgba(227,180,90,.3), 0 0 60px rgba(255,181,71,.35);
}
.origin blockquote { margin: 0; }
.origin blockquote p { margin: 0 0 .7em; font: 400 clamp(22px, 3vw, 33px)/1.45 var(--body); color: var(--ink); letter-spacing: -.005em; }
.origin cite { font-style: italic; color: var(--amber); }
.signature { margin: 30px 0 0; font: 500 12px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.signature::before { content: ""; display: inline-block; width: 36px; height: 1px; margin-right: 14px; vertical-align: middle; background: var(--gold); opacity: .7; }

/* ---------------------------------------------------------- shared heads */
.eyebrow { margin: 0 0 12px; font: 500 11.5px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
h2 { margin: 0; font: italic 800 clamp(34px, 5.4vw, 64px)/1.02 var(--display); letter-spacing: -.01em; color: var(--ink); }
.lede { max-width: 58ch; margin: 18px 0 0; color: var(--ink-soft); font-size: 18px; }

/* ----------------------------------------------------------- long night */
.night { position: relative; isolation: isolate; padding: clamp(80px, 11vw, 140px) 0; overflow: hidden; }
.night-art { position: absolute; inset: 0; z-index: -1; }
.night-art img { width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.night::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--void) 0%, rgba(5,7,15,.35) 30%, rgba(5,7,15,.35) 70%, var(--void) 100%); }
.timeline { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: t; }
.timeline li { position: relative; padding: 34px 28px 0 0; }
.timeline li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, var(--gold), rgba(227,180,90,.15)); }
.timeline li::after { content: ""; position: absolute; top: -5px; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--void); box-shadow: inset 0 0 0 2px var(--gold); }
.timeline li:last-child::after { background: var(--amber); box-shadow: 0 0 0 4px rgba(255,181,71,.18), 0 0 18px var(--amber); }
.year { display: block; font: italic 800 clamp(30px, 3.4vw, 44px)/1 var(--display); color: var(--ice); }
.timeline li:last-child .year { color: var(--amber); }
.timeline li:last-child .year::after { content: " days"; font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.timeline p { margin: 14px 0 0; color: var(--ink-soft); font-size: 16.5px; max-width: 26ch; }

/* ----------------------------------------------------------------- games */
.games { padding: clamp(70px, 10vw, 130px) 0 clamp(40px, 6vw, 80px); }
.game {
  max-width: calc(var(--wrap) + 160px); margin: clamp(60px, 9vw, 120px) auto 0; padding: 0 var(--edge);
  display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: center;
}
.game--flip { grid-template-columns: 1fr 1.35fr; }
.game--flip .game-art { order: 2; }
.game-art {
  position: relative; display: block; overflow: hidden;
  clip-path: polygon(4% 0, 100% 0, 96% 100%, 0 100%);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.game-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,7,15,0) 55%, rgba(5,7,15,.55) 100%); pointer-events: none; }
.game-art img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 1.2s var(--ease); }
.game:hover .game-art img { transform: scale(1.04); }
.game-art::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; z-index: 1; background: linear-gradient(90deg, var(--crimson), var(--accent)); }

.post { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: 0 0 18px; font: 500 11.5px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); }
.num { font: italic 800 30px/1 var(--display); letter-spacing: 0; color: transparent; -webkit-text-stroke: 1px var(--accent); }
.new { padding: 5px 9px 4px; border: 1px solid var(--amber); border-radius: 2px; color: var(--amber); letter-spacing: .16em; }
.game h3 { margin: 0 0 16px; }
.logo { width: min(100%, 440px); filter: drop-shadow(0 8px 24px rgba(0,0,0,.5)); }
.genre { display: inline-block; margin: 0 0 18px; padding: 4px 0; border-bottom: 2px solid var(--accent); font: italic 600 15px/1.2 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.game-copy > p:not(.post):not(.genre):not(.roster) { margin: 0 0 14px; color: var(--ink-soft); max-width: 46ch; }
.roster { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 28px; padding: 0; }
.roster span { padding: 5px 10px; border: 1px solid var(--line); border-radius: 2px; font: 500 11.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ice); background: rgba(16,26,53,.55); }
.play {
  display: inline-flex; align-items: center; gap: 16px; text-decoration: none;
  padding: 0 22px 0 0; border: 1px solid rgba(227,180,90,.45);
  background: linear-gradient(90deg, rgba(200,16,31,.12), rgba(16,26,53,.4));
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
}
.play span {
  position: relative; padding: 14px 26px 14px 22px; background: var(--crimson);
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  font: italic 800 16px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: #fff;
}
.play small { font: 500 12px/1 var(--mono); letter-spacing: .06em; color: var(--ink-soft); }
.play:hover { border-color: var(--amber); background: linear-gradient(90deg, rgba(200,16,31,.22), rgba(16,26,53,.55)); transform: translateX(3px); }
.play:hover small { color: var(--ink); }

/* ------------------------------------------------------------------ crew */
.crew { padding: clamp(70px, 10vw, 130px) 0; background: linear-gradient(180deg, transparent, rgba(10,17,36,.7) 18%, rgba(10,17,36,.7) 82%, transparent); }
.crew-group { margin: 56px 0 18px; font: 500 11.5px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); display: flex; align-items: center; gap: 14px; }
.crew-group::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.crew-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.crew-grid--five { grid-template-columns: repeat(5, 1fr); }
.crew-grid--four { grid-template-columns: repeat(4, calc((100% - 64px) / 5)); justify-content: center; }
.card { position: relative; overflow: hidden; background: var(--navy); border: 1px solid var(--line); transition: transform .4s var(--ease), border-color .4s var(--ease); }
.card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 22%; transition: transform .9s var(--ease); }
.card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 1; background: var(--c); }
.card-text { position: absolute; inset: auto 0 0 0; padding: 60px 14px 14px; background: linear-gradient(180deg, rgba(5,7,15,0), rgba(5,7,15,.88) 45%, rgba(5,7,15,.97)); }
.card p { margin: 0; }
.call { font: italic 800 22px/1 var(--display); color: var(--c); letter-spacing: .02em; text-transform: uppercase; }
.who { margin-top: 6px !important; font: 600 13.5px/1.3 var(--body); color: var(--ink); }
.role { margin-top: 3px !important; font: 500 10.5px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.note { max-height: 0; overflow: hidden; opacity: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); transition: max-height .5s var(--ease), opacity .4s var(--ease), margin .4s var(--ease); }
.card:hover, .card:focus-within { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.card:hover img { transform: scale(1.05); }
.card:hover .note, .card:focus-within .note { max-height: 5em; opacity: 1; margin-top: 8px; }
@media (hover: none) { .note { max-height: none; opacity: 1; margin-top: 8px; } }

/* ------------------------------------------------------------------ dawn */
.dawn { position: relative; isolation: isolate; min-height: clamp(420px, 60vw, 640px); display: flex; align-items: center; justify-content: center; text-align: center; padding: 80px var(--edge); overflow: hidden; }
.dawn-art { position: absolute; inset: 0; z-index: -2; }
.dawn-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.dawn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--void) 0%, rgba(5,7,15,.45) 30%, rgba(5,7,15,.55) 70%, var(--void) 100%), radial-gradient(ellipse at center, rgba(5,7,15,.55), rgba(5,7,15,0) 70%); }
.dawn-copy { position: relative; }
.dawn-copy h2 { text-shadow: 0 4px 30px rgba(0,0,0,.6); }
.dawn-copy p { margin: 14px 0 30px; font-size: 19px; color: var(--ink); }
.back { display: inline-block; padding: 12px 22px; border: 1px solid rgba(255,255,255,.5); font: 500 12px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; text-decoration: none; color: #fff; background: rgba(5,7,15,.35); backdrop-filter: blur(6px); transition: border-color .3s var(--ease), color .3s var(--ease); }
.back:hover { border-color: var(--amber); color: var(--amber); }

/* ---------------------------------------------------------------- footer */
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px var(--edge) 34px; border-top: 1px solid var(--line); font: 500 11.5px/1 var(--mono); letter-spacing: .08em; color: var(--ink-faint); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--amber); }

/* ---------------------------------------------------------------- reveal */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 960px) {
  .game, .game--flip { grid-template-columns: 1fr; }
  .game--flip .game-art { order: 0; }
  .timeline { grid-template-columns: 1fr 1fr; row-gap: 44px; }
  .crew-grid--five { grid-template-columns: repeat(3, 1fr); }
  .crew-grid--four { grid-template-columns: repeat(3, calc((100% - 32px) / 3)); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .topbar-meta { display: none; }
  .hero { min-height: 92svh; padding-top: 96px; padding-bottom: 104px; }
  .scroll-cue { bottom: 18px; }
  .hero-art img { object-position: 91% 30%; }
  .hero::before { background: linear-gradient(0deg, var(--void) 0%, rgba(5,7,15,.82) 38%, rgba(5,7,15,.25) 70%, rgba(5,7,15,.6) 100%); }
  .timeline { grid-template-columns: 1fr; row-gap: 36px; }
  .crew-grid--five, .crew-grid--four { grid-template-columns: repeat(2, 1fr); gap: 12px; justify-content: stretch; }
  .call { font-size: 19px; }
  .play { gap: 12px; padding-right: 14px; }
  .play small { font-size: 11px; overflow-wrap: anywhere; }
}
/* Phones: crew rows swipe sideways with the next card peeking in, text sits
   below each face, and every link is a comfortable tap target. */
@media (max-width: 600px) {
  .home { display: inline-block; padding: 12px 0; }
  .topbar { padding-top: 10px; }
  .timeline p { max-width: none; }
  .game { margin-top: 64px; gap: 22px; }
  .game-art { clip-path: none; margin: 0 calc(-1 * var(--edge)); box-shadow: none; }
  .logo { width: min(100%, 360px); }
  .roster { margin: 18px 0 22px; }
  .play { display: flex; width: 100%; }
  .play span { flex: none; padding: 16px 26px 16px 20px; }
  .play small { display: none; }
  .play::after { content: "\2192"; margin-left: auto; font: 500 18px/1 var(--body); color: var(--amber); }
  .role, .scroll-label, .play small, .post, .eyebrow, .crew-group, .roster span { font-size: 11.5px; }

  .crew-grid, .crew-grid--five, .crew-grid--four {
    display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-left: var(--edge);
    margin: 0 calc(-1 * var(--edge)); padding: 2px var(--edge) 10px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .crew-grid::-webkit-scrollbar { display: none; }
  .card { flex: 0 0 68%; scroll-snap-align: start; display: flex; flex-direction: column; }
  .card:hover, .card:focus-within { transform: none; }
  .card-text { position: static; flex: 1; padding: 12px 14px 16px; background: var(--navy); }
  .call { font-size: 20px; }
  .note { max-height: none; opacity: 1; margin-top: 8px; font-size: 14px; }
  .crew-group::before { content: "Swipe"; order: 2; flex: none; font-size: 10.5px; letter-spacing: .2em; color: var(--ink-faint); }
  .crew-group::after { order: 1; }

  .back { padding: 16px 24px; }
  .foot { gap: 6px 16px; padding-top: 12px; padding-bottom: 20px; }
  .foot span, .foot a { display: inline-block; padding: 14px 0; }
}

/* Phones held sideways: a compact hero so the title, the line and the scroll
   cue fit on the first screen. */
@media (orientation: landscape) and (max-height: 500px) {
  .hero { min-height: 100svh; padding-top: 64px; padding-bottom: 84px; }
  .topbar { padding-top: 12px; padding-bottom: 12px; }
  .plate { margin-bottom: 10px; font-size: 12px; padding: 5px 16px 6px; }
  .wordmark { width: min(100%, 400px); }
  .hero-line { margin-top: 12px; font-size: 18px; }
  .telemetry { display: none; }
  .scroll-cue { bottom: 12px; gap: 6px; }
  .scroll-line { height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-art img { animation: none; }
  .scroll-line::after { animation: none; top: 18px; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .game-art img, .card, .card img, .play { transition: none; }
}
