/* Mad Game Dev: minimal theme in dark (default) and light. Crimson #A7002F is the only accent.
   One font (Inter, self-hosted, SIL OFL). Animations use transform and opacity; decorative
   motion stops for prefers-reduced-motion. The theme is set on <html data-theme> before paint. */

@font-face { font-family: "Inter"; font-weight: 400 800; font-display: swap; src: url("../fonts/inter-var.260c81a4759b.woff2") format("woff2"); }

:root {
  --bg: #0c0c0e;
  --surface: #131316;
  --surface-2: #1a1a1e;
  --border: #25252a;
  --border-strong: #36363c;
  --text: #ececef;
  --muted: #9d9da6;
  --accent: #a7002f;
  --accent-hover: #c00a3c;
  --accent-text: #ff7d9a;
  --focus: #e8436b;
  --radius: 10px;
  --radius-sm: 6px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --header-h: 96px;
  --heading: #fff;
  --line: rgba(255, 255, 255, .03);
  --shine: rgba(255, 255, 255, .07);
  --glass: rgba(19, 19, 22, .86);
  --shadow: rgba(0, 0, 0, .9);
  --dot: #9d9da6;
  --dot-hot: #e8436b;
  --cursor: #fff;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f5f7;
  --surface: #ffffff;
  --surface-2: #f0edf2;
  --border: #e4e0e8;
  --border-strong: #cfc9d6;
  --text: #17161a;
  --muted: #5d5a66;
  --accent-text: #a7002f;
  --focus: #a7002f;
  --heading: #000;
  --line: rgba(0, 0, 0, .045);
  --shine: rgba(167, 0, 47, .06);
  --glass: rgba(255, 255, 255, .9);
  --shadow: rgba(40, 10, 20, .22);
  --dot: #8c8796;
  --dot-hot: #a7002f;
  --cursor: #17161a;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; transition: background-color .3s, color .3s; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--heading); }
img, video, iframe { max-width: 100%; }
img { display: block; height: auto; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); font-weight: 700; }
h2 { font-size: 1.45rem; font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.eyebrow { font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.empty { color: var(--muted); padding: 40px 24px; text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.icon { flex: none; vertical-align: middle; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm); }
.skip-link:focus { left: 8px; }

/* ---------- Buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border: 1px solid transparent; border-radius: 8px;
  font-weight: 600; font-size: .95rem; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .2s, border-color .2s, color .2s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-lg { padding: 13px 22px; font-size: 1rem; }
.btn-sm { padding: 7px 12px; font-size: .85rem; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--border); border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer; transition: color .2s, border-color .2s; }
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .92rem; text-decoration: none; }
.link-more:hover { color: var(--text); }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; text-decoration: none; margin-bottom: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.chip { display: inline-block; padding: 4px 12px; font-size: .85rem; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; text-decoration: none; }
a.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.is-active { color: var(--text); border-color: var(--accent); }
.hidden-tag { display: inline-block; margin-left: 10px; padding: 2px 8px; vertical-align: middle; font-size: .72rem; font-weight: 600; letter-spacing: 0;
  color: var(--accent-text); border: 1px dashed var(--accent); border-radius: 999px; }
.hidden-notice { position: fixed; z-index: 60; left: 16px; bottom: 16px; margin: 0; padding: 8px 12px; font-size: .85rem; color: var(--muted); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; box-shadow: 0 12px 30px -16px var(--shadow); }
.hidden-notice .hidden-tag { margin: 0 8px 0 0; }

/* ---------- Header: floating glass bar, separate from the page edge ---------- */
.announce { background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: .88rem; text-align: center; padding: 8px 0; }
.header-sentinel { height: 1px; margin-bottom: -1px; }
.site-header { position: sticky; top: 0; z-index: 40; padding: 14px 16px; pointer-events: none; }
.nav-shell { position: relative; pointer-events: auto; display: flex; align-items: center; gap: 24px; max-width: 1200px; height: 68px; margin: 0 auto; padding: 0 12px 0 18px;
  background: var(--glass); border: 1px solid var(--border); border-radius: 16px; -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 10px 30px -18px var(--shadow); transition: max-width .45s var(--ease), height .3s var(--ease), box-shadow .3s, border-color .3s, background-color .3s; }
.nav-shell::after { content: ""; position: absolute; left: 24px; right: 24px; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(167, 0, 47, .7), transparent); opacity: .7; }
.is-stuck .nav-shell { max-width: 1100px; height: 60px; border-color: var(--border-strong); box-shadow: 0 18px 40px -22px var(--shadow); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.08rem; font-weight: 700; text-decoration: none; flex: none; }
.brand img { width: 36px; height: 36px; }
.brand img { transition: rotate .5s var(--ease); }
.brand:hover img { rotate: -14deg; }
.site-nav { position: relative; display: flex; gap: 2px; margin-right: auto; }
.nav-link { position: relative; z-index: 1; padding: 10px 15px; color: var(--muted); font-size: 1rem; font-weight: 550; text-decoration: none; border-radius: 10px; transition: color .2s; }
.nav-link:hover, .nav-link.is-active { color: var(--text); }
.nav-link.is-active::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.nav-link.is-hidden { opacity: .55; }
.nav-indicator { position: absolute; z-index: 0; top: 0; left: 0; height: 100%; width: 0; border-radius: 10px; opacity: 0; pointer-events: none;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); transition: translate .35s var(--ease), width .35s var(--ease), opacity .25s; }
.nav-fab-mobile { display: none; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle { position: relative; overflow: hidden; }
.theme-toggle .icon { position: absolute; transition: translate .4s var(--ease), rotate .4s var(--ease), opacity .3s; }
.theme-toggle .icon:last-child { translate: 0 120%; rotate: -90deg; opacity: 0; }
[data-theme="light"] .theme-toggle .icon:first-child { translate: 0 -120%; rotate: 90deg; opacity: 0; }
[data-theme="light"] .theme-toggle .icon:last-child { translate: 0 0; rotate: 0deg; opacity: 1; }
.nav-toggle { display: none; }
.burger { position: relative; width: 18px; height: 12px; }
.burger i { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: translate .3s var(--ease), rotate .3s var(--ease), opacity .2s; }
.burger i:nth-child(1) { top: 0; }
.burger i:nth-child(2) { top: 5px; }
.burger i:nth-child(3) { top: 10px; }
[aria-expanded="true"] .burger i:nth-child(1) { translate: 0 5px; rotate: 45deg; }
[aria-expanded="true"] .burger i:nth-child(2) { opacity: 0; }
[aria-expanded="true"] .burger i:nth-child(3) { translate: 0 -5px; rotate: -45deg; }

/* ---------- Layout blocks ---------- */
.page-header { padding: calc(var(--header-h) + 56px) 0 32px; }
.page-header .lead { margin-bottom: 0; }
.section { padding: 56px 0; }
.section-first { padding-top: 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.panel { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.panel + .panel { margin-top: 16px; }
.panel-title { font-size: .95rem; margin-bottom: 12px; }
.cta { text-align: center; }
.cta .subscribe-form { justify-content: center; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 40px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.flash-list { position: fixed; z-index: 60; right: 16px; bottom: 16px; width: min(380px, calc(100% - 32px)); padding: 0; margin: 0; }
.flash { margin: 8px 0 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border-strong); border-left: 3px solid var(--accent); border-radius: 12px;
  box-shadow: 0 20px 40px -20px var(--shadow); animation: toast-in .5s var(--ease) both; transition: opacity .4s, translate .4s var(--ease); }
.flash.is-leaving { opacity: 0; translate: 0 12px; }
@keyframes toast-in { from { opacity: 0; translate: 0 16px; } }
/* Heroes and page headers slide under the floating header so their backgrounds reach the top. */
.hero, .product-hero, .about-hero, .page-header { margin-top: calc(-1 * var(--header-h)); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: calc(var(--header-h) + 72px) 0 96px; border-bottom: 1px solid var(--border); isolation: isolate; }
.hero-field { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; }
.hero-glow { position: absolute; z-index: -1; top: 0; left: 0; width: 720px; height: 720px; margin: -360px 0 0 -360px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(167, 0, 47, .22), rgba(167, 0, 47, 0)); transform: translate3d(var(--gx, 70vw), var(--gy, 280px), 0); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 24px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.hero-mark { width: 44px; height: 44px; animation: float 6s ease-in-out infinite; }
.hero-title { font-size: clamp(2.4rem, 5.4vw, 4rem); line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 20px; }
.js .hero-title .word { display: inline-block; opacity: 0; translate: 0 .4em; animation: word-in .7s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--i) * 70ms + 100ms); }
.hero-title .word-accent { color: var(--accent-text); }
.hero-lead { max-width: 52ch; font-size: 1.15rem; color: var(--muted); }
.hero .actions { margin-top: 28px; }
.hero-stats { display: flex; gap: 40px; margin: 44px 0 0; padding-top: 24px; border-top: 1px solid var(--border); }
.hero-stats dt { font-size: .82rem; color: var(--muted); }
.hero-stats dd { margin: 2px 0 0; font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hero-art { position: relative; aspect-ratio: 1 / .86; --px: 0; --py: 0; }
.hero-shot { position: absolute; margin: 0; width: 72%; border-radius: 14px; overflow: hidden; border: 1px solid var(--border-strong); background: var(--surface);
  box-shadow: 0 30px 60px -30px var(--shadow); transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.hero-shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hero-shot figcaption { display: flex; flex-direction: column; padding: 12px 16px; font-size: .9rem; font-weight: 600; }
.hero-shot figcaption span { font-size: .75rem; font-weight: 500; color: var(--muted); }
.hero-shot-1 { z-index: 3; left: 4%; top: 26%; border-color: rgba(167, 0, 47, .55); transform: translate3d(calc(var(--px) * 18px), calc(var(--py) * 14px), 0) rotate(-3deg); }
.hero-shot-2 { z-index: 2; right: 0; top: 0; width: 58%; opacity: .9; transform: translate3d(calc(var(--px) * -10px), calc(var(--py) * -8px), 0) rotate(4deg); }
.hero-shot-3 { z-index: 1; right: 6%; bottom: 0; width: 50%; opacity: .75; transform: translate3d(calc(var(--px) * 8px), calc(var(--py) * -12px), 0) rotate(-1deg); }
.hero-logo { width: 72%; margin: 0 auto; filter: drop-shadow(0 30px 60px rgba(167, 0, 47, .35)); animation: float 7s ease-in-out infinite; }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; width: 22px; height: 34px; margin-left: -11px; border: 1.5px solid var(--border-strong); border-radius: 12px; }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--accent-text); animation: cue 1.8s ease-in-out infinite; }
@keyframes word-in { to { opacity: 1; translate: 0 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 80%, 100% { opacity: 0; transform: translateY(10px); } }

[data-theme="light"] .hero-glow { opacity: .6; }
[data-theme="light"] .hero-shot { border-color: var(--border); }

/* Page headers get a quiet grid and a crimson wash for depth. */
.page-header { position: relative; isolation: isolate; }
.page-header::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(600px 260px at 15% 0%, rgba(167, 0, 47, .16), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 40px 40px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent); }

/* ---------- Cards ---------- */
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .25s, box-shadow .35s; }
.card::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--shine), transparent 45%); }
.card:hover { --lift: -6px; color: inherit; border-color: rgba(167, 0, 47, .55); box-shadow: 0 24px 50px -28px rgba(167, 0, 47, .7); }
.card:hover::after { opacity: 1; }
.card-media { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.card-meta { margin: 0 0 6px; font-size: .82rem; color: var(--muted); }
.card-title { margin: 0 0 6px; }
.card-text { margin: 0; color: var(--muted); font-size: .94rem; }
.card-foot { margin: auto 0 0; padding-top: 14px; font-size: .88rem; font-weight: 600; }
.release { margin-top: auto; padding-top: 14px; font-size: .9rem; }
.release-date { margin: 0 0 8px; }
.progress { display: flex; align-items: center; gap: 10px; font-size: .85rem; }
.progress progress { flex: 1; height: 4px; border: 0; border-radius: 2px; background: var(--border); appearance: none; }
.progress progress::-webkit-progress-bar { background: var(--border); border-radius: 2px; }
.progress progress::-webkit-progress-value { background: var(--accent); border-radius: 2px; }
.progress progress::-moz-progress-bar { background: var(--accent); border-radius: 2px; }

/* Scroll reveal: one shared observer adds .is-in. Only opacity and translate animate,
   so the hover tilt (transform) never fights the reveal. */
.js .reveal { opacity: 0; translate: 0 16px; transition: opacity .6s ease-out var(--reveal-delay, 0s), translate .6s cubic-bezier(.2, .8, .2, 1) var(--reveal-delay, 0s),
  transform .35s cubic-bezier(.2, .8, .2, 1), border-color .25s, box-shadow .35s; }
.js .reveal.is-in { opacity: 1; translate: 0 0; }
.grid > .reveal:nth-child(3n + 2), .pillars > .reveal:nth-child(2) { --reveal-delay: .08s; }
.grid > .reveal:nth-child(3n + 3), .pillars > .reveal:nth-child(3) { --reveal-delay: .16s; }

/* ---------- Home extras ---------- */
.section-index { margin-right: 12px; font-size: .8rem; font-weight: 600; color: var(--accent-text); vertical-align: middle; letter-spacing: .04em; }
.link-arrow { display: inline-block; transition: translate .25s; }
.link-more:hover .link-arrow { translate: 4px 0; }
.btn-arrow .icon { transition: translate .25s; }
.btn-arrow:hover .icon { translate: 3px -1px; }
.spotlight { position: relative; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; text-decoration: none;
  transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.spotlight:hover { color: inherit; border-color: rgba(167, 0, 47, .55); box-shadow: 0 30px 70px -36px rgba(167, 0, 47, .8); }
.spotlight::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), var(--shine), transparent 45%); }
.spotlight:hover::after { opacity: 1; }
.spotlight-media { overflow: hidden; background: var(--surface-2); }
.spotlight-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.spotlight:hover .spotlight-media img { transform: scale(1.04); }
.spotlight-body { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 40px; }
.spotlight-title { font-size: 1.8rem; letter-spacing: -0.02em; }
.spotlight-features { list-style: none; padding: 0; margin: 4px 0 28px; }
.spotlight-features li { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.spotlight-features .icon { color: var(--accent-text); }
.pillars { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pillars li { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(167, 0, 47, .07), transparent 60%), var(--surface); }
.pillars .icon { color: var(--accent-text); margin-bottom: 16px; }
.pillars h3 { margin-bottom: 6px; }
.pillars p { margin: 0; font-size: .94rem; }
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 48px; border: 1px solid rgba(167, 0, 47, .4); border-radius: 18px;
  background: radial-gradient(500px 220px at 90% 50%, rgba(167, 0, 47, .3), transparent 70%), var(--surface); }
.cta-band h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta-band .eyebrow { margin-bottom: 6px; }

/* ---------- Living sections ---------- */
.section-alt { position: relative; isolation: isolate; background: linear-gradient(180deg, transparent, var(--surface) 30%, var(--surface) 70%, transparent); }
.section-alt::before { content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: radial-gradient(700px 300px at 85% 20%, rgba(167, 0, 47, .1), transparent 70%); }
.section-head h2 { position: relative; padding-bottom: 10px; }
.section-head h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 48px; height: 2px; border-radius: 2px; background: var(--accent);
  transform-origin: left; transition: transform .8s var(--ease) .15s; }
.js .section-head.reveal h2::after { transform: scaleX(0); }
.js .section-head.reveal.is-in h2::after { transform: scaleX(1); }
.marquee { overflow: hidden; padding: 18px 0; border-bottom: 1px solid var(--border); background: var(--surface);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; align-items: center; gap: 28px; width: max-content; animation: marquee 40s linear infinite; }
.marquee span { font-size: 1.05rem; font-weight: 650; letter-spacing: -0.01em; color: var(--muted); white-space: nowrap; }
.marquee i { width: 7px; height: 7px; border-radius: 2px; background: var(--accent); rotate: 45deg; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.js .reveal .progress progress { transform: scaleX(0); transform-origin: left; transition: transform 1.1s var(--ease) .3s; }
.js .reveal.is-in .progress progress { transform: scaleX(1); }
.pillars li, .value, .member, .feature, .doc-feature { position: relative; overflow: hidden;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.pillars li::after, .value::after, .member::after, .feature::after, .doc-feature::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), var(--shine), transparent 50%); }
.pillars li:hover, .value:hover, .member:hover, .feature:hover, .doc-feature:hover { border-color: rgba(167, 0, 47, .5); }
.pillars li:hover::after, .value:hover::after, .member:hover::after, .feature:hover::after, .doc-feature:hover::after { opacity: 1; }
.pillars li .icon { transition: scale .4s var(--ease), rotate .4s var(--ease); }
.pillars li:hover .icon { scale: 1.15; rotate: -8deg; }
.news-grid > .card:first-child { grid-column: span 2; }
.news-grid > .card:first-child .card-media { aspect-ratio: 21 / 9; }
.news-grid > .card:first-child .card-title { font-size: 1.35rem; }
.eyebrow-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(167, 0, 47, .6); animation: ping 2s infinite; vertical-align: middle; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(167, 0, 47, 0); } 100% { box-shadow: 0 0 0 0 rgba(167, 0, 47, 0); } }

/* ---------- Badges ---------- */
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font-size: .78rem; font-weight: 600; color: var(--text);
  background: var(--glass); border: 1px solid var(--border-strong); border-radius: 999px; }
.badge-accent { color: #fff; background: var(--accent); border-color: var(--accent); }
.badge-quiet { color: var(--muted); }
.badge-pulse::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- Product page ---------- */
.product-hero { position: relative; isolation: isolate; overflow: hidden; padding: calc(var(--header-h) + 40px) 0 64px; border-bottom: 1px solid var(--border); }
.product-hero-bg { position: absolute; inset: 0; z-index: -2; }
.product-hero-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(42px) saturate(1.3) brightness(.55); transform: scale(1.25); }
.product-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 40%, transparent), var(--bg) 96%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 40px 40px; }
[data-theme="light"] .product-hero-bg img { filter: blur(42px) saturate(1.1) brightness(1.2); opacity: .35; }
.product-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.product-title { font-size: clamp(2.3rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 14px; }
.product-title .word-accent { color: inherit; }
.spec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 28px 0 0; }
.spec-grid div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--glass); border: 1px solid var(--border);
  border-radius: 12px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: border-color .25s, translate .3s var(--ease); }
.spec-grid div:hover { border-color: rgba(167, 0, 47, .5); translate: 0 -2px; }
.spec-grid .icon { margin-bottom: 6px; color: var(--accent-text); }
.spec-grid dt { font-size: .75rem; color: var(--muted); }
.spec-grid dd { margin: 0; font-size: .9rem; font-weight: 600; }
.product-actions { margin-top: 28px; }
.product-actions .btn-lg { padding: 12px 18px; }
.release-panel { margin-top: 24px; padding: 16px 18px; background: var(--glass); border: 1px solid var(--border); border-radius: 12px; }
.release-panel .release { padding-top: 0; }
.product-hero-media { position: relative; }
.product-hero-media::before { content: ""; position: absolute; inset: -12% -8%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(167, 0, 47, .35), transparent); animation: breathe 6s ease-in-out infinite; }
.media-frame { display: block; overflow: hidden; border-radius: 16px; border: 1px solid var(--border-strong); background: var(--surface); box-shadow: 0 40px 80px -40px var(--shadow); }
.media-frame iframe, .media-frame img { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; object-fit: cover; }
@keyframes breathe { 50% { opacity: .55; transform: scale(.95); } }
.tabs { position: sticky; top: 88px; z-index: 30; margin-top: -1px; pointer-events: none; }
.tabs-row { position: relative; display: flex; gap: 4px; width: max-content; max-width: calc(100% - 32px); margin: 0 auto; padding: 5px; overflow-x: auto; pointer-events: auto;
  background: var(--glass); border: 1px solid var(--border); border-radius: 999px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); scrollbar-width: none; }
.tabs-row a { position: relative; z-index: 1; padding: 7px 16px; font-size: .88rem; color: var(--muted); text-decoration: none; border-radius: 999px; white-space: nowrap; transition: color .2s; }
.tabs-row a:hover, .tabs-row a.is-active { color: var(--text); }
.tabs-row a.is-active { color: #fff; }
.tabs-indicator { position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px; background: var(--accent); opacity: 0; transition: translate .4s var(--ease), width .4s var(--ease), opacity .25s; }
.product-block { padding: 64px 0; scroll-margin-top: 120px; }
.product-block-alt { background: linear-gradient(180deg, transparent, var(--surface) 25%, var(--surface) 75%, transparent); }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 160px; gap: 12px; }
.gallery-item { position: relative; overflow: hidden; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.gallery-item:first-child { grid-column: span 2; grid-row: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), filter .4s; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-caption { position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; font-size: .8rem; color: #fff; background: rgba(0, 0, 0, .55); border-radius: 999px;
  opacity: 0; translate: 0 6px; transition: opacity .3s, translate .3s var(--ease); }
.gallery-item:hover .gallery-caption { opacity: 1; translate: 0 0; }
.feature-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.feature { padding: 22px; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; transition: border-color .25s; }
.feature-num { display: inline-block; margin-bottom: 14px; font-size: .78rem; font-weight: 700; color: var(--accent-text); letter-spacing: .06em; }
.feature h3 { margin-bottom: 6px; }
.feature p { margin: 0; font-size: .93rem; }
.feature-grid > .reveal:nth-child(3n + 2) { --reveal-delay: .07s; }
.feature-grid > .reveal:nth-child(3n + 3) { --reveal-delay: .14s; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.doc-showcase { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.doc-feature { padding: 24px; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; transition: border-color .25s; }
.doc-feature-icon { display: inline-flex; padding: 10px; margin-bottom: 14px; color: var(--accent-text); border-radius: 10px; background: rgba(167, 0, 47, .12); }
.doc-feature h3 a { text-decoration: none; }
.doc-feature-pages { margin: 12px 0 18px; padding-left: 1.2em; color: var(--muted); font-size: .92rem; }
.doc-feature-pages a { color: var(--muted); text-decoration: none; }
.doc-feature-pages a:hover { color: var(--text); }
.timeline { list-style: none; position: relative; padding: 0 0 0 28px; margin: 0; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--accent), var(--border)); border-radius: 2px; }
.timeline-item { position: relative; padding: 0 0 28px; }
.timeline-item::before { content: ""; position: absolute; left: -28px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.timeline-head { margin: 0 0 8px; }
.timeline .prose p:last-child, .timeline .prose ul:last-child { margin-bottom: 0; }

/* ---------- About ---------- */
.about-hero { position: relative; isolation: isolate; overflow: hidden; padding: calc(var(--header-h) + 64px) 0 88px; border-bottom: 1px solid var(--border); }
.about-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 44px 44px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 44px 44px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 70%); }
.about-hero-glow { position: absolute; z-index: -1; right: -10%; top: -20%; width: 70%; height: 140%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(167, 0, 47, .25), transparent); animation: breathe 8s ease-in-out infinite; }
.about-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.about-title { font-size: clamp(2.3rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: -0.03em; }
.about-mosaic { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; --px: 0; --py: 0; }
.mosaic-tile { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; border: 1px solid var(--border-strong); box-shadow: 0 30px 60px -36px var(--shadow);
  transition: transform .6s var(--ease); }
.mosaic-tile-1 { transform: translate3d(calc(var(--px) * 10px), calc(var(--py) * 8px + 24px), 0); }
.mosaic-tile-2 { transform: translate3d(calc(var(--px) * -8px), calc(var(--py) * -6px), 0); }
.mosaic-tile-3 { transform: translate3d(calc(var(--px) * 6px), calc(var(--py) * 10px + 24px), 0); }
.mosaic-tile-4 { transform: translate3d(calc(var(--px) * -12px), calc(var(--py) * -8px), 0); }
/* The logo only shows when there are no product covers to show. */
.about-mark { display: none; width: 70%; height: auto; margin: 0 auto; filter: drop-shadow(0 30px 60px rgba(167, 0, 47, .35)); animation: float 6s ease-in-out infinite; }
.about-mosaic:not(:has(.mosaic-tile)) { display: block; }
.about-mosaic:not(:has(.mosaic-tile)) .about-mark { display: block; }
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.story-text { font-size: 1.12rem; }
.values { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.value { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; transition: border-color .25s; }
.value .icon { color: var(--accent-text); margin-bottom: 12px; }
.value h3 { margin-bottom: 6px; }
.value p { margin: 0; font-size: .93rem; }
.values > .reveal:nth-child(2n) { --reveal-delay: .08s; }
.journey { list-style: none; position: relative; padding: 0; margin: 0; }
.journey::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: linear-gradient(var(--accent), var(--border)); }
.journey-item { position: relative; width: 50%; padding: 0 40px 36px 0; text-align: right; }
.journey-item:nth-child(even) { margin-left: 50%; padding: 0 0 36px 40px; text-align: left; }
.journey-item::before { content: ""; position: absolute; top: 6px; right: -8px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.journey-item:nth-child(even)::before { right: auto; left: -8px; }
.journey-when { display: inline-block; margin-bottom: 6px; font-size: .8rem; font-weight: 700; color: var(--accent-text); letter-spacing: .04em; }
.journey-item h3 { margin-bottom: 4px; }
.journey-item p { margin: 0; }
.team-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.member { padding: 24px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; transition: border-color .25s; }
.member-photo { display: grid; place-items: center; width: 96px; height: 96px; margin: 0 auto 14px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-strong); }
.member-initials { font-size: 1.6rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--accent), #4a0016); }
.member h3 { margin-bottom: 2px; }
.member h3 a { text-decoration: none; }
.member p { margin: 0; font-size: .9rem; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
.contact-title { font-size: clamp(1.8rem, 3.4vw, 2.5rem); letter-spacing: -0.02em; }
.contact-info .contact-email { margin: 8px 0 24px; font-weight: 600; }
.social-tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.social-tile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); text-decoration: none;
  transition: border-color .25s, translate .3s var(--ease), background-color .25s; }
.social-tile:hover { translate: 0 -3px; border-color: rgba(167, 0, 47, .55); background: var(--surface-2); }
.social-tile .icon { color: var(--accent-text); transition: scale .3s var(--ease); }
.social-tile:hover .icon { scale: 1.15; }
.social-tile strong { display: block; font-size: .92rem; }
.social-tile small { display: block; font-size: .8rem; color: var(--muted); }
.contact-panel { padding: 28px; }
.contact-panel .form { margin-top: 8px; }

/* ---------- Support hub ---------- */
.support-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.support-card { position: relative; overflow: hidden; display: flex; gap: 16px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.support-card:hover { border-color: rgba(167, 0, 47, .5); }
.support-thumb { flex: none; width: 128px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: var(--surface-2); }
.support-thumb img { width: 100%; height: 100%; object-fit: cover; }
.support-body { min-width: 0; }
.support-title { margin: 0 0 2px; font-size: 1rem; }
.support-body .muted { margin: 0 0 10px; font-size: .85rem; }
.support-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.support-cta { margin-top: 40px; }

/* ---------- Custom cursor (fine pointers only; JS adds .has-cursor) ----------
   JS positions with the translate property; hover and press use scale, which
   then grows the ring around its centre instead of moving it. */
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; z-index: 100; pointer-events: none; border-radius: 50%; opacity: 0; }
.has-cursor .cursor-dot, .has-cursor .cursor-ring { opacity: 1; }
.has-cursor.cursor-out .cursor-dot, .has-cursor.cursor-out .cursor-ring { opacity: 0; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--cursor); }
.cursor-ring { width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1.5px solid rgba(255, 125, 154, .7);
  transition: opacity .2s, scale .25s, background-color .25s, border-color .25s; }
.cursor-ring.is-hover { scale: 1.6; background: rgba(167, 0, 47, .14); border-color: var(--accent-text); }
.cursor-ring.is-down { scale: .8; }
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor summary, .has-cursor label, .has-cursor select { cursor: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; translate: none; transition: none; }
  .js .hero-title .word { opacity: 1; translate: none; animation: none; }
  .hero-mark, .hero-logo, .scroll-cue span, .marquee-track, .eyebrow-dot, .about-mark, .about-hero-glow, .product-hero-media::before, .badge-pulse::before { animation: none; }
  .js .reveal .progress progress, .js .section-head.reveal h2::after { transform: none; transition: none; }
  .card, .card-media img, .spotlight-media img, .hero-shot { transition: none; }
  .card:hover, .card:hover .card-media img, .spotlight:hover .spotlight-media img { --lift: 0px; transform: none; }
}

/* ---------- Products ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.search-field { display: flex; align-items: center; gap: 8px; flex: 1 1 240px; padding: 0 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--muted); }
.search-field input { flex: 1; min-width: 0; padding: 10px 0; background: none; border: 0; outline: none; color: var(--text); }
.search-field:focus-within { border-color: var(--focus); }
.result-count { font-size: .9rem; margin-bottom: 24px; }
.product-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.spec-list { margin: 0; }
.spec-list div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid var(--border); font-size: .92rem; }
.spec-list div:first-child { border-top: 0; padding-top: 0; }
.spec-list dt { color: var(--muted); }
.spec-list dd { margin: 0; text-align: right; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list a { display: flex; align-items: center; gap: 10px; padding: 8px 0; text-decoration: none; }
.link-list a .muted { margin-left: auto; font-size: .85rem; }
.link-list li + li { border-top: 1px solid var(--border); }

/* ---------- Docs ---------- */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.doc-card { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; transition: border-color .2s, background-color .2s, translate .25s; }
.doc-card:hover { color: inherit; border-color: rgba(167, 0, 47, .55); background: var(--surface-2); translate: 0 -3px; }
.doc-card-title { font-weight: 600; }
.doc-card-meta { margin-top: 6px; font-size: .82rem; color: var(--muted); }
.docs-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding-top: 40px; padding-bottom: 48px; }
.docs-sidebar { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; }
.docs-menu > summary { display: none; }
.docs-product { font-size: .85rem; color: var(--muted); text-decoration: none; }
.docs-title { font-weight: 650; margin: 4px 0 16px; }
.docs-nav { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--border); }
.docs-nav a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); font-size: .93rem; text-decoration: none; }
.docs-nav a:hover { color: var(--text); }
.docs-nav a[aria-current="page"] { color: var(--text); border-left-color: var(--accent); }
.docs-main { max-width: 760px; }
.docs-main .prose { max-width: none; }
.docs-main h1 { font-size: clamp(1.8rem, 3.6vw, 2.4rem); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
.pager-link { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; font-weight: 600; }
.pager-link .muted { font-size: .82rem; font-weight: 400; }
.pager-link:hover { border-color: var(--border-strong); color: inherit; }
.pager-next { text-align: right; grid-column: 2; }
.docs-meta { margin-top: 24px; font-size: .88rem; }

/* ---------- Prose (Markdown) ---------- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose a { color: var(--accent-text); }
.prose img { border-radius: var(--radius-sm); }
.prose code { font: .88em var(--mono); background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }
.prose pre code { background: none; padding: 0; }
.prose .highlight, .prose > pre { position: relative; margin: 0 0 1.2em; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.prose .highlight pre, .prose > pre { margin: 0; padding: 16px; overflow-x: auto; font: .88rem/1.55 var(--mono); }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .93rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 8px 12px; border: 1px solid var(--border); text-align: left; }
.prose th { background: var(--surface); }
.prose blockquote { margin: 0 0 1.2em; padding: 4px 0 4px 16px; border-left: 3px solid var(--border-strong); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.callout { margin: 0 0 1.2em; padding: 12px 16px; border: 1px solid var(--border); border-left: 3px solid #5b8def; border-radius: var(--radius-sm); background: var(--surface); }
.callout p:last-child { margin-bottom: 0; }
.callout-title { font-size: .8rem; font-weight: 700; margin-bottom: 4px; }
.callout-tip { border-left-color: #36b37e; }
.callout-warning { border-left-color: #e0a030; }
.callout-danger { border-left-color: var(--accent); }
.shortcode-error { color: var(--accent-text); }
.code-copy { position: absolute; top: 8px; right: 8px; padding: 3px 10px; font-size: .78rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
.code-copy:hover { color: var(--text); }
.figure { margin: 0 0 1.2em; }
.figure img { border: 1px solid var(--border); }
.figure figcaption, .video figcaption { margin-top: 8px; font-size: .88rem; color: var(--muted); }
.video { margin: 0 0 1.2em; }
.video iframe, .video video { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); background: var(--surface); }
.file-card { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 1.2em; padding: 10px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; }
.file-card:hover { border-color: var(--border-strong); }
.file-ext { padding: 3px 6px; font-size: .72rem; font-weight: 700; color: #fff; background: var(--accent); border-radius: 4px; }
.file-meta small { display: block; color: var(--muted); }

/* ---------- News ---------- */
.article-cover { width: 100%; margin-bottom: 32px; border-radius: var(--radius); border: 1px solid var(--border); }
.share { display: flex; align-items: center; gap: 8px; margin: 40px 0 16px; padding-top: 24px; border-top: 1px solid var(--border); }

.contact-email { display: inline-flex; align-items: center; gap: 8px; word-break: break-all; }

/* ---------- Forms ---------- */
.form { margin-top: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--muted); }
.field-wide { grid-column: 1 / -1; }
.field input, .field select, .field textarea, .filters select, .subscribe-form input {
  width: 100%; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--text); }
.filters select { width: auto; }
.field input:focus, .field select:focus, .field textarea:focus, .filters select:focus, .subscribe-form input:focus { outline: none; border-color: var(--focus); }
.field textarea { resize: vertical; }
.field-error, .errorlist { color: var(--accent-text); font-size: .85rem; }
.errorlist { list-style: none; padding: 0; margin: 0 0 12px; }
.subscribe-form { display: flex; gap: 8px; }
.subscribe-form input { flex: 1; min-width: 0; max-width: 320px; }

/* ---------- Search ---------- */
.search-dialog { width: min(640px, calc(100% - 32px)); margin: 12vh auto auto; padding: 0; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: 12px; }
.search-dialog::backdrop { background: rgba(0, 0, 0, .6); }
.search-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: var(--muted); }
.search-bar input { flex: 1; min-width: 0; padding: 6px 0; background: none; border: 0; outline: none; color: var(--text); font-size: 1.05rem; }
.search-bar-page { margin-top: 20px; padding: 6px 6px 6px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.search-bar-page:focus-within { border-color: var(--focus); }
.search-results { list-style: none; margin: 0; padding: 6px; max-height: 60vh; overflow-y: auto; border-top: 1px solid var(--border); }
.search-results:empty { display: none; }
.search-results a, .result-list a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; text-decoration: none; }
.search-results a:hover, .search-results a.is-active { background: var(--surface-2); }
.search-results .muted, .result-list .muted { font-size: .88rem; }
.search-empty { padding: 10px 12px; color: var(--muted); }
.result-type { font-size: .78rem; color: var(--muted); }
.result-list { list-style: none; padding: 0; margin: 16px 0 0; }
.result-list li + li { border-top: 1px solid var(--border); }
.result-list a { padding: 14px 0; border-radius: 0; }

/* ---------- Lightbox ---------- */
.lightbox { max-width: 92vw; max-height: 92vh; padding: 0; background: transparent; border: 0; overflow: visible; }
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: var(--radius-sm); }
.lightbox-close { position: absolute; top: -48px; right: 0; background: var(--surface); }

/* ---------- Footer ---------- */
.site-footer { position: relative; margin-top: 56px; padding: 48px 0 24px; border-top: 1px solid var(--border); font-size: .93rem; }
.site-footer::before { content: ""; position: absolute; left: 10%; right: 10%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 40px; }
.footer-brand .muted { margin: 12px 0 16px; }
.social-row { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.social-row a { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; color: var(--muted); border: 1px solid var(--border); border-radius: 8px; }
.social-row a:hover { color: var(--text); border-color: var(--border-strong); }
.footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; align-content: start; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--text); }
.footer-heading { font-weight: 600; margin-bottom: 4px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }

/* ---------- Error pages ---------- */
.error-page { padding: 120px 0; text-align: center; }
.error-page img { margin: 0 auto 24px; }
.error-page .lead { margin: 0 auto; }
.error-page .actions { justify-content: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1140px) {
  .brand span { display: none; }
  .nav-link { padding: 10px 11px; }
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero-art { max-width: 520px; width: 100%; margin: 0 auto; }
  .spotlight { grid-template-columns: minmax(0, 1fr); }
  .spotlight-body { padding: 28px; }
  .pillars { grid-template-columns: minmax(0, 1fr); }
  .product-layout, .product-hero-grid, .about-hero-grid, .story-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 130px; }
  .news-grid > .card:first-child { grid-column: auto; }
  .news-grid > .card:first-child .card-media { aspect-ratio: 16 / 9; }
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 16px; }
  .docs-sidebar { position: static; max-height: none; overflow: visible; }
  .docs-menu { border: 1px solid var(--border); border-radius: var(--radius); padding: 0 16px; }
  .docs-menu > summary { display: block; padding: 12px 0; font-weight: 600; cursor: pointer; }
  .docs-menu[open] > summary { border-bottom: 1px solid var(--border); margin-bottom: 12px; }
  .docs-menu .docs-title { display: none; }
  .docs-menu nav { padding-bottom: 12px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-newsletter { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  :root { --header-h: 80px; }
  .support-grid { grid-template-columns: minmax(0, 1fr); }
  .support-thumb { width: 96px; }
  .site-header { padding: 10px 10px; }
  .nav-shell { height: 60px; gap: 10px; padding: 0 8px 0 12px; }
  .is-stuck .nav-shell { height: 52px; }
  .nav-toggle { display: inline-flex; }
  .nav-fab { display: none; }
  .brand span { display: none; }
  .header-actions { margin-left: auto; }
  .site-nav { position: absolute; top: calc(100% + 8px); left: 0; right: 0; flex-direction: column; gap: 2px; padding: 10px; margin: 0;
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px;
    box-shadow: 0 30px 60px -20px var(--shadow); opacity: 0; visibility: hidden; translate: 0 -8px; scale: .98; transform-origin: top;
    transition: opacity .25s, translate .35s var(--ease), scale .35s var(--ease), visibility 0s .35s; }
  .site-nav.is-open { opacity: 1; visibility: visible; translate: 0 0; scale: 1; transition: opacity .25s, translate .35s var(--ease), scale .35s var(--ease); }
  .nav-link { padding: 14px 16px; font-size: 1.05rem; color: var(--text); opacity: 0; translate: 0 -6px; transition: opacity .3s, translate .35s var(--ease), color .2s, background-color .2s; }
  .site-nav.is-open .nav-link { opacity: 1; translate: 0 0; }
  .site-nav.is-open .nav-link:nth-child(2) { transition-delay: .04s; }
  .site-nav.is-open .nav-link:nth-child(3) { transition-delay: .08s; }
  .site-nav.is-open .nav-link:nth-child(4) { transition-delay: .12s; }
  .site-nav.is-open .nav-link:nth-child(5) { transition-delay: .16s; }
  .site-nav.is-open .nav-link:nth-child(6) { transition-delay: .2s; }
  .site-nav.is-open .nav-link:nth-child(7) { transition-delay: .24s; }
  .site-nav.is-open .nav-link:nth-child(8) { transition-delay: .28s; }
  .nav-link.is-active { background: var(--surface-2); }
  .nav-link.is-active::after { left: auto; right: 14px; top: 50%; bottom: auto; margin: -2px 0 0; }
  .nav-indicator { display: none; }
  .nav-fab-mobile { display: block; color: var(--accent-text); }
  .product-hero { padding: calc(var(--header-h) + 16px) 0 48px; }
  .tabs { top: 76px; }
  .spec-grid { grid-template-columns: 1fr 1fr; }
  .product-block { padding: 44px 0; }
  .values, .social-tiles { grid-template-columns: minmax(0, 1fr); }
  .journey::before { left: 7px; }
  .journey-item, .journey-item:nth-child(even) { width: auto; margin-left: 0; padding: 0 0 28px 36px; text-align: left; }
  .journey-item::before, .journey-item:nth-child(even)::before { left: 0; right: auto; }
  .about-hero { padding: calc(var(--header-h) + 24px) 0 56px; }
  .hero { padding: calc(var(--header-h) + 32px) 0 72px; }
  .hero-stats { gap: 24px; }
  .hero-stats dd { font-size: 1.6rem; }
  .cta-band { padding: 28px; }
  .page-header { padding: calc(var(--header-h) + 32px) 0 24px; }
  .section { padding: 40px 0; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .pager { grid-template-columns: 1fr; }
  .pager-next { grid-column: auto; }
  .subscribe-form input { max-width: none; }
}
