/* Shared styles for the public site: landing.html and each adventure page. */

:root {
  --night: #0b1220;
  --night-2: #111827;
  --panel: rgba(17, 24, 39, 0.72);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f9fafb;
  --muted: #aab4c3;
  --blue: #2563eb;
  --blue-bright: #60a5fa;
  --hazard: #f59e0b;
  --beacon: #ef4444;
  --radius: 16px;
  --gutter: 16px;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--blue-bright); }

a:focus-visible, .btn:focus-visible, summary:focus-visible {
  outline: 3px solid var(--blue-bright);
  outline-offset: 3px;
  border-radius: 8px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.4rem, 7vw, 4.25rem); }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); }
h3 { font-size: 1.3rem; font-weight: 600; }

p { margin: 0 0 1em; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hazard);
  margin-bottom: 1rem;
}

.lede { font-size: 1.2rem; color: #d7dde6; max-width: 34em; }
.muted { color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35); }
.btn-primary:hover { background: #1d4ed8; }
.btn-ghost { color: var(--text); border: 1px solid rgba(255, 255, 255, 0.2); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 18, 32, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  white-space: nowrap;
}

.brand img { width: 32px; height: 32px; border-radius: 8px; }

.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.site-nav a:not(.btn):hover { color: var(--text); }
.site-nav .btn { min-height: 40px; padding: 0.5rem 1.1rem; white-space: nowrap; }

@media (max-width: 720px) {
  .site-nav a:not(.btn) { display: none; }
}

@media (max-width: 360px) {
  .brand { font-size: 1rem; gap: 0.45rem; }
  .brand img { width: 28px; height: 28px; }
  .site-nav .btn { padding: 0.5rem 0.85rem; }
}

/* Hero */
.hero {
  position: relative;
  padding: 3.5rem 0 4rem;
  background:
    radial-gradient(ellipse 80% 60% at 75% 70%, rgba(180, 83, 9, 0.18), transparent 70%),
    linear-gradient(180deg, #0b1220 0%, #0e1628 100%);
}

.hero .wrap {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero { padding: 5rem 0 5.5rem; }
  .hero .wrap { grid-template-columns: 1.05fr 1fr; gap: 3rem; }
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 2rem; }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.95rem;
}

.facts li { display: flex; align-items: center; gap: 0.5rem; }
.facts li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hazard);
}

.scene {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.blink-hazard { animation: hazard 1.1s steps(1, end) infinite; }
.blink-beacon { animation: beacon 2.4s ease-in-out infinite; }

@keyframes hazard {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.08; }
}

@keyframes beacon {
  0%, 100% { opacity: 0.25; }
  45%, 55% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blink-hazard, .blink-beacon { animation: none; }
  .btn { transition: none; }
}

/* Sections */
section { padding: 4.5rem 0; }
.section-head { max-width: 40em; margin-bottom: 2.5rem; }

.alt { background: #0d1526; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Story excerpt */
.excerpt {
  max-width: 44em;
  margin: 0 auto;
  text-align: center;
}

.excerpt blockquote {
  margin: 0 0 1.25rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.35rem, 3.4vw, 1.9rem);
  line-height: 1.4;
}

.excerpt blockquote p { margin: 0 0 0.8em; }
.excerpt blockquote p:last-child { margin-bottom: 0; color: var(--hazard); }
.excerpt figcaption { color: var(--muted); font-size: 0.9rem; }

/* Grids and cards */
.grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 640px) and (max-width: 899px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card p:last-child { margin-bottom: 0; }

.step-num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.18);
  color: var(--blue-bright);
  font-weight: 600;
  margin-bottom: 1rem;
}

.role-title { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.role-title span { color: var(--muted); font-size: 0.85rem; }

.whisper {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--blue-bright);
  background: rgba(96, 165, 250, 0.08);
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: #dbe4f0;
  font-size: 0.97rem;
}

.note {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Resources */
.meter { margin-top: 0.75rem; }
.meter-top { display: flex; justify-content: space-between; font-weight: 600; }
.meter-top span:last-child { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.meter-bar {
  height: 8px;
  margin: 0.5rem 0 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.meter-bar i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.meter-bar i.low { background: var(--hazard); }
.meter p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* Replay */
.big-number {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  line-height: 1;
  color: var(--hazard);
  margin-bottom: 0.4rem;
}

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 1rem 0 0; list-style: none; }
.chips li {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
  color: #d7dde6;
}

.path-label { color: var(--hazard); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }

/* Phones */
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(37, 99, 235, 0.16);
  margin-bottom: 1rem;
}

.feature-icon svg { width: 22px; height: 22px; stroke: var(--blue-bright); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* FAQ */
.faq { max-width: 46em; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1.08rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); font-weight: 400; font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { margin: 0.75rem 0 0; color: #cfd6e0; }

/* Final CTA */
.final {
  text-align: center;
  background:
    radial-gradient(ellipse 60% 70% at 50% 100%, rgba(239, 68, 68, 0.14), transparent 70%),
    #0b1220;
}

.final p { color: var(--muted); max-width: 32em; margin: 0 auto 2rem; }

footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
footer a { color: var(--muted); }

/* Phone mockup of the game screen */
.phone {
  width: min(310px, 100%);
  margin: 0 auto;
  padding: 11px;
  border-radius: 42px;
  background: #05080f;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 0 0 2px #1f2937;
}

.phone-screen {
  position: relative;
  border-radius: 32px;
  padding: 40px 16px 20px;
  background: linear-gradient(180deg, #111827, #0b1220);
  font-size: 0.8rem;
  line-height: 1.45;
}

.phone-screen::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  width: 84px;
  height: 20px;
  transform: translateX(-50%);
  border-radius: 12px;
  background: #05080f;
}

.ui-eyebrow {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.3rem;
}

.ui-name { font-family: var(--display); font-size: 1.35rem; font-weight: 700; margin: 0 0 0.4rem; }

.ui-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
}

.ui-title { font-family: var(--display); font-size: 1.05rem; font-weight: 600; margin: 0 0 0.35rem; }
.ui-body { color: #cbd5e1; margin: 0 0 0.7rem; }

.ui-choice {
  display: block;
  padding: 0.6rem 0.7rem;
  margin-top: 0.45rem;
  border-radius: 10px;
  border: 1px solid rgba(147, 197, 253, 0.25);
  background: rgba(37, 99, 235, 0.1);
  font-weight: 600;
}

.ui-choice.picked { background: var(--blue); border-color: var(--blue); }
.ui-status { color: var(--muted); margin: 0.75rem 0 0; font-size: 0.74rem; }

/* Adventures */
.adventures { display: grid; gap: 1rem; }
/* One adventure per row; the "more are coming" card sits below them. */

/* The Haunted House art: every few seconds the lights go out and red emergency
   lights blink on, and eyes blink in the dark. */
.haunt-lights { animation: haunt-blackout 7s step-end infinite; }
.haunt-emergency { opacity: 0; animation: haunt-emergency 7s step-end infinite; }
.haunt-eyes { animation: haunt-eyes 5s step-end infinite; }
@keyframes haunt-blackout { 0% { opacity: 1; } 78% { opacity: 0.06; } 96% { opacity: 1; } }
@keyframes haunt-emergency { 0% { opacity: 0; } 82% { opacity: 1; } 96% { opacity: 0; } }
@keyframes haunt-eyes { 0% { opacity: 0.9; } 46% { opacity: 0; } 50% { opacity: 0.9; } }
@media (prefers-reduced-motion: reduce) {
  .haunt-lights, .haunt-emergency, .haunt-eyes { animation: none; }
}

.adventure { padding: 0; overflow: hidden; display: grid; }
@media (min-width: 640px) { .adventure { grid-template-columns: 1fr 1.1fr; } }

.adventure-art svg { display: block; width: 100%; height: 100%; min-height: 220px; object-fit: cover; }
.adventure-body { padding: 1.5rem; display: flex; flex-direction: column; }
.adventure-body h3 { font-size: 1.6rem; }
.adventure-body .facts { margin: 0.25rem 0 1.25rem; }

.soon {
  display: grid;
  place-content: center;
  text-align: center;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.18);
  background: transparent;
  min-height: 220px;
}

.text-link {
  margin-top: auto;
  font-weight: 600;
  text-decoration: none;
  color: var(--blue-bright);
}

.text-link:hover { text-decoration: underline; }

.crumb { color: var(--muted); font-size: 0.9rem; text-decoration: none; }
.crumb:hover { color: var(--text); }

.size-list { margin: 1rem 0 0; padding-left: 1.2rem; color: var(--muted); }
.size-list li { margin-bottom: 0.4rem; }
.size-list strong { color: var(--text); font-weight: 600; }
