/* Bellrock — shared base. Neutral by default; product pages override the tokens in their theme.css. */

:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #1c1c1a;
  --muted: #62625d;
  --border: #e3e3de;
  --link: #1c1c1a;
  --focus: #2f6fdd;
  --radius: 10px;
  --maxw: 1080px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root.neutral {
    --bg: #151514;
    --surface: #1d1d1b;
    --text: #ededea;
    --muted: #a3a39c;
    --border: #2e2e2b;
    --link: #ededea;
    --focus: #7aa7ff;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
}

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

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

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

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

/* ---------- Top bar & footer (all pages) ---------- */

.topbar { border-bottom: 1px solid var(--border); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; text-decoration: none; color: var(--text); }
.topbar nav { display: flex; gap: 20px; font-size: 15px; }
.topbar nav a { text-decoration: none; color: var(--muted); }
.topbar nav a:hover { color: var(--text); text-decoration: underline; }
.back { text-decoration: none; color: var(--muted); font-size: 15px; }
.back:hover { color: var(--text); text-decoration: underline; }

.site-footer { border-top: 1px solid var(--border); margin-top: 72px; padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer .fineprint { flex-basis: 100%; font-size: 12.5px; margin: 8px 0 0; }

/* ---------- Studio home ---------- */

.intro { padding: 72px 0 40px; max-width: 640px; }
.intro h1 { font-size: clamp(32px, 5vw, 44px); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 16px; }
.intro p { color: var(--muted); font-size: 19px; margin: 0; }

.section-title { font-size: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 32px 0 16px; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; list-style: none; margin: 0; padding: 0; }

.card {
  display: block; height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none; color: inherit;
  transition: border-color 0.15s ease;
}
.card:hover { border-color: var(--muted); }
.card:hover h3 { text-decoration: underline; text-underline-offset: 0.18em; }
.card-media { aspect-ratio: 16 / 10; background: var(--border); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px 20px 22px; }
.card h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.01em; }
.card p { margin: 0 0 12px; color: var(--muted); font-size: 16px; }
.card .platforms { font-size: 13.5px; color: var(--muted); margin: 0; }

.contact { margin-top: 56px; max-width: 640px; }
.contact h2 { font-size: 20px; margin: 0 0 8px; }
.contact p { margin: 0; color: var(--muted); }

/* ---------- Product page (shared scheme; colors/fonts from theme.css) ---------- */

.product .hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px; align-items: center; padding: 56px 0 24px; }
.eyebrow { margin: 0 0 12px; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.product h1 { margin: 0 0 18px; }
.lead { font-size: 19px; margin: 0 0 16px; }
.hero-text p.more { color: var(--muted); margin: 0 0 28px; }
.store { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.store a.badge img { height: 56px; width: auto; }
.store .soon { font-size: 15px; color: var(--muted); }
.hero-media { margin: 0; justify-self: center; width: 100%; max-width: 380px; }
.hero-media img { width: 100%; }

.support { margin-top: 48px; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.support h2 { margin: 0 0 12px; font-size: 22px; }
.support ul { margin: 0; padding-left: 20px; }
.support li { margin: 6px 0; }

/* ---------- Legal pages ---------- */

.legal { max-width: 78ch; padding: 40px 0 0; }
.legal h1 { font-size: clamp(28px, 4vw, 38px); line-height: 1.15; margin: 0 0 8px; letter-spacing: -0.01em; }
.legal .meta { color: var(--muted); margin: 0 0 24px; font-size: 15px; }
.legal h2 { font-size: 22px; margin: 40px 0 10px; line-height: 1.25; scroll-margin-top: 16px; }
.legal h3 { font-size: 18px; margin: 24px 0 8px; }
.legal p, .legal li { font-size: 16.5px; overflow-wrap: anywhere; }
.legal ul, .legal ol { padding-left: 22px; }
.legal li { margin: 4px 0; }
.legal .toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin: 0 0 16px; }
.legal .toc ol, .legal .toc ul { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.legal .toc li { font-size: 15px; break-inside: avoid; }
.legal .table-wrap { width: calc(min(100vw, var(--maxw)) - 48px); overflow-x: auto; margin: 16px 0; border: 1px solid var(--border); border-radius: 8px; }
.legal table { border-collapse: collapse; width: 100%; min-width: 820px; font-size: 14.5px; background: var(--surface); }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.legal tr:last-child td { border-bottom: 0; }
.legal th { font-weight: 600; background: var(--bg); }
.legal-links { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 15px; color: var(--muted); }

/* ---------- 404 ---------- */
.notfound { padding: 96px 0 24px; max-width: 560px; }
.notfound h1 { font-size: 36px; margin: 0 0 12px; }

/* ---------- Responsive ---------- */

@media (max-width: 800px) {
  .cards { grid-template-columns: 1fr; }
  .product .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 32px; }
  .hero-media { max-width: 320px; }
  .legal .toc ol, .legal .toc ul { columns: 1; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .intro { padding: 48px 0 24px; }
  .intro p, .lead { font-size: 17px; }
  .topbar nav { gap: 14px; }
  .support { padding: 20px; }
}

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

@media (max-width: 480px) {
  .legal .table-wrap { width: calc(100vw - 32px); }
}

.store .badge img { height: 56px; width: auto; }
.store .badge-placeholder { cursor: default; }
