/* Gamestairs website. One stylesheet, no framework. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #070a16;
  --ink: #eef0fa;
  --ink-2: #b3bad2;
  --ink-3: #7f88a8;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.065);
  --step-1: #5262c9;
  --step-2: #97a6f3;
  --step-3: #e9edff;
  --warm: #f4b183;
  --warm-2: #ffe3c4;
  --radius: 20px;
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: clamp(16px, 0.3vw + 15px, 18px);
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Night sky behind everything, plus a little film grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1100px 650px at 88% -8%, rgba(244, 177, 131, 0.14), transparent 62%),
    radial-gradient(900px 700px at -12% 30%, rgba(82, 98, 201, 0.2), transparent 62%),
    radial-gradient(800px 600px at 60% 112%, rgba(151, 166, 243, 0.1), transparent 60%),
    linear-gradient(180deg, #070a16 0%, #0a0f22 55%, #070a16 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

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

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--warm);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 100;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
}
.skip:focus { left: 16px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Type */
h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 560;
  font-variation-settings: "SOFT" 100, "WONK" 0;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.08;
  text-wrap: balance;
}
h1 { font-size: clamp(2.35rem, 3.4vw + 1.25rem, 4.3rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.9rem, 2.2vw + 1.1rem, 3rem); letter-spacing: -0.02em; }
h3 { font-size: 1.4rem; }

.eyebrow {
  margin: 0 0 1.1rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--step-2);
}

.glow-text {
  background: linear-gradient(95deg, var(--step-3) 0%, var(--warm-2) 55%, var(--warm) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 10, 22, 0.55);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  background: rgba(7, 10, 22, 0.72);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
}
.brand img { width: 34px; height: 34px; }
.brand-word {
  font-family: var(--serif);
  font-size: 1.42rem;
  font-weight: 600;
  font-variation-settings: "SOFT" 100, "WONK" 0;
  letter-spacing: -0.025em;
  line-height: 1;
}
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.94rem;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav .nav-cta { color: var(--ink); border: 1px solid var(--line-2); margin-left: 6px; }
@media (max-width: 640px) {
  .nav a:not(.nav-cta) { display: none; }
}

/* Hero */
.hero {
  display: grid;
  align-items: center;
  gap: 8px;
  padding-block: 8px clamp(64px, 9vw, 112px);
}
.hero-art {
  order: -1;
  position: relative;
  width: min(100%, 360px);
  margin-inline: auto;
}
.hero-art svg { width: 100%; height: auto; overflow: visible; }
.lede {
  max-width: 36ch;
  margin: 1.4rem 0 2.1rem;
  font-size: clamp(1.06rem, 0.45vw + 1rem, 1.24rem);
  color: var(--ink-2);
}
.lede strong { color: var(--ink); font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.08fr 1fr;
    gap: 40px;
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100svh - var(--header-h));
    padding-block: 24px 72px;
  }
  .hero-art { order: 0; width: 100%; margin: 0; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary {
  color: #24160a;
  background: linear-gradient(180deg, var(--warm-2), var(--warm));
  box-shadow: 0 10px 34px -10px rgba(244, 177, 131, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 44px -12px rgba(244, 177, 131, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn-ghost {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-2px); }
.btn-ghost svg { fill: currentColor; }

/* Hero illustration: floating steps toward the light */
.slab {
  transform-box: fill-box;
  animation: drift 10s ease-in-out infinite;
  animation-delay: calc(var(--i) * -1.7s);
}
@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.halo {
  transform-box: fill-box;
  transform-origin: center;
  animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.07); }
}
.star { animation: twinkle 7s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes twinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.85; }
}

.motes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 18%, #000 65%, transparent 100%);
  mask-image: linear-gradient(to top, transparent 0%, #000 18%, #000 65%, transparent 100%);
}
.mote {
  position: absolute;
  bottom: -8px;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 10px var(--c);
  opacity: 0;
  animation: rise var(--t) linear infinite;
  animation-delay: var(--d);
}
@keyframes rise {
  0% { transform: translate(0, 0); opacity: 0; }
  15% { opacity: 0.85; }
  80% { opacity: 0.5; }
  100% { transform: translate(var(--dx), -560px); opacity: 0; }
}

/* Load-in for the hero text */
.rise-in {
  animation: rise-in 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: var(--delay, 0s);
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* Sections */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-head { max-width: 680px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p:not(.eyebrow) { margin: 1rem 0 0; font-size: 1.08rem; }

/* Reveal on scroll (only when JavaScript runs) */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--delay, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

/* What we do */
.cards { display: grid; gap: clamp(16px, 2.4vw, 28px); }
@media (min-width: 760px) { .cards { grid-template-columns: 1fr 1fr; } }
.card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(26px, 3.6vw, 44px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -40% -30% auto auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  opacity: 0.45;
}
.card-games { --glow: rgba(82, 98, 201, 0.55); }
.card-video { --glow: rgba(244, 177, 131, 0.4); }
.card-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 1.6rem;
  border-radius: 15px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--ink);
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { font-size: clamp(1.6rem, 1vw + 1.25rem, 2.1rem); margin-bottom: 0.7rem; }
.card p { margin: 0 0 1.6rem; max-width: 40ch; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: 0.88rem;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.2s ease;
}
a.chip:hover { background: var(--surface-2); }
.chip svg { width: 15px; height: 15px; fill: currentColor; }
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warm);
  animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(244, 177, 131, 0.6); }
  70%, 100% { box-shadow: 0 0 0 10px rgba(244, 177, 131, 0); }
}

/* Our steps: a timeline laid out as a staircase */
.stairs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.stair {
  position: relative;
  overflow: hidden;
  padding: 30px 28px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
}
.stair::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: var(--tread);
  box-shadow: 0 0 28px 2px var(--tread);
}
.stair:nth-child(1) { --tread: var(--step-1); }
.stair:nth-child(2) { --tread: var(--step-2); }
.stair:nth-child(3) { --tread: var(--step-3); }
.stair-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1rem;
}
.stair-when {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
}
.badge svg { width: 12px; height: 12px; }
.stair.now .badge { color: var(--warm-2); border-color: rgba(244, 177, 131, 0.4); }
.stair h3 { font-size: 1.55rem; margin-bottom: 0.4rem; }
.stair p { margin: 0; }
.stair.next { background: transparent; border-style: dashed; border-color: var(--line-2); }
.stair.next::before { opacity: 0.35; box-shadow: none; }
@media (min-width: 860px) {
  .stairs { grid-template-columns: repeat(3, 1fr); align-items: start; gap: 20px; }
  .stair:nth-child(1) { margin-top: 120px; }
  .stair:nth-child(2) { margin-top: 60px; }
}

/* Contact */
.contact-card {
  position: relative;
  overflow: hidden;
  padding: clamp(44px, 7vw, 92px) clamp(20px, 5vw, 64px);
  border-radius: 28px;
  border: 1px solid var(--line);
  text-align: center;
  background:
    radial-gradient(640px 320px at 50% 0%, rgba(244, 177, 131, 0.15), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
}
.contact-card .orb {
  width: 58px;
  height: 58px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff1dc, #f4a877);
  box-shadow: 0 0 70px 14px rgba(244, 177, 131, 0.3);
  animation: breathe 9s ease-in-out infinite;
}
.contact-card p { max-width: 44ch; margin: 1rem auto 0; font-size: 1.08rem; }
.email {
  display: inline-block;
  margin: 1.6rem 0 2.2rem;
  padding-bottom: 0.12em;
  font-family: var(--serif);
  font-weight: 500;
  font-variation-settings: "SOFT" 100, "WONK" 0;
  font-size: clamp(1.45rem, 2.8vw + 0.7rem, 2.6rem);
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 177, 131, 0.45);
  overflow-wrap: anywhere;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.email:hover { color: var(--warm-2); border-bottom-color: var(--warm); }
.socials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}
.socials a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: 0.93rem;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}
.socials a:hover { color: var(--ink); background: var(--surface-2); }
.socials svg { width: 16px; height: 16px; fill: currentColor; }

/* Footer */
.site-footer {
  margin-top: clamp(40px, 6vw, 72px);
  padding-block: 32px 40px;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--ink-3);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.footer-brand { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--ink-2); text-decoration: none; }
.footer-brand img { width: 24px; height: 24px; }
.footer-brand span { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; letter-spacing: -0.02em; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* Text pages (privacy, 404) */
.prose { max-width: 68ch; padding-block: clamp(48px, 8vw, 104px) clamp(32px, 5vw, 64px); }
.prose h1 { font-size: clamp(2.3rem, 3vw + 1.2rem, 3.6rem); margin-bottom: 0.6rem; }
.prose h2 { font-size: 1.45rem; margin: 2.6rem 0 0.7rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4rem; }
.prose a { color: var(--ink); text-decoration-color: rgba(244, 177, 131, 0.6); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--warm); }
.updated { color: var(--ink-3); font-size: 0.92rem; margin: 0; }

.lost {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: calc(100vh - var(--header-h) - 160px);
  padding-block: 64px;
}
.lost img { width: 88px; height: 88px; margin: 0 auto 28px; opacity: 0.9; }
.lost p { margin: 1rem auto 2rem; max-width: 36ch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
  .motes { display: none; }
}
