/* Cloud Bot Games — shared stylesheet.
   Design direction (see design/DESIGN.md): dark cinematic game-studio
   aesthetic modelled on the supplied Larian Studios references —
   near-black canvas, white "floating" content panels, bold uppercase
   condensed headings, ghost/outline buttons, dark multi-column footer
   with a legal-links bar. One stylesheet powers every page so the
   nav/footer shell stays identical across index + legal pages. */

:root {
  --bg-dark:   #16171b; /* page canvas */
  --bg-panel:  #1f2128; /* raised dark surfaces (nav, cards on dark) */
  --bg-light:  #ffffff; /* floating white content panels */
  --bg-cream:  #f5f4f2; /* alternate light band */
  --text-light:#f4f4f5;
  --text-dark: #1c1d21;
  --muted:     #9a9ba3; /* secondary text on dark */
  --muted-dk:  #5d5f68; /* secondary text on light */
  --accent:    #e8a33d; /* gold — primary accent, matches refs */
  --accent-2:  #c2410c; /* ember — used sparingly for emphasis */
  --line:      #2c2e36; /* hairlines on dark */
  --line-lt:   #e4e3df; /* hairlines on light */
  --maxw:      1140px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, .wordmark, .nav-links a, .btn, .eyebrow {
  font-family: "Oswald", "Arial Narrow", Impact, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.04; font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: 0.06em; }

a { color: inherit; text-decoration: none; }

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

.eyebrow {
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  font-weight: 600;
}

/* ---- Top navigation ---------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(22, 23, 27, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  /* Bar thickness is locked here so the logo can grow independently —
     a taller logo overhangs the bar instead of thickening it. */
  height: 102px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; }
.badge {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: var(--accent);
  color: #1a1205;
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  border-radius: 6px;
  font-size: 0.95rem;
}
.wordmark { font-size: 1.05rem; font-weight: 600; color: var(--text-light); }
/* Brand logo image — replaces the old "CBG" badge in the nav. Portrait
   2:3 poster (cbglogo.png); height drives the nav bar's height. */
.brand-logo { height: 132px; width: auto; display: block; border-radius: 6px; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--accent); }

/* ---- Hero -------------------------------------------------------------- */
.hero {
  position: relative;
  padding: 120px 0 140px;
  /* Self-contained cinematic backdrop — no external image dependency so
     the page renders identically offline and during App Store review. */
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(232,163,61,0.16), transparent 60%),
    radial-gradient(900px 500px at 10% 120%, rgba(194,65,12,0.14), transparent 55%),
    linear-gradient(180deg, #101116 0%, #16171b 60%, #1b1c22 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::after { /* subtle vignette to seat the headline */
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(900px 500px at 50% 40%, transparent, rgba(0,0,0,0.45));
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; max-width: 880px; }
.hero h1 { margin: 18px 0 22px; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 620px; }
.hero-cta { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 14px 30px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  transition: background 0.16s ease, color 0.16s ease;
  cursor: pointer;
}
.btn:hover { background: var(--accent); color: #1a1205; }
.btn-solid { background: var(--accent); color: #1a1205; }
.btn-solid:hover { background: #f3b85a; }
.btn-ghost-light { border-color: var(--line-lt); color: var(--text-dark); }
.btn-ghost-light:hover { background: var(--text-dark); color: #fff; }

/* ---- Floating white panel (cards row, like the references) ------------- */
.panel {
  background: var(--bg-light);
  color: var(--text-dark);
  /* Pull up so it overlaps the hero, mirroring the reference layout. */
  margin-top: -70px;
  position: relative;
  z-index: 2;
  border-radius: 4px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.45);
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.card {
  padding: 54px 40px;
  text-align: center;
  border-right: 1px solid var(--line-lt);
}
.card:last-child { border-right: none; }
.card .icon {
  width: 46px; height: 46px;
  margin: 0 auto 20px;
  color: var(--accent-2);
}
.card h3 { color: var(--text-dark); margin-bottom: 10px; }
.card p { color: var(--muted-dk); font-size: 0.97rem; margin-bottom: 22px; }

/* ---- Generic light/dark content sections ------------------------------ */
section.band { padding: 90px 0; }
section.light { background: var(--bg-light); color: var(--text-dark); }
section.cream { background: var(--bg-cream); color: var(--text-dark); }
section.light .eyebrow, section.cream .eyebrow { color: var(--accent-2); }
section.light h2, section.cream h2 { color: var(--text-dark); margin: 10px 0 18px; }
section .lead { max-width: 720px; font-size: 1.08rem; }
section.light .lead, section.cream .lead { color: var(--muted-dk); }
section.dark .lead { color: var(--muted); }

/* Game feature card */
.game {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-top: 40px;
}
.game-art {
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  background:
    radial-gradient(600px 300px at 30% 20%, rgba(232,163,61,0.28), transparent 60%),
    linear-gradient(135deg, #1f2128, #2c2e36);
  border: 1px solid var(--line);
  display: grid; place-items: center;
}
.game-art .glyph {
  font-family: "Oswald", sans-serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--accent);
  letter-spacing: 0.08em;
}
.game ul { margin: 18px 0 26px; padding-left: 18px; }
.game li { margin: 6px 0; color: var(--muted-dk); }

/* ---- Legal / long-form content pages ---------------------------------- */
.doc {
  background: var(--bg-light);
  color: var(--text-dark);
  padding: 70px 0 96px;
}
.doc .container { max-width: 820px; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); color: var(--text-dark); }
.doc .updated { color: var(--muted-dk); font-size: 0.9rem; margin: 14px 0 40px; }
.doc h2 {
  font-size: 1.3rem;
  color: var(--text-dark);
  margin: 40px 0 12px;
  padding-top: 8px;
}
.doc h3 { color: var(--text-dark); margin: 26px 0 8px; font-size: 1.02rem; }
.doc p, .doc li { color: #34353b; margin-bottom: 14px; }
.doc ul, .doc ol { margin: 0 0 14px 22px; }
.doc li { margin-bottom: 8px; }
.doc a { color: var(--accent-2); text-decoration: underline; }
.doc strong { color: var(--text-dark); }
.doc .toc {
  background: var(--bg-cream);
  border: 1px solid var(--line-lt);
  border-radius: 4px;
  padding: 22px 26px;
  margin-bottom: 40px;
}
.doc .toc h2 { margin: 0 0 10px; font-size: 1rem; }
.doc .toc ol { margin-bottom: 0; columns: 2; }
.doc .toc a { text-decoration: none; }
.doc .toc a:hover { text-decoration: underline; }

/* ---- Footer ------------------------------------------------------------ */
footer {
  background: #101116;
  border-top: 1px solid var(--line);
  padding: 70px 0 0;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 56px;
}
footer h4 {
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 18px;
}
footer p, footer li, footer a { color: var(--muted); font-size: 0.92rem; }
footer ul { list-style: none; }
footer li { margin-bottom: 10px; }
footer a:hover { color: var(--accent); }
.foot-about p { max-width: 320px; margin-top: 14px; }
.foot-brand { display: flex; align-items: center; gap: 10px; }
.legal-bar {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.legal-bar p, .legal-bar a { font-size: 0.85rem; color: var(--muted-dk); }
.legal-bar .links a { margin-left: 20px; }
.legal-bar .links a:hover { color: var(--accent); }

/* ---- Responsive -------------------------------------------------------- */
@media (max-width: 860px) {
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 0.74rem; }
  .wordmark { display: none; }
  .nav-inner { height: 76px; }
  .brand-logo { height: 98px; }
  .cards { grid-template-columns: 1fr; }
  .card { border-right: none; border-bottom: 1px solid var(--line-lt); }
  .card:last-child { border-bottom: none; }
  .panel { margin-top: -40px; }
  .game { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .doc .toc ol { columns: 1; }
  .hero { padding: 80px 0 100px; }
}
@media (max-width: 520px) {
  .foot-grid { grid-template-columns: 1fr; }
  .legal-bar { flex-direction: column; }
  .legal-bar .links a { margin: 0 16px 0 0; }
}
