/* IJ Code Labs games site – shared styles.
   Each page sets its own colours in a <style> block from build.py:
   --bg, --bg-raised and four accents --a1..--a4 (the game's palette). */
:root {
  --bg: #121318;
  --bg-raised: #1c1d25;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f2f3f7;
  --muted: #a3a3b0;
  --a1: #ffc840;
  --a2: #6be0b3;
  --a3: #ab99ff;
  --a4: #6bc2ff;
  --radius: 20px;
  --max: 980px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--a4); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-nav { display: flex; gap: 20px; font-size: 15px; }
.site-nav a { color: var(--muted); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); text-decoration: none; }

/* Hero */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 12px 40px rgba(0,0,0,.45); }
.hero h1 { font-size: clamp(38px, 6vw, 56px); line-height: 1.05; margin: 24px 0 12px; letter-spacing: -0.02em; }
.hero .lead { font-size: 20px; color: var(--muted); margin: 0 0 28px; max-width: 30em; }
.phone {
  width: 100%; max-width: 330px; justify-self: center;
  border-radius: 44px; border: 10px solid #000; background: #000;
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08);
}
.phone img { display: block; width: 100%; border-radius: 34px; }
.hero-landscape .wrap { grid-template-columns: 1fr; gap: 36px; }
.phone.landscape { max-width: 760px; border-radius: 40px; }
.phone.landscape img { border-radius: 30px; }

.button {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--text); color: #000; font-weight: 600;
  padding: 14px 22px; border-radius: 14px;
}
.button:hover { text-decoration: none; opacity: .9; }
.button svg { width: 22px; height: 22px; }
.button-soon { background: var(--bg-raised); color: var(--muted); border: 1px solid var(--line); cursor: default; }
.button-soon:hover { opacity: 1; }
.store-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.note { color: var(--muted); font-size: 14px; margin-top: 12px; }

/* Sections */
section { padding: 40px 0; }
h2 { font-size: 30px; letter-spacing: -0.01em; margin: 0 0 20px; }
h3 { font-size: 19px; margin: 0 0 6px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }

.plus {
  background: linear-gradient(135deg, color-mix(in srgb, var(--a2) 16%, transparent), color-mix(in srgb, var(--a3) 12%, transparent));
  border: 1px solid color-mix(in srgb, var(--a2) 30%, transparent); border-radius: var(--radius); padding: 28px;
}

/* Studio home: the grid of games */
.studio-hero { padding-bottom: 8px; }
.studio-hero .wrap { grid-template-columns: 1fr; }
.studio-hero h1 { margin-top: 0; }
.game-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.game-card {
  display: flex; gap: 20px; align-items: flex-start; color: var(--text);
  background: var(--card-bg, var(--bg-raised)); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; transition: transform .15s ease, border-color .15s ease;
}
.game-card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--card-accent); }
.game-card img { width: 88px; height: 88px; border-radius: 20px; flex: none; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.game-card h3 { font-size: 22px; margin: 2px 0 2px; }
.game-card p { margin: 0; color: var(--muted); font-size: 16px; }
.game-card .game-sub { color: var(--card-accent); font-weight: 600; font-size: 14px; margin-bottom: 8px; }

/* "More games" strip on game pages */
.more-games { display: flex; gap: 14px; flex-wrap: wrap; }
.more-game {
  display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 15px; line-height: 1.35;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 18px; padding: 12px 18px 12px 12px;
}
.more-game strong { color: var(--text); }
.more-game:hover { text-decoration: none; border-color: var(--a1); }
.more-game img { width: 56px; height: 56px; border-radius: 13px; }
.plus ul { margin: 12px 0 0; padding-left: 20px; }

/* Document pages (support, privacy, terms) */
.doc { padding: 48px 0 32px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); line-height: 1.1; margin: 0 0 8px; letter-spacing: -0.02em; }
.doc .updated { color: var(--muted); margin: 0 0 32px; font-size: 15px; }
.doc h2 { font-size: 22px; margin: 36px 0 10px; }
.doc h3 { font-size: 17px; margin: 20px 0 6px; }
.doc p, .doc li { color: #d5d8e2; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }

.faq details {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 20px; margin: 10px 0;
}
.faq summary { cursor: pointer; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; }

.contact {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; margin: 28px 0;
}
.contact p { margin: 6px 0; }

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

@media (max-width: 760px) {
  .hero { padding-top: 40px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .phone { max-width: 270px; }
  .phone.landscape { max-width: 100%; border-width: 6px; border-radius: 24px; }
  .phone.landscape img { border-radius: 18px; }
  .cards { grid-template-columns: 1fr; }
  .game-grid { grid-template-columns: 1fr; }
  .site-nav { gap: 16px; }
}
