/* The Genesis Spark — original styles. Not derived from any other game site. */
:root {
  --bg: #07080c;
  --bg-raised: #0c1018;
  --bg-card: #10151f;
  --text: #ece8df;
  --text-soft: #c4bfb4;
  --text-dim: #8f8a80;
  --gold: #d4a85a;
  --gold-soft: #e8c48a;
  --gold-dim: #8a6d35;
  --blue: #8eb4c8;
  --blue-dim: #4d6d82;
  --line: rgba(236, 232, 223, 0.12);
  --line-strong: rgba(236, 232, 223, 0.22);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --font-display: "Cormorant Garamond", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", sans-serif;
  --nav-h: 4.25rem;
  --max: 72rem;
  --content: 42rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@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;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, video { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-soft); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--text); }
:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--gold);
  color: var(--bg);
  padding: 0.6rem 1rem;
  font-weight: 600;
}
.skip:focus { top: 1rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
  background: rgba(7, 8, 12, 0.55);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.nav.is-scrolled {
  background: rgba(7, 8, 12, 0.88);
  border-bottom-color: var(--line);
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.logo img { width: 1.7rem; height: 1.7rem; }
.logo:hover { color: var(--gold-soft); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-links a:hover { color: var(--gold-soft); }

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 1.25rem;
  height: 1.5px;
  background: currentColor;
  position: relative;
  margin: 0 auto;
  transition: transform 0.25s var(--ease);
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0 1rem;
    background: rgba(7, 8, 12, 0.96);
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open .nav-links { display: flex; }
  .nav-links a {
    display: block;
    padding: 0.9rem 1.5rem;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(100vh, 58rem);
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--text);
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
@media (min-width: 801px) {
  .hero-media { overflow: hidden; }
  .hero-media img {
    transform: scale(1.15) translate(20%, 1%);
    transform-origin: center center;
  }
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 8, 12, 0.22) 0%, rgba(7, 8, 12, 0.08) 38%, rgba(7, 8, 12, 0.7) 78%, var(--bg) 100%),
    linear-gradient(90deg, rgba(7, 8, 12, 0.9) 0%, rgba(7, 8, 12, 0.62) 26%, rgba(7, 8, 12, 0.18) 48%, rgba(7, 8, 12, 0.05) 62%, rgba(7, 8, 12, 0.12) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 0 0 5.5rem;
  padding-bottom: max(5.5rem, calc(2rem + env(safe-area-inset-bottom)));
}
.kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 1.1rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.8rem, 7.4vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  margin: 0 0 0.8rem;
}
.hero .tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  font-weight: 400;
  color: var(--text-soft);
  margin: 0 0 1.25rem;
  max-width: 22rem;
}
.hero .lead {
  max-width: 38rem;
  color: var(--text-soft);
  margin: 0 0 2rem;
  font-size: 1.08rem;
}
.hero-inner h1,
.hero-inner .tagline,
.hero-inner .lead,
.hero-inner .kicker { max-width: 36rem; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.65rem 1.35rem;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn-primary {
  background: var(--gold);
  color: #16120a;
  border-color: var(--gold);
}
.btn-primary:hover { background: var(--gold-soft); color: #16120a; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--gold-soft); color: var(--gold-soft); }

/* ---------- Sections ---------- */
.section {
  padding: 5.5rem 0;
}
.section-inner {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
}
.section-head {
  max-width: 40rem;
  margin-bottom: 2.75rem;
}
.section-head h2,
.about-copy h2,
.feature-copy h2,
.devlog-card h3,
.community h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3.15rem);
  line-height: 1.1;
  margin: 0 0 0.8rem;
  letter-spacing: 0.01em;
}
.section-head p { margin: 0; color: var(--text-soft); }

.about {
  border-top: 1px solid var(--line);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.about-copy p { color: var(--text-soft); margin: 0 0 1.1rem; }
.about-copy p:last-child { margin-bottom: 0; }
.about-media {
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
}
.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
.note {
  font-size: 0.95rem;
  color: var(--text-dim);
  border-left: 2px solid var(--gold-dim);
  padding-left: 1rem;
  margin-top: 1.5rem !important;
}

@media (max-width: 800px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* Features */
.features { padding-top: 2rem; }
.feature {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0;
  min-height: 28rem;
  background: var(--bg-raised);
  margin: 0 0 1.15rem;
  overflow: hidden;
}
.feature:nth-of-type(even) { grid-template-columns: 0.85fr 1.15fr; }
.feature:nth-of-type(even) .feature-copy { order: -1; }
.feature-media { min-height: 22rem; background: #000; }
.feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
}
.feature-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 2.75rem;
}
.feature-copy p { color: var(--text-soft); margin: 0; }
.feature-copy h2 { margin-bottom: 0.9rem; }

@media (max-width: 860px) {
  .feature,
  .feature:nth-of-type(even) {
    grid-template-columns: 1fr;
  }
  .feature:nth-of-type(even) .feature-copy { order: 0; }
  .feature-copy { padding: 2rem 1.4rem 2.4rem; }
  .feature-media { min-height: 16rem; }
}

/* Devlog */
.devlog { background: var(--bg); border-top: 1px solid var(--line); }
.devlog-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(1.6rem, 3vw, 2.6rem);
  max-width: 46rem;
}
.devlog-meta {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 0.7rem;
}
.devlog-card p { color: var(--text-soft); margin: 0 0 1rem; }
.devlog-card p:last-child { margin-bottom: 0; }


/* Film */
.film {
  margin: 0 0 1.6rem;
  background: #000;
  border-radius: 3px;
  overflow: hidden;
}
.film video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #000;
}
.film figcaption {
  margin: 0;
  padding: 0.95rem 1.05rem 1.15rem;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.55;
  background: var(--bg-card);
  border-top: 1px solid var(--line);
}

/* Gallery */
.media { border-top: 1px solid var(--line); }
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
}
@media (min-width: 720px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
}
.gallery button {
  margin: 0;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
  overflow: hidden;
  border-radius: 3px;
  position: relative;
  display: block;
  width: 100%;
}
.gallery picture { display: block; width: 100%; }
.gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.6s var(--ease);
}
.gallery button:hover img,
.gallery button:focus-visible img {
  transform: scale(1.04);
  filter: brightness(1.08);
}
.gallery-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2rem 0.8rem 0.7rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: var(--text);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-align: left;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.gallery button:hover .gallery-caption,
.gallery button:focus-visible .gallery-caption { opacity: 1; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: min(1200px, 100%);
  max-height: calc(100vh - 6rem);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: var(--shadow);
}
.lightbox-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-caption {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* Community */
.community { border-top: 1px solid var(--line); }
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.75rem;
}
.social {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.85rem;
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.social:hover { border-color: var(--gold-soft); color: var(--gold-soft); }
.social svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }
.todo-note {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 2.2rem 0 3rem;
  padding-bottom: max(3rem, calc(1.5rem + env(safe-area-inset-bottom)));
  color: var(--text-dim);
  font-size: 0.88rem;
}
.footer-inner {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.footer a { color: var(--text-dim); text-decoration: none; }
.footer a:hover { color: var(--gold-soft); }

/* 404 */
.page-404 {
  min-height: calc(100svh - var(--nav-h) - 7rem);
  display: flex;
  align-items: center;
}
.page-404 .section-inner { max-width: 36rem; padding: 4rem 0; }
.page-404 h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin: 0 0 0.8rem;
}


/* Hero text sits in a left-hand shade so it stays readable over the globe */
.hero-inner {
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

@media (max-width: 800px) {
  .hero {
    min-height: 0;
    display: block;
  }
  .hero-media {
    position: relative;
    height: 58vw;
    min-height: 15.5rem;
    max-height: 22rem;
  }
  .hero-media img { object-position: 55% 45%; }
  .hero-media::after {
    background: linear-gradient(180deg, rgba(7, 8, 12, 0.08) 40%, var(--bg) 100%);
  }
  .hero-inner {
    padding: 0.4rem 0 3rem;
    width: min(var(--max), calc(100% - 2rem));
  }
  .hero .lead { font-size: 1rem; }
  .kicker { letter-spacing: 0.1em; font-size: 0.68rem; }
  .nav-links {
    background: #07080c;
    z-index: 60;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  }
}

.page-404 .section-inner { margin-left: auto; margin-right: auto; }
