/* ------------------------------------------------------------------
   Dark Square Games · stylesheet
   Palette mirrors the Waterfall drinking game:
     dark teal background, cream text, coral-red action colour.
------------------------------------------------------------------ */

:root {
  --bg:        #324E5B;   /* page background — same as waterfall */
  --surface:   #3c5b6a;   /* raised cards */
  --surface-2: #2a414c;   /* deeper panels */
  --border:    rgba(241, 247, 238, 0.12);
  --border-2:  rgba(241, 247, 238, 0.22);

  --text:      #f1f7ee;   /* primary text — same cream as waterfall */
  --text-2:    #c9d4d1;
  --text-3:    #8ea2a8;

  --coral:     #ff2959;   /* primary action — same as waterfall Start button */
  --coral-2:   #e32751;   /* hover */
  --gold:      #f7c948;   /* occasional accent */

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow:    0 10px 30px -12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 40px 80px -30px rgba(0, 0, 0, 0.5);

  --font-display: "Crete Round", Georgia, "Times New Roman", serif;
  --font-sans:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius:    12px;
  --radius-lg: 20px;
  --max:       1160px;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1100px 600px at 85% -10%, rgba(255, 41, 89, 0.10), transparent 60%),
    radial-gradient(800px 500px at -10% 20%, rgba(78, 201, 168, 0.08), transparent 60%);
  min-height: 100vh;
}

a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(241,247,238,0.35); text-underline-offset: 3px; }
a:hover { color: #fff; text-decoration-color: currentColor; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 0.4em;
  line-height: 1.1;
}
h1 { font-size: clamp(2.4rem, 5vw + 1rem, 4.6rem); }
h2 { font-size: clamp(1.8rem, 3vw + 1rem, 2.8rem); }
h3 { font-size: 1.4rem; }
p  { margin: 0 0 1em; color: var(--text-2); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; top: -40px; left: 8px;
  background: var(--coral); color: #fff; padding: 8px 12px;
  border-radius: 6px; z-index: 100; transition: top .15s;
}
.skip-link:focus { top: 8px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(42, 65, 76, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 14px 24px; min-height: 64px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark {
  display: inline-block; width: 22px; height: 22px; border-radius: 4px;
  background: var(--coral);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.25);
}
.brand-name { font-family: var(--font-display); font-size: 20px; letter-spacing: 0.01em; }
.site-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-nav a { text-decoration: none; color: var(--text-2); font-weight: 500; font-size: 15px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 80px; }
.footer-grid {
  display: grid; gap: 32px;
  grid-template-columns: 1.3fr 1fr 1fr;
  padding: 48px 24px;
}
.footer-grid h4 { font-family: var(--font-sans); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-grid a { text-decoration: none; color: var(--text-2); font-size: 15px; }
.footer-grid a:hover { color: #fff; }
.footer-tag { font-size: 14px; margin-top: 10px; max-width: 32ch; }
.footer-legal { border-top: 1px solid var(--border); padding: 18px 24px; }
.footer-legal p { margin: 0; color: var(--text-3); font-size: 13px; }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; padding: 32px 24px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  text-decoration: none;
  border: 0; cursor: pointer;
  transition: transform .1s ease, background .2s ease, color .2s ease;
}
.btn-primary {
  background: var(--coral); color: #fff;
  box-shadow: 0 6px 20px -6px rgba(255, 41, 89, 0.55);
}
.btn-primary:hover { background: var(--coral-2); color: #fff; text-decoration: none; }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-2);
}
.btn-ghost:hover { background: rgba(241,247,238,0.06); color: #fff; text-decoration: none; }
.btn-sm { padding: 10px 16px; font-size: 15px; border-radius: 8px; }

/* ---------- page head ---------- */
.page-head { padding: 72px 0 24px; }
.page-head h1 { margin-bottom: 12px; }
.page-head .lead { font-size: clamp(1.1rem, 1vw + .9rem, 1.35rem); color: var(--text-2); max-width: 62ch; }
.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--coral); margin-bottom: 14px;
}

.section { padding: 40px 0; }
.section-lg { padding: 72px 0; }

/* ---------- hero (homepage) ---------- */
.hero { padding: 72px 0 32px; }
.hero-grid {
  display: grid; gap: 48px;
  grid-template-columns: 1.1fr 0.9fr; align-items: center;
}
.hero h1 { margin-bottom: 18px; }
.hero .lead { font-size: 1.25rem; color: var(--text-2); max-width: 50ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-note { color: var(--text-3); font-size: 14px; margin-top: 14px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 41, 89, 0.12);
  color: #ffc2d0;
  border: 1px solid rgba(255, 41, 89, 0.35);
  padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
}
.pill .dot { width: 6px; height: 6px; background: var(--coral); border-radius: 50%; }
.hero-card-stack {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 420px;
  margin-left: auto;
}
.hero-card-stack img {
  position: absolute; inset: 0; margin: auto;
  width: 70%; height: auto;
  border-radius: 16px;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
}
.hero-card-stack img:nth-child(1) { transform: translate(-22%, -6%) rotate(-12deg); }
.hero-card-stack img:nth-child(2) { transform: translate(0, 0) rotate(3deg); }
.hero-card-stack img:nth-child(3) { transform: translate(22%, -4%) rotate(14deg); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-card-stack { margin: 0 auto; max-width: 320px; }
}

/* ---------- game grid ---------- */
.game-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.game-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: transform .15s ease, border-color .2s ease, background .2s ease;
  min-height: 180px;
}
.game-card:hover { transform: translateY(-2px); border-color: var(--coral); background: #3f5e6d; text-decoration: none; color: var(--text); }
.game-card .badge {
  align-self: flex-start;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 10px;
}
.game-card h3 { font-size: 1.5rem; margin-bottom: 6px; }
.game-card p { color: var(--text-2); font-size: 15px; margin: 0; flex: 1; }
.game-card .meta { margin-top: 14px; color: var(--text-3); font-size: 13px; display: flex; gap: 10px; flex-wrap: wrap; }
.game-card .meta span::before { content: "·"; margin-right: 10px; color: var(--text-3); }
.game-card .meta span:first-child::before { content: ""; margin: 0; }
.game-card.coming-soon { opacity: 0.55; pointer-events: none; }

/* ---------- prose (text pages) ---------- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose a { color: #ffb6c3; }
.prose ul, .prose ol { padding-left: 1.2em; color: var(--text-2); }
.prose li { margin-bottom: .4em; }
.prose code { background: var(--surface-2); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }

/* ---------- game page layout (fullscreen playable + rules) ---------- */
.game-stage {
  position: relative;
  min-height: calc(100vh - 64px); /* minus header */
  display: grid;
  place-items: center;
}

/* ---------- App Store badge + app promo ---------- */
.app-store-badge {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.app-store-badge:hover { transform: translateY(-1px); opacity: 0.92; }
.app-store-badge img { display: block; height: auto; max-width: 100%; }

.footer-app-badge { margin-top: 14px; }

.app-promo {
  font-family: var(--font-sans);
  margin-top: 40px;
  padding: 64px 0;
  background:
    radial-gradient(800px 400px at 80% 20%, rgba(255, 41, 89, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(42, 65, 76, 0.6), rgba(42, 65, 76, 0.9));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.app-promo h2, .app-promo h3 { color: var(--text); }
.app-promo .lead { color: var(--text-2); max-width: 52ch; }
.app-promo .eyebrow { color: var(--coral); }

.app-promo-grid {
  display: grid;
  gap: 48px;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
}
.app-icon {
  border-radius: 22px;
  box-shadow: 0 14px 40px -12px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}
.app-icon-row {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}
.app-icon-row h2 { margin: 4px 0 6px; }

.app-promo-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
  font-size: 14px;
  margin-top: 6px;
}
.app-promo-meta .stars {
  color: #f7c948;
  font-size: 16px;
  letter-spacing: 1px;
}

.app-promo-features {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: grid;
  gap: 10px;
}
.app-promo-features li {
  color: var(--text-2);
  padding-left: 22px;
  position: relative;
  font-size: 15px;
  line-height: 1.5;
}
.app-promo-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--coral);
  font-weight: 700;
}
.app-promo-features strong { color: var(--text); }

.app-promo-cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.app-promo-shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: center;
}
.app-promo-shots img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.app-promo-shots img:nth-child(1) { transform: translateY(18px) rotate(-3deg); }
.app-promo-shots img:nth-child(2) { transform: translateY(-6px); z-index: 2; }
.app-promo-shots img:nth-child(3) { transform: translateY(18px) rotate(3deg); }

@media (max-width: 900px) {
  .app-promo { padding: 48px 0; }
  .app-promo-grid { grid-template-columns: 1fr; gap: 40px; }
  .app-promo-shots { max-width: 480px; margin: 0 auto; }
  .app-icon-row h2 { font-size: 1.8rem; }
}

/* Compact variant (single-row layout) */
.app-promo-compact { padding: 36px 0; }
.app-promo-row {
  display: grid;
  gap: 20px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 22px;
  background: rgba(241, 247, 238, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.app-promo-row .app-icon { width: 88px; height: 88px; border-radius: 18px; }
.app-promo-row h3 { margin: 2px 0 6px; }
.app-promo-row p { font-size: 14px; margin: 0; }
.app-promo-row .app-promo-cta { display: flex; justify-content: flex-end; }
@media (max-width: 720px) {
  .app-promo-row {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .app-promo-row .app-promo-cta {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

/* ---------- utility ---------- */
.muted { color: var(--text-3); }
.text-center { text-align: center; }
