@font-face {
  font-family: "Fredoka";
  src: url("fonts/fredoka-latin.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --night: #060a18;
  --night-2: #0b1430;
  --ink: #eef4ff;
  --muted: #9aa9c9;
  --faint: #5d6b8c;
  --ice: #9fd8ff;
  --aurora: #4ff0b4;
  --violet: #8d7bff;
  --gem: #ff5fae;
  --line: rgba(255, 255, 255, 0.09);
  --glass: rgba(255, 255, 255, 0.04);
  --radius: 22px;
  --display: "Fredoka", ui-rounded, "Segoe UI Rounded", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: rgba(79, 240, 180, 0.35); }

/* Film grain over everything, very faint, so the dark areas aren't flat. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { width: min(1160px, 100% - 48px); margin-inline: auto; }

/* --- Navigation ------------------------------------------------------- */

.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  translate: -50% 0;
  z-index: 50;
  width: min(1160px, 100% - 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 13, 32, 0.55);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  transition: background 0.3s;
}
.nav.scrolled { background: rgba(6, 10, 24, 0.82); }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 0 0 1px rgba(255,255,255,0.15); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--ink); background: rgba(255,255,255,0.06); }
.nav-links .pill {
  color: var(--night);
  background: var(--ink);
  font-weight: 600;
}
.nav-links .pill:hover { background: #fff; color: var(--night); }

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

.hero {
  position: relative;
  height: max(760px, 100svh);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 70% at 50% 0%, #142251 0%, #0a1230 45%, var(--night) 80%);
}
.stars, .snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.stars {
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 8%, #cfe4ff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 46% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 62% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 78% 26%, #dfeaff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 6%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 6% 34%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 36% 32%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 94% 38%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 54% 4%, #fff 50%, transparent 51%);
  background-size: 640px 520px;
  opacity: 0.75;
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { to { opacity: 0.45; } }

/* The aurora: soft blurred bands drifting across the sky. */
.aurora { position: absolute; inset: -10% -20% 40% -20%; filter: blur(60px); opacity: 0.8; z-index: 0; }
.aurora span {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
  animation: drift 18s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { left: 5%; top: 18%; width: 60%; height: 34%; background: rgba(79, 240, 180, 0.55); rotate: -8deg; }
.aurora span:nth-child(2) { left: 38%; top: 8%; width: 55%; height: 30%; background: rgba(141, 123, 255, 0.5); rotate: 6deg; animation-duration: 22s; animation-delay: -6s; }
.aurora span:nth-child(3) { left: 20%; top: 30%; width: 70%; height: 22%; background: rgba(64, 196, 255, 0.35); rotate: -3deg; animation-duration: 26s; animation-delay: -12s; }
@keyframes drift {
  from { transform: translate3d(-6%, 0, 0) scale(1); }
  to { transform: translate3d(8%, 6%, 0) scale(1.15); }
}

/* The game's own scrolling backdrops: strips that repeat sideways, sized by height, and
   slid along by site.js at different speeds so the glacier passes by as Henry rides. */
.layer {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  background-repeat: repeat-x;
  background-size: auto 100%;
  background-position: 0 100%;
  will-change: transform, background-position;
}
.layer.far { bottom: 9%; height: 46%; z-index: 1; background-image: url("glacier_far.webp"); filter: brightness(0.9); }
.layer.mid { bottom: 2%; height: 32%; z-index: 2; background-image: url("glacier_mid.webp"); filter: brightness(0.95); }
.layer.near { bottom: -6%; height: 30%; z-index: 4; background-image: url("glacier_near.webp"); }

.rider {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 5%;
  width: clamp(200px, 22vw, 340px);
  translate: -50% 0;
  animation: ride 2.6s ease-in-out infinite;
  filter: drop-shadow(0 18px 24px rgba(0, 10, 40, 0.35));
}
@keyframes ride {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

.hero-fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 26%;
  z-index: 5;
  background: linear-gradient(to bottom, rgba(6, 10, 24, 0) 0%, rgba(6, 10, 24, 0.75) 60%, var(--night) 100%);
}

.hero-copy {
  position: relative;
  z-index: 6;
  padding-top: clamp(118px, 16vh, 180px);
  text-align: center;
}
.hero-copy::before {
  content: "";
  position: absolute;
  inset: 8% 4% -18%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(6, 10, 24, 0.6), rgba(6, 10, 24, 0));
  pointer-events: none;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #d6e4ff;
  font-size: 14px;
}
.eyebrow b {
  padding: 2px 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--aurora), #6fd6ff);
  color: var(--night);
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.wordmark {
  margin: 22px 0 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(64px, 11vw, 148px);
  line-height: 0.92;
  letter-spacing: -1px;
  background: linear-gradient(180deg, #ffffff 30%, #bfe3ff 75%, #8fcaff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 30px rgba(120, 200, 255, 0.35));
}
.tagline {
  margin: 0 auto;
  max-width: 560px;
  color: #c9d6f2;
  font-size: clamp(17px, 1.6vw, 20px);
}
.actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--ink); color: var(--night); box-shadow: 0 8px 30px rgba(159, 216, 255, 0.25); }
.button.primary:hover { box-shadow: 0 10px 40px rgba(159, 216, 255, 0.4); }
.button.ghost { border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.05); color: var(--ink); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.button.ghost:hover { background: rgba(255, 255, 255, 0.1); }
.button svg { width: 18px; height: 18px; }

/* --- Sections ----------------------------------------------------------- */

section { position: relative; padding: 110px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.kicker {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--aurora), var(--ice));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.5px;
}
.section-head p { margin: 0; color: var(--muted); font-size: 18px; }

/* The gameplay clip, framed with an aurora-coloured glow. */
.screen {
  position: relative;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(140deg, rgba(79, 240, 180, 0.7), rgba(141, 123, 255, 0.5) 45%, rgba(255, 255, 255, 0.08) 75%);
  box-shadow: 0 40px 120px -30px rgba(79, 160, 255, 0.45), 0 0 0 1px rgba(255,255,255,0.04);
}
.screen::before {
  content: "";
  position: absolute;
  inset: 10% 6% -8%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(79, 240, 180, 0.28), transparent), radial-gradient(closest-side at 70% 40%, rgba(141, 123, 255, 0.3), transparent);
  filter: blur(40px);
}
.screen video, .screen img { width: 100%; height: auto; border-radius: calc(var(--radius) - 1px); background: #0b1430; aspect-ratio: 16 / 9; object-fit: cover; }
.gameplay .screen { max-width: 1040px; margin: 0 auto; }

/* Feature cards, glass with a glow that follows the pointer. */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  position: relative;
  padding: 28px;
  border: 1px solid rgba(79, 240, 180, 0.24);
  border-radius: var(--radius);
  background:
    radial-gradient(130% 100% at 0% 0%, rgba(79, 240, 180, 0.2), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  box-shadow: inset 0 1px 0 rgba(79, 240, 180, 0.2), 0 0 32px -12px rgba(79, 240, 180, 0.35);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s;
  background: radial-gradient(400px circle at var(--x, 50%) var(--y, 0%), rgba(120, 200, 255, 0.12), transparent 45%);
}
.card:hover { border-color: rgba(79, 240, 180, 0.4); transform: translateY(-3px); }
.card:hover::before { opacity: 1; }
.card h3 { margin: 18px 0 8px; font-family: var(--display); font-weight: 600; font-size: 23px; letter-spacing: 0.1px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(140deg, rgba(79, 240, 180, 0.22), rgba(141, 123, 255, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.icon svg { width: 24px; height: 24px; stroke: #dff4ff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Screenshot strip. */
.shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: 1040px;
  margin: 0 auto;
}
.shots figure { margin: 0; }
.shots figure:first-child { grid-column: 1 / -1; }
.shots .screen img { aspect-ratio: 16 / 10; }
.shots figcaption { margin-top: 12px; color: var(--faint); font-size: 14px; text-align: center; }

/* Riders. */
.riders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 56px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(141, 123, 255, 0.18), transparent 60%),
    radial-gradient(80% 120% at 0% 100%, rgba(79, 240, 180, 0.14), transparent 60%),
    rgba(255, 255, 255, 0.02);
  overflow: hidden;
}
.riders h2 { text-align: left; }
.riders p { color: var(--muted); margin: 0 0 14px; }
.riders .art { position: relative; height: 380px; }
.riders .art img { position: absolute; filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.45)); }
.riders .art .henry { width: 66%; right: 0; top: 0; animation: bob 5s ease-in-out infinite; }
.riders .art .murphy { width: 58%; left: 0; bottom: 0; animation: bob 5s ease-in-out -2.5s infinite; }
@keyframes bob { 50% { transform: translateY(-12px) rotate(-2deg); } }
.tag-gem { color: var(--gem); font-weight: 600; }

/* Closing call to action. */
.cta { text-align: center; }
.cta .stores { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.store {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
  min-width: 210px;
}
.store svg { width: 28px; height: 28px; fill: var(--ink); }
.store small { display: block; color: var(--muted); font-size: 12px; line-height: 1.2; }
.store span { font-weight: 600; font-size: 18px; line-height: 1.2; }
.cta-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(50% 60% at 50% 60%, rgba(79, 240, 180, 0.12), transparent 70%);
}

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

footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--faint); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { text-decoration: none; color: var(--muted); }
footer a:hover { color: var(--ink); }

/* --- Reveal on scroll ----------------------------------------------------- */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.shown { opacity: 1; transform: none; }

/* --- Document pages (privacy, delete account) ----------------------------- */

.doc-hero {
  padding: 170px 0 60px;
  text-align: center;
  background: radial-gradient(90% 100% at 50% 0%, #14234f 0%, var(--night) 70%);
}
.doc-hero h1 { margin: 0 0 10px; font-family: var(--display); font-weight: 600; font-size: clamp(40px, 6vw, 64px); line-height: 1.05; }
.doc-hero p { margin: 0; color: var(--muted); }
.doc-hero.full { min-height: 100svh; display: grid; place-items: center; padding: 40px 0; }
.doc { max-width: 760px; margin: 0 auto; padding: 20px 0 100px; }
.doc h2 { font-size: 28px; margin: 48px 0 12px; }
.doc h3 { font-family: var(--display); font-weight: 600; font-size: 20px; margin: 28px 0 8px; }
.doc p, .doc li { color: #c3cfe8; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc a { color: var(--ice); }
.doc .note {
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}
.doc .steps { counter-reset: step; list-style: none; padding: 0; }
.doc .steps li { position: relative; padding-left: 48px; margin: 16px 0; }
.doc .steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(140deg, rgba(79, 240, 180, 0.3), rgba(141, 123, 255, 0.3));
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
}

/* --- Small screens ------------------------------------------------------- */

@media (max-width: 900px) {
  .features { grid-template-columns: 1fr 1fr; }
  .shots { grid-template-columns: 1fr; }
  .riders { grid-template-columns: 1fr; padding: 36px 28px; }
  .riders .art { height: 300px; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  .nav { top: 12px; width: calc(100% - 20px); padding: 7px 7px 7px 9px; }
  .brand { gap: 8px; font-size: 17px; }
  .brand img { width: 30px; height: 30px; border-radius: 9px; }
  .nav-links a:not(.pill) { display: none; }
  .nav-links .pill { padding: 7px 13px; font-size: 14px; }
  section { padding: 80px 0; }
  .section-head { margin-bottom: 40px; }
  .features { gap: 12px; }
  .card { padding: 18px 16px; border-radius: 18px; }
  .card h3 { margin: 14px 0 6px; font-size: 18px; line-height: 1.2; }
  .card p { font-size: 14px; line-height: 1.5; }
  .icon { width: 40px; height: 40px; border-radius: 12px; }
  .icon svg { width: 21px; height: 21px; }
  footer .wrap { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 340px) {
  .brand { font-size: 15px; }
  .features { grid-template-columns: 1fr; }
}

/* Portrait screens: the glacier gets a band of its own along the bottom, sized by the
   screen width, and the copy sits in the space above it so the two never overlap. */
@media (max-aspect-ratio: 3/4) {
  .hero {
    --scene: clamp(240px, min(86vw, 100svh - 410px), 520px);
    height: auto;
    min-height: 100svh;
    padding: 0 0 calc(var(--scene) * 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .hero-copy { padding: 84px 0 12px; }
  .hero-copy::before { inset: 4% -8% -6%; }
  .eyebrow { font-size: 13px; white-space: nowrap; }
  .wordmark { margin: 16px 0 10px; font-size: clamp(56px, 16.5vw, 120px); }
  .tagline { font-size: 16px; max-width: 30em; }
  .actions { flex-wrap: nowrap; gap: 10px; margin-top: 22px; }
  .actions .button { padding: 11px 17px; font-size: 15px; gap: 8px; }
  .layer.far { bottom: calc(var(--scene) * 0.16); height: calc(var(--scene) * 0.84); }
  .layer.mid { bottom: calc(var(--scene) * 0.04); height: calc(var(--scene) * 0.58); }
  .layer.near { bottom: calc(var(--scene) * -0.11); height: calc(var(--scene) * 0.55); }
  .rider { bottom: calc(var(--scene) * 0.2); width: calc(var(--scene) * 0.68); }
  .hero-fade { height: calc(var(--scene) * 0.4); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
