/* Inspector Game Studios. Studio pages take the logo's palette: charcoal ink,
   burnt orange and paper grey. Game pages (main.theme-<game>) swap the
   variables for the game's own look; header and footer stay studio. */
@font-face { font-family: "Montserrat"; font-weight: 600; font-display: swap; src: url("/fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 800; font-display: swap; src: url("/fonts/montserrat-latin-800-normal.woff2") format("woff2"); }

:root {
  --paper: #ecebe7;
  --paper-2: #e2e0db;
  --card: #f7f6f3;
  --ink: #24272c;
  --ink-2: #2f3338;
  --ink-3: #3a3e44;
  --rust: #a8471a;
  --rust-bright: #c4561f;
  --stone: #b8b6b0;

  --bg: var(--paper);
  --surface: var(--card);
  --surface-2: #ffffff;
  --line: rgba(36, 39, 44, 0.14);
  --text: var(--ink);
  --muted: #555a61;
  --accent: var(--rust);
  --accent-hover: var(--rust-bright);
  --on-accent: #ffffff;
  --link: var(--rust);
  --radius: 14px;
  --wrap: 1120px;
  --display: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Faint paper grain, like the logo's card stock. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--paper) var(--grain);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.12; letter-spacing: -0.01em; margin: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }

/* Dark ink band: the logo's charcoal. */
.ink {
  --bg: var(--ink); --surface: var(--ink-2); --surface-2: var(--ink-3);
  --line: rgba(236, 235, 231, 0.12); --text: #f1efea; --muted: #b9b7b1;
  --link: #e58a55; --accent: #e07a3f; --accent-hover: #f39a63;
  background: var(--ink) var(--grain); color: var(--text);
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(236, 235, 231, 0.9);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(36, 39, 44, 0.14);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand img { width: auto; height: 44px; }
.brand span { font-family: var(--display); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; font-size: 1.05rem; line-height: 1.05; color: var(--ink); }
.brand b {
  display: block; color: var(--rust); font-weight: 600; font-size: 0.66rem; letter-spacing: 0.24em;
  border-top: 1.5px solid currentColor; padding-top: 3px; margin-top: 3px;
}
.site-header nav { display: flex; gap: 4px; }
.site-header nav a {
  color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 8px 12px; border-radius: 8px;
}
.site-header nav a:hover { color: var(--rust); }
.site-header nav a[aria-current="page"] { color: var(--rust); box-shadow: inset 0 -2px 0 var(--rust); border-radius: 0; }
@media (max-width: 760px) {
  .site-header .wrap { flex-wrap: wrap; padding-top: 10px; padding-bottom: 6px; gap: 4px; }
  .site-header nav { width: 100%; overflow-x: auto; margin: 0 -10px; scrollbar-width: none; }
  .site-header nav a { padding: 8px 8px; font-size: 0.72rem; letter-spacing: 0.04em; white-space: nowrap; }
}

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 26px;
  border-radius: 10px; font-family: var(--display); font-weight: 800; font-size: 0.85rem; letter-spacing: 0.1em;
  text-transform: uppercase; text-decoration: none; transition: background .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { border: 2px solid currentColor; color: var(--text); }
.btn-ghost:hover { color: var(--accent); }

/* Sections */
section { padding: 96px 0; }
.section-head { max-width: 42rem; margin-bottom: 44px; }
.section-head h2, .about-title { font-size: clamp(1.9rem, 4.2vw, 2.8rem); text-transform: uppercase; letter-spacing: 0.01em; }
.section-head p { color: var(--muted); margin: 14px 0 0; }
@media (max-width: 760px) { section { padding: 68px 0; } }

/* Studio hero */
.studio-hero { padding: 72px 0 84px; border-bottom: 1px solid var(--line); }
.studio-hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.studio-hero h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); text-transform: uppercase; letter-spacing: 0; }
.studio-hero h1 em { font-style: normal; color: var(--rust); display: block; }
.studio-hero p { max-width: 34rem; color: var(--muted); font-size: 1.15rem; margin: 22px 0 34px; }
.studio-hero .logo { width: 100%; max-width: 440px; justify-self: center; filter: drop-shadow(0 18px 30px rgba(36,39,44,.18)); }
@media (max-width: 860px) {
  .studio-hero { padding: 40px 0 64px; }
  .studio-hero .wrap { grid-template-columns: 1fr; gap: 28px; }
  .studio-hero .logo { order: -1; max-width: 240px; }
}

/* Game cards */
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 24px; }
.game-card {
  display: grid; grid-template-columns: minmax(150px, 34%) 1fr; overflow: hidden; text-decoration: none; color: #eef1f8;
  background: linear-gradient(160deg, #17213f, #0b1124); border: 1px solid rgba(190,205,255,.14); border-radius: 18px;
  transition: border-color .2s, transform .2s;
}
.game-card:hover { color: #eef1f8; border-color: var(--accent); transform: translateY(-3px); }
.game-card .cover { width: 100%; height: 100%; min-height: 300px; max-height: 420px; object-fit: cover; object-position: center 45%; }
.game-card-body { padding: 32px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.game-card .icon { width: 56px; height: 56px; border-radius: 14px; }
.game-card h3 { font-size: 2rem; margin: 8px 0 2px; }
.game-card .tagline { color: #ffd25a; font-weight: 700; margin: 0 0 8px; }
.game-card p { color: #a8b1c8; margin: 0; max-width: 34rem; }
.game-card .more { display: inline-block; margin-top: 14px; color: #ffd25a; font-family: var(--display); font-weight: 800; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; }
.game-card .tag { color: #a9c8ff; border-color: rgba(169,200,255,.3); background: rgba(169,200,255,.08); }
@media (max-width: 520px) { .game-card { grid-template-columns: 1fr; } .game-card .cover { min-height: 0; height: 200px; } }

.tag {
  display: inline-block; font-family: var(--display); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); border: 1.5px solid currentColor; padding: 3px 10px; border-radius: 999px;
}

/* In production: case-file cards */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 22px; }
.project {
  position: relative; padding: 28px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: 0 1px 0 rgba(36,39,44,.04), 0 10px 30px rgba(36,39,44,.06);
}
.project::before { content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.project-art { height: 96px; margin-bottom: 18px; }
.project-art img { width: 96px; height: 96px; object-fit: contain; }
.project h3 { font-size: 1.25rem; margin: 12px 0 6px; }
.project p { color: var(--muted); margin: 0; }
.project-art .mystery {
  display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%;
  font-family: var(--display); font-size: 2.6rem; font-weight: 800; color: var(--muted);
  border: 2px dashed var(--stone); background: var(--paper-2);
}

/* About */
.about { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: center; }
.about .emblem { width: 100%; max-width: 280px; justify-self: center; aspect-ratio: 1; object-fit: contain; padding: 44px; border-radius: 50%; background: var(--paper) var(--grain); box-shadow: 0 0 0 8px var(--ink-2), 0 0 0 10px rgba(224,122,63,.6); }
.about p { color: var(--muted); }
.about-title { margin-bottom: 14px; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.values div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.values strong { display: block; font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; font-size: .9rem; color: var(--accent); }
.values span { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; gap: 32px; } .about .emblem { max-width: 180px; padding: 26px; } .values { grid-template-columns: 1fr; } }

/* Contact band */
.cta-band { background: var(--rust) var(--grain); color: #fff; text-align: center; padding: 80px 0; }
.cta-band h2 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); text-transform: uppercase; }
.cta-band p { color: rgba(255,255,255,.88); max-width: 34rem; margin: 14px auto 30px; }
.cta-band .actions { justify-content: center; }
.cta-band .btn-primary { background: var(--ink); color: #fff; }
.cta-band .btn-primary:hover { background: #000; color: #fff; }
.cta-band .btn-ghost { color: #fff; }
.cta-band .btn-ghost:hover { color: var(--ink); }

/* Plain content pages */
.page { padding: 64px 0 96px; }
.page .wrap, .narrow { max-width: 780px; }
.page h1 { font-size: clamp(2rem, 5vw, 2.9rem); text-transform: uppercase; margin-bottom: 18px; }
.page h2 { font-size: 1.15rem; margin: 40px 0 10px; text-transform: uppercase; letter-spacing: .04em; }
.page .meta { color: var(--muted); white-space: pre-line; }
.policy p { white-space: pre-line; overflow-wrap: anywhere; }
.faq { display: grid; gap: 12px; margin: 14px 0 24px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 10px 0 0; color: var(--muted); }
.contact-card {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 24px; margin: 28px 0;
}
.contact-card p { margin: 0; overflow-wrap: anywhere; }
.back { display: inline-block; margin-bottom: 18px; text-decoration: none; font-weight: 700; }
.link-list { padding-left: 20px; }
.link-list li { margin: 8px 0; }

/* Footer */
.site-footer { background: var(--ink) var(--grain); color: #f1efea; padding: 56px 0 40px; }
.site-footer .wrap { display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; }
.site-footer .brand span { color: #f1efea; }
.site-footer .brand b { color: #e07a3f; }
.site-footer .brand img { height: 52px; padding: 6px 8px; background: var(--paper); border-radius: 10px; }
.site-footer p { color: #b9b7b1; margin: 12px 0 0; font-size: 0.92rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: flex-start; }
.site-footer nav a { color: #d8d6d0; text-decoration: none; font-size: 0.95rem; overflow-wrap: anywhere; }
.site-footer nav a:hover { color: #e58a55; }
.site-footer .legal { grid-column: 1 / -1; font-size: 0.82rem; border-top: 1px solid rgba(236,235,231,.12); padding-top: 20px; margin: 0; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* ---------- OrbitALL: the game's own dark space look ---------- */
main.theme-orbitall {
  --bg: #060a18; --surface: #111a33; --surface-2: #17213f; --line: rgba(190,205,255,.12);
  --text: #eef1f8; --muted: #a8b1c8; --accent: #ffd25a; --accent-hover: #ffe08a; --on-accent: #1a1406;
  --link: #a9c8ff;
  background: var(--bg); color: var(--text);
}
.theme-orbitall h1, .theme-orbitall h2, .theme-orbitall .about-title { text-transform: none; }
.theme-orbitall .eyebrow::before { display: none; }
.stars {
  background-color: #060a18;
  background-image:
    radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,.8), transparent 60%),
    radial-gradient(1px 1px at 140px 80px, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 90px 160px, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1px 1px at 210px 210px, rgba(169,200,255,.7), transparent 60%),
    radial-gradient(1px 1px at 260px 40px, rgba(255,255,255,.45), transparent 60%),
    radial-gradient(1.5px 1.5px at 330px 140px, rgba(255,210,90,.6), transparent 60%);
  background-size: 360px 260px;
}
.game-hero { position: relative; overflow: hidden; padding: 96px 0 88px; border-bottom: 1px solid var(--line); }
.game-hero::after {
  content: ""; position: absolute; inset: auto -20% -60% -20%; height: 80%;
  background: radial-gradient(ellipse at center, rgba(240,122,54,.18), transparent 65%); pointer-events: none;
}
.game-hero .wrap { position: relative; z-index: 1; }
.game-hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
.game-hero p { max-width: 34rem; color: var(--muted); font-size: 1.15rem; margin: 18px 0 30px; }
.game-hero .planet { position: absolute; pointer-events: none; }
.game-hero .p1 { width: min(42vw, 420px); right: -6%; top: 6%; }
.game-hero .p2 { width: min(16vw, 130px); right: 34%; bottom: 10%; opacity: .9; }
.game-hero .ship { position: absolute; width: 84px; right: 30%; top: 22%; transform: rotate(-18deg); }
@media (max-width: 760px) {
  .game-hero { padding: 56px 0 64px; }
  .game-hero .p1 { width: 220px; right: -90px; top: -30px; opacity: .55; }
  .game-hero .p2, .game-hero .ship { display: none; }
}
.gold { color: var(--accent); }
.game-id { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.game-id img { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.game {
  background: linear-gradient(160deg, var(--surface-2), #0b1124);
  border: 1px solid var(--line); border-radius: 28px; padding: 48px;
}
.game-top { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 56px; align-items: start; }
.game p { color: var(--muted); }
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.features li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.features li::before {
  content: ""; flex: none; width: 10px; height: 10px; margin-top: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px rgba(255,210,90,.6);
}
.features strong { color: var(--text); }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 18px 8px 14px;
  background: #000; color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 12px; text-decoration: none;
}
.store:hover { border-color: #fff; color: #fff; }
.store svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.store span { display: flex; flex-direction: column; font-weight: 700; font-size: 1.1rem; line-height: 1.1; }
.store small { font-weight: 500; font-size: 0.68rem; letter-spacing: 0.04em; opacity: .85; }
.store.soon { opacity: .6; cursor: default; border-style: dashed; }
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; align-items: start; margin-top: 48px; padding-bottom: 28px; }
.phone { margin: 0; border-radius: 26px; padding: 6px; background: #1b2238; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.phone img { width: 100%; height: auto; aspect-ratio: 1 / 2.05; object-fit: cover; border-radius: 21px; }
.shots .phone:nth-child(even) { transform: translateY(28px); }
@media (max-width: 960px) { .game { padding: 32px 24px; } .game-top { grid-template-columns: 1fr; } .shots { gap: 14px; } }
@media (max-width: 760px) {
  .shots { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 32px -24px 0; padding: 4px 24px 12px; scrollbar-width: none; }
  .shots .phone { flex: 0 0 62%; scroll-snap-align: center; }
  .shots .phone:nth-child(even) { transform: none; }
}
