:root {
  color-scheme: dark;
  --page: #06101d;
  --surface: #0d1a2a;
  --surface-2: #12263b;
  --line: #28435d;
  --text: #e9f4ff;
  --muted: #a8bdd0;
  --cyan: #73dcff;
  --cyan-strong: #16b9ec;
  --gold: #ffd889;
  --radius: 18px;
}

* { box-sizing: border-box; }

html { background: var(--page); }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 88% 3%, rgba(28, 143, 187, .18), transparent 28rem),
    linear-gradient(180deg, #081525 0, var(--page) 42rem);
  color: var(--text);
  font: 1rem/1.62 "Segoe UI", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(var(--cyan), #1c6d93 62%, transparent);
  pointer-events: none;
}

.site-header,
main,
footer {
  width: min(1480px, calc(100% - 48px));
  margin-left: 28px;
  margin-right: auto;
}

.site-header {
  display: grid;
  grid-template-columns: 88px minmax(0, 920px);
  gap: 24px;
  align-items: center;
  padding: 42px 0 30px;
}

.brand-mark { border-radius: 20px; box-shadow: 0 16px 45px rgba(0, 0, 0, .35); }

.eyebrow,
.section-number {
  margin: 0 0 6px;
  color: var(--cyan);
  font: 700 .82rem/1.2 "Segoe UI", sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1, h2, h3 { margin-top: 0; font-family: Bahnschrift, "Segoe UI", sans-serif; line-height: 1.12; }
h1 { margin-bottom: 10px; max-width: 900px; font-size: clamp(2rem, 4vw, 3.75rem); letter-spacing: -.035em; }
h2 { margin-bottom: 0; font-size: clamp(1.65rem, 2.7vw, 2.5rem); }
h3 { margin-bottom: 8px; font-size: 1.2rem; }
p { margin-top: 0; }
.intro { max-width: 860px; margin: 0; color: var(--muted); font-size: 1.08rem; }

main { padding-bottom: 54px; }
section { margin-top: 30px; }
.section-heading { display: flex; justify-content: space-between; gap: 28px; align-items: end; margin-bottom: 20px; }
.hint { max-width: 430px; margin: 0; color: var(--muted); text-align: left; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 16px;
}

.video-card {
  position: relative;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(19, 39, 60, .92), rgba(10, 23, 37, .96));
  box-shadow: 0 18px 48px rgba(0, 0, 0, .22);
}

.accent-card { border-color: #276f8b; }
.object-card { border-color: #6b654c; }
.calibrated-card { border-color: #386b78; background: linear-gradient(160deg, rgba(17, 50, 60, .94), rgba(9, 25, 34, .97)); }
.video-label { display: flex; gap: 8px; align-items: center; padding: 2px 2px 11px; color: var(--muted); font-size: .86rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.video-label span { color: var(--cyan); }

.video-shell { position: relative; overflow: hidden; aspect-ratio: 1 / 1; border-radius: 12px; background: #000; }
.video-shell video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.video-card > h3 { margin: 17px 4px 7px; }
.video-card > p { min-height: 5.2em; margin: 0 4px 16px; color: var(--muted); }
dl { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; overflow: hidden; border-radius: 10px; background: var(--line); }
dl div { padding: 9px 10px; background: #0a1725; }
dt { color: var(--muted); font-size: .78rem; text-transform: uppercase; }
dd { margin: 2px 0 0; font-weight: 700; }
.group-title { margin: 28px 0 12px; color: var(--muted); font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; }
.secondary-grid { grid-template-columns: repeat(2, minmax(280px, 520px)); }

.aggregate-section { margin-top: 64px; }
.image-grid { display: grid; grid-template-columns: repeat(2, minmax(280px, 480px)); gap: 16px; }
.image-grid figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.image-grid img { display: block; width: 100%; height: auto; background: #111; }
.image-grid figcaption { display: grid; gap: 4px; padding: 15px 17px 18px; }
.image-grid figcaption span { color: var(--muted); }

.method-section { margin-top: 64px; }
.method-flow { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.method-flow li { display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding: 18px; border-top: 1px solid var(--line); background: rgba(11, 27, 43, .7); }
.step { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #387899; border-radius: 50%; color: var(--cyan); font-weight: 800; }
.method-flow p { margin-bottom: 0; color: var(--muted); }

.evidence { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 16px; margin-top: 64px; }
.evidence > div, .evidence aside { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.evidence p { max-width: 760px; color: var(--muted); }
.evidence aside { border-left: 4px solid var(--gold); background: #171b24; }
.evidence aside strong { display: block; margin-bottom: 8px; color: var(--gold); font-family: Bahnschrift, "Segoe UI", sans-serif; font-size: 1.2rem; }
.data-link { color: var(--cyan); font-weight: 700; text-underline-offset: 4px; }

footer { display: flex; align-items: center; gap: 12px; padding: 24px 0 38px; border-top: 1px solid var(--line); color: var(--muted); }
footer img { border-radius: 9px; }
footer p { margin: 0; }

@media (max-width: 1000px) {
  .video-grid, .method-flow { grid-template-columns: repeat(2, minmax(250px, 1fr)); }
  .object-card { grid-column: 1 / -1; max-width: 620px; }
}

@media (max-width: 700px) {
  .site-header, main, footer { width: calc(100% - 32px); margin-left: 22px; }
  .site-header { grid-template-columns: 58px 1fr; gap: 14px; padding-top: 24px; }
  .brand-mark { width: 58px; height: 58px; border-radius: 14px; }
  .section-heading { display: block; }
  .hint { margin-top: 10px; }
  .video-grid, .method-flow, .evidence, .image-grid { grid-template-columns: 1fr; }
  .object-card { grid-column: auto; max-width: none; }
  .video-card > p { min-height: 0; }
}

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

header, nav, .nav-toggle, main, footer { width: min(1480px, calc(100% - 48px)); margin-left: 28px; margin-right: auto; }
header { display:flex; align-items:center; gap:20px; padding:30px 0 18px; }
header img { width:76px; height:76px; border-radius:18px; }
header h1 { margin:0; font-size:2.2rem; }
header p { margin:3px 0; color:var(--muted); }
nav { display:flex; flex-wrap:wrap; gap:7px; padding:10px 0 22px; }
nav a { padding:8px 12px; border:1px solid var(--line); border-radius:999px; color:var(--text); text-decoration:none; }
nav a:hover, nav a.active { color:#00131d; background:var(--cyan); border-color:var(--cyan); }
.nav-toggle { display:block; padding:7px 13px; color:var(--text); background:var(--surface); border:1px solid var(--line); border-radius:8px; text-align:left; }
.hero { display:grid; grid-template-columns:minmax(280px, 1fr) minmax(280px, 520px); gap:24px; align-items:center; padding:34px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); }
.hero video, .card video { display:block; width:100%; max-height:560px; background:#000; border-radius:12px; }
.grid { display:grid; grid-template-columns:repeat(3, minmax(240px,1fr)); gap:16px; }
.card { min-width:0; padding:18px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); }
.card p { color:var(--muted); }
.card img { display:block; width:100%; height:auto; border-radius:10px; background:#000; }
.sequence { margin-top:54px; }
.sequence-heading { display:flex; align-items:end; justify-content:space-between; gap:24px; margin-bottom:16px; }
.sequence-heading p { max-width:630px; margin:0; color:var(--muted); }
.sequence-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; align-items:stretch; }
.sequence-empty { min-width:0; }
.aggregate-sequence { margin-top:28px; }
.aggregate-sequence > h3 { color:var(--muted); font-size:1rem; letter-spacing:.05em; text-transform:uppercase; }
.video-card { display:grid; grid-template-rows:auto auto 1fr auto; min-height:100%; }
.video-card h3 { min-height:2.5em; }
.video-stage { display:flex; align-items:center; justify-content:center; width:100%; aspect-ratio:564/488; overflow:hidden; border-radius:12px; background:#000; }
.card .video-stage video { display:block; width:var(--display-width); height:auto; max-width:none; max-height:none; border-radius:0; background:#000; }
.scale-note { padding:12px 15px; border-left:3px solid var(--cyan); background:var(--surface); color:var(--muted); }
.aggregates { grid-template-columns:repeat(4,minmax(200px,1fr)); }
.button { display:inline-block; margin:5px 6px 5px 0; padding:10px 15px; border-radius:9px; background:var(--cyan); color:#00131d; font-weight:800; text-decoration:none; }
.button.secondary { color:var(--cyan); background:transparent; border:1px solid var(--cyan); }
.steps { max-width:980px; }
.steps li { margin:14px 0; padding:18px; background:var(--surface); border-left:3px solid var(--cyan); }
code, pre { overflow-wrap:anywhere; color:#b9edff; }
pre { overflow:auto; padding:18px; border:1px solid var(--line); border-radius:12px; background:#040b12; }
details { margin:12px 0; padding:16px 18px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
summary { cursor:pointer; font-weight:800; }
small { color:var(--muted); }
@media(max-width:1000px){ .grid,.aggregates{grid-template-columns:repeat(2,minmax(230px,1fr));}.hero{grid-template-columns:1fr;} .sequence-grid{gap:10px}.video-card{padding:12px}.video-card h3{font-size:1rem}.video-card p{font-size:.9rem} }
@media(max-width:650px){ header,nav,.nav-toggle,main,footer{width:calc(100% - 28px);margin-left:18px}.grid,.aggregates{grid-template-columns:1fr;}header{align-items:flex-start}.sequence-heading{display:block}.sequence-grid{grid-template-columns:1fr}.sequence-empty{display:none}.video-card h3{min-height:0} }
