/* Matechi staging v3 (17 Nov): the Built Robotics design language (DESIGN-reference.md) with Matechi's content and colour.
   Layout: dark cinematic stages alternating with light #f0f0f0 bands; one grotesque at a huge scale; pinned films. */
:root {
  color-scheme: dark;
  --ink: #111111;
  --ink-2: rgba(17, 17, 17, 0.55);
  --light: #f0f0f0;
  --dark: #1e1e1e;
  --black: #000000;
  --white: #ffffff;
  --w80: rgba(255, 255, 255, 0.8);
  --w60: rgba(255, 255, 255, 0.6);
  --w40: rgba(255, 255, 255, 0.4);
  --wline: rgba(255, 255, 255, 0.16);
  --kline: rgba(17, 17, 17, 0.14);
  --accent: #5ee0b5;          /* Matechi aqua: the filled button and the live step */
  --accent-ink: #06211b;
  --font: "Albert Sans", "Helvetica Neue", Arial, sans-serif;
  --gl: max(16px, env(safe-area-inset-left, 0px));
  --gr: max(16px, env(safe-area-inset-right, 0px));
  --edge: max(clamp(16px, 4vw, 56px), env(safe-area-inset-left, 0px));
  --edge-r: max(clamp(16px, 4vw, 56px), env(safe-area-inset-right, 0px));
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--light); color: var(--ink); font: 400 clamp(17px, 1.35vw, 22px)/1.35 var(--font); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--light); }
img, video { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0; }
.giant { font-size: clamp(48px, 8.4vw, 120px); line-height: 0.96; font-weight: 500; letter-spacing: -0.025em; }
.h-xl { font-size: clamp(38px, 5.6vw, 80px); line-height: 0.98; }
.h-l { font-size: clamp(28px, 3.2vw, 48px); line-height: 1.05; }
.h-m { font-size: clamp(24px, 2.5vw, 36px); line-height: 1.1; }
.statement { font-size: clamp(22px, 2.8vw, 40px); line-height: 1.2; }
.muted { color: var(--ink-2); }
.muted-2 { color: var(--ink-2); }
.dark .muted, .black .muted, .stage .muted, .scrub .muted { color: var(--w80); }
.dark .muted-2, .black .muted-2, .stage .muted-2 { color: var(--w60); }
.wrap { width: 100%; padding-left: var(--edge); padding-right: var(--edge-r); }
.narrow { max-width: 1100px; }
.band { padding-block: clamp(80px, 12vw, 180px); }
.dark { background: var(--dark); color: var(--white); }
.black { background: var(--black); color: var(--white); }
.light { background: var(--light); color: var(--ink); }
.light .muted, .light .muted-2 { color: var(--ink-2); }
.stack { display: grid; gap: clamp(18px, 2.4vw, 32px); }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 10px; height: clamp(48px, 4vw, 60px); padding: 0 clamp(16px, 1.4vw, 22px); border-radius: 8px; font: 400 clamp(17px, 1.5vw, 22px)/1 var(--font); text-decoration: none; cursor: pointer; border: 1.6px solid transparent; }
.btn-primary, a.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: rgba(17, 17, 17, 0.5); color: var(--ink); }
.dark .btn-ghost, .black .btn-ghost, .stage .btn-ghost, .scrub .btn-ghost { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.53); color: var(--white); }
.textlink { text-decoration: none; color: var(--ink-2); font-size: clamp(18px, 1.7vw, 24px); }
.textlink:hover { color: var(--ink); }
.dark .textlink, .black .textlink, .stage .textlink { color: var(--w60); }
.dark .textlink:hover, .black .textlink:hover, .stage .textlink:hover { color: var(--white); }

/* compatibility with the v1 text pages (Proof, About, Field Notes, Connect) */
.stage { background: var(--black); color: var(--white); }
.label { font-size: 16px; color: var(--ink-2); }
.stage .label, .dark .label, .black .label { color: var(--w60); }
.lede { font-size: clamp(20px, 2.2vw, 32px); line-height: 1.25; color: var(--ink-2); max-width: 34ch; }
.stage .lede, .dark .lede, .black .lede { color: var(--w80); }
.more { text-decoration: none; }
.rows { border-top: 1px solid var(--kline); }
.rows > a, .rows > div { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) auto; gap: 8px 32px; padding: 22px 0; border-bottom: 1px solid var(--kline); text-decoration: none; color: var(--ink); }
.rows .k { font-size: clamp(20px, 2vw, 30px); line-height: 1.1; }
.rows .v { color: var(--ink-2); }
.rows .g { font-size: 14px; color: var(--ink-2); white-space: nowrap; }
@media (max-width: 760px) { .rows > a, .rows > div { grid-template-columns: minmax(0, 1fr); } }
.split { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 32px; align-items: center; }
@media (max-width: 760px) { .split { grid-template-columns: minmax(0, 1fr); } }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; }
.facts div { display: grid; gap: 6px; border-top: 1px solid var(--kline); padding-top: 12px; }
.facts b { font-size: clamp(28px, 3vw, 44px); font-weight: 500; }
.facts span { color: var(--ink-2); }

/* announcement bar = the staging switch */
/* the staging bar scrolls away like an announcement bar; the header rides under it, then stays at the top,
   sliding away as you scroll down and back as you scroll up (site.js sets its top) */
.stagebar { position: relative; z-index: 50; background: var(--light); color: var(--ink); font-size: clamp(14px, 1.15vw, 17px); }
body.hide-top header.site { transform: translateY(calc(-100% - 24px)); }
.stagebar .wrap { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: center; padding-block: 10px; }
.stagebar b { font-weight: 600; }
.stagebar a { text-decoration: none; padding: 4px 11px; border-radius: 999px; border: 1px solid rgba(17, 17, 17, 0.3); }
.stagebar a[aria-current="true"] { background: var(--ink); color: var(--light); border-color: var(--ink); }

/* header: fixed, transparent, logo left, pill menu right; contrast follows the page under it */
header.site { position: fixed; left: 0; right: 0; top: 0; z-index: 40; pointer-events: none; mix-blend-mode: difference; color: #fff; transition: transform 0.35s ease; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; padding-block: clamp(14px, 2.2vw, 30px); }
header.site a, header.site button { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; font-weight: 600; letter-spacing: 0.2em; font-size: clamp(15px, 1.3vw, 19px); }
.brand svg { width: clamp(34px, 3.2vw, 46px); height: auto; }
.brand svg rect.tile { fill: #fff; } .brand svg path { fill: #000; } .brand svg rect.bar { fill: #fff; }
.pill { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-radius: 999px; border: 1.6px solid #fff; background: transparent; color: #fff; font: 500 16px var(--font); cursor: pointer; }
.pill i { display: grid; gap: 4px; } .pill i::before, .pill i::after { content: ""; display: block; width: 18px; height: 1.6px; background: currentColor; }

/* full-screen menu */
.menu { position: fixed; inset: 0; z-index: 55; background: var(--black); color: var(--white); display: none; overflow-y: auto; }
.menu.open { display: block; }
.menu .wrap { min-height: 100%; display: grid; align-content: space-between; gap: 40px; padding-block: calc(24px + env(safe-area-inset-top, 0px)) calc(32px + env(safe-area-inset-bottom, 0px)); }
.menu .top { display: flex; justify-content: space-between; align-items: center; }
.menu nav { display: grid; gap: 4px; }
.menu nav a { font-size: clamp(36px, 6vw, 84px); line-height: 1.04; text-decoration: none; color: var(--w60); }
.menu nav a:hover, .menu nav a[aria-current="page"] { color: var(--white); }
.menu .small { display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--w60); }
.menu .small a { text-decoration: none; }
.menu .close { height: 44px; padding: 0 16px; border-radius: 999px; border: 1.6px solid var(--w60); background: transparent; color: var(--white); font: 500 16px var(--font); cursor: pointer; }

/* scrub films (the live matechi.com mechanism; site.js) */
.scrub { position: relative; background: var(--black); color: var(--white); }
.scrub .pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; grid-template-rows: minmax(0, 1fr); }
.scrub video { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: cover; background: #000; }
/* the film's frame box: the motion keys size the film to cover it, then move and zoom it (as on matechi.com) */
.scrub .media { grid-area: 1 / 1; position: relative; overflow: hidden; background: #000; min-height: 0; }
.scrub .media video { width: 100%; height: 100%; }
.is-framed video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; max-width: none; max-height: none; aspect-ratio: auto; object-fit: cover; transform-origin: 0 0; will-change: transform; }
.bar b.tick { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: rgba(255, 255, 255, 0.75); }
.scrub .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--wline); z-index: 3; }
.scrub .bar i { display: block; height: 100%; width: 0; background: var(--white); }
.scrub .panel { grid-area: 1 / 1; align-self: end; position: relative; z-index: 2; padding: clamp(28px, 5vw, 64px) var(--edge-r) clamp(28px, 6vh, 72px) var(--edge);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.72) 45%, rgba(0, 0, 0, 0.88)); }
.scrub .panel .inner { max-width: 760px; display: grid; gap: 14px; }
.scrub .say { font-size: clamp(20px, 2.2vw, 32px); line-height: 1.25; color: var(--w80); }
.scrub .fact { font-size: clamp(16px, 1.3vw, 20px); color: var(--accent); }
.scrub .num { font-size: clamp(15px, 1.2vw, 18px); color: var(--w60); }
.scrub .more { color: var(--white); text-decoration: none; font-size: clamp(17px, 1.4vw, 21px); }
.steptitle { font-size: clamp(30px, 3.4vw, 52px); line-height: 1.02; font-weight: 500; letter-spacing: -0.02em; }
.stepcopy { font-size: clamp(18px, 1.7vw, 26px); line-height: 1.3; color: var(--w80); max-width: 32ch; }
.steps-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.steps-list li { font-size: clamp(14px, 1.1vw, 17px); color: var(--w40); padding-top: 10px; border-top: 1.6px solid var(--wline); transition: color 0.3s, border-color 0.3s; }
.steps-list li.is-done { color: var(--w80); border-top-color: var(--w60); }
.steps-list li.is-current { color: var(--white); }
/* each step fills as you scroll through it (the live site's chapter progress) */
.steps-list li { position: relative; }
.steps-list li::before { content: ""; position: absolute; left: 0; right: 0; top: -1.6px; height: 1.6px; background: var(--accent); transform: scaleX(var(--chapter-progress, 0)); transform-origin: left; }

/* the hero: pinned agents film, one line in the dark space beside it, nothing over the agents' work */
.scrub.hero .pin { background: var(--black); grid-template-columns: minmax(0, 1fr); align-items: end; }
.hero .giant { font-size: clamp(44px, 6.6vw, 104px); }
.hero-film { grid-area: 1 / 1; justify-self: end; align-self: end; width: min(78vw, calc((100svh - 360px) * 16 / 9)); aspect-ratio: 16 / 9;
  -webkit-mask-image: radial-gradient(ellipse 72% 80% at 55% 55%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 72% 80% at 55% 55%, #000 62%, transparent 100%); }
.hero-film video { width: 100%; height: 100%; object-fit: cover; }
.hero-line { grid-area: 1 / 1; align-self: start; z-index: 2; padding: calc(clamp(92px, 9vw, 140px) + env(safe-area-inset-top, 0px)) var(--edge-r) 0 var(--edge); pointer-events: none; }
.hero-line h1 { max-width: 9.5em; }
@media (max-width: 760px) {
  .scrub .pin { grid-template-rows: auto minmax(0, 1fr); align-content: start; }
  .scrub video { grid-area: 1 / 1; height: auto; aspect-ratio: 1.21 / 1; object-fit: cover; }
  .scrub .media { aspect-ratio: 1.21 / 1; }
  .scrub .media video { height: 100%; aspect-ratio: auto; }
  .scrub.portrait .media { aspect-ratio: 9 / 16; height: 56svh; justify-self: center; }
  .scrub .panel { grid-area: 2 / 1; align-self: start; background: none; padding-top: 20px; }
  .scrub.hero .pin { grid-template-rows: auto minmax(0, 1fr); align-items: start; }
  .hero-line { grid-area: 1 / 1; padding-top: calc(86px + env(safe-area-inset-top, 0px)); }
  .hero-film { grid-area: 2 / 1; justify-self: center; align-self: center; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; -webkit-mask-image: none; mask-image: none; }
  /* the square crop drops the film's bottom strip, so its corner captions never show half-cut on a phone */
  .hero-film video { aspect-ratio: auto; height: 109%; object-position: 54% 0; }
}

/* mission band: the statement reveals word by word as you scroll */
.mission { min-height: 100svh; display: grid; align-items: center; }
.mission .statement { font-size: clamp(28px, 4.2vw, 64px); line-height: 1.12; max-width: 22ch; }
[data-reveal] span.w { color: rgba(17, 17, 17, 0.14); transition: color 0.25s; }
[data-reveal] span.w.on { color: var(--ink); }

/* stats: one monumental number at a time over a framed video card */
.stats { position: relative; background: var(--light); }
.stats .pin { position: sticky; top: 0; height: 100svh; display: grid; place-items: center; padding: clamp(70px, 9vw, 120px) var(--edge-r) clamp(24px, 4vw, 48px) var(--edge); }
.stats .card { position: relative; width: 100%; height: 100%; border-radius: 14px; overflow: hidden; background: #000; display: grid; place-items: center; }
.stats .card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.stats .stat { grid-area: 1 / 1; position: relative; text-align: center; display: grid; gap: 8px; justify-items: center; opacity: 0; transform: translateY(12px); transition: opacity 0.45s, transform 0.45s; padding: 0 16px; }
.stats .stat.on { opacity: 1; transform: none; }
.stats .stat b { font-size: clamp(96px, 19vw, 300px); line-height: 0.85; font-weight: 500; letter-spacing: -0.04em; color: var(--white); }
.stats .stat span { font-size: clamp(20px, 2.6vw, 40px); color: var(--w80); max-width: 22ch; }
.stats .src { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-size: 14px; color: var(--w60); z-index: 2; padding: 0 16px; }

/* lists without card grids */
.biglist { border-top: 1px solid var(--kline); }
.biglist a, .biglist div.item { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) auto; gap: 8px 32px; align-items: baseline; padding: clamp(18px, 2.2vw, 30px) 0; border-bottom: 1px solid var(--kline); text-decoration: none; }
.biglist .k { font-size: clamp(24px, 2.8vw, 40px); line-height: 1.05; }
.biglist .v { color: var(--ink-2); }
.biglist .g { font-size: 15px; color: var(--ink-2); white-space: nowrap; }
.dark .biglist, .black .biglist { border-top-color: var(--wline); }
.dark .biglist a, .dark .biglist div.item, .black .biglist a { border-bottom-color: var(--wline); }
.dark .biglist .v, .black .biglist .v, .dark .biglist .g { color: var(--w60); }
@media (max-width: 760px) { .biglist a, .biglist div.item { grid-template-columns: minmax(0, 1fr); } }
.twocol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px) clamp(28px, 5vw, 80px); }
.twocol > div { display: grid; gap: 10px; align-content: start; }
.twocol h3 { font-size: clamp(24px, 2.4vw, 36px); line-height: 1.08; }
@media (max-width: 760px) { .twocol { grid-template-columns: minmax(0, 1fr); } }
.seq { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); counter-reset: s; }
.seq > div { display: grid; gap: 10px; align-content: start; counter-increment: s; border-top: 1.6px solid var(--wline); padding-top: 18px; }
.seq > div::before { content: "0" counter(s); font-size: clamp(40px, 5vw, 72px); line-height: 1; font-weight: 500; color: var(--w40); }
.seq h3 { font-size: clamp(22px, 2.2vw, 32px); }
@media (max-width: 760px) { .seq { grid-template-columns: minmax(0, 1fr); } }
.case { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 14px clamp(28px, 5vw, 80px); padding-block: clamp(28px, 3.4vw, 48px); border-top: 1px solid var(--kline); }
.case h3 { font-size: clamp(24px, 2.6vw, 38px); line-height: 1.06; }
.case .meta { color: var(--ink-2); font-size: 16px; margin-top: 8px; }
.case .body { display: grid; gap: 12px; }
.case .body p { font-size: clamp(20px, 2vw, 30px); line-height: 1.22; }
.case ul { margin: 0; padding-left: 1.1em; color: var(--ink-2); }
@media (max-width: 760px) { .case { grid-template-columns: minmax(0, 1fr); } }
.frames { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.frames figure { margin: 0; display: grid; gap: 8px; }
.frames img { border-radius: 12px; aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.frames figcaption { font-size: 16px; color: var(--ink-2); }
@media (max-width: 760px) { .frames { grid-template-columns: minmax(0, 1fr); } }

/* product pages (light): centred giant title, grey subtitle, framed pinned film card, spec row */
.prodhead { text-align: center; padding: calc(clamp(100px, 10.5vw, 150px) + env(safe-area-inset-top, 0px)) var(--edge-r) clamp(4px, 1vw, 12px) var(--edge); display: grid; gap: clamp(12px, 1.6vw, 22px); justify-items: center; }
.prodhead .sub { font-size: clamp(20px, 2.6vw, 40px); line-height: 1.18; color: var(--ink-2); max-width: 26em; }
.framed { position: relative; background: var(--light); color: var(--ink); }
.framed .pin { position: sticky; top: 0; height: 100svh; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: clamp(14px, 2vw, 24px); padding: clamp(72px, 6vw, 84px) var(--edge-r) clamp(20px, 3vw, 36px) var(--edge); }
.framed .card { position: relative; border-radius: 14px; overflow: hidden; background: #000; min-height: 0; }
.framed .card video { width: 100%; height: 100%; object-fit: cover; }
.framed .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.2); z-index: 3; }
.framed .bar i { display: block; height: 100%; width: 0; background: var(--white); }
.framed .below { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 12px clamp(24px, 4vw, 64px); align-items: start; }
.framed .steptitle { color: var(--ink); }
.framed .stepcopy { color: var(--ink-2); max-width: 38ch; }
.framed .steps-list li { color: rgba(17, 17, 17, 0.38); border-top-color: var(--kline); }
.framed .steps-list li.is-done { color: var(--ink-2); border-top-color: rgba(17, 17, 17, 0.4); }
.framed .steps-list li.is-current { color: var(--ink); }
.framed .steps-list li::before { background: var(--ink); }
.framed .say { font-size: clamp(18px, 1.7vw, 26px); line-height: 1.28; color: var(--ink-2); }
@media (max-width: 760px) {
  .framed .pin { grid-template-rows: auto auto; align-content: start; padding-top: 76px; }
  .framed .card video { aspect-ratio: 1.21 / 1; height: auto; }
  .framed .card.is-framed { aspect-ratio: 1.21 / 1; }
  .framed.portrait .card { aspect-ratio: 9 / 16; height: 54svh; justify-self: center; }
  .framed.portrait .card video { aspect-ratio: auto; height: 100%; }
  .framed .below { grid-template-columns: minmax(0, 1fr); }
}
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px clamp(24px, 4vw, 56px); }
.specs div { display: grid; gap: 6px; border-top: 1px solid var(--kline); padding-top: 14px; }
.specs b { font-size: clamp(28px, 3vw, 44px); font-weight: 500; line-height: 1; }
.specs span { color: var(--ink-2); font-size: 17px; }
.dark .specs div, .black .specs div { border-top-color: var(--wline); }
.dark .specs span, .black .specs span { color: var(--w60); }
.pagehead2 { padding: calc(clamp(110px, 12vw, 170px) + env(safe-area-inset-top, 0px)) var(--edge-r) clamp(40px, 5vw, 72px) var(--edge); display: grid; gap: 20px; }
.copy-email { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.copy-email code { font: 500 clamp(20px, 2vw, 28px) var(--font); user-select: all; }

/* footer */
footer.site { background: var(--black); color: var(--w60); }
footer.site .wrap { padding-block: clamp(64px, 8vw, 120px) calc(40px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 48px; }
footer.site .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
footer.site .cols > div { display: grid; gap: 10px; align-content: start; }
footer.site .k { color: var(--white); font-size: clamp(18px, 1.5vw, 22px); }
footer.site a { text-decoration: none; font-size: clamp(16px, 1.3vw, 19px); }
footer.site a:hover { color: var(--white); }

/* film dialog and homepage variants */
dialog.filmbox { border: 0; padding: 0; background: #000; width: min(1100px, 94vw); border-radius: 12px; }
dialog.filmbox::backdrop { background: rgba(0, 0, 0, 0.86); }
dialog.filmbox video { width: 100%; }
dialog.filmbox .bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; background: #111; color: var(--white); font-size: 16px; }
dialog.filmbox button { background: none; border: 1.6px solid var(--w60); color: var(--white); border-radius: 999px; padding: 6px 14px; cursor: pointer; font: 500 15px var(--font); }
.watch { background: rgba(255, 255, 255, 0.04); border: 1.6px solid rgba(255, 255, 255, 0.53); color: var(--white); border-radius: 8px; padding: 10px 16px; font: 400 17px var(--font); cursor: pointer; text-decoration: none; }
[data-variant] { display: none; }
body[data-home="a"] [data-variant~="a"], body[data-home="b"] [data-variant~="b"], body[data-home="c"] [data-variant~="c"] { display: block; }

/* ---- the connected-delivery film is portrait: a portrait card beside its steps on desktop ---- */
@media (min-width: 761px) {
  .framed.portrait .pin { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); column-gap: clamp(32px, 5vw, 96px); align-items: center; }
  .framed.portrait .card { height: 100%; aspect-ratio: 9 / 16; }
  .framed.portrait .below { grid-template-columns: minmax(0, 1fr); align-self: center; }
  .scrub.portrait .media { justify-self: end; height: 100%; aspect-ratio: 9 / 16; }
}

/* ---- product layer: drawn by the page over the film, timed and anchored to its frames (ported from matechi.com) ---- */
.film-layer {
  --tone-critical: #ff6b4f; --tone-mint: #60d0a1; --tone-amber: #e2b762; --tone-neutral: #e6eeeb;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  position: absolute; inset: 0; z-index: 1; overflow: hidden; color: #eef3f1; font-family: var(--font); pointer-events: none;
}
.film-layer-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.film-leader { fill: none; stroke-width: 1.25; }
.film-dot { fill: rgba(8, 13, 14, 0.6); stroke-width: 1.6; }
.film-leader.tone-critical, .film-dot.tone-critical { stroke: var(--tone-critical); }
.film-leader.tone-mint, .film-dot.tone-mint { stroke: var(--tone-mint); }
.film-leader.tone-amber, .film-dot.tone-amber { stroke: var(--tone-amber); }
.film-leader.tone-neutral, .film-dot.tone-neutral { stroke: var(--tone-neutral); }
.film-tag, .film-pill, .film-chip, .film-card {
  position: absolute; border: 1px solid rgba(255, 255, 255, 0.15); background: rgba(9, 14, 15, 0.78);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.film-tag { --tag-tone: var(--tone-neutral); top: 0; left: 0; display: grid; gap: 2px; padding: 6px 10px 7px; border-radius: 4px; white-space: nowrap; }
.film-tag.dir-ne { translate: 0 -100%; border-left: 2px solid var(--tag-tone); }
.film-tag.dir-nw { translate: -100% -100%; border-right: 2px solid var(--tag-tone); }
.film-tag.dir-se { border-left: 2px solid var(--tag-tone); }
.film-tag.dir-sw { translate: -100% 0; border-right: 2px solid var(--tag-tone); }
.film-tag.tone-critical { --tag-tone: var(--tone-critical); }
.film-tag.tone-mint { --tag-tone: var(--tone-mint); }
.film-tag.tone-amber { --tag-tone: var(--tone-amber); }
.film-tag strong, .film-chip strong { color: var(--tag-tone); font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.film-tag.tone-neutral strong { color: #f4f7f6; }
.film-tag span, .film-chip span { color: #e3ebe8; font-size: 12px; line-height: 1.3; }
.film-pill { top: 0; left: 0; padding: 3px 8px; border-color: currentColor; border-radius: 999px; font-family: var(--mono); font-size: 10.5px; font-weight: 500; white-space: nowrap; }
.film-pill.tone-mint { color: var(--tone-mint); }
.film-pill.tone-amber { color: var(--tone-amber); }
.film-pill.tone-neutral { color: #dfe8e5; }
.film-card { width: min(324px, 42%); padding: 12px 14px 8px; border-radius: 6px; }
.film-card.slot-tr { top: 14px; right: 14px; }
.film-card.slot-tl { top: 14px; left: 14px; }
.film-card.slot-br { right: 14px; bottom: 14px; }
.film-card.slot-bl { bottom: 14px; left: 14px; }
.film-card-kicker { margin: 0; color: var(--accent); font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.film-card-title { margin: 4px 0 8px; color: #fff; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.film-card dl { display: grid; margin: 0; }
.film-card dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-top: 1px solid rgba(255, 255, 255, 0.09); font-size: 11.5px; line-height: 1.35; }
.film-card dt { color: #9fb1ab; }
.film-card dd { margin: 0; color: #f3f7f5; font-family: var(--mono); font-size: 11px; text-align: right; }
.film-card .is-option dt { color: #e6eeeb; }
.film-card.has-selection .is-option:not(.is-selected) dt, .film-card.has-selection .is-option:not(.is-selected) dd { color: #6f827c; }
.film-card .is-selected { border-top-color: rgba(96, 208, 161, 0.55); }
.film-card .is-selected dt, .film-card .is-selected dd { color: var(--tone-mint); }
.film-card-badge { display: none; margin-left: 8px; padding: 1px 6px; border-radius: 999px; background: var(--tone-mint); color: #06120e; font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 1px; }
.film-card .is-selected .film-card-badge { display: inline-block; }
.film-field-evidence { fill: none; stroke: rgba(236, 242, 240, 0.72); stroke-width: 1; }
.film-field-path { fill: none; stroke-linecap: round; }
.film-field-path.tone-amber { stroke: var(--tone-amber); stroke-width: 1.4; }
.film-field-path.tone-mint { stroke: var(--tone-mint); stroke-width: 2.2; }
.film-field-end { stroke-width: 1.3; fill: rgba(9, 14, 15, 0.85); }
.film-field-end.tone-amber { stroke: var(--tone-amber); }
.film-field-end.tone-mint { stroke: var(--tone-mint); fill: var(--tone-mint); }
.film-field-halo { fill: rgba(8, 13, 14, 0.62); stroke: rgba(255, 255, 255, 0.16); stroke-width: 1; }
.film-field-lattice { fill: none; stroke: #f3f8f6; stroke-width: 1.15; stroke-linejoin: round; }
.film-field-facets { fill: none; stroke: rgba(96, 208, 161, 0.6); stroke-width: 0.9; }
.film-chip { --tag-tone: var(--tone-neutral); top: 0; left: 0; display: grid; gap: 2px; padding: 6px 10px 7px; border-left: 2px solid var(--tag-tone); border-radius: 4px; translate: 0 -50%; white-space: nowrap; }
.film-chip.is-left { border-right: 2px solid var(--tag-tone); border-left: 1px solid rgba(255, 255, 255, 0.15); translate: -100% -50%; }
.film-chip.is-below { translate: 0 0; }
.film-box { stroke-width: 1.6; }
.film-box.tone-neutral { fill: rgba(230, 238, 235, 0.06); stroke: rgba(230, 238, 235, 0.85); }
.film-box.tone-amber { fill: rgba(226, 183, 98, 0.08); stroke: var(--tone-amber); }
.film-box.tone-mint { fill: rgba(96, 208, 161, 0.12); stroke: var(--tone-mint); stroke-width: 2; }
.film-chip.film-box-label { border-right: 2px solid var(--tag-tone); border-left: 1px solid rgba(255, 255, 255, 0.15); translate: -100% -50%; }
.film-chip.tone-mint { --tag-tone: var(--tone-mint); }
.film-chip.tone-amber { --tag-tone: var(--tone-amber); }
/* phones: tags keep their short label, cards dock to the bottom of the film */
.film-layer.is-narrow .film-tag span, .film-layer.is-narrow .film-chip span { display: none; }
.film-layer.is-narrow .film-tag, .film-layer.is-narrow .film-chip { padding: 4px 7px 5px; }
.film-layer.is-narrow .film-tag strong, .film-layer.is-narrow .film-chip strong { font-size: 9.5px; }
.film-layer.is-narrow .film-card { top: auto; right: 8px; bottom: 8px; left: 8px; width: auto; padding: 8px 10px 7px; }
.film-layer.is-narrow .film-card-title { margin: 2px 0 0; font-size: 12px; }
.film-layer.is-narrow .film-card dl > div:not(.is-selected) { display: none; }
.film-layer.is-narrow .film-card dl > div.is-selected { margin-top: 5px; }
.film-layer.is-narrow .film-pill { font-size: 9.5px; }

/* ---- header: Book a call beside the menu pill ---- */
.hdr-r { display: flex; align-items: center; gap: 10px; }
.pill-book { text-decoration: none; }
@media (max-width: 420px) { .hdr-r { gap: 6px; } .hdr-r .pill { padding: 0 12px; font-size: 15px; } .brand { gap: 8px; letter-spacing: 0.14em; } }
@media (max-width: 359px) { .brand { font-size: 0; gap: 0; } }

/* ---- staging bar: Today, beside A, B and C ---- */
.stagebar a.today-link { border-style: dashed; }
.stagebar a.today-link[aria-current="true"] { background: var(--ink); color: var(--light); border-style: solid; }

/* ---- the hero's quiet scroll cue ---- */
.scrollcue { position: absolute; left: var(--edge); bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 2; display: flex; align-items: center; gap: 12px;
  color: var(--w60); font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; transition: opacity 0.5s ease; pointer-events: none; }
.scrollcue i { display: block; width: 1.6px; height: 36px; background: linear-gradient(var(--w60), transparent); animation: cue 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0.2); opacity: 0.4; } 50% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(0.2); opacity: 0.4; } }
.hero.cue-off .scrollcue { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .scrollcue i { animation: none; } }

/* ---- calls to action after the journey or films ---- */
.cta-inline { padding-block: clamp(48px, 7vw, 96px); }
.cta-split { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.cta-split .h-l { max-width: 20ch; margin: 0; }

/* ---- Connect: calendar, intake form ---- */
.connect-sec { padding-block: clamp(40px, 6vw, 88px); border-top: 1px solid var(--kline); }
.calendar { border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid var(--kline); }
.calendar iframe { display: block; width: 100%; height: 860px; border: 0; }
@media (max-width: 760px) { .calendar iframe { height: 1040px; } }
.staging-note { margin: 0; padding: 10px 14px; border: 1.6px dashed rgba(17, 17, 17, 0.45); border-radius: 8px; font-size: 16px; color: var(--ink); background: rgba(17, 17, 17, 0.04); }
.intake { display: grid; gap: 18px; max-width: 980px; }
.intake .fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.intake .fgrid.f3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .intake .fgrid, .intake .fgrid.f3 { grid-template-columns: minmax(0, 1fr); } }
.intake label { display: grid; gap: 8px; font-size: 16px; font-weight: 500; color: var(--ink); }
.intake input, .intake select, .intake textarea { width: 100%; box-sizing: border-box; font: 400 17px/1.4 var(--font); color: var(--ink); background: #fff;
  border: 1.6px solid rgba(17, 17, 17, 0.25); border-radius: 8px; padding: 12px 14px; }
.intake textarea { resize: vertical; min-height: 120px; }
.intake input:focus, .intake select:focus, .intake textarea:focus { outline: none; border-color: var(--ink); }
.formmsg { margin: 0; font-size: 16px; color: var(--ink-2); }

/* ---- Today: the current matechi.com's version of this page ---- */
.today { position: fixed; inset: 0; z-index: 80; background: #0d0d0d; color: #fff; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.today[hidden] { display: none; }
.today .tbar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; padding: calc(10px + env(safe-area-inset-top, 0px)) var(--edge-r) 10px var(--edge);
  background: rgba(13, 13, 13, 0.94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(255, 255, 255, 0.14); font-size: 15px; }
.today .tbar b { font-weight: 600; }
.today .tbar .route { color: var(--w60); font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.today .tbar .sp { flex: 1 1 auto; }
.today .tbtn { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; border: 1.6px solid rgba(255, 255, 255, 0.5); background: transparent;
  color: #fff; font: 500 15px var(--font); text-decoration: none; cursor: pointer; }
.today[data-view="p"] [data-today-view="p"], .today[data-view="d"] [data-today-view="d"] { background: #fff; color: #000; border-color: #fff; }
.today .tclose { border-color: var(--accent); color: var(--accent); }
.today .shots { display: none; flex-direction: column; align-items: center; gap: 12px; padding: 18px var(--edge-r) 28px var(--edge); }
.today[data-view="p"] .shots-p, .today[data-view="d"] .shots-d { display: flex; }
.today .shots img { display: block; width: 100%; height: auto; border-radius: 6px; background: #1a1a1a; }
.today .shots-p img { max-width: 420px; }
.today .shots-d img { max-width: 1440px; }
.today .tnote { max-width: 64ch; margin: 0 auto; padding: 4px var(--edge) 48px; color: var(--w60); font-size: 15px; line-height: 1.45; }
.today .tnote.tlead { padding: 18px var(--edge) 0; color: var(--w80); font-size: 17px; }
.today .nomatch { padding: clamp(48px, 10vw, 140px) var(--edge); display: grid; gap: 14px; }
.today .nomatch .muted { color: var(--w80); font-size: 18px; }
