/* QInteract, version C: minimalist, clear sci-fi.
   A light "clean room" interface: cool grey, ink, one aerospace orange signal colour,
   hairlines, corner brackets and mono readouts. Fonts: Geist and Geist Mono. */

:root {
  --bg: #eceef1;
  --bg-2: #e3e6ea;
  --panel: #f7f8fa;
  --ink: #0b0d10;
  --ink-2: #3d434c;
  --muted: #7a818b;
  --line: rgba(11, 13, 16, 0.1);
  --line-2: rgba(11, 13, 16, 0.22);
  --on-ink: #ffffff;            /* text on an ink-coloured surface */
  --hdr-bg: rgba(236, 238, 241, 0.8);
  --backdrop: rgba(236, 238, 241, 0.82);
  --hud-glow: rgba(255, 255, 255, 0.7);
  --chip: rgba(247, 248, 250, 0.92);
  --field-focus: #ffffff;
  --shadow: rgba(11, 13, 16, 0.35);
  --orbit-ink: 11, 13, 16;      /* read by orbit.js */
  --orbit-boost: 1;             /* multiplies the orbit line opacity */
  --sig: #ff4d00;
  --sans: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 3.4vw, 48px);
  --hdr-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--hdr-h); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.is-locked { overflow: hidden; }
img, video, iframe, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
em { font-style: normal; color: var(--sig); }
::selection { background: var(--sig); color: #fff; }
:focus-visible { outline: 1.5px solid var(--sig); outline-offset: 3px; }

.mono { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.wrap { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; inset-inline-start: 8px; top: 8px; z-index: 300; background: var(--ink); color: var(--on-ink); padding: 10px 14px; transform: translateY(-300%); }
.skip:focus { transform: none; }

/* faint measuring grid behind everything, fading out at the edges */
.grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 80%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 80%);
  opacity: 0.55;
}
header, main, footer { position: relative; z-index: 1; }

/* corner brackets: the signature detail */
.corner { position: absolute; width: 12px; height: 12px; border: 0 solid var(--ink); pointer-events: none; transition: width 0.4s var(--ease), height 0.4s var(--ease), border-color 0.3s; }
.corner.tl { top: -1px; left: -1px; border-top-width: 1.5px; border-left-width: 1.5px; }
.corner.tr { top: -1px; right: -1px; border-top-width: 1.5px; border-right-width: 1.5px; }
.corner.bl { bottom: -1px; left: -1px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.corner.br { bottom: -1px; right: -1px; border-bottom-width: 1.5px; border-right-width: 1.5px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding-inline: 20px; border-radius: 2px; font-size: 15px; font-weight: 500; border: 1px solid var(--ink); white-space: nowrap; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.btn .arr { display: inline-block; transition: transform 0.3s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn-ink { background: var(--ink); color: var(--on-ink); }
.btn-ink:hover { background: var(--sig); border-color: var(--sig); color: #fff; }
.btn-line { background: transparent; }
.btn-line:hover { background: var(--ink); color: var(--on-ink); }
.btn-sig { background: var(--sig); border-color: var(--sig); color: #fff; }
.btn-sig:hover { background: var(--ink); border-color: var(--ink); }
.btn-sm { height: 36px; padding-inline: 14px; font-size: 14px; }
.btn:disabled { opacity: 0.6; cursor: wait; }

/* ---------- Header ---------- */
.hdr { position: fixed; inset: 0 0 auto; z-index: 100; height: var(--hdr-h); background: var(--hdr-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.hdr.is-scrolled { border-bottom-color: var(--line-2); }
.hdr-in { height: 100%; max-width: 1360px; margin-inline: auto; padding-inline: var(--gutter); display: flex; align-items: center; gap: 28px; }
.hdr-logo img { height: 22px; width: auto; }
.logo-dark { display: none !important; }
html[data-theme="dark"] .logo-light { display: none !important; }
html[data-theme="dark"] .logo-dark { display: block !important; }

/* language menu */
html.i18n-pending main, html.i18n-pending header, html.i18n-pending footer { visibility: hidden; }
.lang { position: relative; }
.lang-btn { height: 36px; display: inline-flex; align-items: center; gap: 7px; padding-inline: 10px; border: 1px solid var(--line-2); border-radius: 2px; transition: border-color 0.2s; }
.lang-btn:hover, .lang.is-open .lang-btn { border-color: var(--ink); }
.lang-btn svg { width: 15px; height: 15px; fill: none; stroke: var(--ink); stroke-width: 1.4; }
.lang-menu { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; min-width: 168px; padding: 4px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 2px; box-shadow: 0 20px 40px -20px var(--shadow); opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity 0.2s, transform 0.25s var(--ease); z-index: 5; }
.lang.is-open .lang-menu { opacity: 1; transform: none; pointer-events: auto; }
.lang-menu button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 2px; font-size: 14px; text-align: start; }
.lang-menu button .mono { width: 22px; color: var(--muted); }
.lang-menu button:hover { background: var(--bg-2); }
.lang-menu button[aria-selected="true"] { background: var(--bg-2); }
.lang-menu button[aria-selected="true"] .mono { color: var(--sig); }

/* theme switch */
.theme-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--line-2); border-radius: 2px; transition: border-color 0.2s, background 0.2s; }
.theme-btn:hover { border-color: var(--ink); }
.theme-btn svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.theme-btn .moon { display: none; }
html[data-theme="dark"] .theme-btn .sun { display: none; }
html[data-theme="dark"] .theme-btn .moon { display: block; }
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after { transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease, fill 0.45s ease, stroke 0.45s ease !important; }
.hdr-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.hdr-nav a { padding: 8px 10px; border: 1px solid transparent; border-radius: 2px; transition: border-color 0.2s, background 0.2s; }
.hdr-nav a i { font-style: normal; color: var(--muted); margin-inline-end: 6px; }
.hdr-nav a:hover { border-color: var(--line-2); }
.hdr-nav a.is-active { border-color: var(--ink); background: var(--panel); }
.hdr-nav a.is-active i { color: var(--sig); }
.hdr-status { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.hdr-status time { color: var(--ink); }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--sig); box-shadow: 0 0 0 0 rgba(255, 77, 0, 0.5); animation: ping 2s infinite; display: inline-block; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(255, 77, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 0, 0); } }
.burger { display: none; width: 40px; height: 40px; position: relative; }
.burger span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--ink); transition: transform 0.3s var(--ease); }
.burger span:first-child { top: 16px; }
.burger span:last-child { top: 23px; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: calc(var(--hdr-h) + 24px); padding-bottom: 28px; }
.hero-grid { flex: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); }
.tag .sq { width: 8px; height: 8px; background: var(--sig); }
.hero-title { margin-top: 26px; font-size: clamp(42px, 5.4vw, 86px); line-height: 1.02; font-weight: 500; letter-spacing: -0.045em; max-width: 12ch; }
.hero-sub { margin-top: 24px; max-width: 44ch; font-size: clamp(16px, 1.25vw, 18px); color: var(--ink-2); }
.hero-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-text > * { animation: boot 0.9s var(--ease) both; }
.hero-text > :nth-child(2) { animation-delay: 0.1s; }
.hero-text > :nth-child(3) { animation-delay: 0.2s; }
.hero-text > :nth-child(4) { animation-delay: 0.3s; }
@keyframes boot { from { opacity: 0; transform: translateY(14px); clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 -20% 0); } }

.hud { position: relative; aspect-ratio: 1; width: 100%; max-width: 620px; justify-self: end; border: 1px solid var(--line); background: radial-gradient(circle at 50% 50%, var(--hud-glow), transparent 70%); animation: fadeIn 1.2s ease 0.2s both; }
@keyframes fadeIn { from { opacity: 0; } }
.hud canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hud-read { position: absolute; display: flex; flex-direction: column; gap: 2px; color: var(--muted); font-size: 10.5px; }
.hud-read b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.hud-read.tl { top: 14px; left: 16px; }
.hud-read.tr { top: 14px; right: 16px; text-align: right; }
.hud-read.bl { bottom: 14px; left: 16px; }
.hud-read.br { bottom: 14px; right: 16px; text-align: right; }
.hero-foot { display: flex; align-items: center; gap: 18px; margin-top: 28px; color: var(--ink-2); }
.hero-foot .rule { flex: 1; height: 1px; background: var(--line-2); }
.scroll-hint:hover { color: var(--sig); }

/* Hero visual options, set by scenes.js from data-opts on the canvas:
   is-bg (scene behind the hero), no-frame, no-read (readouts hidden), hero-fade (soft edges) */
.hero { position: relative; }
.hero > .wrap { position: relative; z-index: 1; }
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; animation: fadeIn 1.2s ease 0.2s both; }
.hero-bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero.is-bg .hud { background: none; }
.hud.no-frame { border-color: transparent; background: none; }
.hud.no-frame .corner { display: none; }
.hud.no-read .hud-read { display: none; }
.hero-fade .hud canvas {
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 48%, transparent 71%);
          mask-image: radial-gradient(circle at 50% 50%, #000 48%, transparent 71%);
}
.hero-fade .hero-bg canvas {
  -webkit-mask-image: radial-gradient(ellipse var(--frx, 600px) var(--fry, 420px) at var(--fx, 70%) var(--fy, 50%), #000 35%, transparent 100%);
          mask-image: radial-gradient(ellipse var(--frx, 600px) var(--fry, 420px) at var(--fx, 70%) var(--fy, 50%), #000 35%, transparent 100%);
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(80px, 10vw, 140px); }
.sec-head { margin-bottom: clamp(36px, 4.5vw, 60px); }
.sec-head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.sec-id { display: flex; align-items: center; gap: 12px; color: var(--ink-2); max-width: 420px; }
.sec-id span:first-child { color: var(--sig); }
.sec-line { flex: 1; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease); min-width: 60px; }
.sec-head.is-in .sec-line, .contact-text.is-in .sec-line { transform: scaleX(1); }
.sec-head h2, .contact-text h2 { margin-top: 22px; font-size: clamp(34px, 4.2vw, 64px); line-height: 1.04; font-weight: 500; letter-spacing: -0.04em; max-width: 18ch; }
.sec-lead { margin-top: 18px; max-width: 52ch; font-size: clamp(16px, 1.2vw, 18px); color: var(--ink-2); }

/* Services modules */
.modules { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.module { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 22px 20px 20px; background: var(--panel); border: 1px solid var(--line); transition: border-color 0.3s, transform 0.4s var(--ease); }
.module:hover { border-color: var(--line-2); transform: translateY(-3px); }
.module:hover .corner { width: 24px; height: 24px; border-color: var(--sig); }
.mod-id { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.new { background: var(--sig); color: #fff; padding: 2px 6px; border-radius: 2px; }
.module h3 { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.module > p:not(.mod-id) { color: var(--ink-2); font-size: 15px; flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.chips li { font-size: 10px; padding: 3px 7px; border: 1px solid var(--line-2); border-radius: 2px; color: var(--ink-2); }

/* Work: segmented filter, uniform small cards */
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-2); border-radius: 3px; padding: 3px; background: var(--panel); }
.seg button { padding: 8px 12px; border-radius: 2px; transition: background 0.2s, color 0.2s; }
.seg button:hover { background: var(--bg-2); }
.seg button.is-on { background: var(--ink); color: var(--on-ink); }
.readout { color: var(--muted); margin-bottom: 14px; display: flex; gap: 10px; align-items: center; }
.readout::before { content: ""; width: 6px; height: 6px; background: var(--sig); }
.cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.card { position: relative; min-width: 0; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); animation: cardIn 0.5s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); transition: border-color 0.3s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } }
.card:hover { border-color: var(--line-2); }
.card:hover .corner { width: 22px; height: 22px; border-color: var(--sig); }
.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-2); cursor: pointer; margin: 8px 8px 0; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease), filter 0.4s; filter: saturate(0.85); }
.card:hover .card-media img { transform: scale(1.04); filter: none; }
.card-media::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 3px); pointer-events: none; }
.card-play { position: absolute; left: 8px; bottom: 8px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; background: var(--chip); color: var(--ink); border-radius: 2px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; transition: background 0.2s, color 0.2s; }
.card:hover .card-play { background: var(--sig); color: #fff; }
/* the cover is a fixed 16:10 box: its image(s) fill it and never size it (Safari grows the cards otherwise) */
.card-media > img, .card-thumbs { position: absolute; inset: 0; }
.card-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
.card-thumbs img { width: 100%; min-width: 0; height: 100%; object-fit: cover; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-top { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10.5px; }
.card-top a { color: var(--ink); border-bottom: 1px solid var(--line-2); }
.card-top a:hover { color: var(--sig); border-color: var(--sig); }
.card h3 { font-size: 18px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.card p { font-size: 14px; color: var(--ink-2); line-height: 1.5; flex: 1; }
.card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; padding-top: 10px; border-top: 1px dashed var(--line-2); font-size: 10.5px; }
.card dt { color: var(--muted); }
.card dd { color: var(--ink); }

.cta { position: relative; margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; padding: 26px 28px; background: var(--panel); border: 1px solid var(--line); }
.cta p { font-size: clamp(20px, 1.8vw, 26px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; max-width: 32ch; }

/* Studio: gauges and specs */
.gauges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gauge { padding: 18px 20px 20px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.gauge dt { color: var(--muted); }
.gauge dd { font-size: clamp(42px, 4.6vw, 72px); font-weight: 400; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.gauge .bar { position: relative; height: 4px; background: repeating-linear-gradient(90deg, var(--line-2) 0 2px, transparent 2px 6px); }
.gauge .bar::after { content: ""; position: absolute; inset: 0; background: var(--sig); transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease) 0.2s; width: calc(var(--v) * 100%); }
.gauge.is-in .bar::after { transform: scaleX(1); }
.specs { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.specs article { padding: 22px 20px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.specs .mono { color: var(--sig); }
.specs h3 { font-size: 19px; font-weight: 500; letter-spacing: -0.02em; }
.specs p:not(.mono) { color: var(--ink-2); font-size: 15px; }
.platforms { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.plat-label { color: var(--muted); }
.platforms ul { display: flex; flex-wrap: wrap; gap: 6px; }
.platforms li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 2px; background: var(--panel); }
.platforms li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--sig); }

/* Process timeline */
.timeline { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; padding-top: 34px; }
.timeline::before { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 1px; background: var(--line-2); }
.timeline::after { content: ""; position: absolute; top: 6px; left: 0; width: calc(var(--p, 0) * 100%); height: 1px; background: var(--sig); transition: width 0.2s linear; }
.timeline li { position: relative; display: flex; flex-direction: column; gap: 8px; }
.node { position: absolute; top: -34px; left: 0; width: 13px; height: 13px; border: 1.5px solid var(--ink); background: var(--bg); transform: rotate(45deg); transition: background 0.3s, border-color 0.3s; }
.timeline li.is-lit .node { background: var(--sig); border-color: var(--sig); }
.timeline .mono { color: var(--muted); }
.timeline h3 { font-size: 19px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.timeline p:not(.mono) { color: var(--ink-2); font-size: 15px; }

/* Contact console */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px clamp(32px, 5vw, 80px); align-items: start; }
.channels { margin-top: 32px; display: flex; flex-direction: column; border-top: 1px solid var(--line-2); }
.channels div { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.channels dt { color: var(--muted); }
.channels dd a { font-size: clamp(17px, 1.5vw, 21px); font-weight: 500; letter-spacing: -0.01em; transition: color 0.2s; }
.channels dd a:hover { color: var(--sig); }
.console { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; padding: 0 22px 22px; background: var(--panel); border: 1px solid var(--line-2); }
.console-bar { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; margin: 0 -22px 6px; padding: 12px 22px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10.5px; }
.console-bar > span:first-child { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld .mono { color: var(--muted); font-size: 10.5px; }
.fld-wide { grid-column: 1 / -1; }
.fld input, .fld textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--line-2); border-radius: 2px; padding: 11px 12px; resize: vertical; transition: border-color 0.2s, background 0.2s; }
.fld input:focus, .fld textarea:focus { outline: none; border-color: var(--ink); background: var(--field-focus); }
.fld.is-bad input, .fld.is-bad textarea { border-color: var(--sig); }
.console-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.form-note { font-size: 13px; color: var(--muted); max-width: 38ch; }
.form-status { min-height: 1.4em; color: var(--ink-2); text-transform: none; letter-spacing: 0; font-size: 13px; }

/* Footer */
.ftr { border-top: 1px solid var(--line-2); padding-top: 48px; background: var(--bg); }
.ftr-in { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; padding-bottom: 36px; }
.ftr-logo { height: 24px; width: auto; margin-bottom: 14px; }
.ftr-in p { color: var(--ink-2); max-width: 34ch; }
.ftr-in nav, .ftr-in > div.mono { display: flex; flex-direction: column; gap: 8px; }
.ftr a:hover { color: var(--sig); }
.ftr-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-block: 18px; border-top: 1px solid var(--line); color: var(--muted); }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: var(--gutter); }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: var(--backdrop); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fadeIn 0.25s both; }
.modal-box { position: relative; width: min(1180px, 100%); max-height: calc(100vh - var(--gutter) * 2); max-height: calc(100svh - var(--gutter) * 2); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--ink); box-shadow: 0 40px 80px -30px var(--shadow); animation: pop 0.4s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.99); } }
.modal-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
.modal-close { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 2px; }
.modal-close:hover { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.video-slot { aspect-ratio: 16 / 9; background: #000; }
.video-slot iframe, .video-slot video { width: 100%; height: 100%; border: 0; }
#videoModal { z-index: 210; }
.modal-protos { overflow: hidden; }
.protos-head { padding: 22px 18px 18px; display: grid; grid-template-columns: auto 1fr; gap: 10px 36px; align-items: end; border-bottom: 1px solid var(--line); }
.protos-head h2 { font-size: clamp(28px, 3.2vw, 46px); font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.protos-head p { color: var(--ink-2); max-width: 50ch; }
.protos-grid { overflow-y: auto; padding: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px 10px; overscroll-behavior: contain; }
.proto { display: flex; flex-direction: column; gap: 8px; animation: cardIn 0.45s var(--ease) both; animation-delay: calc(var(--i, 0) * 14ms); }
.proto-media { position: relative; aspect-ratio: 9 / 16; overflow: hidden; background: #000; border-radius: 2px; cursor: pointer; }
.proto-media img { position: absolute; left: 50%; top: 50%; height: 134%; width: auto; max-width: none; transform: translate(-50%, -50%); }
.proto-media .pbtn { position: absolute; left: 6px; bottom: 6px; background: var(--chip); color: var(--ink); font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 7px; border-radius: 2px; transition: background 0.2s, color 0.2s; }
.proto-media:hover .pbtn { background: var(--sig); color: #fff; }
.proto-media.is-playing { cursor: default; outline: 1.5px solid var(--sig); outline-offset: -1.5px; }
.proto-crop { position: absolute; inset: 0; overflow: hidden; }
.proto-crop iframe { position: absolute; top: 0; left: 50%; height: 100%; width: 316.05%; max-width: none; transform: translateX(-50%); border: 0; }
.proto-expand { position: absolute; z-index: 2; top: 6px; right: 6px; background: var(--chip); color: var(--ink); font-family: var(--mono); font-size: 10px; text-transform: uppercase; padding: 3px 7px; border-radius: 2px; }
.proto-expand:hover { background: var(--sig); color: #fff; }
.proto h3 { font-size: 14px; font-weight: 500; line-height: 1.25; }
.proto small { display: block; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--sig); margin-top: 3px; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { transform: none; transition: opacity 0.6s ease; }
  .hero-text > * { animation-name: fadeIn; }
}

/* ---------- Dark theme (button in the header, saved per visitor) ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0d11;
  --bg-2: #161b22;
  --panel: #11161d;
  --ink: #e6e9ee;
  --ink-2: #a4acb7;
  --muted: #6d7682;
  --line: rgba(230, 233, 238, 0.14);
  --line-2: rgba(230, 233, 238, 0.3);
  --on-ink: #0a0d11;
  --hdr-bg: rgba(10, 13, 17, 0.8);
  --backdrop: rgba(10, 13, 17, 0.86);
  --hud-glow: rgba(255, 77, 0, 0.09);
  --chip: rgba(12, 16, 21, 0.9);
  --field-focus: #0d1116;
  --shadow: rgba(0, 0, 0, 0.7);
  --orbit-ink: 230, 233, 238;
  --orbit-boost: 1.45;
}
html[data-theme="dark"] .grid-bg { opacity: 0.75; }
html[data-theme="dark"] .card-media img { filter: saturate(0.9) brightness(0.92); }
html[data-theme="dark"] .card:hover .card-media img { filter: none; }

/* ---------- Languages ---------- */
html[lang="ar"] { --sans: "IBM Plex Sans Arabic", "Geist", system-ui, sans-serif; --mono: "Geist Mono", "IBM Plex Sans Arabic", ui-monospace, monospace; }
html[lang="ja"] { --sans: "Geist", "Noto Sans JP", system-ui, sans-serif; --mono: "Geist Mono", "Noto Sans JP", ui-monospace, monospace; }
html[lang="zh"] { --sans: "Geist", "Noto Sans SC", system-ui, sans-serif; --mono: "Geist Mono", "Noto Sans SC", ui-monospace, monospace; }
/* Arabic letters must join, and CJK needs no tracking */
html[lang="ar"] .mono, html[lang="ja"] .mono, html[lang="zh"] .mono { letter-spacing: 0; }
html[lang="ar"] .hero-title, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; line-height: 1.3; }
html[lang="ja"] .hero-title, html[lang="zh"] .hero-title, html[lang="ja"] h2, html[lang="zh"] h2 { letter-spacing: -0.01em; line-height: 1.2; }
html[lang="ja"] .hero-title, html[lang="zh"] .hero-title { font-size: clamp(36px, 4.6vw, 72px); max-width: 11em; }
html[lang="ar"] .hero-title { font-size: clamp(38px, 4.8vw, 76px); max-width: 13em; }
html[lang="fr"] .hero-title { max-width: 13ch; }

/* right to left (Arabic) */
html[dir="rtl"] .sec-line { transform-origin: right; }
html[dir="rtl"] .timeline::after { left: auto; right: 0; }
html[dir="rtl"] .node { left: auto; right: 0; }
html[dir="rtl"] .btn .arr { transform: scaleX(-1); }
html[dir="rtl"] .btn:hover .arr { transform: scaleX(-1) translateX(3px); }
html[dir="rtl"] .hdr-nav a i { margin-inline-end: 6px; }
html[dir="rtl"] .card-play { left: auto; right: 8px; }
html[dir="rtl"] .hud-read.tl, html[dir="rtl"] .hud-read.bl { text-align: left; }
html[dir="rtl"] .hud-read.tr, html[dir="rtl"] .hud-read.br { text-align: right; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .hdr-status { display: none; }
  .modules { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 56px; }
  .timeline::before, .timeline::after { display: none; }
}
@media (max-width: 900px) {
  .hdr-nav {
    position: fixed; inset: var(--hdr-h) 0 auto; flex-direction: column; gap: 0; padding: 10px var(--gutter) 18px; background: var(--bg); border-bottom: 1px solid var(--line-2);
    opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity 0.25s, transform 0.3s var(--ease);
  }
  .hdr-nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .hdr-nav a { font-size: 14px; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
  .hdr-nav a.is-active { background: none; }
  .burger { display: block; }
  .theme-btn { margin-inline-start: auto; }
  .hdr .btn-sm { display: none; }
  .lang { margin-inline-start: auto; }
  .theme-btn { margin-inline-start: 0; }
  .hero-grid { grid-template-columns: 1fr; }
  .hud { order: -1; max-width: 420px; justify-self: center; width: 78%; }
  .hero-title { margin-top: 18px; }
  .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .specs { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact { grid-template-columns: 1fr; }
  .ftr-in { grid-template-columns: 1fr 1fr; }
  .ftr-in > div:first-child { grid-column: 1 / -1; }
  .protos-head { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hud { width: 88%; }
  .modules, .timeline { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-body { padding: 12px; }
  .card p, .card dl { display: none; }
  .card h3 { font-size: 16px; }
  .console { grid-template-columns: 1fr; padding: 0 16px 16px; }
  .console-bar { margin-inline: -16px; padding-inline: 16px; }
  .console-bar > span:last-child { display: none; }
  .protos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
  .hero-foot .scroll-hint { display: none; }
}
