/* THE ESCAPE COUCH — site-wide styles (home, about, how-to-play, faq, contact)
   Individual games keep their own palettes; this is the brand shell around them. */

:root {
  --bg: #18121c;
  --bg-alt: #201924;
  --panel: #271f2c;
  --panel-border: #3c3140;
  --text: #f5ecdd;
  --text-dim: #b6a99b;
  --gold: #f0a63c;
  --gold-bright: #ffc169;
  --coral: #ef5b5b;
  --coral-bright: #ff8177;
  --teal: #4fd3c4;
  --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito Sans", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

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

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 6vw;
}

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(24, 18, 28, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--panel-border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand svg { flex: none; width: 34px; height: 34px; }

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

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}

.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--gold-bright); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--panel-border);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 6vw 1rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 0.8rem 0; }
  .nav-toggle { display: block; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--coral); color: #2a0e0e; }
.btn-primary:hover { background: var(--coral-bright); }

.btn-secondary {
  background: transparent;
  border-color: var(--panel-border);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold-bright); }

/* ---------- hero (home page) ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 6rem 0 5rem;
  text-align: center;
  background: var(--bg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Where the "interesting part" (the family's faces) sits in assets/img/hero.jpg,
     as a percentage down the image. Adjust this one number to reframe the photo. */
  object-position: center 22%;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(650px 460px at 50% 46%, rgba(20,15,23,0.8), rgba(20,15,23,0) 70%),
    linear-gradient(180deg, rgba(24,18,28,0.25) 0%, rgba(24,18,28,0.55) 60%, var(--bg) 100%),
    radial-gradient(700px 420px at 18% 0%, rgba(240, 166, 60, 0.22), transparent),
    radial-gradient(700px 420px at 85% 15%, rgba(239, 91, 91, 0.18), transparent);
}

.hero-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, rgba(0,0,0,0.15) 0px, rgba(0,0,0,0.15) 1px, transparent 1px, transparent 3px);
  opacity: 0.25;
}

.hero > .wrap {
  position: relative;
  z-index: 2;
}

.hero-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
}

.kicker {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 6px rgba(0,0,0,0.9), 0 0 20px rgba(0,0,0,0.6);
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 14px rgba(0,0,0,0.65));
}

.hero .sub {
  max-width: 40rem;
  margin: 0 auto 2rem;
  color: var(--text);
  font-size: 1.1rem;
  text-shadow: 0 2px 6px rgba(0,0,0,0.95), 0 0 24px rgba(0,0,0,0.7);
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.tag-row {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.tag-pill {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
  white-space: nowrap;
}

/* ---------- page header (sub-pages) ---------- */

.page-hero {
  padding: 4.5rem 0 3rem;
  text-align: center;
  background:
    radial-gradient(600px 360px at 50% 0%, rgba(240, 166, 60, 0.14), transparent),
    var(--bg);
  border-bottom: 1px solid var(--panel-border);
}

.page-hero h1 { font-size: clamp(2rem, 5vw, 2.8rem); color: var(--gold-bright); }
.page-hero p { color: var(--text-dim); max-width: 36rem; margin: 0 auto; font-size: 1.05rem; }

/* ---------- sections ---------- */

section.block { padding: 4.5rem 0; }
section.block.alt { background: var(--bg-alt); }

.section-head { text-align: center; max-width: 38rem; margin: 0 auto 3rem; }
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.section-head p { color: var(--text-dim); }

/* ---------- how-it-works steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  max-width: var(--max);
  margin: 0 auto;
}

.step { text-align: center; }

.step-num {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--gold);
  color: var(--gold-bright);
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-photo {
  width: 88px;
  height: 88px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 3px solid var(--gold);
  overflow: hidden;
}

.step-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.step h3 { font-size: 1.1rem; }
.step p { color: var(--text-dim); font-size: 0.95rem; margin: 0; }

/* ---------- game cards ---------- */

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.game-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 1.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.game-card:hover { transform: translateY(-4px); border-color: var(--gold); }

.card-cover {
  margin: -1.85rem -1.85rem 0;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card .tag {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--coral-bright);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-card h3 { margin: 0; font-size: 1.4rem; }
.game-card p { color: var(--text-dim); margin: 0; font-size: 0.95rem; }

.game-card .meta {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 700;
}

.game-card .play {
  margin-top: auto;
  align-self: flex-start;
}

.game-card.soon {
  opacity: 0.55;
  border-style: dashed;
}

/* ---------- prose content (about / how-to-play) ---------- */

.prose { max-width: 42rem; margin: 0 auto; }
.prose h2 { margin-top: 2.2rem; font-size: 1.4rem; color: var(--gold-bright); }
.prose ul, .prose ol { color: var(--text-dim); padding-left: 1.3rem; }
.prose li { margin-bottom: 0.5rem; }

.callout {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-left: 4px solid var(--coral);
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  margin: 1.8rem 0;
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- FAQ accordion ---------- */

.faq-list { max-width: 42rem; margin: 0 auto; display: flex; flex-direction: column; gap: 0.75rem; }

.faq-item {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 0.2rem 1.3rem;
}

.faq-item summary {
  cursor: pointer;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  padding: 1.1rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--gold);
  flex: none;
}

.faq-item[open] summary::after { content: "\2212"; }

.faq-item p { color: var(--text-dim); padding-bottom: 1.1rem; margin: 0; }

/* ---------- contact form ---------- */

.contact-form {
  max-width: 32rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.field label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--text-dim);
}

.field input, .field textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  color: var(--text);
  font-family: "Nunito Sans", sans-serif;
  font-size: 1rem;
}

.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.field textarea { resize: vertical; min-height: 120px; }

.hp-field { position: absolute; left: -9999px; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--panel-border);
  padding: 3rem 0 2.5rem;
  background: var(--bg-alt);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav a { color: var(--text-dim); text-decoration: none; font-weight: 700; font-size: 0.9rem; }
.footer-nav a:hover { color: var(--gold-bright); }

.site-footer .fine-print {
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--panel-border);
  padding-top: 1.5rem;
}

/* ---------- responsive ---------- */

@media (max-width: 600px) {
  section.block { padding: 3rem 0; }
  .hero { padding: 4rem 0 3rem; }
  .hero-bg { object-position: center 10%; }
}
