/* shapetrouble3d.com — shared styles for the content pages (home, game article, privacy, 404).
   One visual world: the night sky behind the mark. Colours and fonts come from brand/brand.json. */
:root {
  color-scheme: dark;
  --navy: #0b1020;        /* page ground */
  --ink: #151b2a;         /* raised panels */
  --deep: #060914;        /* deepest band, footer */
  --pearl: #eef2f7;       /* text */
  --muted: rgba(238, 242, 247, 0.68);
  --faint: rgba(238, 242, 247, 0.42);
  --blue: #8fe3ff;        /* cool light: links, labels */
  --mint: #a7e0d6;        /* the orbit: staged / secondary */
  --gold: #ffcf6b;        /* warm light: the main action */
  --coral: #ff7a5c;       /* warnings, the "pop" */
  --line: rgba(143, 227, 255, 0.16);
  --line-strong: rgba(143, 227, 255, 0.34);
  --display: "Instrument Serif", ui-serif, Georgia, serif;
  --text: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Azeret Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1120px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--navy); color: var(--pearl); font: 400 16px/1.55 var(--text); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
img, video { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--pearl); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #1a1206; padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(11, 16, 32, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--pearl); text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: 0.2px; white-space: nowrap; }
.logo img { width: 34px; height: 34px; }
.logo b { color: var(--gold); font-weight: 600; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; padding: 8px 10px; border-radius: 999px; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--pearl); background: rgba(143, 227, 255, 0.08); }
@media (max-width: 560px) { .logo span { display: none; } .nav a { padding: 8px 8px; font-size: 13.5px; } }
@media (max-width: 420px) { .site-head .nav a[href$="#about"] { display: none; } } /* About stays in the footer; the header fits a phone */

/* ---------- type ---------- */
.eyebrow { font: 500 11.5px/1 var(--mono); letter-spacing: 1.8px; text-transform: uppercase; color: var(--blue); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font: italic 400 clamp(52px, 9vw, 104px)/0.92 var(--display); letter-spacing: -0.5px; }
h2 { font: italic 400 clamp(36px, 5vw, 54px)/1 var(--display); }
h3 { font: 600 19px/1.25 var(--text); }
p { margin: 0; text-wrap: pretty; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 40ch; }
.prose { max-width: 66ch; display: flex; flex-direction: column; gap: 14px; }
.prose ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.small { font-size: 13.5px; color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.86em; }

/* ---------- buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: 600 15px/1 var(--text); padding: 14px 20px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--pearl); background: rgba(21, 27, 42, 0.7); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--blue); color: var(--pearl); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #1a1206; }
.btn.primary:hover { filter: brightness(1.06); color: #1a1206; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- sections ---------- */
section { padding-block: clamp(56px, 9vw, 104px); }
section + section { border-top: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: clamp(24px, 4vw, 40px); max-width: 62ch; }

/* hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(48px, 8vw, 96px) clamp(56px, 9vw, 110px); border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0; background: url("/assets/brand/lensing-web.jpg") center / cover no-repeat; opacity: 0.55; mix-blend-mode: screen; pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 70% at 75% 45%, rgba(11, 16, 32, 0) 0%, rgba(11, 16, 32, 0.55) 60%, var(--navy) 100%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero-text { display: flex; flex-direction: column; gap: 22px; }
.hero-text h1 em { font-style: italic; color: var(--gold); }
.hero-mark { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hero-mark img { width: min(100%, 420px); height: auto; aspect-ratio: 1; filter: drop-shadow(0 0 40px rgba(143, 227, 255, 0.18)); }
.hero-mark figcaption { font-size: 12.5px; color: var(--faint); text-align: center; max-width: 34ch; }
@media (max-width: 760px) { .hero .wrap { grid-template-columns: 1fr; } .hero-mark { order: -1; } .hero-mark img { width: min(62vw, 260px); } }

/* games */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.game-card { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 0; background: var(--ink); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; color: var(--pearl); text-decoration: none; grid-column: 1 / -1; transition: border-color 0.2s; }
.game-card:hover { border-color: var(--line-strong); color: var(--pearl); }
.game-card .media { position: relative; background: #03060d; aspect-ratio: 9 / 16; max-height: 640px; }
.game-card .media video, .game-card .media img { width: 100%; height: 100%; object-fit: cover; }
.game-card .body { padding: clamp(22px, 4vw, 44px); display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.game-card h3 { font: italic 400 clamp(38px, 5vw, 60px)/0.95 var(--display); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 500 12px/1 var(--mono); letter-spacing: 0.4px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; }
.chip.new { color: #1a1206; background: var(--mint); border-color: var(--mint); }
.film-strip { display: flex; flex-direction: column; gap: 6px; }
.film-strip .bar { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #07080c 0%, #3d434f 6%, #c9d1dc 13%, #f4f0df 22%, #f7d77a 35%, #e7a24a 42%, #9b3fa7 52%, #4a5be0 60%, #3fb3e8 72%, #67e0d6 86%, #b8f0c9 100%); }
.film-strip .ends { display: flex; justify-content: space-between; font: 11px/1 var(--mono); color: var(--faint); }
@media (max-width: 720px) { .game-card { grid-template-columns: 1fr; } .game-card .media { aspect-ratio: 4 / 5; } }

/* sponsor */
.sponsor { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border: 1px dashed var(--line-strong); border-radius: 16px; margin-top: 24px; color: var(--muted); }
.sponsor img { height: 40px; width: auto; }
.sponsor a { color: var(--pearl); font-weight: 600; }

/* accounts */
.accounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.account { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 18px; background: var(--ink); border: 1px solid var(--line); color: var(--pearl); text-decoration: none; }
.account:hover { border-color: var(--blue); color: var(--pearl); }
.account svg { width: 28px; height: 28px; flex: none; }
.account span { display: flex; flex-direction: column; gap: 2px; }
.account small { color: var(--muted); font: 12px/1.2 var(--mono); }

/* free visuals + about */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
@media (max-width: 760px) { .split { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--ink); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 3vw, 32px); display: flex; flex-direction: column; gap: 12px; }
.credit { font: 13px/1.4 var(--mono); color: var(--pearl); background: var(--deep); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; overflow-x: auto; white-space: nowrap; }
.ledger { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14.5px; }
.ledger dt { font: 500 11.5px/1.9 var(--mono); letter-spacing: 1px; text-transform: uppercase; }
.ledger dt.real { color: var(--gold); }
.ledger dt.staged { color: var(--mint); }
.ledger dt.worked { color: var(--blue); }
.ledger dd { margin: 0; color: var(--muted); }

/* ---------- research films (home tiles, /research/ cards) ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
@media (max-width: 760px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.tile { display: flex; flex-direction: column; gap: 10px; color: var(--pearl); text-decoration: none; }
.tile img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); background: #03060d; transition: border-color 0.2s; }
.tile:hover { color: var(--pearl); }
.tile:hover img { border-color: var(--blue); }
.tile b { font: italic 400 clamp(22px, 2.6vw, 28px)/1 var(--display); }
.tile small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.hero-research .wrap { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
@media (max-width: 760px) { .hero-research .wrap { grid-template-columns: 1fr; } }
.hero-research .panel { background: rgba(21, 27, 42, 0.82); }
.films { display: flex; flex-direction: column; gap: 22px; }
.film-card { grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); }
.film-card .media { max-height: none; }
.film-card .media video { object-fit: contain; }
.film-card .watch { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; font: 600 14px/1 var(--text); color: #1a1206; background: var(--gold); border: 0; border-radius: 999px; padding: 11px 16px 11px 12px; cursor: pointer; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45); }
.film-card .watch:hover { filter: brightness(1.06); }
.film-card .watch svg { width: 18px; height: 18px; }
.film-card .body { justify-content: flex-start; }
.chip.data { color: var(--gold); border-color: rgba(255, 207, 107, 0.45); }
.chip.worked { color: var(--blue); border-color: var(--line-strong); }
.cite { display: flex; flex-direction: column; gap: 8px; border-left: 2px solid var(--line-strong); padding-left: 14px; font-size: 14.5px; color: var(--muted); }
.cite i { color: var(--pearl); }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; color: var(--muted); }
.steps li::marker { color: var(--gold); font-family: var(--mono); font-size: 0.9em; }
@media (max-width: 720px) { .film-card { grid-template-columns: 1fr; } .film-card .media { aspect-ratio: 9 / 16; max-height: 82svh; } }

/* ---------- ad slots (empty and hidden until ads are switched on in site-config.js) ---------- */
.ad-slot { display: grid; place-items: center; min-height: 100px; margin-inline: auto; width: 100%; }
.ad-slot.preview { border: 1.5px dashed var(--line-strong); border-radius: 14px; color: var(--faint); font: 12px/1.3 var(--mono); text-align: center; padding: 10px; }
.ad-band { padding-block: 24px; border-top: 1px solid var(--line); }
.ad-label { font: 10.5px/1 var(--mono); letter-spacing: 1.2px; text-transform: uppercase; color: var(--faint); text-align: center; margin-bottom: 6px; }

/* ---------- footer ---------- */
.site-foot { background: var(--deep); border-top: 1px solid var(--line); padding-block: 40px calc(40px + env(safe-area-inset-bottom, 0px)); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-start; }
.site-foot .logo { font-size: 16px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }
.site-foot nav a { color: var(--muted); text-decoration: none; }
.site-foot nav a:hover { color: var(--pearl); }
.site-foot .fine { width: 100%; font-size: 12.5px; color: var(--faint); }
