/* site.css — the WordPress content shell (everything around the game canvas).
   The game itself is themed by game.css. Light, fast, and accessible. */

:root {
  --rc-primary: #4f7cff;
  --rc-ink: #1a2033;
  --rc-muted: #5a647e;
  --rc-surface: #ffffff;
  --rc-surface-2: #eef1f8;
  --rc-line: #e2e7f2;
  --rc-content: 720px;
  --rc-wide: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--rc-ink);
  background: var(--rc-surface);
  line-height: 1.65;
}
img { max-width: 100%; height: auto; }
a { color: var(--rc-primary); }

/* ---- Header ---- */
.site-header { border-bottom: 1px solid var(--rc-line); background: var(--rc-surface); }
.site-header__inner,
.site-footer__inner,
.rc-home,
.rc-page {
  max-width: var(--rc-wide);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.site-title { font-weight: 800; font-size: 1.15rem; }
.site-title a { color: var(--rc-ink); text-decoration: none; }
.custom-logo { max-height: 44px; width: auto; }
.site-nav__list { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; }
.site-nav__list a { color: var(--rc-muted); text-decoration: none; font-size: 0.92rem; }
.site-nav__list a:hover { color: var(--rc-ink); }

/* ---- Hero ---- */
.rc-hero { text-align: center; padding: clamp(24px, 5vw, 48px) 0 8px; }
.rc-hero__title { font-size: clamp(1.6rem, 4.5vw, 2.5rem); line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.01em; }
.rc-hero__lead { max-width: 680px; margin: 0 auto; color: var(--rc-muted); font-size: 1.08rem; }

/* ---- Game wrap (reserve space, no CLS) ---- */
.rc-game-wrap {
  max-width: var(--rc-content);
  margin: 20px auto;
}
.ricochet-mount {
  display: block;
  width: 100%;
  min-height: 420px; /* reserved so the mounting engine causes no layout shift */
}

/* ---- Content sections ---- */
.rc-content { max-width: var(--rc-content); margin: 0 auto; }
.rc-section { margin: 40px 0; }
.rc-section h2 { font-size: clamp(1.35rem, 3.5vw, 1.7rem); margin: 0 0 14px; }
.rc-section h3 { font-size: 1.15rem; margin: 22px 0 8px; }
.rc-steps, .rc-tips { padding-left: 1.2rem; }
.rc-steps li, .rc-tips li { margin: 8px 0; }

/* diagram */
.rc-diagram { margin: 20px 0; text-align: center; }
.rc-diagram svg { max-width: 100%; height: auto; }
.rc-diagram figcaption { color: var(--rc-muted); font-size: 0.88rem; margin-top: 8px; }

/* cards */
.rc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.rc-card { background: var(--rc-surface-2); border: 1px solid var(--rc-line); border-radius: 14px; padding: 18px; }
.rc-card h3 { margin-top: 0; }
.rc-card p { margin-bottom: 0; color: var(--rc-muted); }

/* faq */
.rc-faq { border-top: 1px solid var(--rc-line); }
.rc-faq__item { border-bottom: 1px solid var(--rc-line); }
.rc-faq__q { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; position: relative; padding-right: 28px; }
.rc-faq__q::-webkit-details-marker { display: none; }
.rc-faq__q::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.3rem; color: var(--rc-primary); }
.rc-faq__item[open] .rc-faq__q::after { content: "–"; }
.rc-faq__a { padding: 0 0 14px; color: var(--rc-muted); }

.rc-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.rc-links a { text-decoration: none; }

/* ---- Ad slots ---- */
.rc-ad {
  max-width: var(--rc-wide);
  margin: 18px auto;
  display: flex; align-items: center; justify-content: center;
  padding-inline: 16px;
}
.rc-ad--sidebar { max-width: 320px; }
.rc-ad__hint {
  font-size: 0.8rem; color: var(--rc-muted); border: 1px dashed var(--rc-line);
  padding: 8px 12px; border-radius: 8px; background: var(--rc-surface-2);
}

/* ---- Pages ---- */
.rc-page { padding-block: 32px; }
.rc-page__article { max-width: var(--rc-content); margin: 0 auto; }
.rc-page__title { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 18px; }
.rc-page__content > * + * { margin-top: 1rem; }
.rc-post-list { max-width: var(--rc-content); margin: 0 auto; display: grid; gap: 20px; }
.rc-post-card { border-bottom: 1px solid var(--rc-line); padding-bottom: 18px; }

.rc-btn-primary {
  display: inline-block; background: var(--rc-primary); color: #fff; text-decoration: none;
  padding: 10px 18px; border-radius: 10px; font-weight: 600;
}

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--rc-line); margin-top: 48px; padding: 28px 0; background: var(--rc-surface-2); }
.footer-nav__list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 0 0 12px; justify-content: center; }
.footer-nav__list a { color: var(--rc-muted); text-decoration: none; font-size: 0.9rem; }
.site-footer__copy { text-align: center; color: var(--rc-muted); font-size: 0.85rem; margin: 0; }

/* ---- Dark scheme for the shell (game stays dark regardless) ---- */
@media (prefers-color-scheme: dark) {
  :root {
    --rc-ink: #e8ecf4; --rc-muted: #9aa6bf; --rc-surface: #0d1119;
    --rc-surface-2: #151b28; --rc-line: #232c40;
  }
  .site-title a { color: var(--rc-ink); }
}

@media (max-width: 600px) {
  .site-nav__list { gap: 12px; }
  .rc-hero { padding-top: 20px; }
}
