/* MathuLabs.com — shared styles */
:root {
  --bg: #fbf8f2;
  --surface: #ffffff;
  --ink: #222b34;
  --muted: #5b5f78;
  --line: #e6e1d6;
  --accent: #fe6702;
  --accent-ink: #ffffff;
  --accent-2: #2f6bff;
  --grid: rgba(34, 43, 52, 0.06);
  --radius: 18px;
  --max: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161c23;
    --surface: #1f262f;
    --ink: #f2f0ea;
    --muted: #a7a9bf;
    --line: #313a46;
    --accent: #ff7a1f;
    --accent-ink: #11121d;
    --accent-2: #7aa0ff;
    --grid: rgba(242, 240, 234, 0.05);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
a { color: var(--accent-2); }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; display: block; }

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

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0; z-index: 10;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px 16px; min-height: 68px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.logo picture { display: block; }
.logo-mark { width: 44px; height: auto; display: block; }
.logo-text { text-transform: uppercase; letter-spacing: 0.06em; font-size: 1.1rem; }
.logo-text span { color: var(--accent); }

.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero-logo img { width: 100%; max-width: 420px; height: auto; margin-left: auto; }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-logo { display: none; }
}
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  color: var(--muted); text-decoration: none; font-weight: 500;
  padding: 6px 12px; border-radius: 999px; font-size: 0.95rem;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--line); }

/* Hero */
.hero {
  padding: 84px 0 64px;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  display: inline-block; font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
h1, h2, h3 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  letter-spacing: -0.025em; line-height: 1.15; margin: 0 0 0.5em;
}
.hero h1 { font-size: clamp(2.3rem, 6vw, 4rem); max-width: 14ch; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 52ch; margin: 0 0 28px; }
.symbols {
  font-family: "Space Grotesk", sans-serif; font-weight: 700;
  color: var(--accent); letter-spacing: 0.3em;
}

.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  padding: 12px 22px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
}
.btn:hover { opacity: 0.88; }
.btn.secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Sections */
section { padding: 64px 0; }
.section-head { margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
.section-head p { color: var(--muted); margin: 0; }

/* Game cards */
.games { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.game {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 12px;
}
img.game-icon {
  width: 88px; height: 88px; border-radius: 22%; object-fit: cover;
  box-shadow: 0 6px 18px rgba(34, 43, 52, 0.18);
}
.tag.soon { color: var(--accent); border-color: var(--accent); }
.game-icon {
  width: 72px; height: 72px; border-radius: 18px;
  display: grid; place-items: center; font-size: 2rem; font-weight: 700;
  font-family: "Space Grotesk", sans-serif; color: #fff;
}
.game h3 { font-size: 1.3rem; margin: 0; }
.tag {
  align-self: flex-start; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px;
}
.game p { color: var(--muted); margin: 0; flex: 1; }
.store-links { display: flex; gap: 8px; flex-wrap: wrap; }
.store-links a {
  font-size: 0.85rem; font-weight: 600; text-decoration: none;
  padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink);
}
.store-links a:hover { border-color: var(--ink); }
.store-links a.soon { color: var(--muted); pointer-events: none; border-style: dashed; }

/* About strip */
.about { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.about-grid h3 { font-size: 1.1rem; margin-bottom: 6px; }
.about-grid p { color: var(--muted); margin: 0; }

/* Long-form pages (privacy / support) */
.doc { padding: 56px 0 80px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.doc h2 { font-size: 1.4rem; margin-top: 2.2em; }
.doc h3 { font-size: 1.1rem; margin-top: 1.6em; }
.doc .meta { color: var(--muted); margin-top: -0.4em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 0.35em 0; }
.callout {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 12px; padding: 16px 20px; margin: 24px 0;
}
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 24px; }
.toc ol { margin: 0; padding-left: 1.2em; }

.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 18px; margin: 10px 0;
}
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { color: var(--muted); margin: 10px 0 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: 0.92rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* Trailer button + modal */
.trailer-btn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  padding: 8px; cursor: pointer; text-align: left; color: var(--ink); font: inherit;
}
.trailer-btn:hover { border-color: var(--accent); }
.trailer-thumb {
  position: relative; width: 44px; height: 78px; border-radius: 8px; overflow: hidden; flex: none;
  background: #0b0f1c;
}
.trailer-thumb img { width: 100%; height: 100%; object-fit: cover; }
.trailer-thumb::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0;
  border-left: 14px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent;
  transform: translateX(2px); filter: drop-shadow(0 1px 3px rgba(0,0,0,.6));
}
.trailer-text { display: flex; flex-direction: column; line-height: 1.3; }
.trailer-text strong { font-size: 0.95rem; }
.trailer-text span { font-size: 0.85rem; color: var(--muted); }

.trailer-modal {
  padding: 0; border: 0; background: transparent; overflow: visible;
  width: min(92vw, calc(86vh * 9 / 16)); max-width: 420px;
}
.trailer-modal::backdrop { background: rgba(10, 12, 20, 0.82); }
.trailer-modal video {
  display: block; width: 100%; aspect-ratio: 9 / 16; max-height: 86vh;
  border-radius: 18px; background: #000;
}
.trailer-close {
  position: absolute; top: -14px; right: -14px; z-index: 1;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: #fff; color: #222b34; font-size: 1.6rem; line-height: 1;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
}
@media (max-width: 560px) { .trailer-close { top: 8px; right: 8px; } }

/* Landscape trailers */
.trailer-btn.wide .trailer-thumb { width: 96px; height: 54px; }
.trailer-modal.landscape { width: min(92vw, calc(80vh * 16 / 9)); max-width: 960px; }
.trailer-modal.landscape video { aspect-ratio: 16 / 9; max-height: 80vh; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding: 56px 0 44px; }
  section { padding: 48px 0; }
}
