/* ==========================================================================
   Downstair Games — site styles
   Dark, minimal, a little bit HUD. Amber = the light at the bottom of the stairs.
   ========================================================================== */

:root {
  --bg: #0a0b0d;
  --bg-2: #0f1115;
  --bg-3: #15181e;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #ece9e3;
  --muted: #9aa0a9;
  --dim: #5e636c;
  --accent: #ffb02e;
  --accent-hot: #ff7a1a;
  --accent-ink: #170f02;

  --font-display: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --container: 1160px;
  --gutter: clamp(20px, 5vw, 40px);
  --header-h: 80px;
  --stairs-h: clamp(40px, 5vw, 64px);
  --chamfer: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* film grain over everything — very low, just kills the flat-black banding */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 0.8rem var(--font-mono);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---------- Type ---------- */
h1, h2, h3 {
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.7rem, 6.6vw, 5.5rem); }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1.25; }

h1 em, h2 em { font-style: normal; color: var(--accent); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75em;
  font: 500 0.75rem/1.4 var(--font-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow b { font-weight: 500; color: var(--accent); }
.eyebrow .sep { color: var(--dim); }

.lead {
  font-size: clamp(1.08rem, 1.5vw, 1.25rem);
  line-height: 1.65;
  color: var(--muted);
  max-width: 34em;
}

.status-dot {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.status-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  animation: ping 2.4s var(--ease-out) infinite;
}
@keyframes ping {
  0% { transform: scale(0.5); opacity: 0.9; }
  80%, 100% { transform: scale(1.7); opacity: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 52px;
  padding: 0 1.5rem;
  font: 600 0.8rem/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--accent-ink);
  background: var(--accent);
  clip-path: var(--chamfer);
  transition: background 0.2s, color 0.2s, transform 0.2s var(--ease-out);
}
.btn svg { width: 16px; height: 16px; flex: none; transition: transform 0.25s var(--ease-out); }
.btn:hover { background: #ffc35c; }
.btn:hover svg { transform: translate(3px, 3px); }
.btn:active { transform: translateY(1px); }

/* outlined variant: outer box is the "border", ::before is the fill */
.btn-ghost { color: var(--text); background: var(--line-strong); }
.btn-ghost::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  background: var(--btn-fill, var(--bg));
  clip-path: var(--chamfer);
  transition: background 0.2s;
}
.btn-ghost:hover { color: var(--accent); background: var(--accent); }
.btn-ghost:hover::before { background: #14110b; }

.btn[aria-disabled="true"] {
  color: var(--dim);
  background: var(--line);
  cursor: not-allowed;
}
.btn[aria-disabled="true"]::before { background: var(--btn-fill, var(--bg)); }
.btn[aria-disabled="true"]:hover svg { transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  transition: height 0.3s var(--ease-out);
}
/* blur lives on a pseudo-element: backdrop-filter on the header itself would
   trap the fixed-position mobile menu inside the header's box */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(10, 11, 13, 0.8);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transition: opacity 0.3s;
}
.site-header.is-scrolled { height: 66px; }
.site-header.is-scrolled::before { opacity: 1; }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand { position: relative; z-index: 2; flex: none; display: block; }
.brand img {
  height: 54px;
  width: auto;
  transition: height 0.3s var(--ease-out), opacity 0.2s;
}
.is-scrolled .brand img { height: 46px; }
.brand:hover img { opacity: 0.8; }

.site-nav ul { display: flex; align-items: center; gap: clamp(1.4rem, 3vw, 2.6rem); }
.site-nav a {
  position: relative;
  display: inline-block;
  padding: 0.5rem 0;
  font: 500 0.76rem/1 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}
/* roguelike nod: ">" is the "descend stairs" key */
.site-nav a:not(.nav-cta)::before {
  content: ">";
  position: absolute;
  left: -1.1em;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity 0.2s, transform 0.2s var(--ease-out);
}
.site-nav a:hover,
.site-nav a[aria-current] { color: var(--text); }
.site-nav a:not(.nav-cta):hover::before,
.site-nav a:not(.nav-cta)[aria-current]::before { opacity: 1; transform: none; }

.site-nav .nav-cta {
  padding: 0.8rem 1.15rem;
  color: var(--text);
  background: var(--line-strong);
  clip-path: var(--chamfer);
  --chamfer: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.site-nav .nav-cta::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  background: var(--bg);
  clip-path: var(--chamfer);
  transition: background 0.2s;
}
.site-nav .nav-cta:hover,
.site-nav .nav-cta[aria-current] { color: var(--accent); background: var(--accent); }
.site-nav .nav-cta:hover::after { background: #14110b; }

.nav-toggle {
  display: none;
  position: relative;
  z-index: 2;
  width: 46px;
  height: 46px;
  margin-right: -10px;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease-out), opacity 0.2s, width 0.3s var(--ease-out);
}
/* three descending steps */
.nav-toggle span:nth-child(1) { top: 15px; width: 12px; }
.nav-toggle span:nth-child(2) { top: 22px; width: 18px; }
.nav-toggle span:nth-child(3) { top: 29px; width: 24px; }
.nav-open .nav-toggle span:nth-child(1) { width: 24px; transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  :root { --header-h: 68px; }
  .site-header.is-scrolled { height: 60px; }
  .brand img { height: 46px; }
  .is-scrolled .brand img { height: 42px; }
  .nav-toggle { display: block; }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    background: rgba(8, 9, 11, 0.93);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }
  .nav-open .site-nav { opacity: 1; visibility: visible; }
  .nav-open { overflow: hidden; }

  .site-nav ul { flex-direction: column; gap: 2rem; }
  .site-nav a,
  .site-nav .nav-cta {
    font: 600 2rem/1 var(--font-display);
    letter-spacing: -0.02em;
    text-transform: none;
    color: var(--text);
  }
  .site-nav li {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.4s, transform 0.4s var(--ease-out);
  }
  .nav-open .site-nav li { opacity: 1; transform: none; }
  .nav-open .site-nav li:nth-child(2) { transition-delay: 60ms; }
  .nav-open .site-nav li:nth-child(3) { transition-delay: 120ms; }
  .site-nav .nav-cta { padding: 0.5rem 0; background: none; clip-path: none; }
  .site-nav .nav-cta::after { display: none; }
  .site-nav a:not(.nav-cta)::before { left: -0.9em; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + 3rem) 0 8rem;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.6s ease 0.1s;
}
.hero-canvas.is-ready { opacity: 1; }

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(10, 11, 13, 0.9) 28%, rgba(10, 11, 13, 0.35) 58%, rgba(10, 11, 13, 0) 78%),
    linear-gradient(0deg, var(--bg) 0%, rgba(10, 11, 13, 0) 30%),
    linear-gradient(180deg, rgba(10, 11, 13, 0.85) 0%, rgba(10, 11, 13, 0) 22%);
}

.hero-inner { display: grid; gap: 1.75rem; justify-items: start; }
.hero h1 { max-width: 11.5em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 0.75rem; }

/* load-in */
.hero-inner > * {
  opacity: 0;
  transform: translateY(22px);
  animation: rise 0.9s var(--ease-out) forwards;
}
.hero-inner > :nth-child(1) { animation-delay: 0.15s; }
.hero-inner > :nth-child(2) { animation-delay: 0.28s; }
.hero-inner > :nth-child(3) { animation-delay: 0.42s; }
.hero-inner > :nth-child(4) { animation-delay: 0.56s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: calc(var(--stairs-h) + 1.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  transform: translateX(-50%);
  font: 500 0.68rem/1 var(--font-mono);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
  transition: color 0.2s;
}
.scroll-cue:hover { color: var(--accent); }
.scroll-cue svg { width: 22px; height: 22px; color: var(--accent); animation: step-down 2.2s var(--ease-out) infinite; }
@keyframes step-down {
  0% { transform: translate(-5px, -5px); opacity: 0; }
  35%, 65% { transform: none; opacity: 1; }
  100% { transform: translate(5px, 5px); opacity: 0; }
}

/* narrow screens: the stairwell moves up top, the copy anchors to the bottom */
@media (max-width: 900px) {
  .hero { align-items: flex-end; padding-bottom: calc(var(--stairs-h) + 6.5rem); }
  .hero-shade {
    background:
      linear-gradient(180deg, rgba(10, 11, 13, 0.75) 0%, rgba(10, 11, 13, 0.1) 16%, rgba(10, 11, 13, 0.2) 30%, rgba(10, 11, 13, 0.88) 52%, var(--bg) 88%);
  }
}
@media (max-height: 640px) { .scroll-cue { display: none; } }

/* ---------- Sections + stepped edges ---------- */
.section {
  position: relative;
  /* extra room at the bottom: the next section's stair edge overlaps us by --stairs-h */
  padding: clamp(5rem, 11vw, 9rem) 0 calc(clamp(5rem, 11vw, 9rem) + var(--stairs-h));
  background: var(--section-bg, var(--bg));
}

/* The top edge of a .stepped section is a staircase descending left → right.
   ::before draws the 1px "nosing" line, ::after is the fill, nudged 1px down/left. */
.stepped {
  isolation: isolate;
  margin-top: calc(var(--stairs-h) * -1);
  padding-top: calc(clamp(5rem, 11vw, 9rem) + var(--stairs-h));
  background: none;
}
.stepped::before,
.stepped::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  --s: calc(var(--stairs-h) / 8);
  /* --o insets the fill by 1px on treads and risers so the line layer shows through */
  clip-path: polygon(
    0 var(--o), calc(12.5% - var(--o)) var(--o),
    calc(12.5% - var(--o)) calc(var(--s) * 1 + var(--o)), calc(25% - var(--o)) calc(var(--s) * 1 + var(--o)),
    calc(25% - var(--o)) calc(var(--s) * 2 + var(--o)), calc(37.5% - var(--o)) calc(var(--s) * 2 + var(--o)),
    calc(37.5% - var(--o)) calc(var(--s) * 3 + var(--o)), calc(50% - var(--o)) calc(var(--s) * 3 + var(--o)),
    calc(50% - var(--o)) calc(var(--s) * 4 + var(--o)), calc(62.5% - var(--o)) calc(var(--s) * 4 + var(--o)),
    calc(62.5% - var(--o)) calc(var(--s) * 5 + var(--o)), calc(75% - var(--o)) calc(var(--s) * 5 + var(--o)),
    calc(75% - var(--o)) calc(var(--s) * 6 + var(--o)), calc(87.5% - var(--o)) calc(var(--s) * 6 + var(--o)),
    calc(87.5% - var(--o)) calc(var(--s) * 7 + var(--o)), 100% calc(var(--s) * 7 + var(--o)),
    100% 100%, 0 100%
  );
}
.stepped::before {
  --o: 0px;
  bottom: auto;
  height: calc(var(--stairs-h) + 2px);
  background: linear-gradient(90deg, var(--line-strong) 30%, var(--accent) 130%);
}
.stepped::after { --o: 1px; background: var(--section-bg, var(--bg)); }

.section-head { display: grid; gap: 1.4rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.section-head h2 { max-width: 14em; }

/* ---------- About ---------- */
.about { --section-bg: var(--bg-2); }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}
.about-copy { display: grid; gap: 1.4rem; color: var(--muted); max-width: 38em; }
.about-copy p:first-child { font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.55; color: var(--text); }
.about-copy strong { font-weight: 500; color: var(--text); }

/* HUD panel */
.panel {
  position: relative;
  background: var(--bg-3);
  border: 1px solid var(--line);
}
.hud-frame::before,
.hud-frame::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent);
  pointer-events: none;
}
.hud-frame::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hud-frame::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.4rem;
  border-bottom: 1px solid var(--line);
  font: 500 0.7rem/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
.panel-head span:last-child { display: flex; align-items: center; gap: 0.6em; color: var(--accent); }

.stats { padding: 0.5rem 1.4rem; }
.stats > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px dashed var(--line);
}
.stats > div:last-child { border-bottom: 0; }
.stats dt {
  font: 500 0.72rem/1.4 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.stats dd { text-align: right; font-weight: 500; line-height: 1.35; }

.panel-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  border-top: 1px solid var(--line);
  font: 600 0.76rem/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  transition: background 0.2s;
}
.panel-link svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease-out); }
.panel-link:hover { background: rgba(255, 176, 46, 0.07); }
.panel-link:hover svg { transform: translate(3px, 3px); }

.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(3.5rem, 8vw, 6rem);
  background: var(--line);
  border: 1px solid var(--line);
}
.pillars li {
  display: grid;
  align-content: start;
  gap: 0.8rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--bg-2);
  transition: background 0.3s;
}
.pillars li:hover { background: var(--bg-3); }
.pillars .num { font: 500 0.72rem/1 var(--font-mono); letter-spacing: 0.18em; color: var(--accent); }
.pillars p { font-size: 0.98rem; line-height: 1.65; color: var(--muted); }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .pillars { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Contact ---------- */
.contact { overflow: hidden; text-align: center; }
/* grid floor + the glow coming up from downstairs */
.contact .contact-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 55% at 50% 108%, rgba(255, 138, 30, 0.2), rgba(255, 138, 30, 0) 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 50% 0 / 72px 72px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 50% 0 / 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 75% 80% at 50% 100%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 80% at 50% 100%, #000 10%, transparent 75%);
}

.contact-inner { display: grid; justify-items: center; gap: 1.5rem; }
.contact-inner .lead { max-width: 30em; }

.email-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.75rem 1.25rem; margin-top: 1rem; }
.email-link {
  font-size: clamp(1.3rem, 4.2vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  overflow-wrap: anywhere;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 2px no-repeat;
  padding-bottom: 0.15em;
  transition: color 0.25s, background-size 0.35s var(--ease-out);
}
.email-link:hover { color: var(--accent-ink); background-size: 100% 100%; }

.copy-btn {
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line-strong);
  font: 500 0.7rem/1 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}
.copy-btn:hover,
.copy-btn.is-copied { color: var(--accent); border-color: var(--accent); }

/* ---------- Socials ---------- */
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.socials a {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.25s var(--ease-out);
}
.socials svg { width: 20px; height: 20px; fill: currentColor; }
.socials a:hover {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
}
.contact .socials { margin-top: 1.75rem; }

.socials-label {
  margin-top: 2.5rem;
  font: 500 0.7rem/1 var(--font-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}
.socials-label + .socials { margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer {
  --section-bg: var(--bg-2);
  position: relative;
  padding: calc(var(--stairs-h) + 3.5rem) 0 2rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2.5rem;
}
.footer-brand img { height: 64px; width: auto; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }
.footer-nav a {
  font: 500 0.74rem/1 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--accent); }
.site-footer .socials a { width: 44px; height: 44px; }
.site-footer .socials svg { width: 17px; height: 17px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  font: 400 0.72rem/1.6 var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--dim);
}
.footer-bottom kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 0.05em 0.4em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 3px;
  font: inherit;
  text-align: center;
  color: var(--accent);
}
@media (hover: none) { .key-hint { display: none; } }

/* ---------- Floor indicator (home, wide screens) ---------- */
.floor-nav {
  position: fixed;
  top: 50%;
  right: 22px;
  z-index: 40;
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  transform: translateY(-50%);
}
.floor-nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 7px 0;
  font: 500 0.66rem/1 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  transition: color 0.25s;
}
.floor-nav .name { opacity: 0; transform: translateX(6px); transition: opacity 0.25s, transform 0.25s var(--ease-out); }
.floor-nav a::after {
  content: "";
  width: 14px;
  height: 2px;
  background: currentColor;
  transition: width 0.3s var(--ease-out);
}
.floor-nav a:hover { color: var(--text); }
.floor-nav a:hover .name,
.floor-nav a[aria-current] .name { opacity: 1; transform: none; }
.floor-nav a[aria-current] { color: var(--accent); }
.floor-nav a[aria-current]::after { width: 30px; }
@media (min-width: 1360px) { .floor-nav { display: flex; } }

/* ---------- Games page ---------- */
.page-hero {
  position: relative;
  isolation: isolate;
  padding: calc(var(--header-h) + clamp(3.5rem, 9vw, 7rem)) 0 calc(clamp(3rem, 7vw, 5rem) + var(--stairs-h));
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 50% 70% at 85% -10%, rgba(255, 138, 30, 0.16), rgba(255, 138, 30, 0) 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 50% 0 / 72px 72px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 50% 0 / 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 90% 100% at 70% 0%, #000 5%, transparent 72%);
  mask-image: radial-gradient(ellipse 90% 100% at 70% 0%, #000 5%, transparent 72%);
}
.page-hero .container { display: grid; gap: 1.5rem; }
.page-hero h1 { font-size: clamp(2.6rem, 6vw, 4.75rem); }

.games { --section-bg: var(--bg-2); padding-top: calc(clamp(2.5rem, 6vw, 4rem) + var(--stairs-h)); }

.game-art {
  position: relative;
  border: 1px solid var(--line);
  background: #07080a;
}
.game-art img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
/* scanlines: reads as "signal pending" rather than "broken image" */
.game-art .scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 4px);
}
.badge {
  position: absolute;
  top: clamp(0.8rem, 2vw, 1.4rem);
  left: clamp(0.8rem, 2vw, 1.4rem);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.6rem 0.85rem;
  background: rgba(10, 11, 13, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-strong);
  font: 500 0.68rem/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.art-tag {
  position: absolute;
  right: clamp(0.8rem, 2vw, 1.4rem);
  bottom: clamp(0.8rem, 2vw, 1.4rem);
  font: 500 0.64rem/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(236, 233, 227, 0.55);
}

.game-body {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  margin-top: clamp(2.25rem, 5vw, 3.5rem);
}
.game-copy { display: grid; gap: 1.25rem; justify-items: start; }
.game-copy h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); }
.game-copy p:not(.eyebrow) { color: var(--muted); max-width: 36em; }
.game-copy .hero-actions { margin-top: 0.75rem; --btn-fill: var(--bg-2); }

.dev-bar { padding: 1.1rem 1.4rem 1.3rem; border-top: 1px solid var(--line); }
.dev-bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.7rem;
  font: 500 0.68rem/1 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}
.dev-bar-track {
  position: relative;
  height: 8px;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 10px);
}
.dev-bar-track::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 10px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%, #000 60%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 40%, #000 60%, transparent);
  animation: sweep 2.8s steps(28) infinite;
}
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

.locked-slot {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: clamp(3rem, 7vw, 5rem);
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px dashed var(--line-strong);
  color: var(--dim);
}
.locked-slot svg { flex: none; width: 26px; height: 26px; }
.locked-slot strong {
  display: block;
  margin-bottom: 0.2rem;
  font: 500 0.72rem/1.4 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.locked-slot p { font-size: 0.98rem; line-height: 1.5; color: #848a93; }

@media (max-width: 900px) {
  .game-body { grid-template-columns: minmax(0, 1fr); }
  .art-tag { display: none; }
}
@media (max-width: 600px) {
  /* taller crop on phones so the camp doesn't shrink to a speck */
  .game-art img { aspect-ratio: 4 / 3; object-position: 50% 100%; }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
.no-js .hero-canvas { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .dev-bar-track::after { transform: translateX(75%); }
}
