/* Nanostack: cinematic home. Night to morning, glass controls over real footage. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --night: #060912;
  --night-2: #0b1020;
  --day: #f2f4f8;
  --ink: #0b1020;
  --paper: #f5f7fc;
  --muted-night: rgba(225, 232, 250, 0.68);
  --muted-day: #4a5468;
  --blue: #3a5cf5;
  --gutter: clamp(20px, 5vw, 72px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 17px/1.55 var(--font);
  color: var(--paper);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid #8fb0ff; outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; padding: 10px 14px; background: #fff; color: #000; border-radius: 10px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 0.45s var(--ease-out) both vt-out; }
::view-transition-new(root) { animation: 0.7s var(--ease-out) both vt-in; }
@keyframes vt-out { to { opacity: 0; filter: brightness(0.2); } }
@keyframes vt-in { from { opacity: 0; } }

/* Type: SF Pro, heavy and tight for titles, as on the Rempart and Cadastre sites. */
.display {
  font-weight: 800;
  font-size: clamp(52px, 9vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.055em;
  margin: 0;
  text-wrap: balance;
}
.title {
  font-weight: 800;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.05em;
  margin: 0;
  text-wrap: balance;
}
.lead { font-size: clamp(19px, 1.6vw, 23px); line-height: 1.42; letter-spacing: -0.012em; margin: 0; max-width: 34ch; text-wrap: pretty; }
.timecode {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600; letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--muted-night);
  margin: 0 0 18px;
}
.timecode::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ff5a4f; box-shadow: 0 0 12px #ff5a4f; }
.light-scene .timecode { color: var(--muted-day); }

/* Navigation: one floating glass pill. */
.nav-wrap { position: fixed; inset: 16px 0 auto; z-index: 50; display: flex; justify-content: center; pointer-events: none; padding: 0 12px; }
.nav {
  pointer-events: auto;
  display: flex; align-items: center; gap: 4px;
  height: 56px; padding: 0 7px 0 16px;
  border-radius: 999px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; text-decoration: none; margin-right: 14px; }
.brand svg { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { text-decoration: none; font-size: 15px; font-weight: 500; padding: 9px 13px; border-radius: 999px; color: inherit; opacity: 0.86; transition: background-color 0.2s, opacity 0.2s; }
.nav-links a:hover { opacity: 1; background: rgba(255, 255, 255, 0.1); }
.nav-links a[aria-current="page"] { opacity: 1; background: rgba(255, 255, 255, 0.14); }
.nav .glass-btn { height: 42px; padding: 0 18px; font-size: 15px; margin-left: 8px; }
.nav.light .nav-links a:hover, .nav.light .nav-links a[aria-current="page"] { background: rgba(11, 16, 32, 0.07); }

/* Film: full-bleed footage with a grade on top. */
.film { position: absolute; inset: 0; overflow: hidden; background: var(--night) center / cover no-repeat; }
.film video, .film img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film video { opacity: 0; transition: opacity 1.4s ease; }
.film video.on { opacity: 1; }
.grade { position: absolute; inset: 0; pointer-events: none; }
.grade-night { background:
  radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(3, 5, 12, 0.7) 100%),
  linear-gradient(180deg, rgba(6, 9, 18, 0.55) 0%, rgba(6, 9, 18, 0.05) 30%, rgba(6, 9, 18, 0.25) 60%, var(--night) 100%); }
.grade-left { background: linear-gradient(90deg, rgba(6, 9, 18, 0.88) 0%, rgba(6, 9, 18, 0.55) 38%, rgba(6, 9, 18, 0) 70%), linear-gradient(180deg, var(--night) 0%, transparent 18%, transparent 80%, var(--night) 100%); }
.grain { position: absolute; inset: -50%; pointer-events: none; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* Opening scene. */
.opening { position: relative; height: 100svh; min-height: 620px; display: grid; place-items: end center; overflow: hidden; }
.opening .copy { position: relative; z-index: 3; text-align: center; padding: 0 var(--gutter) clamp(150px, 22vh, 210px); display: grid; justify-items: center; gap: 22px; }
.opening .lead { margin: 0 auto; max-width: 44ch; color: rgba(236, 241, 255, 0.84); }
/* Letterbox: the bars open on load like a projector gate, then slide away as you scroll. */
.bars::before, .bars::after { content: ""; position: absolute; left: 0; right: 0; height: 50.5%; background: #000; z-index: 4; pointer-events: none; animation: gate 1.6s var(--ease-out) 0.15s both; }
.bars::before { top: 0; transform-origin: top; }
.bars::after { bottom: 0; transform-origin: bottom; }
@keyframes gate { to { transform: scaleY(0); } }

/* The dock: the products as glass, with the Mac's magnification. */
.dock {
  position: absolute; z-index: 5; left: 50%; bottom: clamp(36px, 7vh, 64px);
  transform: translateX(-50%);
  display: flex; align-items: flex-end; gap: 10px;
  padding: 10px 12px; border-radius: 30px;
  animation: rise 1s var(--ease-out) 1.1s both;
}
@keyframes rise { from { opacity: 0; transform: translate(-50%, 24px) scale(0.96); } }
.dock a { position: relative; display: block; width: 64px; height: 64px; border-radius: 18px; text-decoration: none; transform-origin: bottom center; transition: transform 0.35s var(--ease-spring); }
.dock img { width: 100%; height: 100%; border-radius: 15px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)); }
.dock .tip { position: absolute; left: 50%; bottom: calc(100% + 14px); transform: translate(-50%, 6px); white-space: nowrap; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 10px; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.3s var(--ease-out); }
.dock a:hover .tip, .dock a:focus-visible .tip { opacity: 1; transform: translate(-50%, 0); }
.dock .sep { width: 1px; align-self: stretch; margin: 6px 4px; background: rgba(255, 255, 255, 0.25); }
.dock .notes-tile { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 15px; background: linear-gradient(160deg, #fbfbfd, #d9dde6); color: #20263a; font-weight: 800; font-size: 30px; letter-spacing: -0.06em; box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3); }
.dock .notes-tile svg { width: 34px; height: 34px; }
.dock .echo-tile { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 15px; overflow: hidden; box-shadow: 0 6px 10px rgba(0, 0, 0, 0.35); }

.scroll-cue { position: absolute; z-index: 5; right: var(--gutter); bottom: clamp(44px, 8vh, 74px); font-size: 13px; color: var(--muted-night); display: flex; align-items: center; gap: 10px; }
.scroll-cue i { width: 1px; height: 38px; background: linear-gradient(transparent, currentColor); }

/* Scenes: sticky full-screen shots that the text scrolls across. */
.scene { position: relative; }
.scene .stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.scene .track { position: relative; z-index: 3; margin-top: -100svh; }
.beat { min-height: 100svh; display: flex; align-items: center; padding: 120px var(--gutter); }
.beat.end { align-items: flex-end; padding-bottom: 14vh; }
.beat .copy { max-width: 560px; display: grid; gap: 22px; }
.beat .copy p { margin: 0; }
.beat .body { color: var(--muted-night); font-size: 18px; max-width: 46ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.product-mark { display: flex; align-items: center; gap: 14px; font-size: 22px; font-weight: 700; letter-spacing: -0.025em; }
.product-mark img { width: 52px; height: 52px; border-radius: 12px; }
.product-mark .epmark { width: 46px; height: 46px; border-radius: 11px; overflow: hidden; }

/* Echopoint: a notification arriving over the film. */
.notif {
  position: absolute; z-index: 4; top: clamp(96px, 14vh, 140px); right: var(--gutter);
  width: min(380px, calc(100vw - 2 * var(--gutter)));
  border-radius: 26px; padding: 16px 18px 14px;
}
.notif header { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; opacity: 0.86; }
.notif header .epmark { width: 22px; height: 22px; border-radius: 6px; overflow: hidden; }
.notif header time { margin-left: auto; font-weight: 500; opacity: 0.7; font-variant-numeric: tabular-nums; }
.notif h3 { margin: 10px 0 2px; font-size: 16px; font-weight: 700; letter-spacing: -0.015em; }
.notif .sub { margin: 0 0 10px; font-size: 14px; opacity: 0.78; }
.asserts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.asserts li { display: grid; grid-template-columns: 1fr auto 18px; gap: 10px; align-items: center; font-size: 13px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.08); font-variant-numeric: tabular-nums; }
.asserts li span:nth-child(2) { opacity: 0.7; }
.asserts .ok { width: 18px; height: 18px; border-radius: 50%; background: #34c759; display: grid; place-items: center; }
.asserts .ok::after { content: ""; width: 7px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
html.js .asserts li { opacity: 0; transform: translateY(6px); transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }
html.js .notif.play .asserts li { opacity: 1; transform: none; }
html.js .notif.play .asserts li:nth-child(2) { transition-delay: 0.35s; }
html.js .notif.play .asserts li:nth-child(3) { transition-delay: 0.7s; }
html.js .notif { opacity: 0; transform: translateY(-14px) scale(0.97); transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-spring); }
html.js .notif.play { opacity: 1; transform: none; }

/* Rempart: the real map, slowly pushing in, with a prompt you can answer. */
.dolly { position: absolute; inset: -4%; background: center / cover no-repeat; }
.prompt {
  position: absolute; z-index: 4; right: max(var(--gutter), 6vw); top: 50%; transform: translateY(-50%);
  width: min(400px, calc(100vw - 2 * var(--gutter)));
  border-radius: 28px; padding: 22px;
}
.prompt .app { display: flex; gap: 14px; align-items: center; }
.prompt .app-ic { width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(160deg, #6fc3ff, #2f6bff); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.prompt .app-ic svg { width: 26px; height: 26px; }
.prompt h3 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.prompt .meta { margin: 14px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14px; }
.prompt .meta dt { opacity: 0.6; }
.prompt .meta dd { margin: 0; font-variant-numeric: tabular-nums; }
.prompt label.remember { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 14px; }
.prompt select { font: 500 14px var(--font); color: inherit; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 10px; padding: 7px 10px; }
.prompt select option { color: #000; }
.prompt .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.prompt .row .glass-btn { width: 100%; height: 44px; }
.prompt .result { display: none; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; margin-top: 16px; }
.prompt .result i { width: 10px; height: 10px; border-radius: 50%; background: #34c759; box-shadow: 0 0 14px #34c759; }
.prompt.denied .result i { background: #ff5a4f; box-shadow: 0 0 14px #ff5a4f; }
.prompt.answered .result { display: flex; }
.prompt.answered .row, .prompt.answered label.remember { display: none; }

/* Cadastre: morning. A Mac window tilts up to face you. */
.light-scene { color: var(--ink); }
.light-scene .body { color: var(--muted-day); }
.grade-morning { background: linear-gradient(90deg, rgba(245, 247, 252, 0.94) 0%, rgba(245, 247, 252, 0.7) 34%, rgba(245, 247, 252, 0.1) 62%), linear-gradient(180deg, var(--night) 0%, rgba(6, 9, 18, 0) 14%, rgba(245, 247, 252, 0) 80%, var(--day) 100%); }
.window-wrap { position: absolute; z-index: 2; right: calc(-1 * clamp(60px, 8vw, 160px)); top: 50%; width: min(980px, 66vw); transform: translateY(-50%); perspective: 1600px; }
.window { position: relative; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px rgba(11, 16, 32, 0.12), 0 50px 100px -30px rgba(11, 16, 32, 0.55), 0 20px 40px -20px rgba(11, 16, 32, 0.35); transform: rotateY(-18deg) rotateX(6deg) scale(0.94); transform-origin: right center; }
.window img { width: 100%; height: auto; }
.survey-bar {
  position: absolute; z-index: 3; left: 50%; bottom: 7%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; white-space: nowrap;
  padding: 8px 8px 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
}
.survey-bar b { font-variant-numeric: tabular-nums; }
.survey-bar .glass-btn { height: 36px; font-size: 14px; padding: 0 16px; }

/* Notes and credits. */
.notes { background: var(--day); color: var(--ink); padding: clamp(100px, 16vh, 180px) var(--gutter) clamp(80px, 12vh, 140px); }
.notes-inner { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.notes .body { color: var(--muted-day); margin-top: 18px; max-width: 40ch; }
.samples { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.samples li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 22px; border-radius: 20px; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.samples small { flex: none; font-size: 12px; font-weight: 600; color: var(--muted-day); border: 1px solid rgba(11, 16, 32, 0.15); padding: 4px 9px; border-radius: 999px; }
.samples.on-dark small { color: var(--muted-night); border-color: rgba(255, 255, 255, 0.25); }

.credits { background: #000; color: #e9edf7; padding: clamp(110px, 18vh, 200px) var(--gutter) 56px; text-align: center; }
.credits .made { font-size: 15px; color: rgba(233, 237, 247, 0.55); margin: 0 0 10px; }
.credits .studio { font-size: clamp(44px, 7vw, 96px); font-weight: 800; letter-spacing: -0.055em; margin: 0 0 clamp(56px, 9vh, 96px); }
.roll { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; max-width: 760px; margin: 0 auto; font-size: 17px; }
.roll dt { text-align: right; color: rgba(233, 237, 247, 0.55); }
.roll dd { margin: 0; text-align: left; font-weight: 600; }
.roll a { text-decoration: none; }
.roll a:hover { text-decoration: underline; text-underline-offset: 4px; }
.credits .fine { margin: clamp(80px, 12vh, 120px) 0 0; font-size: 13px; color: rgba(233, 237, 247, 0.4); }

/* Scroll-driven camera moves where the browser supports them. */
@supports (animation-timeline: view()) {
  .opening .film { animation: push linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
  .opening .copy { animation: lift linear both; animation-timeline: view(); animation-range: exit 0% exit 60%; }
  /* The stage is sticky, so it never moves in view: drive its camera from the whole scene instead. */
  .scene { view-timeline-name: --scene; }
  .scene .dolly { animation: dolly linear both; animation-timeline: --scene; animation-range: cover 0% cover 100%; }
  .scene .window { animation: face linear both; animation-timeline: --scene; animation-range: entry 10% contain 60%; }
  .scene .stage .film { animation: settle linear both; animation-timeline: --scene; animation-range: cover 0% cover 100%; }
}
@keyframes push { to { transform: scale(1.12); filter: brightness(0.5); } }
@keyframes lift { to { transform: translateY(-80px); opacity: 0; } }
@keyframes dolly { from { transform: scale(1.12) translate(2%, 1%); } to { transform: scale(1) translate(-2%, -1%); } }
@keyframes face { from { transform: rotateY(-24deg) rotateX(10deg) scale(0.86); } to { transform: rotateY(-6deg) rotateX(2deg) scale(1); } }
@keyframes settle { from { transform: scale(1.08); } to { transform: scale(1); } }

/* Product pages. */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; }
.hero .copy { position: relative; z-index: 3; padding: 140px var(--gutter) clamp(72px, 12vh, 120px); display: grid; gap: 22px; max-width: 900px; }
.hero .lead { color: rgba(236, 241, 255, 0.86); }
.section { position: relative; padding: clamp(90px, 14vh, 150px) var(--gutter); }
.section-inner { max-width: 1180px; margin: 0 auto; }
.section h2 { margin-bottom: 18px; }
.section .body { color: var(--muted-night); font-size: 19px; max-width: 54ch; margin: 0; }
.light-scene.section .body { color: var(--muted-day); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 48px; }
.fact { padding: 24px; border-radius: 24px; }
.fact b { display: block; font-size: 34px; font-weight: 800; letter-spacing: -0.045em; line-height: 1; margin-bottom: 10px; }
.fact span { color: var(--muted-night); font-size: 16px; }
.light-scene .fact span { color: var(--muted-day); }
.flow { display: flex; align-items: center; gap: 0; margin-top: 48px; flex-wrap: wrap; }
.node { padding: 16px 20px; border-radius: 20px; min-width: 190px; }
.node small { display: block; font-size: 12px; font-weight: 600; opacity: 0.65; margin-bottom: 4px; }
.node b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wire { width: 56px; height: 2px; background: linear-gradient(90deg, rgba(143, 176, 255, 0.2), rgba(143, 176, 255, 0.9), rgba(143, 176, 255, 0.2)); }
.table-wrap { margin-top: 18px; border-radius: 24px; overflow: hidden; max-width: 760px; }
table.results { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
table.results th, table.results td { text-align: left; padding: 13px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
table.results th { font-size: 13px; font-weight: 600; color: var(--muted-night); }
table.results tr:last-child td { border-bottom: 0; }
.pass { color: #5ee08a; font-weight: 600; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(32px, 6vw, 90px); align-items: center; }
.window.flat { transform: none; }
.list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; max-width: 54ch; }
.list li { position: relative; padding-left: 24px; color: var(--muted-night); }
.light-scene .list li { color: var(--muted-day); }
.list li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.list li b { color: var(--paper); font-weight: 600; }
.light-scene .list li b { color: var(--ink); }
.closing { text-align: center; display: grid; justify-items: center; gap: 22px; }
.closing .lead { margin: 0 auto; }
.orbs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.orbs span { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55; }

/* Prototype tag. */
.proto { position: fixed; left: 14px; bottom: 14px; z-index: 60; font-size: 12px; font-weight: 600; padding: 7px 11px; border-radius: 999px; text-decoration: none; }

@media (max-width: 860px) {
  .nav-links a { padding: 9px 9px; font-size: 14px; }
  .brand span { display: none; }
  .brand { margin-right: 4px; }
  .nav .glass-btn { display: none; }
  .notif { top: auto; bottom: 24px; }
  .prompt { position: relative; top: auto; right: auto; transform: none; margin: 0 auto; }
  .prompt-slot { min-height: 100svh; display: grid; place-items: center; padding: 100px var(--gutter); }
  .window-wrap { position: relative; right: auto; top: auto; transform: none; width: auto; margin: 0 calc(-1 * var(--gutter)) 0 0; }
  .notes-inner, .split { grid-template-columns: 1fr; }
  .roll { grid-template-columns: 1fr; gap: 4px; }
  .roll dt, .roll dd { text-align: center; }
  .roll dd { margin-bottom: 14px; }
  .scroll-cue { display: none; }
  .dock a { width: 54px; height: 54px; }
  .grade-left { background: linear-gradient(180deg, var(--night) 0%, rgba(6, 9, 18, 0.35) 30%, rgba(6, 9, 18, 0.75) 70%, var(--night) 100%); }
  .grade-morning { background: linear-gradient(180deg, var(--night) 0%, rgba(245, 247, 252, 0.55) 22%, rgba(245, 247, 252, 0.92) 60%, var(--day) 100%); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .bars::before, .bars::after { transform: scaleY(0); }
  @view-transition { navigation: none; }
  html.js .notif, html.js .asserts li { opacity: 1; transform: none; }
}

/* A beat with copy on the left and a glass control on the right. */
.split-beat { justify-content: space-between; gap: clamp(32px, 6vw, 96px); }
.split-beat .notif, .split-beat .prompt { position: relative; inset: auto; transform: none; flex: none; margin: 0; }
html.js .split-beat .notif { transform: translateY(-14px) scale(0.97); }
html.js .split-beat .notif.play { transform: none; }
@media (max-width: 860px) {
  .split-beat { flex-direction: column; align-items: stretch; justify-content: center; }
  .light-scene .window-wrap { position: absolute; top: 86px; left: var(--gutter); right: 0; margin: 0; }
  .light-scene .beat { align-items: flex-end; }
}
@media (min-width: 861px) { .split-beat .notif { align-self: flex-start; margin-top: 2vh; } }
/* Mirrored scene: copy on the right when the footage's subject is on the left. */
.grade-right { background: linear-gradient(270deg, rgba(6, 9, 18, 0.9) 0%, rgba(6, 9, 18, 0.6) 36%, rgba(6, 9, 18, 0) 66%), linear-gradient(180deg, var(--night) 0%, transparent 18%, transparent 80%, var(--night) 100%); }
@media (min-width: 861px) {
  .flip .beat { justify-content: flex-end; }
  .flip .split-beat { flex-direction: row-reverse; justify-content: space-between; }
  .flip .split-beat .prompt { align-self: center; }
}
@media (max-width: 860px) { .grade-right { background: linear-gradient(180deg, var(--night) 0%, rgba(6, 9, 18, 0.35) 30%, rgba(6, 9, 18, 0.75) 70%, var(--night) 100%); } }
/* Text-heavy glass uses the "regular" variant: more dim, more blur. */
.prompt { --g-dim: rgba(8, 12, 26, 0.58); }
.notif { --g-dim: rgba(8, 12, 26, 0.4); }
.nav, .proto { transition: color 0.4s var(--ease-out), background 0.4s var(--ease-out), border-color 0.4s var(--ease-out); }
.nav.light .brand svg rect { fill: #0b1020; }
/* Notes: soft morning light behind the material, like the Rempart and Cadastre sites. */
.notes { position: relative; overflow: hidden; isolation: isolate; }
.notes::before {
  content: ""; position: absolute; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 42% at 78% 30%, rgba(84, 128, 255, 0.42), transparent 70%),
    radial-gradient(30% 36% at 92% 78%, rgba(56, 200, 230, 0.32), transparent 70%),
    radial-gradient(34% 40% at 58% 88%, rgba(126, 92, 255, 0.22), transparent 70%),
    radial-gradient(40% 50% at 10% 0%, rgba(255, 214, 170, 0.35), transparent 70%);
  filter: blur(20px);
}
.samples li { transition: transform 0.4s var(--ease-out); }
.hero .display { font-size: clamp(48px, 6.6vw, 100px); max-width: 15ch; }
.proto { left: auto; right: 14px; }
@media (max-width: 860px) {
  .light-scene .survey-bar, .proto { display: none; }
  .light-scene .window-wrap { opacity: 0.55; }
}
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.results { min-width: 520px; }

/* Rendered scenes (Blender): the video fills its dolly; the survey bar floats over the lifted files. */
.dolly video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; }
.land-bar { position: absolute; z-index: 3; left: max(59%, 845px); right: auto; top: 54%; bottom: auto; transform: translateX(-50%); }
@media (min-width: 861px) and (max-width: 1200px) { .land-bar { left: auto; right: 1.5%; transform: none; } }
.light-scene .grade-morning { background: linear-gradient(90deg, rgba(242, 244, 248, 0.92) 0%, rgba(242, 244, 248, 0.6) 30%, rgba(242, 244, 248, 0) 55%), linear-gradient(180deg, var(--night) 0%, rgba(6, 9, 18, 0) 14%, rgba(242, 244, 248, 0) 82%, var(--day) 100%); }
.opening .grade-night { background: radial-gradient(120% 90% at 50% 40%, transparent 50%, rgba(3, 5, 12, 0.6) 100%), linear-gradient(180deg, rgba(6, 9, 18, 0.35) 0%, rgba(6, 9, 18, 0) 25%, rgba(6, 9, 18, 0.15) 60%, var(--night) 100%); }
@media (max-width: 860px) { .land-bar { right: 50%; transform: translateX(50%); bottom: auto; top: 30%; } }
/* Rendered loops already move: a gentler scroll dolly, framed so the subject keeps its edge. */
@supports (animation-timeline: view()) { .scene .dolly:has(video) { animation-name: dolly-soft; } }
@keyframes dolly-soft { from { transform: scale(1.05) translate(1%, .5%); } to { transform: scale(1) translate(-1%, -.5%); } }
.flip .dolly:has(video) { background: #010103; }
.flip .dolly video { transform: scale(.84); transform-origin: 8% 50%; -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 80%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 80%, transparent 100%); }
@media (max-width: 860px) { .light-scene .film video { object-position: 72% 50%; } .flip .dolly video { transform: none; -webkit-mask-image: none; mask-image: none; object-position: 28% 50%; } }
/* Phones: the 16:9 title shot in a shorter band above the headline, so the whole mark shows. */
@media (max-width: 860px) and (orientation: portrait) {
  .opening .film { background-image: none !important; }
  .opening .film video { inset: 7% 0 auto; height: 50%; -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 78%, transparent); mask-image: linear-gradient(180deg, transparent, #000 14%, #000 78%, transparent); }
}
.land-bar .sb-text { min-width: 15.5em; }
.land-bar .glass-btn { transition: opacity .3s ease, transform .15s var(--ease-out); }
.land-bar .glass-btn[data-state="idle"] { opacity: .4; }
.land-bar .glass-btn[data-state="press"] { transform: scale(.94); }
.land-bar .glass-btn[data-state="gone"] { display: none; }
.land-bar:has(.glass-btn[data-state="gone"]) { padding-right: 18px; }
.land-bar:has(.glass-btn[data-state="gone"]) .sb-text { min-width: 0; }

/* Screen-size pass (QA sweep, 11 viewports). */
/* The run result sits low on the right, clear of the robot's head. */
@media (min-width: 861px) { .split-beat .notif { align-self: flex-end; margin: 0 0 6vh; } }
/* Phone landscape and other short screens: the opening and hero titles fit the first screen. */
@media (max-height: 520px) and (orientation: landscape) {
  .display, .hero .display { font-size: clamp(32px, 7.5vw, 58px); }
  .lead { font-size: 16px; }
  .dock { transform: translateX(-50%) scale(.82); transform-origin: 50% 100%; }
  .opening { min-height: 100svh; }
  .opening .copy { padding-bottom: 92px; gap: 14px; }
  .opening .dock { bottom: 12px; }
  .opening .film { background-image: none !important; }
  .opening .film video { inset: 12% auto auto 50%; transform: translateX(-50%); width: auto; height: 50%; aspect-ratio: 16 / 9; -webkit-mask-image: radial-gradient(50% 50% at 50% 50%, #000 55%, transparent 100%); mask-image: radial-gradient(50% 50% at 50% 50%, #000 55%, transparent 100%); }
}
/* Desktop: on the home page the run result stacks under the Echopoint copy, leaving the robot clear. */
@media (min-width: 861px) {
  .scene:not(.flip) .split-beat:has(.notif) { flex-direction: column; align-items: flex-start; justify-content: center; gap: 28px; }
  .scene:not(.flip) .split-beat .notif { align-self: flex-start; margin: 0; }
}
/* Phones and tablets: text over the globe and over the land gets a calmer backdrop. */
@media (max-width: 860px) {
  .grade-right { background: linear-gradient(180deg, var(--night) 0%, rgba(6, 9, 18, 0.5) 28%, rgba(6, 9, 18, 0.86) 58%, var(--night) 100%); }
  .light-scene .grade-morning { background: linear-gradient(180deg, var(--night) 0%, rgba(242, 244, 248, 0.25) 18%, rgba(242, 244, 248, 0.45) 44%, rgba(242, 244, 248, 0.92) 64%, var(--day) 100%); }
}
.land-bar .glass-btn[data-state="idle"] { opacity: .65; }
/* Narrow screens: the results table fits without sideways scrolling; the flow stacks with vertical wires. */
@media (max-width: 560px) {
  table.results { min-width: 0; font-size: 13px; }
  table.results th, table.results td { padding: 10px 8px; }
  table.results td:nth-child(3) { overflow-wrap: break-word; }
}
@media (max-width: 760px) {
  .flow { flex-direction: column; align-items: flex-start; }
  .wire { width: 2px; height: 26px; margin-left: 34px; background: linear-gradient(180deg, rgba(143, 176, 255, 0.2), rgba(143, 176, 255, 0.9), rgba(143, 176, 255, 0.2)); }
}

/* Second QA pass. */
/* Text beside the globe stays on a calm, dark field at narrow desktop widths and in phone landscape. */
@media (min-width: 861px) and (max-width: 1200px) {
  .grade-right { background: linear-gradient(270deg, rgba(6, 9, 18, 0.94) 0%, rgba(6, 9, 18, 0.82) 44%, rgba(6, 9, 18, 0) 72%), linear-gradient(180deg, var(--night) 0%, transparent 18%, transparent 80%, var(--night) 100%); }
}
@media (max-height: 520px) and (orientation: landscape) {
  .grade-right { background: linear-gradient(180deg, var(--night) 0%, rgba(6, 9, 18, 0.8) 26%, rgba(6, 9, 18, 0.88) 70%, var(--night) 100%); }
}
/* Portrait screens: the first Echopoint clip is framed on the robot. */
@media (max-width: 860px) and (orientation: portrait) {
  .film[data-montage] video:first-of-type { object-position: 78% 50%; }
}
/* The night scenes fade into the morning one instead of meeting on a hard line. */
.scene.light-scene { position: relative; }
.scene.light-scene::before { content: ""; position: absolute; z-index: 4; left: 0; right: 0; top: 0; height: 28vh; background: linear-gradient(180deg, var(--night), rgba(6, 9, 18, 0)); pointer-events: none; }
@media (min-width: 861px) and (max-width: 1200px) { .flip .dolly video { transform: scale(.7); transform-origin: 0% 50%; } }
