:root {
  color-scheme: dark;
  --ink: #f8efd4;
  --muted: #cec3a5;
  --line: rgba(248, 239, 212, 0.18);
  --bg: #07110f;
  --panel: rgba(10, 26, 22, 0.82);
  --gold: #e9c34f;
  --gold-strong: #f3d66b;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
  --radius: 8px;
  --stage-width: 1152px;
  font-family:
    "Nunito", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    url("/images/background.png"),
    var(--bg);
  background-repeat: repeat, repeat, repeat;
  background-size: auto, 220px 382px, auto;
  color: var(--ink);
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(248, 239, 212, 0.12);
  background: rgba(5, 12, 10, 0.74);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: auto;
  height: clamp(36px, 4vw, 48px);
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.28));
}

.nav-links {
  gap: clamp(12px, 2vw, 22px);
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 750;
}

.nav-links a:hover {
  color: var(--ink);
}

.play-hero {
  position: relative;
  min-height: 100svh;
  overflow: clip;
  padding: 80px clamp(16px, 4vw, 56px) 28px;
}

.hero-image,
.hero-scrim {
  position: absolute;
  inset: 0;
}

.hero-image {
  background:
    linear-gradient(180deg, rgba(7, 17, 15, 0.6), rgba(7, 17, 15, 0.84)),
    url("/images/background.png"),
    #07110f;
  background-position: center, center;
  background-repeat: no-repeat, repeat;
  background-size: auto, 220px 382px;
}

.hero-scrim {
  background:
    radial-gradient(circle at 50% 42%, rgba(233, 195, 79, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(4, 11, 10, 0.08), rgba(4, 11, 10, 0.62));
}

.play-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: calc(100svh - 108px);
  align-items: center;
  justify-items: center;
}

.game-stage {
  position: relative;
  display: grid;
  width: min(var(--stage-width), calc(100vw - clamp(32px, 8vw, 112px)));
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(248, 239, 212, 0.16);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.game-stage[data-game-state="playing"] {
  background: #040807;
}

.game-teaser {
  display: grid;
  align-items: center;
  min-height: 100%;
  padding: clamp(24px, 5vw, 72px);
  background:
    url("/images/hero.png");
  background-position: center;
  background-size: cover;
}

.teaser-copy {
  max-width: 720px;
}

.hero-logo {
  display: block;
  width: min(100%, 560px);
  height: auto;
  margin-bottom: 22px;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.42));
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-kicker,
.hero-description {
  max-width: 650px;
  color: var(--ink);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.62);
}

.hero-kicker {
  margin-bottom: 10px;
  font-size: clamp(1.36rem, 2.8vw, 2rem);
  line-height: 1.18;
}

.hero-description {
  margin-bottom: 28px;
  font-size: clamp(1.08rem, 2vw, 1.34rem);
  line-height: 1.38;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold-strong);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  font-size: clamp(1.2rem, 2vw, 1.38rem);
  font-weight: 900;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--gold);
  color: #211707;
}

.button-secondary {
  border-color: var(--line);
  background: rgba(5, 12, 10, 0.52);
  color: var(--ink);
}

.game-shell {
  display: grid;
  min-height: 100%;
  background: #040807;
}

.game-frame-wrap {
  position: relative;
  min-height: 100%;
  background: #050807;
}

.game-frame-wrap:fullscreen {
  width: 100vw;
  height: 100vh;
  background: #000;
}

.game-frame-wrap:fullscreen iframe {
  height: 100vh;
  min-height: 100vh;
}

iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.fullscreen-button {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 4;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(248, 239, 212, 0.24);
  border-radius: var(--radius);
  background: rgba(5, 12, 10, 0.72);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 900;
}

.game-fallback {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-content: center;
  padding: 28px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(7, 17, 15, 0.88), rgba(7, 17, 15, 0.96)),
    var(--bg);
}

code {
  color: var(--gold);
}

.info-section,
.updates-section {
  padding: 88px clamp(20px, 6vw, 96px);
}

.info-section {
  background: rgba(9, 31, 27, 0.62);
}

.section-copy {
  max-width: 850px;
}

.section-copy p {
  color: var(--muted);
  font-size: 1.1rem;
}

.updates-section {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 0.72fr);
  align-items: start;
  gap: clamp(24px, 5vw, 56px);
}

.thanks-main {
  min-height: 100svh;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 104px clamp(18px, 6vw, 96px) 48px;
}

.thanks-panel {
  width: min(100%, 860px);
  padding: 56px;
  border: 1px solid rgba(248, 239, 212, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(4, 11, 10, 0.86), rgba(4, 11, 10, 0.5) 56%, rgba(4, 11, 10, 0.76)),
    linear-gradient(180deg, rgba(4, 11, 10, 0.12), rgba(4, 11, 10, 0.84)),
    url("/images/hero.png"),
    #07110f;
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.thanks-logo {
  display: block;
  width: 460px;
  max-width: 100%;
  height: auto;
  margin-bottom: 28px;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.42));
}

.thanks-panel h1 {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  margin-bottom: 18px;
  font-size: 72px;
  line-height: 0.98;
  white-space: normal;
}

.thanks-panel p {
  max-width: 640px;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.4;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.62);
}

.thanks-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.signup-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  padding: 22px;
}

.kit-embed {
  min-height: 90px;
}

.kit-embed .formkit-form {
  max-width: none !important;
}

.kit-embed .formkit-fields {
  gap: 12px;
}

.kit-embed .formkit-field,
.kit-embed .formkit-submit {
  margin: 0 !important;
}

.kit-embed .formkit-input {
  min-height: 48px !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
}

.kit-embed .formkit-submit {
  min-height: 48px !important;
  border-radius: var(--radius) !important;
  background: var(--gold) !important;
  color: #211707 !important;
  font-weight: 900 !important;
}

.kit-embed .formkit-submit > span {
  padding: 12px 18px !important;
}

.kit-embed .formkit-powered-by-convertkit-container {
  margin-top: 10px !important;
}

.form-message {
  min-height: 24px;
  margin-bottom: 0;
  color: var(--muted);
}

button:focus-visible,
a:focus-visible,
input:focus {
  outline: 3px solid rgba(233, 195, 79, 0.82);
  outline-offset: 3px;
}

@media (max-width: 880px) {
  :root {
    --stage-width: 768px;
  }

  .updates-section {
    grid-template-columns: 1fr;
  }

  .play-hero {
    padding-top: 84px;
  }

  .game-stage {
    width: min(var(--stage-width), calc(100vw - 32px));
  }
}

@media (min-width: 881px) and (max-width: 1040px) {
  :root {
    --stage-width: 864px;
  }
}

@media (min-width: 1041px) and (max-width: 1240px) {
  :root {
    --stage-width: 960px;
  }
}

@media (max-width: 640px) {
  :root {
    --stage-width: 390px;
  }

  .site-header {
    position: absolute;
    align-items: flex-start;
    flex-direction: column;
    min-height: 84px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .play-hero {
    padding: 104px 12px 18px;
  }

  .game-teaser {
    padding: 22px;
  }

  .game-stage {
    aspect-ratio: auto;
    min-height: calc(100svh - 128px);
  }

  .game-stage[data-game-state="playing"] {
    aspect-ratio: 16 / 9;
    min-height: auto;
  }

  .hero-logo {
    width: min(100%, 410px);
  }

  .hero-kicker {
    font-size: 1.32rem;
  }

  .hero-description {
    font-size: 1.08rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-links a {
    white-space: nowrap;
  }

  .button {
    width: 100%;
  }

  .game-frame-wrap,
  iframe {
    min-height: 100%;
  }

  .fullscreen-button {
    right: 10px;
    top: 10px;
  }

  .info-section,
  .updates-section,
  .thanks-main {
    padding-top: 62px;
    padding-bottom: 62px;
  }

  .thanks-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .thanks-panel {
    padding: 28px;
  }

  .thanks-panel h1 {
    font-size: 42px;
  }

  .thanks-panel p {
    font-size: 18px;
  }
}
