/* SANS page sections.
 *
 * Layout for every block of index.html, in page order. Colour, rhythm and type
 * come from tokens.css - nothing here declares a palette of its own, only
 * mixes of the tokens. The camera journey's motion belongs to journey.css;
 * this file lays the stage out and owns the static list the journey shows
 * before JavaScript runs, without JavaScript and under reduced motion.
 *
 * Two page states matter here:
 *   .journey--static   on the journey section until journey.js removes it
 *   html.ui-ready      set by main.js once SANS.ui.init() has succeeded; until
 *                      then the menu, tabs and detail buttons fall back to
 *                      plain content that works without scripts
 */

:root {
  --head-h: 72px;
  --arch-lift: clamp(36px, 6vw, 88px);
  --hud-w: min(100vw, 1480px);
}

@media (max-width: 900px) {
  :root {
    --head-h: 60px;
  }
}

html {
  scroll-padding-top: var(--head-h);
}

body {
  overflow-x: clip;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon,
.hud__icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.icon--sm {
  width: 15px;
  height: 15px;
}

.i-fill {
  fill: currentColor;
  stroke: none;
}

.skip-link {
  position: fixed;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  top: 12px;
  left: var(--gutter);
  z-index: 100;
  padding: 10px 18px;
  background: var(--red);
  color: var(--on-red);
  font-size: .78rem;
  letter-spacing: .16em;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--fast) var(--ease);
}

.skip-link:focus {
  transform: none;
}

.section-title {
  font-weight: 300;
  font-size: clamp(1.6rem, 2.4vw + .8rem, 2.6rem);
  line-height: 1.05;
  text-wrap: balance;
}

.section-title b {
  font-weight: 700;
}

.section-title--bar {
  position: relative;
  padding-left: 18px;
}

.section-title--bar::before {
  content: '';
  position: absolute;
  top: .12em;
  bottom: .12em;
  left: 0;
  width: 3px;
  background: var(--red);
}

.dot-sep + .dot-sep::before {
  content: '·';
  margin: 0 .45em;
}

/* --- 1. header ------------------------------------------------------------ */

/* The dark bar is a pseudo-element: a backdrop-filter on the header itself
 * would become the containing block of the fixed mobile menu inside it. */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  color: var(--ink);
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  opacity: 0;
  transition: opacity var(--slow) var(--ease);
}

/* ui.js clears the bar over the hero; without it the bar stays dark. */

html:not(.ui-ready) .site-header::before,
.site-header.is-scrolled::before,
.site-header:has(.burger[aria-expanded='true'])::before {
  opacity: 1;
}

.site-header__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 16px;
  min-height: var(--head-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 6px 14px -6px var(--shadow);
}

.brand__mark img {
  width: 24px;
  height: auto;
}

.brand__type {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand__word {
  font-family: var(--f-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: .32em;
}

.brand__sub {
  margin-top: 5px;
  font-family: var(--f-display);
  font-size: .62rem;
  letter-spacing: .2em;
  white-space: nowrap;
}

.site-nav__list {
  display: flex;
  gap: clamp(20px, 3vw, 44px);
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a::after {
  content: '';
  position: absolute;
  right: .24em;
  bottom: 10px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--slow) var(--ease);
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.site-header__tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang {
  display: flex;
  align-items: center;
  margin-right: 4px;
}

.lang__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 36px;
  min-height: var(--tap);
  padding: 0 9px;
  border: 0;
  background: none;
  font-family: var(--f-display);
  font-size: .74rem;
  letter-spacing: .14em;
  opacity: .78;
  cursor: pointer;
  transition: opacity var(--fast) var(--ease);
}

.lang__btn + .lang__btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 1px;
  height: 12px;
  margin-top: -6px;
  background: currentColor;
  opacity: .35;
}

.lang__btn:hover,
.lang__btn[aria-pressed='true'] {
  opacity: 1;
}

.lang__btn[aria-pressed='true'] {
  font-weight: 600;
}

.lang__btn[aria-pressed='true']::after {
  content: '';
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.icon-btn {
  --rim: 24%;
  flex: none;
  border-width: 1px;
  border-style: solid;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition:
    border-color var(--fast) var(--ease),
    background-color var(--fast) var(--ease);
}

.icon-btn:hover {
  border-color: currentColor;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.burger {
  display: none;
}

.burger__bars {
  display: grid;
  gap: 4px;
  width: 18px;
}

.burger__bars span {
  height: 1.5px;
  background: currentColor;
  transition:
    transform var(--slow) var(--ease),
    opacity var(--fast) var(--ease);
}

.burger[aria-expanded='true'] .burger__bars span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.burger[aria-expanded='true'] .burger__bars span:nth-child(2) {
  opacity: 0;
}

.burger[aria-expanded='true'] .burger__bars span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

@media (max-width: 900px) {
  .site-header__bar {
    gap: 0 8px;
  }

  .site-header::before {
    opacity: 1;
  }

  /* Every target keeps the full 44px; the ring is drawn smaller inside it so
   * the buttons can sit edge to edge on a 360px screen. */

  .site-header__tools {
    gap: 0;
  }

  .lang {
    margin-right: 0;
  }

  .lang__btn {
    min-width: var(--tap);
    padding: 0 4px;
  }

  .icon-btn,
  .icon-btn:hover {
    position: relative;
    isolation: isolate;
    border-color: transparent;
    background: transparent;
  }

  .icon-btn::before {
    content: '';
    position: absolute;
    inset: 4px;
    z-index: -1;
    border: 1px solid color-mix(in srgb, currentColor var(--rim), transparent);
    border-radius: 50%;
  }

  /* The bar wraps only to drop the no-script link row below. A zero basis
   * keeps the brand from ever pushing the buttons onto a second line: it takes
   * what is left, and a wide fallback face is clipped instead of wrapping. */

  .brand {
    flex: 1 1 0;
    min-width: 0;
    gap: 8px;
  }

  .brand__type {
    min-width: 0;
    overflow-x: clip;
  }

  .site-header__tools {
    flex: none;
  }

  .brand__word {
    font-size: 1.1rem;
    letter-spacing: .2em;
  }

  .brand__sub {
    font-size: .56rem;
    letter-spacing: .06em;
  }


  /* Without the ui module the links stay a plain scrollable row. */

  .site-nav {
    order: 3;
    flex-basis: calc(100% + var(--gutter) * 2);
    margin-inline: calc(var(--gutter) * -1);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-nav .site-nav__list {
    gap: 22px;
    padding: 0 var(--gutter) 4px;
  }

  html.ui-ready .burger {
    display: inline-grid;
  }

  html.ui-ready .site-nav {
    position: fixed;
    inset: var(--head-h) 0 0;
    display: none;
    margin: 0;
    padding: 24px var(--gutter) calc(32px + env(safe-area-inset-bottom));
    overflow-y: auto;
    background: var(--bg);
  }

  html.ui-ready .site-header.is-open .site-nav,
  html.ui-ready .site-header:has(.burger[aria-expanded='true']) .site-nav {
    display: block;
  }

  html.ui-ready .site-nav .site-nav__list {
    flex-direction: column;
    gap: 0;
    padding: 0;
  }

  html.ui-ready .site-nav a {
    display: flex;
    min-height: 64px;
    border-bottom: 1px solid var(--line);
    font-size: 1.5rem;
    letter-spacing: .14em;
  }

  html.ui-ready .site-nav a::after {
    display: none;
  }
}

@media (max-width: 360px) {
  .brand__sub {
    display: none;
  }

  .brand__word {
    font-size: 1rem;
    letter-spacing: .12em;
  }
}

@media (max-width: 355px) {
  .brand__type {
    display: none;
  }
}

/* --- 2. hero -------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: calc(var(--head-h) + clamp(12px, 3vw, 36px)) 0 calc(var(--arch-lift) + clamp(40px, 5vw, 64px));
}

/* A disc wider than the screen, so only its lower edge shows as an arch. */

.hero__arch {
  position: absolute;
  bottom: var(--arch-lift);
  left: 50%;
  z-index: -2;
  --arch-w: max(175vw, 1100px);
  width: var(--arch-w);
  margin-left: calc(var(--arch-w) / -2);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    ellipse 55% 30% at 50% 80%,
    var(--red) 0%,
    var(--red) 24%,
    var(--red-2) 72%,
    color-mix(in srgb, var(--red-2) 45%, var(--bg)) 100%
  );
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--white) 26%, transparent),
    0 36px 110px -30px var(--red-glow),
    inset 0 -1px 0 color-mix(in srgb, var(--white) 40%, transparent);
}

/* The glass frame behind the word, lit from above like the reference. */

.hero__frame.glass {
  position: absolute;
  top: calc(var(--head-h) + 6px);
  inset-inline: 0;
  z-index: -1;
  width: min(1080px, 100% - var(--gutter) * 2);
  height: clamp(200px, 34vw, 430px);
  margin-inline: auto;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--white) 22%, transparent),
    color-mix(in srgb, var(--white) 4%, transparent) 55%,
    transparent
  );
}

.hero__frame.glass::before {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--red-2) 50%, var(--bg)),
    color-mix(in srgb, var(--red-2) 30%, transparent) 70%,
    transparent
  );
}

.hero__inner {
  --word: clamp(72px, 16vw, 230px);
  --car-w: min(840px, 100%, 100svh * .96);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--on-red);
}

/* The word rides above the car so the comma under the S is never lost. */

.hero__title {
  position: relative;
  z-index: 2;
  line-height: .8;
}

.hero__word {
  display: block;
  padding-block: .06em .16em;
  margin-bottom: -.16em;
  font-size: var(--word);
  font-weight: 700;
  text-indent: .06em;
  color: transparent;
  background: linear-gradient(
    180deg,
    var(--white) 14%,
    var(--ink) 40%,
    color-mix(in srgb, var(--ink) 58%, var(--bg)) 52%,
    var(--ink) 62%,
    color-mix(in srgb, var(--ink) 78%, var(--bg)) 90%
  );
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 2px 0 color-mix(in srgb, var(--bg) 45%, transparent)) drop-shadow(0 12px 18px color-mix(in srgb, var(--bg) 60%, transparent));
}

/* The photo has empty floor above and below the car: the word tucks under
 * the roof line and the subtitle rides up onto the floor. */

.hero__car {
  position: relative;
  z-index: 1;
  width: var(--car-w);
  margin-top: calc(var(--word) * -.3 - var(--car-w) * .1);
  pointer-events: none;
}

.hero__car img {
  width: 100%;
  height: auto;
  /* Two fades intersected: the floor above the roof has to clear the word. */
  -webkit-mask-image:
    linear-gradient(180deg, transparent 6%, #000 17%, #000 80%, transparent 97%),
    linear-gradient(90deg, transparent 2%, #000 9%, #000 91%, transparent 98%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(180deg, transparent 6%, #000 17%, #000 80%, transparent 97%),
    linear-gradient(90deg, transparent 2%, #000 9%, #000 91%, transparent 98%);
  mask-composite: intersect;
}

/* Everything after the car sits above the photo's faded floor. */

.hero__car ~ * {
  position: relative;
  z-index: 2;
}

.hero__sub {
  margin-top: calc(var(--car-w) * -.13);
  font-size: clamp(1.05rem, 1.5vw + .6rem, 1.75rem);
  line-height: 1.2;
  letter-spacing: .08em;
  text-wrap: balance;
}

.hero__slogan {
  margin-top: 8px;
  font-size: clamp(1rem, .6vw + .85rem, 1.3rem);
}

.hero__slogan em {
  font-weight: 700;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 0;
  margin-top: 20px;
  font-size: .82rem;
  letter-spacing: .02em;
}

.trust__item {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
}

.trust__item + .trust__item {
  border-left: 1px solid color-mix(in srgb, var(--on-red) 42%, transparent);
}

.trust__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap);
  text-decoration-color: color-mix(in srgb, var(--on-red) 50%, transparent);
  transition: text-decoration-color var(--fast) var(--ease);
}

.trust__link:hover {
  text-decoration-color: currentColor;
}

.trust__part + .trust__part::before {
  content: '·';
  margin-right: 6px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

.hero .btn--solid {
  border-color: var(--bg);
  background: var(--bg);
  color: var(--ink);
}

.hero .btn--solid:hover {
  border-color: var(--bg-2);
  background: var(--bg-2);
  box-shadow: 0 14px 30px -12px var(--shadow);
}

@media (max-width: 640px) {
  /* Stacked, the four items cost 170px; with the Google proof the second hero
   * button ran past the fold of a 360x640 screen, so the gaps shrink here. */

  .trust {
    flex-direction: column;
    align-items: center;
    gap: 2px 0;
    margin-top: 12px;
    font-size: .78rem;
  }

  .trust__item + .trust__item {
    border-left: 0;
  }

  .hero__actions {
    align-self: stretch;
    flex-direction: column;
    margin-top: 18px;
  }
}

@media (max-width: 900px) {
  html:not(.ui-ready) .hero {
    padding-top: calc(var(--head-h) + 60px);
  }
}

/* --- 3. camera journey: shared ------------------------------------------- */

/* One source for the journey's numbers. The phone boundary: every @media rule
 * repeats it literally (tests/run.js checks they agree) and the scripts read
 * --phone-max. The runway of the pinned stage. The shade on the seam between
 * the hero and the stage - the stage's top edge and the hero's veil
 * (journey.css) carry the same one. */

:root {
  --phone-max: 767.98px;
  --runway: 500vh;
}

@media (max-width: 767.98px) {
  :root {
    --runway: 400vh;
  }
}

.hero,
.journey {
  --seam-h: 22svh;
  --seam-tint: color-mix(in srgb, var(--bg) 60%, transparent);
  --seam-side: linear-gradient(90deg, color-mix(in srgb, var(--bg) 82%, transparent), transparent 58%);
}

.journey {
  position: relative;
}

.journey__head {
  display: grid;
  gap: 14px;
  padding-block: var(--gap) clamp(28px, 4vw, 56px);
}

.journey__head .section-title {
  font-weight: 600;
}

.scene__media img,
.scene__canvas,
.scene__fallback {
  width: 100%;
  height: 100%;
}

.scene__media img {
  object-fit: cover;
}

.scene__eyebrow {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: .78rem;
  color: var(--ink-2);
}

.scene__num {
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .02em;
  color: var(--ink);
}

.scene__title {
  margin-top: 14px;
  font-size: clamp(1.5rem, 1.6vw + 1rem, 2.3rem);
  line-height: 1.08;
  letter-spacing: .04em;
  text-wrap: balance;
}

.scene__text {
  max-width: 52ch;
  margin-top: 14px;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Still drawings for the two canvas scenes, shown only in the static list. */

.fb-duct {
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 2;
}

.fb-wall {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 4;
  stroke-linejoin: round;
}

.fb-part {
  fill: var(--bg-2);
  stroke: var(--ink-2);
  stroke-width: 2;
  stroke-linejoin: round;
}

.fb-flame {
  fill: url(#fb-flame);
}

.fb-stop-hot {
  stop-color: color-mix(in srgb, var(--white) 70%, var(--red));
}

.fb-stop-mid {
  stop-color: var(--red);
}

.fb-stop-cold {
  stop-color: var(--red-2);
  stop-opacity: .2;
}

.fb-shock {
  fill: none;
  stroke: color-mix(in srgb, var(--white) 60%, var(--red));
  stroke-width: 2;
  stroke-dasharray: 4 6;
}

.fb-spark {
  fill: var(--white);
}

.fb-gas {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 2 5;
}

.fb-pipe {
  fill: url(#fb-pipe);
}

.fb-stop-steel-hi {
  stop-color: color-mix(in srgb, var(--ink) 55%, var(--bg));
}

.fb-stop-steel {
  stop-color: var(--bg-2);
}

.fb-stop-steel-lo {
  stop-color: var(--bg);
}

.fb-pipe-end {
  fill: var(--bg-2);
  stroke: var(--ink-2);
  stroke-width: 2;
}

.fb-pipe-bore {
  fill: var(--bg);
}

.fb-heat {
  fill: none;
  stroke: color-mix(in srgb, var(--red) 50%, var(--ink));
  stroke-width: 2;
  stroke-linecap: round;
  opacity: .75;
}

.fb-drop {
  fill: var(--ink-2);
}

.fb-text {
  fill: var(--ink);
  font-family: var(--f-display);
  font-size: 26px;
  letter-spacing: .08em;
}

/* --- 3a. journey as a static list ---------------------------------------- */

.journey--static .journey__stage {
  display: grid;
  gap: clamp(44px, 6vw, 96px);
}

.journey--static .scene {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
}

.journey--static .scene:nth-of-type(even) .scene__media {
  order: 2;
}

.journey--static .scene__media {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg-1);
}

.journey--static .scene__media--canvas {
  background:
    radial-gradient(ellipse at 50% 38%, var(--bg-2), var(--bg-1) 70%);
  box-shadow: inset 0 0 0 1px var(--line);
}

.journey--static .scene__canvas,
.journey--static .journey__film,
.journey--static .hotspots,
.journey--static .journey__caption,
.journey--static .hud {
  display: none;
}

@media (max-width: 767.98px) {
  .journey--static .scene {
    grid-template-columns: minmax(0, 1fr);
  }

  .journey--static .scene:nth-of-type(even) .scene__media {
    order: 0;
  }
}

/* --- 3b. journey as a pinned stage (journey.js removed .journey--static) - */

.journey:not(.journey--static) {
  height: var(--runway);
}

.journey:not(.journey--static) .journey__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--bg);
}

.journey:not(.journey--static) .scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
}

.journey:not(.journey--static) .scene.is-active {
  opacity: 1;
}

.journey:not(.journey--static) .scene__media {
  position: absolute;
  inset: 0;
  display: block;
}

.journey:not(.journey--static) .scene__canvas {
  display: block;
}

.journey:not(.journey--static) .scene__fallback {
  display: none;
}

.journey__film {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.journey__film:not([src]):not(:has(source)) {
  display: none;
}

/* Shade for legibility: over the caption on the left and the arc below. */

.journey:not(.journey--static) .journey__stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    var(--seam-side),
    linear-gradient(180deg, var(--seam-tint), transparent var(--seam-h), transparent 55%, color-mix(in srgb, var(--bg) 92%, transparent) 90%);
}

/* Callouts: journey.js places them (left/top or --x/--y) and unhides them. */

.hotspots {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  top: var(--y, 50%);
  left: var(--x, 50%);
  display: flex;
  align-items: center;
  transform: translate(-9px, -50%);
}

.hotspot[data-side='left'] {
  flex-direction: row-reverse;
  transform: translate(calc(-100% + 9px), -50%);
}

.hotspot__dot {
  flex: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--white);
  border-radius: 50%;
  background: color-mix(in srgb, var(--red) 75%, transparent);
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--red) 26%, transparent),
    0 0 18px var(--red-glow);
}

.hotspot__line {
  flex: none;
  width: clamp(28px, 5vw, 64px);
  height: 1px;
  background: linear-gradient(90deg, var(--white), color-mix(in srgb, var(--white) 35%, transparent));
}

.hotspot[data-side='left'] .hotspot__line {
  background: linear-gradient(270deg, var(--white), color-mix(in srgb, var(--white) 35%, transparent));
}

.hotspot__label {
  padding: 7px 12px;
  border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: .72rem;
  letter-spacing: .18em;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--ink);
}

.journey__caption {
  position: absolute;
  bottom: calc(var(--hud-w) * .2 + 12px);
  left: max(var(--gutter), (100% - var(--shell)) / 2);
  z-index: 5;
  width: min(460px, 100% - var(--gutter) * 2);
}

.journey__counter {
  font-family: var(--f-display);
  font-size: .9rem;
  letter-spacing: .2em;
  color: var(--ink-2);
}

.journey__counter #scene-num {
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink);
}

.journey__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: .76rem;
  color: var(--ink);
}

.journey__eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--red);
}

.journey__title {
  margin-top: 10px;
  font-size: clamp(1.5rem, 2.2vw + .8rem, 2.8rem);
  line-height: 1.04;
  letter-spacing: .04em;
  text-wrap: balance;
}

.journey__text {
  margin-top: 12px;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* The arc: five segments, numbers above the rim, labels along the band. */

.hud {
  position: absolute;
  bottom: 0;
  left: 50%;
  z-index: 6;
  width: var(--hud-w);
  transform: translateX(-50%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.hud__svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.hud__band {
  fill: url(#hud-band);
}

.hud-stop-in {
  stop-color: var(--bg-2);
}

.hud-stop-out {
  stop-color: var(--bg);
}

.hud__rim {
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1.5;
}

.hud__progress {
  fill: none;
  stroke: var(--red);
  stroke-width: 3;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.hud__tick {
  fill: var(--ink);
}

.hud__seg {
  cursor: pointer;
  outline: none;
}

/* Invisible but painted, so the whole wedge answers a tap on a phone. */

.hud__hit {
  fill: transparent;
}

.hud__cell {
  fill: color-mix(in srgb, var(--ink) 4%, transparent);
  stroke: var(--line);
  stroke-width: 1;
  transition:
    fill var(--slow) var(--ease),
    stroke var(--slow) var(--ease);
}

.hud__seg:hover .hud__cell {
  fill: color-mix(in srgb, var(--ink) 9%, transparent);
}

.hud__seg:focus-visible .hud__cell {
  stroke: var(--red);
  stroke-width: 2.5;
}

.hud__seg.is-active .hud__cell,
.hud__seg[aria-current] .hud__cell {
  fill: color-mix(in srgb, var(--red) 24%, transparent);
  stroke: color-mix(in srgb, var(--red) 65%, transparent);
}

.hud__num {
  fill: var(--ink-2);
  font-family: var(--f-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .04em;
}

.hud__icon {
  color: var(--ink-2);
}

.hud__label {
  fill: var(--ink-2);
  font-size: 13px;
  letter-spacing: .16em;
}

.hud__seg.is-active .hud__num,
.hud__seg.is-active .hud__label,
.hud__seg[aria-current] .hud__num,
.hud__seg[aria-current] .hud__label {
  fill: var(--ink);
}

.hud__seg.is-active .hud__icon,
.hud__seg[aria-current] .hud__icon {
  color: var(--red);
}

@media (max-width: 640px) {
  .hotspot__label {
    padding: 5px 9px;
    font-size: .62rem;
    letter-spacing: .12em;
  }

  .hotspot__dot {
    width: 14px;
    height: 14px;
  }

  /* Labels along the arc get too small to read: keep them for screen readers
   * and let the numbers and icons carry the arc. */

  .hud__label {
    fill-opacity: 0;
  }

  .hud__num {
    transform: scale(1.9);
  }

  .hud__icon {
    transform: scale(1.5);
  }

  .hud__progress {
    stroke-width: 7;
  }

  .journey__caption {
    bottom: calc(var(--hud-w) * .2 + 40px);
  }

  .journey__text {
    font-size: .9rem;
  }
}

/* --- 4. two technical cards ---------------------------------------------- */

.tech {
  padding-top: var(--gap);
}

.tech__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
}

.tech-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  background: var(--bg-1);
}

.tech-card__media img {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.1);
  transform: scale(1.02);
  transition: transform var(--dur-drift) var(--ease);
}

.tech-card:hover .tech-card__media img {
  transform: scale(1.06);
}

.tech-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, transparent 30%, color-mix(in srgb, var(--bg) 90%, transparent) 100%);
}

.tech-card__over {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(18px, 2.4vw, 32px);
}

.tech-card__title {
  font-size: clamp(1.1rem, 1.3vw + .6rem, 1.75rem);
  line-height: 1.05;
  letter-spacing: .08em;
}

.tech-card__text {
  max-width: 30ch;
  font-size: .84rem;
  line-height: 1.5;
  text-align: right;
  color: var(--ink);
}

@media (max-width: 767.98px) {
  .tech__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tech-card {
    aspect-ratio: 4 / 3;
  }

  .tech-card__over {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .tech-card__text {
    text-align: left;
  }
}

/* --- 5-6. works ------------------------------------------------------------ */

.works {
  padding-top: var(--gap);
}

.works__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: clamp(24px, 3vw, 40px);
}

.tabs {
  display: flex;
  gap: 6px;
}

.tab {
  min-height: var(--tap);
  padding: 0 20px;
  border: 0;
  border-radius: var(--pill);
  background: transparent;
  font-size: .72rem;
  letter-spacing: .2em;
  color: var(--ink-2);
  cursor: pointer;
  transition:
    color var(--fast) var(--ease),
    background-color var(--fast) var(--ease);
}

.tab:hover {
  color: var(--ink);
}

.tab[aria-selected='true'] {
  background: var(--red);
  color: var(--on-red);
  font-weight: 600;
  box-shadow: 0 10px 24px -12px var(--red-glow);
}

/* Without the ui module both panels show, each under its own heading. */

html:not(.ui-ready) .tabs {
  display: none;
}

html:not(.ui-ready) .tabpanel[hidden] {
  display: block !important;
  margin-top: clamp(28px, 3vw, 40px);
}

html:not(.ui-ready) .tabpanel__title {
  position: static;
  width: auto;
  height: auto;
  margin: 0 0 14px;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  font-size: .78rem;
  letter-spacing: .26em;
  color: var(--ink-2);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.tiles > li {
  display: flex;
  background: var(--bg-1);
}

.tile {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: clamp(132px, 13vw, 176px);
  padding: 22px 16px;
  text-align: center;
  text-decoration: none;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, color-mix(in srgb, var(--ink) 4%, transparent), transparent 70%);
  transition: background-color var(--slow) var(--ease);
}

a.tile::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--red);
  transition:
    left var(--slow) var(--ease),
    width var(--slow) var(--ease);
}

a.tile:hover {
  background-color: var(--bg-2);
}

a.tile:hover::after {
  left: 20%;
  width: 60%;
}

.tile__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(1.15rem, 1.1vw + .7rem, 1.6rem);
  line-height: 1.1;
  letter-spacing: .22em;
  text-indent: .22em;
}

.tile__model {
  font-size: .84rem;
  letter-spacing: .04em;
  color: var(--ink-2);
}

.tile__meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: .66rem;
  letter-spacing: .2em;
  color: var(--ink-2);
  transition: color var(--fast) var(--ease);
}

a.tile:hover .tile__meta {
  color: var(--ink);
}

a.tile:hover .tile__meta .icon,
.tile--accent .icon {
  color: var(--red);
}

.tile--word .tile__brand {
  font-size: clamp(1rem, .8vw + .7rem, 1.35rem);
  font-weight: 500;
  letter-spacing: .16em;
  text-indent: .16em;
}

.tile--accent {
  background: radial-gradient(ellipse 80% 70% at 50% 100%, color-mix(in srgb, var(--red) 16%, transparent), transparent 70%);
}

.tile--info {
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  padding: 24px 22px;
  text-align: left;
}

.tile--info .tile__brand {
  font-size: 1.05rem;
  letter-spacing: .12em;
  text-indent: 0;
}

.tile--info .tile__model {
  font-size: .9rem;
  line-height: 1.55;
  letter-spacing: 0;
}

@media (max-width: 900px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .tiles--info {
    grid-template-columns: minmax(0, 1fr);
  }

  .tile {
    padding: 20px 10px;
  }

  .tile__brand {
    letter-spacing: .16em;
    text-indent: .16em;
  }
}

/* --- 7. rule ---------------------------------------------------------------- */

.page-rule {
  width: 100%;
  margin-top: var(--gap);
}

/* --- 8. services -------------------------------------------------------------- */

.services {
  padding-top: var(--gap);
}

.services__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 40px;
  margin-bottom: clamp(28px, 3.5vw, 48px);
}

.services__head .lead {
  max-width: 44ch;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

.cards > li {
  display: flex;
}

.cards > li > article {
  flex: 1;
}

.cards--svc {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 1080px;
  margin-inline: auto;
}

.svc {
  display: flex;
  flex-direction: column;
}

.svc__media {
  --cut-tl: calc(var(--r-cut) - 6px);
  --cut-br: 0px;
  position: relative;
  margin: 10px 10px 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.svc__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* .lift re-rasterises its drop-shadow on every frame of a transition inside
 * it, so states in a lifted card switch instantly. */

.lift .btn {
  transition: none;
}

.svc__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px clamp(18px, 2vw, 26px) 26px;
}

.svc__tag {
  font-family: var(--f-display);
  font-size: .72rem;
  letter-spacing: .24em;
  color: var(--ink-2);
}

.svc__title {
  margin-top: 6px;
  font-size: 1.5rem;
  line-height: 1.1;
}

.svc__text {
  margin-top: 10px;
  font-size: .93rem;
  color: var(--ink-2);
}

.specs {
  margin: 18px 0 24px;
  border-top: 1px solid var(--line);
}

.specs__row {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: .86rem;
  line-height: 1.45;
}

.specs dt {
  padding-top: .18em;
  font-size: .68rem;
  letter-spacing: .16em;
  color: var(--ink-2);
}

.specs dd {
  margin: 0;
}

.svc__more {
  --rim: 30%;
  margin-top: auto;
}

html:not(.ui-ready) .svc__more {
  display: none;
}

.svc-notes {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: clamp(28px, 3vw, 44px);
  text-align: center;
}

.svc-notes__main {
  max-width: 60ch;
  font-size: 1.02rem;
  text-wrap: balance;
}

.svc-notes__official {
  font-size: .7rem;
  letter-spacing: .2em;
  text-wrap: balance;
  color: var(--ink-2);
}

.fears {
  margin-top: var(--gap);
}

.fears__title {
  margin-bottom: clamp(20px, 2.4vw, 32px);
  font-size: clamp(1.2rem, 1.2vw + .8rem, 1.75rem);
}

.fear {
  padding: clamp(24px, 2.4vw, 34px);
}

.fear__q {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.3rem;
  line-height: 1.15;
  letter-spacing: .04em;
}

.fear__q::before {
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  background: var(--red);
  transform: rotate(45deg);
}

.fear__a {
  margin-top: 14px;
  font-size: .93rem;
  color: var(--ink-2);
  text-wrap: pretty;
}

@media (max-width: 900px) {
  .cards {
    grid-template-columns: minmax(0, 1fr);
    max-width: 580px;
    margin-inline: auto;
  }
}

/* Detail dialog - filled by ui.js. Not .glass: that class sets position and
 * would pull a modal dialog out of the top layer's fixed placement. */

.svc-dialog {
  width: min(560px, 100% - var(--gutter) * 2);
  max-height: calc(100dvh - 48px);
  padding: clamp(26px, 3vw, 38px);
  border: 0;
  border-top: 2px solid var(--red);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  color: var(--ink);
  overflow: auto;
}

/* ::backdrop does not inherit custom properties everywhere yet; the value is --bg. */

.svc-dialog::backdrop {
  background: rgba(8, 8, 10, .74);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* Sticky, not absolute: long texts scroll inside the dialog and used to carry
 * the close button off screen. Height 0 keeps it out of the flow, as before;
 * the title's padding-right leaves room for it. */

.svc-dialog__close {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  height: 0;
}

.svc-dialog__close .icon-btn {
  background: var(--bg-2);
}

.svc-dialog__title {
  padding-right: 52px;
  font-size: 1.6rem;
  line-height: 1.1;
  letter-spacing: .05em;
}

.svc-dialog__text {
  margin-top: 12px;
  color: var(--ink-2);
}

.svc-dialog__list {
  display: grid;
  gap: 8px;
  margin: 18px 0 26px;
  padding: 0;
  list-style: none;
}

.svc-dialog__list > li {
  position: relative;
  padding-left: 20px;
}

.svc-dialog__list > li::before {
  content: '';
  position: absolute;
  top: .8em;
  left: 0;
  width: 9px;
  height: 1px;
  background: var(--red);
}

/* --- 9. book an installation ---------------------------------------------- */

.contact {
  padding-block: var(--gap);
}

.contact__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(24px, 3vw, 48px);
  padding: clamp(26px, 3.5vw, 52px) clamp(22px, 3.5vw, 52px) clamp(44px, 5vw, 68px);
}

.contact__title {
  font-size: clamp(1.8rem, 2.6vw + .8rem, 3rem);
  font-weight: 700;
  line-height: 1;
  text-wrap: balance;
}

.contact__text {
  max-width: 46ch;
  margin-top: 14px;
  color: var(--ink-2);
  text-wrap: pretty;
}

.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.contact__btn {
  --rim: 24%;
  padding: 0 18px;
  letter-spacing: .12em;
}

.contact__btn .icon {
  width: 18px;
  height: 18px;
}

.btn--solid.contact__btn {
  border-color: var(--red);
}

.contact__phone {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin-top: 24px;
}

.contact__phone a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-family: var(--f-display);
  font-size: clamp(1.4rem, 1.4vw + 1rem, 2rem);
  letter-spacing: .06em;
  text-decoration: none;
  transition: color var(--fast) var(--ease);
}

.contact__phone a:hover {
  color: var(--red);
}

.contact__person {
  font-size: .74rem;
  letter-spacing: .22em;
  color: var(--ink-2);
}

.contact__phone--second {
  margin-top: 4px;
}

.contact__phone--second > a {
  font-size: clamp(1.15rem, 1vw + .9rem, 1.5rem);
}

.contact__person a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font: inherit;
  letter-spacing: inherit;
  color: var(--ink);
}

.contact__meta {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-size: .86rem;
  color: var(--ink-2);
}

.contact__meta > .icon {
  margin-top: .28em;
}

/* Hours and languages on lines of their own: inline, the last day and the
 * first word of the languages became one unbreakable chunk and dragged the
 * wrap upwards on a 360px screen. */

.contact__meta > span > span {
  display: block;
}

.teaser {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--bg);
}

.teaser__poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.7) brightness(.6);
}

.teaser__canvas,
.teaser__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.teaser__canvas {
  z-index: 1;
}

.teaser__video {
  z-index: 2;
  object-fit: cover;
}

.teaser__video:not([src]):not(:has(source)) {
  display: none;
}

.teaser::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 40%, color-mix(in srgb, var(--bg) 70%, transparent) 100%);
}

.teaser__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  width: 78px;
  height: 78px;
  margin: -39px 0 0 -39px;
  border: 2px solid var(--white);
  background: color-mix(in srgb, var(--bg) 35%, transparent);
  color: var(--white);
  box-shadow: 0 14px 34px -12px var(--shadow);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition:
    transform var(--slow) var(--ease),
    background-color var(--fast) var(--ease),
    border-color var(--fast) var(--ease);
}

.teaser__play .icon {
  width: 30px;
  height: 30px;
  margin-left: 4px;
}

.teaser__play:hover {
  border-color: var(--red);
  background: var(--red);
  color: var(--on-red);
  transform: scale(1.06);
}

/* The machined tab on the panel's lower edge. */

.contact__tab {
  position: absolute;
  bottom: 0;
  left: 18%;
  z-index: 1;
  width: clamp(90px, 12vw, 150px);
  height: 16px;
  background: repeating-linear-gradient(-60deg, var(--ink-3) 0 5px, transparent 5px 12px);
  clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

@media (max-width: 900px) {
  .contact__panel {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .contact__btn {
    flex: 1 1 calc(50% - 5px);
  }

  .contact__links li {
    display: contents;
  }
}

/* --- 10. footer -------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-1), var(--bg));
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.3fr 1fr;
  gap: 40px 32px;
  padding-block: clamp(48px, 6vw, 80px) clamp(40px, 5vw, 64px);
}

.site-footer__about {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 6px;
  font-size: .88rem;
  color: var(--ink-2);
}

.site-footer__plate {
  display: block;
  width: 112px;
  margin-bottom: 12px;
  padding: 12px 14px;
  background: var(--white);
}

.site-footer__plate img {
  width: 100%;
  height: auto;
}

.site-footer__descriptor {
  font-size: .7rem;
  letter-spacing: .3em;
  color: var(--ink);
}

.site-footer__title {
  margin-bottom: 18px;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .24em;
}

.site-footer__list {
  display: grid;
  gap: 10px;
  font-size: .9rem;
  font-style: normal;
  color: var(--ink-2);
}

.site-footer__list a {
  display: inline-block;
  padding-block: 2px;
  color: var(--ink-2);
  text-decoration: none;
  transition: color var(--fast) var(--ease);
}

.site-footer__list a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.site-footer__line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.site-footer__line > .icon {
  margin-top: .32em;
}

.site-footer__note {
  display: block;
  font-size: .78rem;
  color: var(--ink-2);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.site-footer__copy {
  font-size: .8rem;
  color: var(--ink-2);
}

.social {
  display: flex;
  gap: 10px;
}

.social__link {
  display: grid;
  background: var(--ink);
  color: var(--bg);
  transition:
    background-color var(--fast) var(--ease),
    color var(--fast) var(--ease);
}

.social__link:hover {
  background: var(--red);
  color: var(--on-red);
}

.social__link .icon {
  width: 19px;
  height: 19px;
}

@media (max-width: 900px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__list {
    gap: 0;
  }

  .site-footer__list a {
    display: inline-flex;
    align-items: center;
    min-width: var(--tap);
    min-height: var(--tap);
  }

  .site-footer__line {
    align-items: center;
  }

  .site-footer__line > .icon {
    margin-top: 0;
  }
}

@media (max-width: 520px) {
  .site-footer__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
