:root {
  --bg: #171310;
  --bg-raised: #1f1a15;
  --bg-card: #231d17;
  --text: #f1ece3;
  --text-dim: #b9ad9d;
  --amber: #e8a33d;
  --amber-bright: #f5b94f;
  --green: #8bb84a;
  --border: #35291e;
  --max-w: 1120px;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Rubik', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--text);
}

p { margin: 0 0 1em; color: var(--text-dim); }

a { color: var(--amber-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

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

code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-size: 0.9em;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--amber);
  text-transform: uppercase;
  margin: 0 0 1em;
}
.eyebrow.center { text-align: center; }

.section-title { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
.section-title.center { text-align: center; max-width: 720px; margin-left: auto; margin-right: auto; }

.section-sub {
  max-width: 640px;
  margin: -0.6em auto 2.5em;
  color: var(--text-dim);
}
.section-sub.center { text-align: center; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85em 1.6em;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--amber);
  color: #241a0b;
}
.btn-primary:hover { background: var(--amber-bright); }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--amber); color: var(--amber-bright); }

button.btn { font-family: inherit; cursor: pointer; }

.btn-lg { font-size: 1.05rem; padding: 0.9em 1.7em; }
.btn-xl { font-size: 1.2rem; padding: 1em 2.2em; }
.btn-primary { box-shadow: 0 6px 24px rgba(232, 163, 61, 0.28); }
.btn-ghost { background: rgba(23, 19, 16, 0.45); backdrop-filter: blur(4px); }

.btn-sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.75;
  margin-top: 2px;
  letter-spacing: 0.02em;
}
.btn-lg, .btn-xl { text-align: center; }

.play-icon {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 0.42em solid transparent;
  border-bottom: 0.42em solid transparent;
  border-left: 0.68em solid currentColor;
  margin-right: 0.45em;
  vertical-align: -0.04em;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--text-dim);
  font-size: 0.9rem;
  cursor: pointer;
}
.link-btn:hover { color: var(--amber-bright); }

.center-cta {
  display: flex;
  justify-content: center;
  margin-top: 44px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(23, 19, 16, 0.88);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  color: var(--amber-bright);
  letter-spacing: 0.05em;
}
.logo:hover { text-decoration: none; }

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav a {
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav a:hover { color: var(--text); text-decoration: none; }
.nav-cta {
  background: var(--amber);
  color: #241a0b !important;
  padding: 0.5em 1.1em;
  border-radius: 6px;
}
.nav-cta:hover { background: var(--amber-bright); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.2rem;
  border-radius: 6px;
  padding: 0.3em 0.6em;
  cursor: pointer;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100svh - 64px);
  display: flex;
  align-items: center;
  padding: 110px 0 120px;
  overflow: hidden;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) brightness(0.72);
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(23,19,16,0.82) 0%, rgba(23,19,16,0.45) 55%, rgba(23,19,16,0.15) 100%),
    linear-gradient(180deg, rgba(23,19,16,0) 60%, var(--bg) 100%);
}
.hero h1, .hero-sub { text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55); }
.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 1;
  color: var(--text);
  font-size: 1.6rem;
  opacity: 0.7;
  animation: bob 2.2s ease-in-out infinite;
}
.hero-scroll:hover { text-decoration: none; opacity: 1; }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }
.hero-inner { position: relative; z-index: 1; max-width: 760px; }

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  margin-bottom: 0.5em;
}

.hero-sub {
  font-size: 1.1rem;
  color: #d9d0c3;
  max-width: 620px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 1.6em 0 1em;
}

.hero-note {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Stat banner */
.stat-banner {
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
}
.stat-banner-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 28px 24px;
}
.stat-chip {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-chip strong {
  font-family: 'Rubik', sans-serif;
  font-size: 1.6rem;
  color: var(--amber-bright);
}
.stat-chip span {
  font-size: 0.82rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Gameplay clips */
.moments { padding: 90px 0 70px; }

.clip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 50px;
}
.clip { margin: 0; }
.clip-wide { grid-column: span 2; grid-row: span 2; }
.clip video {
  display: block;
  width: 100%;
  aspect-ratio: 1280 / 672;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.clip-wide video { aspect-ratio: auto; height: calc(100% - 4.2em); }
.clip figcaption {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--text-dim);
}
.clip figcaption strong { color: var(--text); }

/* Three steps */
.steps {
  padding: 80px 0 90px;
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.step-list {
  list-style: none;
  padding: 0;
  margin: 50px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px 24px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--amber);
  color: #241a0b;
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  margin-bottom: 14px;
}
.step h3 { font-size: 1.15rem; color: var(--amber-bright); }
.step p { margin: 0; font-size: 0.95rem; }

/* Mid-page call to action */
.cta-band {
  background: linear-gradient(100deg, rgba(232,163,61,0.16), rgba(139,184,74,0.10)), var(--bg-raised);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 44px 24px;
  flex-wrap: wrap;
}
.cta-band h2 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); margin-bottom: 0.3em; }
.cta-band p { margin: 0; }

/* Intro */
.intro {
  padding: 60px 0 10px;
  max-width: 780px;
  font-size: 1.05rem;
}

/* Features */
.features { padding: 90px 0; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 50px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.feature-card:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
}
.feature-card h3 {
  font-size: 1.05rem;
  color: var(--amber-bright);
}
.feature-card p { margin-bottom: 0; font-size: 0.95rem; }

/* Crafting */
.crafting { padding: 90px 0; }

.recipe-grid-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 50px;
}

.recipe-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}
.recipe-card h3 {
  font-size: 1rem;
  color: var(--amber-bright);
  margin-bottom: 0.8em;
}
.recipe-card p {
  font-size: 0.88rem;
  margin: 14px 0 0;
  text-align: left;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  width: 132px;
  margin: 0 auto;
}
.recipe-cell {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-dim);
}
.recipe-cell.filled {
  background: rgba(232, 163, 61, 0.14);
  border-color: var(--amber);
  color: var(--amber-bright);
}

.recipe-legend {
  margin-top: 36px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Showcase (sculpting / breeding) */
.showcase { padding: 90px 0; }
.showcase-alt { background: var(--bg-raised); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.showcase-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.showcase-alt .showcase-inner { grid-template-columns: 1fr 1.1fr; }
.showcase-alt .showcase-art { order: -1; }

.showcase-copy p { font-size: 1rem; }

.showcase-art img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
}

.chip-art {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.behavior-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: 8px;
  padding: 22px 18px;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  display: flex;
  align-items: center;
}
.behavior-chip.wide {
  grid-column: 1 / -1;
  font-size: 0.95rem;
  color: var(--text-dim);
  font-weight: 500;
}

/* World */
.world { padding: 90px 0; background: var(--bg-raised); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.world-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}

.stat-list {
  list-style: none;
  padding: 0;
  margin: 1.5em 0 0;
  display: grid;
  gap: 12px;
}
.stat-list li {
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 0.95rem;
}
.stat-list strong { color: var(--amber-bright); }

.world-art img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Screenshots */
.screenshots { padding: 90px 0; }

.shot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 50px;
}

.shot { margin: 0; }
.shot-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius);
  overflow: hidden;
}
.shot img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
  transition: transform 0.25s ease;
}
.shot-open:hover img { transform: scale(1.03); }

.shot figcaption {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Play */
.play { padding: 90px 0 110px; }

.play-single {
  display: flex;
  justify-content: center;
  margin-top: 50px;
}

.play-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  max-width: 560px;
  text-align: center;
}
.play-card h3 { color: var(--amber-bright); }
.play-card p { margin-bottom: 0; }

.itch-embed {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}
.itch-embed iframe {
  max-width: 100%;
  border-radius: 8px;
}

/* FAQ */
.faq {
  max-width: 680px;
  margin: 56px auto 0;
  display: grid;
  gap: 10px;
}
.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 18px;
}
.faq summary {
  cursor: pointer;
  padding: 15px 0;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--amber); font-weight: 700; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 0 0 16px; font-size: 0.95rem; }

/* Trailer and screenshot dialogs */
.media-dialog {
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}
.media-dialog::backdrop { background: rgba(8, 6, 4, 0.85); backdrop-filter: blur(3px); }
.media-dialog video, .media-dialog img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  background: #000;
}
.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(23, 19, 16, 0.8);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
}
.dialog-close:hover { border-color: var(--amber); }
.dialog-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  font-size: 0.88rem;
  color: var(--text-dim);
}
.dialog-caption { margin: 0; padding: 14px 18px; font-size: 0.92rem; }
body.dialog-open { overflow: hidden; }

/* Mobile download bar */
.mobile-bar { display: none; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 44px 0;
  background: var(--bg-raised);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-inner p { max-width: 320px; font-size: 0.9rem; margin: 0.6em 0 0; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--text-dim); font-size: 0.9rem; }
.footer-links a:hover { color: var(--amber-bright); }

/* Responsive */
@media (max-width: 880px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .shot-grid { grid-template-columns: 1fr; }
  .world-inner { grid-template-columns: 1fr; }
  .showcase-inner, .showcase-alt .showcase-inner { grid-template-columns: 1fr; }
  .showcase-alt .showcase-art { order: 0; }
  .stat-banner-inner { grid-template-columns: repeat(2, 1fr); }
  .recipe-grid-wrap { grid-template-columns: repeat(2, 1fr); }
  .clip-grid { grid-template-columns: repeat(2, 1fr); }
  .clip-wide { grid-row: auto; }
  .clip-wide video { aspect-ratio: 1280 / 672; height: auto; }
  .step-list { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 24px;
    gap: 16px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav-toggle { display: inline-block; }
}

@media (max-width: 640px) {
  .feature-grid { grid-template-columns: 1fr; }
  .recipe-grid-wrap { grid-template-columns: 1fr; }
  .wrap { padding: 0 16px; }
  .hero { padding: 80px 0 90px; min-height: calc(100svh - 64px); }
  .hero-scrim { background: linear-gradient(180deg, rgba(23,19,16,0.55) 0%, rgba(23,19,16,0.7) 60%, var(--bg) 100%); }
  .hero-ctas .btn { flex: 1 1 100%; }
  .clip-grid { grid-template-columns: 1fr; }
  .clip-wide { grid-column: auto; }
  .cta-band-inner { padding: 36px 16px; }
  .cta-band-inner .btn { width: 100%; text-align: center; }
  .btn-xl { font-size: 1.05rem; padding: 0.95em 1.4em; }
  .dialog-cta { flex-direction: column; align-items: stretch; text-align: center; }

  /* A thumb-reach download bar once the hero has scrolled away. */
  .mobile-bar {
    display: flex;
    gap: 10px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(23, 19, 16, 0.94);
    border-top: 1px solid var(--border);
    transform: translateY(110%);
    transition: transform 0.25s ease;
  }
  .mobile-bar.show { transform: none; }
  .mobile-bar .btn { flex: 1; text-align: center; padding: 0.8em 1em; }
  .mobile-bar .btn-primary { flex: 1.4; }
  .site-footer { padding-bottom: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-scroll { animation: none; }
  .btn, .feature-card, .shot img, .mobile-bar { transition: none; }
}
