@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Urbanist:wght@500;600;700;800&display=swap');

:root {
  /* Palette: terracotta, olive, cream, espresso, cyan */
  --color-terracotta: oklch(0.55 0.15 40);
  --color-olive: oklch(0.45 0.08 110);
  --color-cream: oklch(0.96 0.02 80);
  --color-espresso: oklch(0.25 0.05 40);
  --color-cyan: oklch(0.75 0.15 220);
  
  --color-bg: var(--color-espresso);
  --color-text: var(--color-cream);
  --color-surface: oklch(0.3 0.05 40);
  --color-surface-light: oklch(0.35 0.05 40);
  --color-border: oklch(0.4 0.05 40);

  /* Typography */
  --font-heading: 'Urbanist', system-ui, sans-serif;
  --font-body: 'Libre Baskerville', Georgia, serif;

  /* Shape: chamfered-relic-geometry */
  --radius-primary: 12px;
  --radius-modal: 24px;
  --radius-pill: 9999px;
  --radius-nested: 4px;
  
  --clip-chamfer: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  --clip-chamfer-large: polygon(24px 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%, 0 24px);

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --transition-fast: 150ms var(--ease-out);
  --transition-normal: 300ms var(--ease-out);
  --transition-slow: 500ms var(--ease-out);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); }

p {
  margin-bottom: 1.5rem;
  max-width: 75ch;
}

a {
  color: var(--color-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-cream);
}

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

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
  position: relative;
}

.section-large {
  padding: 10rem 0;
}

/* Header & Nav */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(40, 35, 35, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--color-cream);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

/* Mobile Nav */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-cream);
  font-size: 2rem;
  cursor: pointer;
  z-index: 101;
}

.mobile-nav-panel {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--color-bg);
  z-index: 100;
  padding: 6rem 2rem;
  transform: translateX(-100%);
  transition: transform var(--transition-normal);
}

.mobile-nav-panel.is-open {
  transform: translateX(0);
}

.mobile-nav-panel .nav-links {
  flex-direction: column;
  gap: 2rem;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-nav-toggle { display: block; }
  .mobile-nav-panel { display: block; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-espresso);
  background-color: var(--color-cyan);
  border: none;
  cursor: pointer;
  clip-path: var(--clip-chamfer);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(120, 240, 255, 0.4);
  color: var(--color-espresso);
}

.btn:active {
  transform: scale(0.97);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-cyan);
  border: 2px solid var(--color-cyan);
}

.btn-outline:hover {
  background-color: rgba(120, 240, 255, 0.1);
  color: var(--color-cyan);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0.4;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, var(--color-bg) 0%, transparent 100%);
  z-index: -1;
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: 1.05;
  margin-bottom: 1.5rem;
  color: var(--color-cream);
}

.hero-title span {
  color: var(--color-cyan);
}

.hero-desc {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  color: rgba(255, 255, 255, 0.8);
}

.hero-hologram {
  position: absolute;
  right: -10%;
  top: 50%;
  transform: translateY(-50%);
  width: 600px;
  height: 600px;
  object-fit: contain;
  z-index: 0;
  opacity: 0.8;
  mix-blend-mode: screen;
  pointer-events: none;
}

@media (max-width: 1024px) {
  .hero-hologram {
    right: -20%;
    width: 400px;
    height: 400px;
  }
}

@media (max-width: 768px) {
  .hero-hologram {
    display: none;
  }
  .hero-overlay {
    background: linear-gradient(to top, var(--color-bg) 0%, rgba(40, 35, 35, 0.5) 100%);
  }
}

/* External Game Stage */
.game-stage-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--color-surface);
  clip-path: var(--clip-chamfer-large);
  margin: 4rem 0;
  border: 1px solid var(--color-border);
}

.game-stage-wrapper iframe[data-external-game-iframe] {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  position: relative;
  z-index: 2;
}

.game-stage-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.3;
}

.game-stage-fg-left,
.game-stage-fg-right {
  position: absolute;
  top: 0;
  height: 100%;
  width: auto;
  z-index: 1;
  pointer-events: none;
  opacity: 0.6;
  mix-blend-mode: screen;
}

.game-stage-fg-left { left: 0; }
.game-stage-fg-right { right: 0; }

@media (max-width: 768px) {
  .game-stage-wrapper {
    aspect-ratio: auto;
    height: min(82vh, 760px);
    clip-path: none;
    border-radius: 0;
    margin: 2rem -2rem;
    width: calc(100% + 4rem);
  }
  .game-stage-fg-left,
  .game-stage-fg-right,
  .game-stage-bg {
    display: none;
  }
}

/* Bento Grid / Cards */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  grid-auto-flow: dense;
}

.card {
  background: var(--color-surface);
  clip-path: var(--clip-chamfer);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  border: 1px solid var(--color-border);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(120, 240, 255, 0.1), transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 1.5rem;
  clip-path: var(--clip-chamfer);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--color-cream);
}

/* Editorial / Prose */
.prose {
  max-width: 800px;
  margin: 0 auto;
}

.prose h2 {
  margin-top: 3rem;
  color: var(--color-cyan);
}

.prose h3 {
  margin-top: 2rem;
}

.prose ul, .prose ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose img {
  margin: 2rem 0;
  clip-path: var(--clip-chamfer);
}

/* Footer */
.site-footer {
  background: var(--color-surface);
  padding: 6rem 0 3rem;
  border-top: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.footer-decoration {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200px;
  object-fit: cover;
  opacity: 0.1;
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 4rem;
  position: relative;
  z-index: 1;
}

.footer-col h4 {
  color: var(--color-cyan);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
  color: var(--color-cyan);
}

.footer-bottom {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--color-border);
  color: var(--color-cream);
  font-family: var(--font-body);
  clip-path: var(--clip-chamfer);
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-cyan);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* Age Gate */
.age-gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(40, 35, 35, 0.95);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.age-gate-modal {
  background: var(--color-surface);
  padding: 3rem;
  max-width: 500px;
  width: 100%;
  clip-path: var(--clip-chamfer-large);
  border: 1px solid var(--color-border);
  text-align: center;
}

.age-gate-modal h2 {
  color: var(--color-cyan);
  margin-bottom: 1rem;
}

.age-gate-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.age-gate-error {
  color: var(--color-terracotta);
  margin-top: 1rem;
  display: none;
}

/* Utilities */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mb-4 { margin-bottom: 4rem; }
.mt-4 { margin-top: 4rem; }

/* GSAP Initial States */
.gsap-reveal {
  opacity: 0;
  transform: translateY(30px);
}

/* Google Play Block */
.google-play-block {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: var(--color-surface-light);
  padding: 2rem;
  clip-path: var(--clip-chamfer);
  margin-top: 2rem;
}

.google-play-block img {
  height: 60px;
  width: auto;
}

@media (max-width: 768px) {
  .google-play-block {
    flex-direction: column;
    text-align: center;
  }
}


/* __SITE_SAFETY_CSS__ */
/* FIXED responsive/safety layer — ships into every generated site.
   Loaded AFTER the agent's assets/styles.css, so it overrides the agent's
   broken mechanical CSS via the cascade. Targets the real class names the
   generator already emits (mobile-nav-*, age-gate-overlay, nav-links).
   The agent only owns content + theme colours; this owns the mechanics. */

/* ---- global layout safety ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; max-width: 100%; }
img, video, svg, canvas { max-width: 100%; height: auto; }
/* broken images (404) shrink to nothing instead of showing a broken icon */
img[alt]:not([src]), img:not([alt]) { }

/* ---- mobile nav: full-screen drawer instead of the broken 300px sliver ---- */
@media (max-width: 768px) {
  .mobile-nav-panel {
    width: 100% !important;
    max-width: 100% !important;
    right: -100%;
    padding: 5rem 1.5rem 2rem !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-nav-panel.is-open { right: 0 !important; }
  /* menu links: big touch targets, readable */
  .mobile-nav-panel a {
    display: block;
    padding: 0.9rem 0;
    font-size: 1.25rem;
    min-height: 44px;
  }
  /* close affordance: a visible X in the open drawer */
  .mobile-nav-panel.is-open::before {
    content: "\00d7";
    position: absolute;
    top: 1.2rem; right: 1.5rem;
    font-size: 2.2rem; line-height: 1;
    opacity: .8; pointer-events: none;
  }
  /* lock body scroll while the menu is open (best-effort, JS also handles it) */
  body.nav-open { overflow: hidden; }
}

/* ---- age gate: force a real blocking modal (was position:static) ---- */
.age-gate-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 2rem;
  text-align: center;
  background: rgba(6, 9, 16, 0.94);
  backdrop-filter: blur(4px);
}
.age-gate-overlay.is-dismissed,
.age-gate-overlay[hidden] { display: none !important; }
/* while gate is up, don't let the page scroll behind it */
body.age-gate-locked { overflow: hidden; }

/* ---- game stage: bound it (was rendering ~4400px / ~5 screens tall) ---- */
/* the outer section must not carry a giant fixed height */
.game-stage-section, [class*="game-stage"][class*="section"] {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible;
}
/* the playable stage becomes a bounded, centered, aspect-locked box */
.game-stage-wrapper, [data-game-card].game-stage-wrapper, [data-external-game] {
  position: relative !important;
  width: min(100%, 960px) !important;
  height: auto !important;
  aspect-ratio: 16 / 10;
  max-height: 82vh;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 12px;
}
/* the game iframe fills the bounded stage instead of growing to its content */
.game-stage-wrapper iframe, .game-stage-section iframe, [data-external-game] iframe {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  border: 0;
}
/* the oversized decorative stage images cover the bounded stage, not 1336px each */
[class*="game-stage-atmosphere"], [class*="game-stage-fg"], [class*="game-stage-bg"] {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}
@media (max-width: 768px) {
  .game-stage-wrapper, [data-game-card].game-stage-wrapper, [data-external-game] {
    aspect-ratio: 3 / 4;   /* taller play area on phones */
    max-height: 80vh;
  }
}

/* ---- touch targets everywhere ---- */
a, button, [role="button"], input, select { touch-action: manipulation; }
