/* ==========================================================================
   Efan Studios — site styles
   Mobile-first. No framework. Colors live in :root so a re-theme is one edit.
   ========================================================================== */

:root {
  --bg: #f4f9fd;
  --surface: #ffffff;
  --surface-2: #e8f3fb;
  --text: #0f2236;
  --text-muted: #4a6075;
  --border: #d4e4f0;
  --brand: #1f7fd1;        /* ice blue */
  --brand-strong: #145fa0;
  --brand-ink: #ffffff;
  --accent: #ff7a45;       /* warm "fishing bobber" orange */
  --accent-soft: #ffe6da;
  --shadow: 0 1px 2px rgba(15, 34, 54, 0.06), 0 8px 24px rgba(15, 34, 54, 0.08);
  --radius: 18px;
  --radius-sm: 10px;
  --max: 1080px;
  --prose: 70ch;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1724;
    --surface: #12233a;
    --surface-2: #172c47;
    --text: #e8f1f9;
    --text-muted: #a3b7ca;
    --border: #23405f;
    --brand: #5cb0f5;
    --brand-strong: #8ac7fa;
    --brand-ink: #06121f;
    --accent: #ff8f5e;
    --accent-soft: #3a2419;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

main { flex: 1; }

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

a { color: var(--brand-strong); text-underline-offset: 0.18em; }
a:hover { color: var(--brand); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 7vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 4.5vw, 1.9rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }

p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  z-index: 10;
}
.skip-link:focus { top: 8px; }

/* ---------- Header ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 5;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
}
.brand img { width: 36px; height: 36px; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
}
.site-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.98rem;
}
.site-nav a:hover { background: var(--surface-2); color: var(--text); }
.site-nav a[aria-current="page"] { background: var(--surface-2); color: var(--brand-strong); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 64px;
  background:
    radial-gradient(1200px 400px at 85% -10%, rgba(92, 176, 245, 0.28), transparent 60%),
    radial-gradient(800px 300px at -10% 110%, rgba(255, 122, 69, 0.16), transparent 60%);
}
.hero .eyebrow {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero .tagline {
  font-size: clamp(1.15rem, 3.5vw, 1.4rem);
  color: var(--text-muted);
  max-width: 34ch;
  margin-bottom: 28px;
}

.button-row { display: flex; flex-wrap: wrap; gap: 12px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--brand); color: var(--brand-ink); }
.button-primary:hover { background: var(--brand-strong); color: var(--brand-ink); }
.button-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.button-secondary:hover { background: var(--surface-2); color: var(--text); }

/* ---------- Sections ---------- */

.section { padding: 48px 0; }
.section-alt { background: var(--surface-2); }
.section-header { margin-bottom: 24px; }
.section-header p { color: var(--text-muted); margin: 0; }

.about-grid { display: grid; gap: 16px; }
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.feature .icon { font-size: 1.6rem; line-height: 1; margin-bottom: 10px; }
.feature p { margin: 0; color: var(--text-muted); }

/* ---------- Game cards ---------- */

.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.game-card .art {
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
}
.game-card .art img { width: 100%; height: 100%; object-fit: cover; }
.game-card .body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.game-card h3 { margin: 0; font-size: 1.3rem; }
.game-card p { margin: 0; color: var(--text-muted); }
.game-card .meta { display: flex; flex-wrap: wrap; gap: 8px; }
.game-card .links { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.95rem; }

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.badge-soon { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge-live { background: #dff6e7; color: #17733d; border-color: transparent; }
@media (prefers-color-scheme: dark) {
  .badge-live { background: #143524; color: #7fe0a6; }
}

.store-badges { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Prose pages (privacy, terms, support) ---------- */

.page-header {
  padding: 40px 0 24px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.page-header p { color: var(--text-muted); margin: 0; }

.prose { max-width: var(--prose); padding: 32px 0 56px; }
.prose h2 { margin-top: 2em; scroll-margin-top: 90px; }
.prose h3 { margin-top: 1.5em; scroll-margin-top: 90px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.25em; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px; border-bottom: 1px solid var(--border); }
.prose th { font-family: var(--font-display); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 0 0 1.5em;
}
.callout p:last-child { margin-bottom: 0; }

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 8px;
}
.toc h2 { font-size: 1rem; margin: 0 0 8px; }
.toc ol { margin: 0; padding-left: 1.3em; columns: 1; }
.toc li { margin-bottom: 0.25em; }

/* Support */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 8px;
}
.contact-card .email { font-size: 1.2rem; font-weight: 700; word-break: break-word; }

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
.faq summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 16px 14px; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 28px 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.site-footer .container { display: flex; flex-direction: column; gap: 12px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }
.site-footer p { margin: 0; }

/* ---------- Larger screens ---------- */

@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: repeat(3, 1fr); }
  .toc ol { columns: 2; column-gap: 32px; }
  .hero { padding: 88px 0 96px; }
  .section { padding: 64px 0; }
}

@media (min-width: 960px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .site-footer .container { flex-direction: row; justify-content: space-between; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
