/*
 * The public site of Controlis Clima (Issue #546).
 *
 * Every colour is a token of services/theme_tokens.py, written as
 * rgb(var(--c-NAME)); the token table itself is inlined in the page head by
 * scripts/build_site.py. No hex, no rgb() literal, no colour keyword here
 * (tests/test_site_build.py fails on one). Layout uses logical properties so
 * a right-to-left page later is a `dir` attribute, not a rewrite.
 *
 * One ground is dark in BOTH themes, because something lit sits on it: the
 * hero (the city video, and on it the building scene, the product's login
 * scene, drawn for a dark column, docs/visual-language.md section 10). It
 * uses `scrim`, the one token that is dark in either theme, and `pure_white`
 * for what sits on it.
 */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-block-start: 64px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: rgb(var(--c-canvas));
  color: rgb(var(--c-ink));
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, canvas { display: block; max-inline-size: 100%; }
a { color: rgb(var(--c-accent-400)); text-underline-offset: 3px; }
a:hover { color: rgb(var(--c-accent-300)); }
:focus-visible { outline: 2px solid rgb(var(--c-accent-500)); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; color: rgb(var(--c-ink-strong)); line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 16px; inset-block-start: -60px; z-index: 50;
        background: rgb(var(--c-surface)); color: rgb(var(--c-ink-strong)); padding: 8px 14px;
        border: 1px solid rgb(var(--c-line)); border-radius: 6px; }
.skip:focus { inset-block-start: 12px; }

.wrap { inline-size: 100%; max-inline-size: 1160px; margin-inline: auto; padding-inline: 24px; }
@media (max-width: 599px) { .wrap { padding-inline: 16px; } }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-block-size: 46px; padding: 10px 20px; border-radius: 8px;
  font: inherit; font-size: 16px; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: rgb(var(--c-accent-600)); color: rgb(var(--c-canvas)); }
.btn-primary:hover { background: rgb(var(--c-accent-500)); color: rgb(var(--c-canvas)); }
.btn-quiet { background: transparent; color: rgb(var(--c-ink-strong)); border-color: rgb(var(--c-line-strong)); }
.btn-quiet:hover { background: rgb(var(--c-ink-strong) / 0.06); color: rgb(var(--c-ink-strong)); }
/* On the dark hero, in both themes. */
.btn-light { background: rgb(var(--c-pure-white)); color: rgb(var(--c-scrim)); }
.btn-light:hover { background: rgb(var(--c-pure-white) / 0.86); color: rgb(var(--c-scrim)); }
.btn-ghost-light { background: rgb(var(--c-scrim) / 0.25); color: rgb(var(--c-pure-white));
                   border-color: rgb(var(--c-pure-white) / 0.55); }
.btn-ghost-light:hover { background: rgb(var(--c-pure-white) / 0.12); color: rgb(var(--c-pure-white)); }
.btn .ci { flex-shrink: 0; }

/* ── Header ──────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; inset-block-start: 0; z-index: 30;
  background: rgb(var(--c-surface) / 0.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-block-end: 1px solid rgb(var(--c-line));
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; block-size: 64px; }
.brand { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; flex-shrink: 0; }
.brand img { block-size: 22px; inline-size: auto; align-self: center; }
.brand span { font-size: 19px; font-weight: 500; letter-spacing: 0.01em; color: rgb(var(--c-ink-400)); }
.logo-dark { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }
:root[data-theme="dark"] .logo-light { display: none !important; }
.site-nav { display: flex; gap: 22px; margin-inline-start: 12px; }
.site-nav a { color: rgb(var(--c-ink-400)); text-decoration: none; font-size: 15px; font-weight: 500; }
.site-nav a:hover { color: rgb(var(--c-ink-strong)); }
.header-end { margin-inline-start: auto; display: flex; align-items: center; gap: 16px; }
.sign-in { color: rgb(var(--c-ink-400)); font-size: 15px; font-weight: 600; text-decoration: none; }
.sign-in:hover { color: rgb(var(--c-ink-strong)); }
@media (max-width: 1023px) { .site-nav { display: none; } }

/* The theme toggle: both words on screen, as in the product
   (auth/templates/_theme_toggle.html); the words fold away on a phone. */
.theme-toggle { display: inline-flex; align-items: center; padding: 2px; gap: 2px;
                border: 1px solid rgb(var(--c-line)); border-radius: 8px; background: rgb(var(--c-surface-2)); }
.theme-toggle button { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px;
                       border-radius: 6px; font: inherit; font-size: 12px; font-weight: 600; line-height: 18px;
                       color: rgb(var(--c-ink-400)); background: transparent; border: 0; cursor: pointer; }
.theme-toggle button:hover { color: rgb(var(--c-ink-200)); background: rgb(var(--c-ink-strong) / 0.16); }
.theme-toggle button[aria-pressed="true"] { background: rgb(var(--c-surface)); color: rgb(var(--c-ink-strong));
                                            box-shadow: 0 1px 2px rgb(var(--c-scrim) / 0.08); }
@media (max-width: 599px) { .theme-toggle .tt-word { display: none; } .header-end { gap: 12px; } }

/* ── Hero: the city loop under a scrim ───────────────────────────────── */
.hero { position: relative; isolation: isolate; overflow: hidden;
        background: rgb(var(--c-scrim)); color: rgb(var(--c-pure-white)); }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media video { inline-size: 100%; block-size: 100%; max-inline-size: none; object-fit: cover; }
/* The scrim: dark where the words are (the start side and the foot), lighter
   on the far side so the city still reads. The headline measures at least
   7:1 on the brightest frame of the loop (sky at 0.6 s) in both themes. */
.hero-scrim { position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to right, rgb(var(--c-scrim) / 0.88) 0%, rgb(var(--c-scrim) / 0.72) 45%, rgb(var(--c-scrim) / 0.35) 100%),
    linear-gradient(to bottom, rgb(var(--c-scrim) / 0.25) 0%, rgb(var(--c-scrim) / 0) 40%, rgb(var(--c-scrim) / 0.6) 100%); }
:root[dir="rtl"] .hero-scrim { transform: scaleX(-1); }
.hero-inner { min-block-size: min(76vh, 720px); display: flex; flex-direction: column; justify-content: center;
              padding-block: 96px 88px; }
.hero h1 { color: rgb(var(--c-pure-white)); font-size: clamp(36px, 5.2vw, 62px); font-weight: 800;
           max-inline-size: 18ch; letter-spacing: -0.02em; }
.hero-eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
                color: rgb(var(--c-pure-white) / 0.8); margin-block-end: 18px; }
.hero-lead { margin-block-start: 22px; max-inline-size: 36rem; font-size: clamp(18px, 1.6vw, 21px);
             color: rgb(var(--c-pure-white) / 0.86); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 34px; }
@media (max-width: 599px) {
  .hero-inner { min-block-size: 0; padding-block: 64px 56px; }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* The building in 3D (Issue #601, the product's login scene): beside the
   words from 1024px, under them below that. The stage is square and has a
   fixed size, so neither its poster nor the canvas that replaces it moves
   anything. No box, no border, no backdrop: the scene is transparent and sits
   straight on the hero's dark ground, the ground it was drawn for
   (docs/visual-language.md section 10). */
.hero-3d { position: relative; flex: none; align-self: center; aspect-ratio: 1 / 1;
           block-size: 320px; margin-block: 16px -16px; touch-action: pan-y; cursor: grab; user-select: none; }
.hero-3d:active { cursor: grabbing; }
@media (min-width: 768px) { .hero-3d { block-size: 420px; margin-block: 16px -24px; } }
@media (min-width: 1024px) {
  .hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
                column-gap: 24px; }
  .hero-3d { block-size: min(560px, 70vh); margin-block: -40px -32px; margin-inline-end: -24px; }
}
.hero-3d img, .login3d-gl { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; max-inline-size: none; }
.hero-3d img { object-fit: contain; transition: opacity .35s ease-in-out; }
.login3d-gl { opacity: 0; transition: opacity .35s ease-in-out; }
.hero-3d[data-login3d-state="ready"] .login3d-gl { opacity: 1; }
.hero-3d[data-login3d-state="ready"] img { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .hero-3d img, .login3d-gl { transition: none; } }

/* ── Sections ────────────────────────────────────────────────────────── */
.section { padding-block: 96px; }
.section + .section { border-block-start: 1px solid rgb(var(--c-line-soft)); }
.section-alt { background: rgb(var(--c-surface)); }
@media (max-width: 767px) { .section { padding-block: 64px; } }
.section h2 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; max-inline-size: 24ch; letter-spacing: -0.015em; }
.lead { margin-block-start: 16px; max-inline-size: 44rem; font-size: 19px; color: rgb(var(--c-ink-400)); }
.section-head { margin-block-end: 48px; }
@media (max-width: 767px) { .section-head { margin-block-end: 32px; } .lead { font-size: 17px; } }
.muted { color: rgb(var(--c-ink-400)); }
.small { font-size: 14px; line-height: 1.55; }

/* The 3D renders (Issue #550): one house style, transparent, read on both
   themes. They sit straight on the page: no tile, no frame. */
.r3d { display: block; max-inline-size: none; }

.bullets { margin-block-start: 16px; display: grid; gap: 12px; }
.bullets li { position: relative; padding-inline-start: 20px; color: rgb(var(--c-ink-400)); font-size: 16px; }
.bullets li::before { content: ""; position: absolute; inset-inline-start: 2px; inset-block-start: 0.62em;
                      inline-size: 6px; block-size: 6px; border-radius: 50%; background: rgb(var(--c-ink-500)); }
.bullets strong { color: rgb(var(--c-ink-strong)); font-weight: 650; }

/* The illustrations Netanel supplied (Issue #556): a photograph-like picture
   in a rounded frame, the page's own line around it. Its width and height
   attributes hold its box before it loads. */
.illus-frame { margin: 0; border-radius: 12px; border: 1px solid rgb(var(--c-line)); overflow: hidden;
               background: rgb(var(--c-inset)); }
.illus { display: block; inline-size: 100%; block-size: auto; }
.illus-frame figcaption { padding: 10px 14px; font-size: 14px; line-height: 1.5; color: rgb(var(--c-ink-400));
                          background: rgb(var(--c-surface)); border-block-start: 1px solid rgb(var(--c-line)); }
.gap-figure { margin-block: 16px 4px; }

/* ── The problem: the dusk picture beside the words, then three figures in
   one ruled row, and their sources ───────────────────────────────────── */
.problem-intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center;
                 margin-block-end: 48px; }
.problem-intro .section-head { margin-block-end: 0; }
.problem-figure { max-inline-size: 790px; }
@media (max-width: 1023px) {
  .problem-intro { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-block-end: 32px; }
}

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid rgb(var(--c-line)); }
.stat { padding: 32px 28px 32px 0; }
.stat + .stat { padding-inline-start: 28px; border-inline-start: 1px solid rgb(var(--c-line)); }
.stat-figure { font-size: clamp(48px, 5.6vw, 72px); font-weight: 800; line-height: 1; color: rgb(var(--c-ink-strong));
               letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.stat p { margin-block-start: 14px; color: rgb(var(--c-ink-400)); max-inline-size: 22rem; }
@media (max-width: 767px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat, .stat + .stat { padding: 24px 0; border-inline-start: 0; }
  .stat + .stat { border-block-start: 1px solid rgb(var(--c-line)); }
}
.gap-note { margin-block-start: 32px; display: grid; grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); gap: 6px 28px;
            align-items: baseline; }
.gap-note h3 { font-size: 18px; }
.gap-note p { color: rgb(var(--c-ink-400)); font-size: 17px; }
@media (max-width: 599px) { .gap-note { grid-template-columns: minmax(0, 1fr); } }
.sources { margin-block-start: 28px; padding-block-start: 20px; border-block-start: 1px solid rgb(var(--c-line-soft));
           display: grid; gap: 8px; font-size: 14px; color: rgb(var(--c-ink-500)); max-inline-size: 60rem; }
.sources strong { color: rgb(var(--c-ink-400)); font-weight: 650; }

/* ── The solution: the three parts as our models, then three pillars ──── */
.arch { display: grid; grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr) 72px minmax(0, 1fr);
        align-items: start; margin-block-end: 56px; }
.arch-node { text-align: center; }
.arch-node .r3d { margin-inline: auto; inline-size: 188px; block-size: 188px; }
.arch-node strong { display: block; margin-block-start: 6px; color: rgb(var(--c-ink-strong)); font-size: 17px; }
.arch-node span { display: block; font-size: 14px; color: rgb(var(--c-ink-500)); }
.arch-core strong { color: rgb(var(--c-accent-400)); }
.arch-link { margin-block-start: 104px; block-size: 1px; background: rgb(var(--c-line-strong)); }
@media (max-width: 767px) {
  .arch { grid-template-columns: minmax(0, 1fr); }
  .arch-node .r3d { inline-size: 132px; block-size: 132px; }
  .arch-link { margin: 12px auto; inline-size: 1px; block-size: 24px; }
}
.pillars { border-block-start: 1px solid rgb(var(--c-line)); }
.pillar { display: grid; grid-template-columns: 124px minmax(0, 17rem) minmax(0, 1fr); gap: 8px 36px; align-items: start;
          padding-block: 28px; border-block-end: 1px solid rgb(var(--c-line)); }
.pillar .r3d { inline-size: 124px; block-size: 124px; margin-block-start: -24px; }
.pillar h3 { font-size: 20px; line-height: 1.3; }
.pillar .bullets { margin: 0; }
@media (max-width: 899px) {
  .pillar { grid-template-columns: 88px minmax(0, 1fr); }
  .pillar .r3d { inline-size: 88px; block-size: 88px; grid-row: span 2; margin: 0; }
  .pillar .bullets { grid-column: 2; margin-block-start: 8px; }
}
@media (max-width: 479px) {
  .pillar { grid-template-columns: minmax(0, 1fr); }
  .pillar .r3d { grid-row: auto; }
  .pillar .bullets { grid-column: auto; }
}

/* ── The film: the whole video, one screen tall, edge to edge ────────── */
/* The frame is the video's own 16:9, as wide as the screen allows while
   staying within one screen's height: no bars above or below it. */
.film { position: relative; inline-size: min(100%, calc((100svh - 64px) * 16 / 9)); margin-inline: auto;
        aspect-ratio: 16 / 9; overflow: hidden; background: rgb(var(--c-scrim)); color: rgb(var(--c-pure-white)); }
.film video { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; max-inline-size: none; object-fit: contain;
              background: rgb(var(--c-scrim)); }
.film-start { position: absolute; inset: 0; inline-size: 100%; border: 0; padding: 0; cursor: pointer;
              background: rgb(var(--c-scrim) / 0.3); }
.film-start[hidden] { display: none; }
.film-bar { position: absolute; inset-inline: 0; inset-block-end: 0; display: flex; flex-wrap: wrap; align-items: center;
            justify-content: space-between; gap: 12px; padding: 40px 24px 20px;
            background: linear-gradient(to top, rgb(var(--c-scrim) / 0.75), rgb(var(--c-scrim) / 0)); }
.film-title { font-size: 15px; font-weight: 650; color: rgb(var(--c-pure-white) / 0.9); }
.film-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.film-btn { display: inline-flex; align-items: center; gap: 6px; min-block-size: 38px; padding: 6px 12px; border-radius: 8px;
            font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; color: rgb(var(--c-pure-white));
            background: rgb(var(--c-scrim) / 0.55); border: 1px solid rgb(var(--c-pure-white) / 0.45); }
.film-btn:hover { background: rgb(var(--c-pure-white) / 0.16); }
.film-btn[aria-pressed="true"] { background: rgb(var(--c-pure-white)); color: rgb(var(--c-scrim)); }
.film .film-btn:focus-visible, .film-start:focus-visible { outline-color: rgb(var(--c-pure-white)); }
#filmPlayIcon { display: none; }
.film[data-paused] #filmPlayIcon { display: inline-block; }
.film[data-paused] #filmPauseIcon { display: none; }
@media (max-width: 599px) { .film-bar { padding: 32px 16px 16px; } .film-title { flex-basis: 100%; } }
.vc-play { position: absolute; inset: 0; margin: auto; inline-size: 76px; block-size: 76px; border-radius: 50%;
           display: flex; align-items: center; justify-content: center; background: rgb(var(--c-pure-white));
           color: rgb(var(--c-scrim)); box-shadow: 0 8px 30px rgb(var(--c-scrim) / 0.45); }
.vc-play .ci { margin-inline-start: 4px; }

/* ── Technology: three layers, the picture on alternating sides ──────── */
.layer { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.layer + .layer { margin-block-start: 72px; }
.layer-flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.layer-flip > :first-child { order: 2; }
.layer-figure { position: relative; border-radius: 12px; background: rgb(var(--c-inset));
                aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.layer-figure img { inline-size: 100%; block-size: 100%; object-fit: contain; }
.layer-figure .r3d { inline-size: 64%; block-size: auto; aspect-ratio: 1; }
.layer-tag { font-size: 14px; font-weight: 650; color: rgb(var(--c-ink-500)); }
.layer h3 { margin-block-start: 4px; font-size: 26px; letter-spacing: -0.01em; }
.patent { margin-block-start: 20px; padding-block-start: 14px; border-block-start: 1px solid rgb(var(--c-line));
          font-size: 14px; color: rgb(var(--c-ink-500)); }
.figure-btn { position: absolute; inset-block-end: 10px; inset-inline-end: 10px; display: inline-flex; align-items: center;
              gap: 6px; font: inherit; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 6px; cursor: pointer;
              color: rgb(var(--c-ink-strong)); background: rgb(var(--c-surface)); border: 1px solid rgb(var(--c-line)); }
.figure-btn:hover { border-color: rgb(var(--c-accent-500)); }
/* The Clima Hub, last and smaller (Issue #601): a narrow picture, a smaller
   heading and text, under its own rule. */
.layer-minor { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 32px; align-items: start;
               padding-block-start: 40px; border-block-start: 1px solid rgb(var(--c-line-soft)); }
.layer + .layer-minor { margin-block-start: 56px; }
.layer-minor .layer-figure { max-inline-size: 260px; }
.layer-minor h3 { font-size: 20px; }
.layer-minor .bullets { font-size: 15px; }
.layer-minor .gap-figure { max-inline-size: 480px; }
@media (max-width: 767px) {
  .layer { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .layer + .layer { margin-block-start: 48px; }
  .layer-flip > :first-child { order: 0; }
  .layer-figure { max-inline-size: 420px; }
}

/* ── The platform: one strip of steps, left to right ─────────────────── */
.steps { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.steps::before { content: ""; position: absolute; inset-inline: 10%; inset-block-start: 70px; block-size: 1px;
                 background: rgb(var(--c-line-strong)); }
.step { position: relative; text-align: center; }
.step .r3d { position: relative; margin-inline: auto; inline-size: 140px; block-size: 140px; }
.step strong { display: block; margin-block-start: 8px; color: rgb(var(--c-ink-strong)); font-size: 16px; line-height: 1.35; }
.step strong::before { counter-increment: step; content: counter(step) "  "; color: rgb(var(--c-ink-500)); font-weight: 600;
                       white-space: pre; }
.step span { display: block; margin-block-start: 6px; font-size: 14px; color: rgb(var(--c-ink-400)); line-height: 1.5; }
@media (max-width: 899px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .steps::before { inset-inline: 44px auto; inset-block: 44px; inline-size: 1px; block-size: auto; }
  .step { display: grid; grid-template-columns: 88px minmax(0, 1fr); column-gap: 16px; text-align: start; align-items: center; }
  .step .r3d { inline-size: 88px; block-size: 88px; grid-row: span 2; margin: 0; }
  .step strong { margin: 0; align-self: end; }
  .step span { align-self: start; margin-block-start: 2px; }
}

/* Two ways in, side by side under one rule. */
.ways { margin-block-start: 48px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
        border-block-start: 1px solid rgb(var(--c-line)); }
.way { padding: 24px 32px 0 0; }
.way + .way { padding-inline: 32px 0; border-inline-start: 1px solid rgb(var(--c-line)); }
.way h3 { font-size: 19px; }
.way p { margin-block-start: 8px; color: rgb(var(--c-ink-400)); }
@media (max-width: 767px) {
  .ways { grid-template-columns: minmax(0, 1fr); }
  .way + .way { padding-inline: 0; border-inline-start: 0; }
}

/* What was measured, beside the three rules the screens keep. */
.checks { margin-block-start: 56px; }
.measured-figure { font-size: clamp(56px, 7vw, 88px); font-weight: 800; line-height: 1; letter-spacing: -0.035em;
                   color: rgb(var(--c-ink-strong)); font-variant-numeric: tabular-nums; }
.measured-figure span { color: rgb(var(--c-accent-400)); }
.measured p + p { margin-block-start: 16px; color: rgb(var(--c-ink-400)); font-size: 16px; }
.measured strong { color: rgb(var(--c-ink-strong)); }
/* The three rules the screens keep, in one ruled row. */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px;
              border-block-start: 1px solid rgb(var(--c-line)); }
.principle { padding-block: 16px; }
@media (max-width: 899px) { .principles { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .principle { border-block-end: 1px solid rgb(var(--c-line)); } }
.principle dt { font-weight: 700; color: rgb(var(--c-ink-strong)); font-size: 17px; }
.principle dd { margin: 4px 0 0; color: rgb(var(--c-ink-400)); font-size: 16px; }
@media (max-width: 899px) { .checks { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

/* ── The equipment grid ──────────────────────────────────────────────── */
.equip-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-block: 72px 20px; }
.equip-head h3 { font-size: 24px; }
.equip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.equip { display: flex; flex-direction: column; align-items: stretch; padding: 0; text-align: start; font: inherit; cursor: pointer;
         background: rgb(var(--c-canvas)); border: 1px solid rgb(var(--c-line)); border-radius: 10px; overflow: hidden;
         color: rgb(var(--c-ink-strong)); transition: border-color .15s; }
.equip:hover { border-color: rgb(var(--c-accent-500)); }
.equip img { inline-size: 100%; block-size: auto; aspect-ratio: 4 / 3; object-fit: contain; background: rgb(var(--c-inset)); }
.equip span { padding: 10px 12px; font-size: 14px; font-weight: 600; line-height: 1.3; }
@media (max-width: 479px) { .equip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── Why us: three differentiators, then the comparison ──────────────── */
.diffs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.diff .r3d { inline-size: 150px; block-size: 150px; margin-inline-start: -22px; }
.diff h3 { margin-block-start: 6px; font-size: 19px; line-height: 1.3; }
.diff p { margin-block-start: 8px; color: rgb(var(--c-ink-400)); }
@media (max-width: 899px) {
  .diffs { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .diff { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 16px; align-items: start; }
  .diff .r3d { inline-size: 96px; block-size: 96px; grid-row: span 2; margin: 0; }
  .diff h3 { margin: 0; }
}
.compare { margin-block-start: 56px; inline-size: 100%; border-collapse: separate; border-spacing: 0;
           border: 1px solid rgb(var(--c-line)); border-radius: 10px; overflow: hidden; font-size: 15px; }
.compare th, .compare td { padding: 14px 16px; text-align: start; vertical-align: top; border-block-end: 1px solid rgb(var(--c-line-soft)); }
.compare tr:last-child th, .compare tr:last-child td { border-block-end: 0; }
.compare thead th { background: rgb(var(--c-surface-2)); color: rgb(var(--c-ink-strong)); font-weight: 700; font-size: 14px; }
.compare tbody th { color: rgb(var(--c-ink-strong)); font-weight: 650; inline-size: 20%; }
.compare td { color: rgb(var(--c-ink-400)); background: rgb(var(--c-surface)); }
.compare tbody th { background: rgb(var(--c-surface)); }
.compare .ours { color: rgb(var(--c-ink-strong)); font-weight: 600; background: rgb(var(--c-accent-bg)); }
.compare thead .ours { background: rgb(var(--c-accent-bg)); color: rgb(var(--c-accent-300)); }
@media (max-width: 767px) {
  .compare, .compare thead, .compare tbody, .compare tr, .compare th, .compare td { display: block; }
  .compare thead { display: none; }
  .compare tr { border-block-end: 1px solid rgb(var(--c-line)); }
  .compare tr:last-child { border-block-end: 0; }
  .compare tbody th { inline-size: auto; background: rgb(var(--c-surface-2)); }
  .compare td { border-block-end: 0; padding-block: 8px; }
  .compare td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
                        text-transform: uppercase; color: rgb(var(--c-ink-500)); margin-block-end: 2px; }
}

/* ── Markets: one street, one picture, four labels under it ──────────── */
.street { max-inline-size: 960px; margin-inline: auto; }
.street-stage { position: relative; }
.street .r3d { inline-size: 100%; block-size: auto; aspect-ratio: 3 / 1; }
.street .s-building { position: absolute; inset: 0; }
/* Four equal columns: the render centres each building on its quarter, so a
   label sits under its building; all four start on one line and a long one
   wraps downward. */
.street-labels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start;
                 margin-block-start: -3%; text-align: center; }
.street-labels li { padding-inline: 8px; font-weight: 650; color: rgb(var(--c-ink-strong)); font-size: 16px; line-height: 1.35; }
@media (max-width: 599px) { .street-labels li { font-size: 13px; padding-inline: 2px; } }
.partner-model { margin-block-start: 48px; max-inline-size: 44rem; }
.partner-model h3 { font-size: 19px; }
.partner-model p { margin-block-start: 8px; color: rgb(var(--c-ink-400)); }

/* ── Team ────────────────────────────────────────────────────────────── */
.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; padding-block-start: 28px;
          border-block-start: 1px solid rgb(var(--c-line)); }
.person h3 { font-size: 20px; }
.person .role { margin-block-start: 2px; font-size: 14px; font-weight: 650; color: rgb(var(--c-accent-400)); }
.person p { margin-block-start: 10px; font-size: 15px; color: rgb(var(--c-ink-400)); }
/* Five people: rows of three, the last row centred, so no hole is left. */
.core-team { margin-block-start: 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 32px; }
.core-team li { flex: 0 1 calc((100% - 64px) / 3); display: flex; align-items: center; gap: 14px; padding-block: 12px;
                border-block-end: 1px solid rgb(var(--c-line-soft)); }
@media (max-width: 899px) { .core-team li { flex-basis: calc((100% - 32px) / 2); } }
.core-team strong { display: block; color: rgb(var(--c-ink-strong)); font-size: 15px; }
.core-team .who span { font-size: 14px; color: rgb(var(--c-ink-400)); }
.sub-head { margin-block-start: 48px; font-size: 14px; font-weight: 650; color: rgb(var(--c-ink-500)); }
/* The photos: round, small, the size the deck's own files allow. */
.face { flex: none; border-radius: 50%; background: rgb(var(--c-inset));
        box-shadow: 0 0 0 1px rgb(var(--c-line)), 0 0 0 4px rgb(var(--c-line-soft) / 0.6); }
.person { display: grid; grid-template-columns: 80px minmax(0, 1fr); column-gap: 18px; align-items: start; }
@media (max-width: 899px) {
  .people { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* ── Partners: the deck's strip, one quiet row ───────────────────────── */
.partners { background: rgb(var(--c-surface)); border-block-start: 1px solid rgb(var(--c-line-soft)); padding-block: 56px; }
.partners-title { font-size: 15px; font-weight: 650; color: rgb(var(--c-ink-500)); }
.partner-row { margin-block-start: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; align-items: start; }
.partner-row li { display: grid; gap: 12px; justify-items: start; }
/* Each logo at its own size (scripts/build_site_team_photos.py sets one
   height per logo for equal optical weight), on one shared 48 px line. */
.partner-row .logo { display: flex; align-items: center; block-size: 48px; }
.partner-row .logo img { max-inline-size: 100%; block-size: auto; }
.partner-row .caption { font-size: 14px; color: rgb(var(--c-ink-400)); max-inline-size: 22rem; }
.logo-on-dark { display: none; }
:root[data-theme="dark"] .logo-on-dark { display: block; }
:root[data-theme="dark"] .logo-on-light { display: none; }
@media (max-width: 767px) { .partner-row { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
@media (max-width: 599px) { .core-team li { flex-basis: 100%; } }

/* ── Vision ──────────────────────────────────────────────────────────── */
/* A city behind the words (an illustration, sunrise on the light theme, blue
   hour on the dark one). The words sit in its calm sky; the busy lower part
   of the picture stays below them (the band's bottom padding). One scrim
   fades the picture into the page at both edges and lays the page's own
   colour, thinned, behind the words, so they read in both themes. */
.vision { position: relative; isolation: isolate; overflow: hidden; background: rgb(var(--c-canvas));
          color: rgb(var(--c-ink)); padding-block: 104px max(300px, 23vw); text-align: center; }
/* The picture keeps its own shape at the band's foot, so its horizon stays
   below the buttons however tall the words make the band. */
.vision-bg { position: absolute; inset: auto 0 0 0; block-size: max(42vw, 560px); z-index: -1; }
.vision-bg .illus { inline-size: 100%; block-size: 100%; object-fit: cover; object-position: 50% 100%; }
.vision-bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgb(var(--c-canvas)) 0%, rgb(var(--c-canvas) / 0.86) 16%,
              rgb(var(--c-canvas) / 0.6) 46%, rgb(var(--c-canvas) / 0) 74%, rgb(var(--c-canvas) / 0) 90%,
              rgb(var(--c-canvas)) 100%); }
.illus-dark { display: none; }
:root[data-theme="dark"] .illus-light { display: none; }
:root[data-theme="dark"] .illus-dark { display: block; }
.vision-label { font-size: 15px; font-weight: 650; color: rgb(var(--c-ink-500)); margin-block-end: 16px; }
.vision blockquote { margin: 0 auto; max-inline-size: 30ch; font-size: clamp(28px, 3.6vw, 44px); font-weight: 750; line-height: 1.2;
                     letter-spacing: -0.015em; color: rgb(var(--c-ink-strong)); }
.vision p { margin-block-start: 22px; color: rgb(var(--c-ink)); }
.vision .hero-actions { justify-content: center; }
@media (max-width: 767px) {
  /* The picture is the band's lower part only, so a narrow screen still
     shows buildings, not a sliver of one. */
  .vision { padding-block: 72px 320px; }
  .vision-bg { block-size: 640px; }
  .vision-bg .illus { object-position: 64% 100%; }
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer { background: rgb(var(--c-surface)); border-block-start: 1px solid rgb(var(--c-line)); padding-block: 36px; font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: rgb(var(--c-ink-400)); text-decoration: none; }
.site-footer a:hover { color: rgb(var(--c-ink-strong)); }
.site-footer small { color: rgb(var(--c-ink-500)); font-size: 14px; }

/* ── Dialogs: the video and one model in 3D ──────────────────────────── */
dialog.sheet { padding: 0; border: 1px solid rgb(var(--c-line)); border-radius: 12px; background: rgb(var(--c-surface));
               color: rgb(var(--c-ink)); inline-size: min(96vw, 1040px); max-block-size: 92vh; overflow: hidden; }
dialog.sheet::backdrop { background: rgb(var(--c-scrim) / 0.78); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 20px;
              border-block-end: 1px solid rgb(var(--c-line)); }
.sheet-head h2 { font-size: 17px; font-weight: 700; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; border-radius: 8px;
            border: 0; background: transparent; color: rgb(var(--c-ink-400)); cursor: pointer; }
.icon-btn:hover { background: rgb(var(--c-ink-strong) / 0.08); color: rgb(var(--c-ink-strong)); }
.eq-stage { position: relative; inline-size: 100%; aspect-ratio: 4 / 3; max-block-size: 70vh; background: rgb(var(--c-inset));
            touch-action: pan-y; cursor: grab; }
.eq-stage:active { cursor: grabbing; }
.eq-stage img, .eq3d-gl { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: contain; }
.eq3d-gl { opacity: 0; transition: opacity .3s ease-in-out; }
.eq-stage[data-eq3d-state="ready"] .eq3d-gl { opacity: 1; }
.eq-stage[data-eq3d-state="ready"] img { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .eq3d-gl { transition: none; } }
.sheet-foot { padding: 12px 20px; font-size: 14px; color: rgb(var(--c-ink-500)); border-block-start: 1px solid rgb(var(--c-line)); }
#eqDialog { inline-size: min(96vw, 820px); }

/* ── At a glance: three lines before the questions ──────────────────── */
.glance { background: rgb(var(--c-surface)); border-block-start: 1px solid rgb(var(--c-line)); padding-block: 56px; }
.glance-title { font-size: 15px; font-weight: 650; color: rgb(var(--c-ink-500)); margin-block-end: 12px; }
.glance-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.glance-list li { font-size: 16px; color: rgb(var(--c-ink-400)); }
@media (max-width: 899px) { .glance-list { grid-template-columns: minmax(0, 1fr); gap: 14px; } .glance { padding-block: 44px; } }

/* ── Questions ───────────────────────────────────────────────────────── */
.faq { display: grid; gap: 10px; max-inline-size: 52rem; }
.faq-item { background: rgb(var(--c-canvas)); border: 1px solid rgb(var(--c-line)); border-radius: 10px; }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px;
                    cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { font-size: 17px; font-weight: 650; }
.faq-item summary .ci { color: rgb(var(--c-ink-500)); transition: transform .15s; }
.faq-item[open] summary .ci { transform: rotate(180deg); }
.faq-item p { padding: 0 20px 18px; color: rgb(var(--c-ink-400)); }
@media (prefers-reduced-motion: reduce) { .faq-item summary .ci { transition: none; } }


/* The film's transcript, under the film. */
.transcript { background: rgb(var(--c-surface)); border-block-end: 1px solid rgb(var(--c-line)); }
.transcript details { padding-block: 18px; }
.transcript summary { cursor: pointer; font-weight: 650; color: rgb(var(--c-ink-strong)); }
.transcript-text { margin-block-start: 12px; display: grid; gap: 8px; max-inline-size: 52rem;
                   color: rgb(var(--c-ink-400)); font-size: 16px; }

/* The two-pager's facts (2026-10-08): the stranded market, the business in
   three steps, the rollout, the active line, the ask. */
.stranded { margin-block-start: 40px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 48px;
            align-items: start; }
.stranded-lead { font-size: 19px; color: rgb(var(--c-ink-400)); }
.stranded-figure { display: block; margin-block-end: 8px; font-size: clamp(36px, 4vw, 52px); font-weight: 800; line-height: 1.05;
                   letter-spacing: -0.03em; color: rgb(var(--c-ink-strong)); }
.stranded-points { border-block-start: 1px solid rgb(var(--c-line)); }
.stranded-points li { padding-block: 14px; border-block-end: 1px solid rgb(var(--c-line)); color: rgb(var(--c-ink-400)); }
@media (max-width: 899px) { .stranded { grid-template-columns: minmax(0, 1fr); } }
.lead-sub { margin-block-start: 8px; font-size: 16px; font-weight: 650; color: rgb(var(--c-ink-500)); }
.biz-steps { margin-block-start: 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px;
             counter-reset: biz; border-block-start: 1px solid rgb(var(--c-line)); padding-block-start: 20px; }
.biz-steps li { counter-increment: biz; }
.biz-steps strong { display: block; font-size: 17px; color: rgb(var(--c-ink-strong)); }
.biz-steps strong::before { content: counter(biz) "  "; white-space: pre; color: rgb(var(--c-accent-400)); font-weight: 700; }
.biz-steps p { margin-block-start: 6px; color: rgb(var(--c-ink-400)); font-size: 15px; }
@media (max-width: 899px) { .biz-steps { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
.rollout { margin-block-start: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; }
.rollout li { font-size: 15px; color: rgb(var(--c-ink-400)); }
.rollout strong { display: block; color: rgb(var(--c-ink-strong)); font-size: 15px; }
@media (max-width: 767px) { .rollout { grid-template-columns: minmax(0, 1fr); } }
.active-line { margin-block-start: 40px; max-inline-size: 52rem; font-size: 18px; color: rgb(var(--c-ink-400)); }
.active-line strong { color: rgb(var(--c-ink-strong)); }
.ask { margin: 28px auto 0; max-inline-size: 44rem; text-align: start; display: grid; gap: 10px; }
.ask-title { font-weight: 700; color: rgb(var(--c-ink-strong)); }
.vision .ask p.ask-title { margin-block-start: 0; }
.ask li { color: rgb(var(--c-ink)); padding-inline-start: 18px; position: relative; }
.ask li::before { content: ""; position: absolute; inset-inline-start: 2px; inset-block-start: 0.62em; inline-size: 6px; block-size: 6px;
                  border-radius: 50%; background: rgb(var(--c-accent-400)); }
.ask strong { color: rgb(var(--c-ink-strong)); }

/* ── Motion (Issue #556) ─────────────────────────────────────────────────
   Every rule here sits behind two gates: the `motion` class, which only the
   head script adds (JS running, no reduced-motion request), and the
   no-preference media query. Without either, the page is the still page:
   nothing is ever hidden. Opacity and transform only: nothing moves in the
   layout, so no layout shift.

   The grammar is one gesture, used everywhere: a short rise and a fade, the
   items of a group a beat apart, once. Two places move to explain rather
   than to arrive: the solution's links carry a dot from the equipment to
   ControlisOS to Clima Hub while they are on screen, and the street's kerb
   draws in before the buildings stand on it in turn. The vision's city never
   moves (Issue #564): a zoom on it slid the buildings under its fixed fog. */
@media (prefers-reduced-motion: no-preference) {
  .motion .rv > *, .motion .rv-one {
    opacity: 0; transform: translate3d(0, 16px, 0);
    transition: opacity 520ms cubic-bezier(.2, .7, .2, 1), transform 760ms cubic-bezier(.2, .7, .2, 1);
    transition-delay: calc(var(--i, 0) * 70ms);
  }
  .motion .rv.in > *, .motion .rv-one.in { opacity: 1; transform: none; }
  /* A face settles a beat after its words: a small scale, no bounce. */
  .motion .rv .face { transform: scale(.88); transition: transform 700ms cubic-bezier(.2, .7, .2, 1);
                      transition-delay: calc(var(--i, 0) * 70ms + 120ms); }
  .motion .rv.in .face { transform: none; }
  .motion .equip-grid.rv > .equip { transition-property: opacity, transform, border-color; transition-delay: calc(var(--i, 0) * 45ms), calc(var(--i, 0) * 45ms), 0s; }

  /* The solution: a dot runs along each link, equipment to ControlisOS, then
     ControlisOS to Clima Hub, while the picture is on screen. */
  .arch-link { position: relative; }
  .motion .arch.live .arch-link { background: rgb(var(--c-accent-500) / 0.45); }
  .motion .arch.live .arch-link::before, .motion .arch.live .arch-link::after {
    content: ""; position: absolute; inset-inline-start: -4px; inset-block-start: -4px; inline-size: 9px; block-size: 9px;
    border-radius: 50%; background: rgb(var(--c-accent-500)); opacity: 0;
    animation: flow-x 2400ms cubic-bezier(.45, 0, .55, 1) infinite;
  }
  .motion .arch.live .arch-link::after { animation-delay: 1200ms; }
  .motion .arch.live .arch-link ~ .arch-link::before { animation-delay: 600ms; }
  .motion .arch.live .arch-link ~ .arch-link::after { animation-delay: 1800ms; }
  @keyframes flow-x {
    0% { opacity: 0; transform: translateX(0); }
    15%, 80% { opacity: 1; }
    100% { opacity: 0; transform: translateX(72px); }
  }
  @keyframes flow-y {
    0% { opacity: 0; transform: translateY(0); }
    15%, 80% { opacity: 1; }
    100% { opacity: 0; transform: translateY(24px); }
  }
  @media (max-width: 767px) {
    .motion .arch.live .arch-link::before, .motion .arch.live .arch-link::after { animation-name: flow-y; }
  }

  /* The street: the kerb draws in left to right, then each building stands
     on it in turn, its label with it. */
  .motion .street .s-ground { clip-path: inset(0 100% 0 0); transition: clip-path 900ms cubic-bezier(.4, 0, .2, 1); }
  .motion .street.in .s-ground { clip-path: inset(0 0 0 0); }
  .motion .street .s-building, .motion .street-labels li {
    opacity: 0; transform: translate3d(0, 10%, 0);
    transition: opacity 500ms cubic-bezier(.2, .7, .2, 1), transform 800ms cubic-bezier(.2, .7, .2, 1);
    transition-delay: calc(650ms + var(--i, 0) * 180ms);
  }
  .motion .street-labels li { transform: translate3d(0, 8px, 0); }
  .motion .street.in .s-building, .motion .street.in .street-labels li { opacity: 1; transform: none; }

  /* Response under the pointer: the objects lift a little, the gallery's
     picture leans in. */
  .pillar .r3d, .diff .r3d, .step .r3d, .arch-node .r3d { transition: transform 420ms cubic-bezier(.2, .7, .2, 1); }
  .pillar:hover .r3d, .diff:hover .r3d, .step:hover .r3d, .arch-node:hover .r3d { transform: translate3d(0, -5px, 0) rotate(-1.5deg); }
  .equip img { transition: transform 420ms cubic-bezier(.2, .7, .2, 1); }
  .equip:hover img { transform: scale(1.045) translate3d(0, -2px, 0); }
}
.nowrap { white-space: nowrap; }
