@font-face { font-family: "Greenbelt"; src: url("../assets/fonts/Greenbelt-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Greenbelt"; src: url("../assets/fonts/Greenbelt-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Greenbelt"; src: url("../assets/fonts/Greenbelt-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

/* The capsule's studio grey, the logo's slate ink, the game's marker amber. */
:root {
  --paper: #d3d5da;
  --paper-2: #e4e5e8;
  --paper-3: #eef0f2;
  --ink: #23262d;
  --ink-2: #474b55;
  --muted: #6f7480;
  --line: rgba(35, 38, 45, 0.07);
  --line-2: rgba(35, 38, 45, 0.14);
  --night: #14171d;
  --accent: #e8962a;
  --accent-hi: #f3a63e;
  --accent-ink: #1e1407;
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 48px);
  --font: "Greenbelt", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background-color: var(--paper-2);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 100px 100px;
  background-position: center top;
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2 { font-weight: 600; letter-spacing: 0.01em; line-height: 1.08; margin: 0; }
h2 { font-size: clamp(32px, 5vw, 64px); }
p { margin: 0; }
.wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Header */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  transition: background-color 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.bar.solid {
  background: rgba(228, 229, 232, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line-2);
}
/* Over the night hero, before the bar turns solid. */
.night .bar:not(.solid) { color: #e7e9ee; }
.night .bar:not(.solid) .nav a:not(.btn) { color: #c4c9d2; }
.night .bar:not(.solid) .studio img { filter: invert(1); }
.night .bar:not(.solid) .btn-small { background: var(--accent); color: var(--accent-ink); }
.studio { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: 0.18em; font-size: 14px; }
.studio img { width: 36px; height: 36px; }
.nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 28px); font-size: 15px; }
.nav a:not(.btn) { text-decoration: none; color: var(--ink-2); }
.nav a:not(.btn):hover { color: var(--ink); }
@media (max-width: 640px) { .nav a:not(.btn) { display: none; } .studio span { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 16px/1 var(--font); letter-spacing: 0.02em; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s, background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn svg { width: 20px; height: 20px; }
.btn:active { transform: translateY(1px); }
.btn-steam { background: var(--ink); color: #f4f5f7; }
.btn-steam:hover { background: #343944; }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: rgba(255, 255, 255, 0.45); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 14px; background: var(--ink); color: #f4f5f7; }
.btn-small:hover { background: #343944; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Hero */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  display: grid; align-items: center;
  background: #c5c7cc; /* the capsule render's grey; the lit 3D floor matches it */
  transition: background-color 1.2s;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(85% 80% at 62% 45%, #2b3346 0%, #171b26 60%, #0e1118 100%);
  opacity: 0; transition: opacity 1.4s ease;
}
.hero.night::after { opacity: 1; }
.hero-scene { position: absolute; inset: 0; z-index: 1; }
/* Only shown where neither WebGPU nor WebGL 2 is available. */
.hero-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (min-aspect-ratio: 11/10) { .hero-poster { transform: translateX(14%); } }
#hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  touch-action: pan-y; cursor: grab; opacity: 0; transition: opacity 1.2s ease; outline: none;
}
#hero-canvas.ready { opacity: 1; }
#hero-canvas.dragging { cursor: grabbing; }
.no-gpu #hero-canvas { display: none; }
/* Loading: a slim bar where the model will appear (right of the copy on
   wide screens, above it on narrow ones). */
.hero-load {
  position: absolute; left: 66%; top: 52%; width: min(260px, 30vw); height: 2px; transform: translate(-50%, -50%);
  border-radius: 2px; background: rgba(35, 38, 45, 0.14); overflow: hidden; transition: opacity 0.5s;
}
.hero-load i { position: absolute; inset: 0; background: var(--ink); transform: scaleX(var(--p, 0.02)); transform-origin: left; transition: transform 0.3s ease-out; }
.hero.live .hero-load, .no-gpu .hero-load { opacity: 0; }

.hero-copy {
  position: relative; z-index: 3; pointer-events: none;
  padding: 96px var(--gutter) 120px;
  max-width: 600px;
  transition: color 1.2s;
}
.hero-copy > * { pointer-events: auto; }
.logo img { width: min(440px, 78vw); height: auto; transition: filter 1.2s; }
.hero .lede { margin-top: 26px; font-size: clamp(18px, 1.6vw, 22px); color: var(--ink-2); max-width: 30ch; transition: color 1.2s; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero.night .logo img { filter: invert(1) hue-rotate(180deg) brightness(1.15); }
.hero.night .lede { color: #c4c9d2; }
.hero.night .btn-ghost { color: #f4f5f7; border-color: rgba(255, 255, 255, 0.3); background: rgba(20, 23, 29, 0.4); }
.hero.night .btn-steam { background: var(--accent); color: var(--accent-ink); }

.hero-hud {
  position: absolute; z-index: 3; right: var(--gutter); bottom: clamp(24px, 5vh, 48px);
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
  pointer-events: none;
}
.hero-hud > * { pointer-events: auto; }
.hero-tools { display: flex; align-items: center; gap: 10px; }
.chip {
  height: 40px; border-radius: 999px; background: rgba(244, 245, 247, 0.72); border: 1px solid var(--line-2);
  color: var(--ink-2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.hint { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; font-size: 14px; }
.glyph { width: 14px; height: 20px; }
.icon-btn { width: 40px; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.icon-btn:hover { border-color: var(--ink-2); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .moon, .icon-btn[aria-pressed="true"] .sun { display: none; }
.icon-btn[aria-pressed="true"] .moon { display: block; }
/* The spin hint shows a mouse, or on touch screens a finger swiping. */
.hint .touch { display: none; }
@media (pointer: coarse) { .hint .mouse { display: none; } .hint .touch { display: block; width: 20px; height: 20px; } }
.hero.night .chip { background: rgba(20, 23, 29, 0.6); color: #c4c9d2; border-color: rgba(255, 255, 255, 0.12); }
.hero.night .icon-btn { color: #f4f5f7; }
.scroll-cue {
  position: absolute; z-index: 3; left: 50%; bottom: 18px; transform: translateX(-50%);
  width: 36px; height: 36px; color: var(--ink-2); animation: bob 2.4s ease-in-out infinite;
}
.hero.night .scroll-cue { color: #c4c9d2; }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue { animation: none; } }

@media (max-width: 820px) {
  .hero { align-items: end; }
  .hero-copy { padding-bottom: 88px; }
  .hero-poster { object-position: 60% 30%; transform: translateY(-14%); }
  .hero-load { left: 50%; top: 32%; width: 50vw; }
  .hero-hud { bottom: auto; top: 72px; }
  /* Phones: the buttons share a row, so the city keeps more of the height. */
  .hero .lede { margin-top: 16px; }
  .cta { margin-top: 20px; }
}
/* Short phones: a smaller logo and tighter copy, so the city isn't squeezed. */
@media (max-width: 820px) and (max-height: 800px) {
  .logo img { width: min(300px, 64vw); }
  .hero-copy { padding-bottom: 64px; }
  .cta .btn { padding-top: 11px; padding-bottom: 11px; }
}


/* Scroll tour */
.tour { position: relative; height: 420vh; color: #f4f5f7; }
.tour-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--night); }
.shots { position: absolute; inset: 0; }
.shot { position: absolute; inset: -12%; margin: 0; opacity: 0; will-change: transform, opacity; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot[data-shot="0"] { opacity: 1; }
.shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(14, 17, 22, 0.86) 0%, rgba(14, 17, 22, 0.5) 34%, rgba(14, 17, 22, 0) 62%),
    linear-gradient(0deg, rgba(14, 17, 22, 0.5), transparent 30%),
    linear-gradient(180deg, rgba(14, 17, 22, 0.55), transparent 22%);
}
.tour-copy { position: absolute; inset: 0; display: grid; align-items: center; padding: 0 var(--gutter); pointer-events: none; }
.panel { grid-area: 1 / 1; max-width: 560px; opacity: 0; transform: translateY(24px); will-change: transform, opacity; }
.panel[data-panel="0"] { opacity: 1; transform: none; }
.panel h2 { text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5); }
.panel > p { margin-top: 20px; font-size: clamp(17px, 1.4vw, 20px); color: #c4c9d2; max-width: 44ch; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7); }
.tour-rail { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); display: grid; gap: 10px; }
.tour-rail i { display: block; width: 3px; height: 44px; border-radius: 3px; background: rgba(255, 255, 255, 0.18); overflow: hidden; position: relative; }
.tour-rail i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleY(var(--p, 0)); transform-origin: top; }
@media (max-width: 820px) {
  .tour-copy { align-items: end; padding-bottom: 72px; }
  .shade { background: linear-gradient(0deg, rgba(14, 17, 22, 0.92) 0%, rgba(14, 17, 22, 0.6) 45%, rgba(14, 17, 22, 0.1) 75%), linear-gradient(180deg, rgba(14, 17, 22, 0.55), transparent 20%); }
  .tour-rail { top: auto; bottom: 24px; right: 50%; transform: translateX(50%); grid-auto-flow: column; }
  .tour-rail i { width: 44px; height: 3px; }
  .tour-rail i::after { transform: scaleX(var(--p, 0)); transform-origin: left; }
}

/* Sections */
.section { padding: clamp(88px, 14vh, 150px) 0; position: relative; }
.section h2 { margin-bottom: 36px; }
.frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, #2a2f39, #1a1e25); border: 1px solid var(--line-2);
  box-shadow: 0 40px 90px -40px rgba(20, 23, 29, 0.55);
}
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.frame-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; color: #9aa1ad; }
.frame-empty svg { width: 76px; height: 76px; padding: 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.2); color: #f4f5f7; }
.frame-poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer; background: #000 center / cover no-repeat; display: grid; place-items: center; }
.frame-poster svg { width: 84px; height: 84px; padding: 22px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); transition: transform 0.2s; }
.frame-poster:hover svg { transform: scale(1.06); }

.wishlist { background: linear-gradient(180deg, transparent, rgba(232, 150, 42, 0.08) 60%, transparent); }
.wishlist-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.wishlist h2 { margin-bottom: 16px; }
.wishlist .lede { color: var(--ink-2); font-size: 19px; margin-bottom: 28px; max-width: 34ch; }
.steam-widget { width: 100%; max-width: 646px; justify-self: end; }
.steam-widget iframe { display: block; width: 100%; height: 190px; border: 0; border-radius: 6px; }
.steam-empty {
  display: flex; align-items: center; gap: 18px; padding: 22px; min-height: 190px; border-radius: var(--radius);
  background: linear-gradient(135deg, #1b2838, #2a475e); color: #f4f5f7;
  box-shadow: 0 30px 70px -36px rgba(20, 23, 29, 0.6);
}
.steam-empty img { border-radius: 12px; background: #e9eaec; padding: 6px; }
.steam-empty b { display: block; font-size: 24px; }
.steam-empty span { color: #8fa3b8; }
@media (max-width: 820px) { .wishlist-grid { grid-template-columns: 1fr; } .steam-widget { justify-self: stretch; } }

/* Footer */
.foot { border-top: 1px solid var(--line-2); padding: 36px 0 44px; color: var(--muted); font-size: 14px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.foot .studio { color: var(--ink-2); }
.foot .studio img { width: 28px; height: 28px; }
.foot-mark { height: 40px; width: auto; opacity: 0.85; }

/* ?capsule: compare against the Blender render */
.capsule .hero-copy, .capsule .hero-hud, .capsule .bar, .capsule .scroll-cue { display: none; }

/* Phones held sideways: copy at the left, compact, the city beside it. */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { align-items: center; }
  .hero-copy { padding: 64px var(--gutter) 24px; max-width: 42vw; }
  .logo img { width: min(240px, 32vw); }
  .hero .lede { margin-top: 10px; font-size: 15px; }
  .cta { margin-top: 14px; gap: 8px; }
  .cta .btn { padding-top: 9px; padding-bottom: 9px; font-size: 14px; }
  .hero-hud { top: auto; bottom: 14px; }
  .scroll-cue { display: none; }
}

