/* Archeium Technologies. Direção em DESIGN.md. */

@font-face {
  font-family: "Sora";
  src: url("/fonts/Sora-Variable.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */

:root {
  --bg: #fafafa;
  --bg-2: #f4f4f5;
  --surface: #ffffff;
  --ink: #111111;
  --ink-2: #52525b;
  --ink-3: #6b7280;
  --on-ink: #fafafa;
  --line: rgb(17 17 17 / 0.1);
  --line-2: rgb(17 17 17 / 0.16);
  --fill: rgb(17 17 17 / 0.04);
  --fill-2: rgb(17 17 17 / 0.07);
  --grid: rgb(17 17 17 / 0.05);
  --mark: rgb(17 17 17 / 0.34);
  --danger: #b42318;
  --cyan: #22d3ee;
  --focus: #3b82f6;
  --draw: var(--ink);
  --draw-2: var(--ink-3);
  --draw-3: var(--ink-2);

  --font: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --geist: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  --hdr-h: 64px;
  --logo-h: 28px;
  --gutter: 24px;
  --maxw: 1200px;
  --section: clamp(80px, 10vw, 136px);
  --stage-h: min(620px, calc(100svh - var(--hdr-h) - 64px));
  --step-h: 50svh;
  /* intro: symbol size in the middle of the screen and the scale that lands it in the header */
  --intro-h: 120px;
  --intro-s: 0.23333;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --surface: #161616;
  --ink: #f5f5f5;
  --ink-2: #a1a1aa;
  --ink-3: #8b8b95;
  --on-ink: #0a0a0a;
  --line: rgb(255 255 255 / 0.1);
  --line-2: rgb(255 255 255 / 0.17);
  --fill: rgb(255 255 255 / 0.05);
  --fill-2: rgb(255 255 255 / 0.09);
  --grid: rgb(255 255 255 / 0.055);
  --mark: rgb(255 255 255 / 0.36);
  --danger: #f97066;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0a0a0a;
    --bg-2: #111111;
    --surface: #161616;
    --ink: #f5f5f5;
    --ink-2: #a1a1aa;
    --ink-3: #8b8b95;
    --on-ink: #0a0a0a;
    --line: rgb(255 255 255 / 0.1);
    --line-2: rgb(255 255 255 / 0.17);
    --fill: rgb(255 255 255 / 0.05);
    --fill-2: rgb(255 255 255 / 0.09);
    --grid: rgb(255 255 255 / 0.055);
    --mark: rgb(255 255 255 / 0.36);
    --danger: #f97066;
    color-scheme: dark;
  }
}

/* The StepFlag sheet always uses the opposite theme of the page, in StepFlag's own palette. */
.sf {
  --sf-bg: #0e0d0b;
  --sf-bg-2: #151412;
  --sf-surface: #1b1a17;
  --sf-ink: #f3f1ec;
  --sf-ink-2: #a7a399;
  --sf-ink-3: #87837b;
  --sf-on-ink: #0e0d0b;
  --sf-line: rgb(243 241 236 / 0.11);
  --sf-line-2: rgb(243 241 236 / 0.19);
  --sf-fill: rgb(243 241 236 / 0.05);
  --sf-shadow: 0 1px 0 rgb(243 241 236 / 0.06) inset, 0 30px 80px -30px rgb(0 0 0 / 0.7);
  --chrome-1: #ffffff;
  --chrome-2: #8f8b82;
  --chrome-3: #f4f2ec;
  --chrome-4: #6c6860;
  --chrome-edge: rgb(255 255 255 / 0.45);
  color-scheme: dark;
}
:root[data-theme="dark"] .sf {
  --sf-bg: #fbfaf7;
  --sf-bg-2: #f4f2ed;
  --sf-surface: #ffffff;
  --sf-ink: #171612;
  --sf-ink-2: #5d5a53;
  --sf-ink-3: #706d65;
  --sf-on-ink: #fbfaf7;
  --sf-line: rgb(23 22 18 / 0.1);
  --sf-line-2: rgb(23 22 18 / 0.17);
  --sf-fill: rgb(23 22 18 / 0.04);
  --sf-shadow: 0 1px 1px rgb(23 22 18 / 0.04), 0 30px 70px -30px rgb(23 22 18 / 0.28);
  --chrome-1: #8f8a80;
  --chrome-2: #26241f;
  --chrome-3: #c9c4b9;
  --chrome-4: #0f0e0b;
  --chrome-edge: rgb(255 255 255 / 0.18);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .sf {
    --sf-bg: #fbfaf7;
    --sf-bg-2: #f4f2ed;
    --sf-surface: #ffffff;
    --sf-ink: #171612;
    --sf-ink-2: #5d5a53;
    --sf-ink-3: #706d65;
    --sf-on-ink: #fbfaf7;
    --sf-line: rgb(23 22 18 / 0.1);
    --sf-line-2: rgb(23 22 18 / 0.17);
    --sf-fill: rgb(23 22 18 / 0.04);
    --sf-shadow: 0 1px 1px rgb(23 22 18 / 0.04), 0 30px 70px -30px rgb(23 22 18 / 0.28);
    --chrome-1: #8f8a80;
    --chrome-2: #26241f;
    --chrome-3: #c9c4b9;
    --chrome-4: #0f0e0b;
    --chrome-edge: rgb(255 255 255 / 0.18);
    color-scheme: light;
  }
}

/* ---------- base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--hdr-h) + 16px);
  background: var(--bg);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
fieldset {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
fieldset {
  border: 0;
  padding: 0;
  min-width: 0;
}
legend {
  padding: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
img,
svg,
canvas {
  display: block;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
h1,
h2,
h3,
h4 {
  font-weight: 500;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
h3 {
  font-size: 1.1875rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
p {
  text-wrap: pretty;
}
.lead {
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 46ch;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
::selection {
  background: rgb(59 130 246 / 0.22);
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.skip {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 110;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 500;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease-out);
}
.skip:focus {
  transform: none;
}
main:focus {
  outline: none;
}

/* "+" registration marks, drawn with a mask so they take the theme color */
.marks {
  position: absolute;
  pointer-events: none;
  background: var(--mark);
  --plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 0v12M0 6h12' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 12px 12px;
  mask-size: 12px 12px;
}
.marks--corners,
.marks--grid {
  inset: -6px;
  -webkit-mask-image: var(--plus), var(--plus), var(--plus), var(--plus);
  mask-image: var(--plus), var(--plus), var(--plus), var(--plus);
  -webkit-mask-position: 0 0, 100% 0, 0 100%, 100% 100%;
  mask-position: 0 0, 100% 0, 0 100%, 100% 100%;
}
.marks--ends {
  inset: -6px;
  -webkit-mask-image: var(--plus), var(--plus);
  mask-image: var(--plus), var(--plus);
  -webkit-mask-position: 0 50%, 100% 50%;
  mask-position: 0 50%, 100% 50%;
}

/* ---------- buttons and small controls ---------- */

.btn {
  --h: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--h);
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition:
    background-color 0.15s,
    color 0.15s,
    box-shadow 0.15s,
    transform 0.3s var(--ease-out);
}
.btn .ic {
  width: 18px;
  height: 18px;
  flex: none;
}
.btn--sm {
  --h: 34px;
  padding: 0 14px;
  font-size: 0.875rem;
}
.btn--lg {
  --h: 48px;
  padding: 0 22px;
  font-size: 1rem;
}
.btn--primary {
  background: var(--ink);
  color: var(--on-ink);
}
.btn--primary:hover {
  background: color-mix(in srgb, var(--ink) 84%, var(--bg));
}
.btn--secondary {
  background: var(--fill);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.btn--secondary:hover {
  background: var(--fill-2);
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--ink-2);
  transition:
    background-color 0.15s,
    color 0.15s;
}
.icon-btn:hover {
  background: var(--fill-2);
  color: var(--ink);
}
.icon-btn .ic {
  width: 18px;
  height: 18px;
}
/* the toggle shows where it goes: moon on the light theme, sun on the dark one */
[data-theme-toggle] [data-ic="sun"],
:root[data-theme="dark"] [data-theme-toggle] [data-ic="moon"] {
  display: none;
}
:root[data-theme="dark"] [data-theme-toggle] [data-ic="sun"] {
  display: block;
}

.lang-link {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  padding: 8px 6px;
  border-radius: 6px;
  transition: color 0.15s;
}
.lang-link:hover {
  color: var(--ink);
}

.theme-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.theme-switch label {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 28px;
  border-radius: 999px;
  color: var(--ink-3);
  cursor: pointer;
  transition:
    background-color 0.15s,
    color 0.15s;
}
.theme-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.theme-switch .ic {
  width: 15px;
  height: 15px;
}
.theme-switch label:hover {
  color: var(--ink);
}
.theme-switch label:has(input:checked) {
  background: var(--fill-2);
  color: var(--ink);
}
.theme-switch label:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

/* ---------- header ---------- */

.hdr {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: var(--hdr-h);
  transition:
    background-color 0.25s,
    box-shadow 0.25s;
}
.hdr.is-scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 var(--line);
}
.hdr__bar {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  flex: none;
}
.brand__logo {
  height: var(--logo-h);
  width: auto;
}
.lk-word {
  fill: var(--ink);
}
.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.nav a {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 450;
  color: var(--ink-2);
  transition:
    color 0.15s,
    background-color 0.15s;
}
.nav a:hover {
  color: var(--ink);
  background: var(--fill);
}
.hdr__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hdr__cta {
  margin-left: 6px;
}
.hdr__menu {
  display: none;
}

/* the masthead word stands in for the header word until it docks */
:root.mast-on:not(.mast-docked) .hdr .lk-word {
  opacity: 0;
}

/* ---------- mobile menu ---------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.menu[hidden] {
  display: none;
}
.menu__bar {
  flex: none;
  height: var(--hdr-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.menu__nav {
  display: flex;
  flex-direction: column;
  padding-block: 16px;
}
.menu__nav a {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.625rem;
  font-weight: 500;
  letter-spacing: -0.025em;
}
.menu__foot {
  margin-top: auto;
  display: grid;
  gap: 20px;
  padding-block: 24px max(24px, env(safe-area-inset-bottom));
}
.menu__prefs {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
:root.menu-open {
  overflow: hidden;
}

/* ---------- intro: the arch draws, the point falls in, the symbol lands in the header ---------- */

.intro {
  display: none;
}
:root.has-intro .intro {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 100;
  container-type: size;
  cursor: pointer;
  animation: introGone 1ms linear 1.72s both;
}
:root.has-intro.intro-skip .intro {
  display: none;
}
.intro__bg {
  position: absolute;
  inset: 0;
  background: var(--bg);
  animation: fadeOut 0.46s var(--ease-io) 1.2s both;
}
.intro__mark {
  position: absolute;
  height: var(--intro-h);
  width: calc(var(--intro-h) * 200 / 227);
  left: calc(50cqw - var(--intro-h) * 100 / 227);
  top: calc(50cqh - var(--intro-h) / 2);
  transform-origin: 0 0;
  animation: introFly 0.56s var(--ease-io) 1.1s both;
}
.intro__mark svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.intro__line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3.2;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  animation:
    draw 0.7s var(--ease-io) 0.08s forwards,
    fadeOut 0.3s ease 0.86s forwards;
}
.intro__fill {
  opacity: 0;
  animation: fadeIn 0.36s ease 0.82s forwards;
}
.intro__dot {
  fill: var(--cyan);
}
.intro__drop {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: drop 0.62s linear 0.36s both;
}
@keyframes drop {
  0% {
    transform: translateY(-220px);
    opacity: 0;
    animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
  }
  12% {
    opacity: 1;
  }
  62% {
    transform: translateY(0) scale(1.14, 0.84);
    animation-timing-function: cubic-bezier(0, 0.55, 0.45, 1);
  }
  80% {
    transform: translateY(-16px) scale(0.97, 1.04);
    animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
@keyframes introFly {
  to {
    transform: translate(
        calc(max(var(--gutter), (100cqw - var(--maxw)) / 2) - 50cqw + var(--intro-h) * 100 / 227),
        calc((var(--hdr-h) - var(--logo-h)) / 2 - 50cqh + var(--intro-h) / 2)
      )
      scale(var(--intro-s));
  }
}
/* The header symbol waits for the flying one to land on it (1.1s + 0.56s), so only one is ever seen. */
:root.has-intro:not(.intro-skip) .hdr .lk-sym {
  animation: symLand 1ms linear 1.66s both;
}
@keyframes symLand {
  from {
    visibility: hidden;
  }
}
@keyframes introGone {
  to {
    visibility: hidden;
    pointer-events: none;
  }
}
@keyframes fadeOut {
  to {
    opacity: 0;
  }
}
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}
@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

/* ---------- masthead: the giant name ---------- */

.mast {
  padding-top: calc(var(--hdr-h) + clamp(8px, 1.6vw, 20px));
}
.mast__box {
  width: 100%;
}
.mast__word {
  width: 100%;
  height: auto;
  fill: var(--ink);
}
/* mast-live: main.js measured the spot and pinned the word there; it shrinks with the scroll */
:root.mast-live .mast__fly {
  position: fixed;
  z-index: 45;
  transform-origin: 0 0;
}
:root.mast-live.mast-docked .mast__fly {
  visibility: hidden;
}
:root.menu-open .mast__fly {
  visibility: hidden;
}

/* ---------- origin: mission, the stage and the process ---------- */

.origin {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  column-gap: clamp(32px, 5vw, 80px);
  align-items: start;
  padding-top: clamp(28px, 4vw, 56px);
}
.hero {
  grid-column: 1;
  grid-row: 1;
  padding-bottom: clamp(72px, 9vw, 128px);
}
.hero__title {
  font-size: clamp(2rem, 1.25rem + 2.6vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  max-width: 19ch;
}
.hero__lead {
  margin-top: clamp(20px, 2.4vw, 28px);
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(28px, 3.4vw, 40px);
}

.stage {
  grid-column: 2;
  grid-row: 1 / span 3;
  position: sticky;
  top: calc(var(--hdr-h) + (100svh - var(--hdr-h) - var(--stage-h)) / 2);
  height: var(--stage-h);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--bg-2);
  --k: 2.1; /* viewBox units per CSS pixel; js/stage.js keeps it exact */
}
.stage__draw {
  position: relative;
  flex: 1;
  min-height: 0;
  container-type: size;
  overflow: hidden;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center center;
  --u: calc(min(1cqw, 1cqh) / 10);
}
.stage__draw canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.stage.is-live .stage__draw canvas {
  opacity: 1;
}
.stage__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: visible;
  pointer-events: none;
}
.stage__svg path,
.stage__svg circle {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ly--edge {
  opacity: var(--o-edge);
}
.ly--cons {
  opacity: var(--o-cons);
}
.ly--dim {
  opacity: var(--o-dim);
}
.ly--depth {
  opacity: var(--o-depth);
}
.ly--origin {
  opacity: var(--o-origin);
}
.p-front {
  stroke: var(--draw);
  stroke-width: calc(var(--k) * 1.3);
}
.p-back {
  stroke: var(--draw);
  stroke-width: calc(var(--k) * 0.9);
  stroke-opacity: 0.5;
}
.p-links {
  stroke: var(--draw);
  stroke-width: calc(var(--k) * 0.8);
  stroke-opacity: 0.5;
}
.p-cons {
  stroke: var(--draw-2);
  stroke-width: calc(var(--k) * 0.8);
  stroke-dasharray: calc(var(--k) * 5) calc(var(--k) * 4);
}
.p-axis {
  stroke: var(--draw-2);
  stroke-width: calc(var(--k) * 0.8);
  stroke-dasharray: calc(var(--k) * 12) calc(var(--k) * 3) calc(var(--k) * 1.5) calc(var(--k) * 3);
}
.p-dims {
  stroke: var(--draw-3);
  stroke-width: calc(var(--k) * 0.85);
}
.dot-fill {
  fill: var(--cyan) !important;
  stroke: none;
  transition: opacity 0.4s ease;
}
.stage.is-live .dot-fill {
  opacity: 0;
}
.dot-ring {
  stroke: var(--draw);
  stroke-width: calc(var(--k) * 1);
  opacity: var(--o-edge);
}
.dot-pulse {
  stroke: var(--cyan);
  stroke-width: calc(var(--k) * 1.4);
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
}

.lbl {
  position: absolute;
  z-index: 2;
  left: calc(50% + var(--x) * var(--u));
  top: calc(50% + var(--y) * var(--u));
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  white-space: nowrap;
  pointer-events: none;
}
.lbl[data-layer="dim"] {
  opacity: var(--o-dim);
}
.lbl[data-layer="depth"] {
  opacity: var(--o-depth);
}
.lbl[data-layer="origin"] {
  opacity: var(--o-origin);
}
.lbl--above {
  transform: translate(-50%, calc(-100% - 5px));
}
.lbl--left-rot {
  transform: translate(-50%, -50%) translateX(-11px) rotate(-90deg);
}
.lbl--right {
  transform: translate(7px, -50%);
}
.lbl--below-right {
  transform: translate(6px, 4px);
}
.lbl--above-dot {
  transform: translate(-50%, calc(-100% - var(--r) * var(--u) - 12px));
  text-align: center;
  color: var(--ink);
}
@container (max-width: 420px) or (max-height: 420px) {
  .lbl {
    font-size: 11px;
  }
  .lbl--minor {
    display: none;
  }
}

.stage__bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 44px;
  padding: 0 16px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.02em;
}
.stage__num {
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.stage__name {
  color: var(--ink);
}
.stage__prog {
  display: flex;
  margin-left: auto;
}
/* One button per state. The line inside fills as the state is reached (or, on phones, as the
   tour plays it). */
.stage__seg {
  display: grid;
  place-items: center;
  width: 24px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.stage__seg i {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  overflow: hidden;
  background: var(--line-2);
  transition: background-color 0.15s;
}
.stage__seg b {
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--ease-out);
}
.stage__seg.is-on b {
  transform: scaleX(1);
}
.stage__seg:hover i {
  background: var(--ink-3);
}
.stage__seg:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -4px;
  border-radius: 4px;
}
/* play / pause / play again: only the phone tour shows it */
.stage__play {
  display: none;
}
.stage__play .ic {
  display: none;
  width: 16px;
  height: 16px;
}
.stage__play[data-state="playing"] [data-ic="pause"],
.stage__play[data-state="paused"] [data-ic="play"],
.stage__play[data-state="ended"] [data-ic="replay"] {
  display: block;
}
.stage__hint {
  position: absolute;
  z-index: 3;
  left: 12px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.stage__hint[hidden] {
  display: none;
}
.stage__hint.is-gone {
  opacity: 0;
}
.stage__hint .ic {
  width: 14px;
  height: 14px;
}
@keyframes seg-fill {
  to {
    transform: scaleX(1);
  }
}

/* On wide screens the process section lends its parts to the origin grid: the heading and the
   steps go in the left column, the stage stays sticky in the right one. */
.process {
  display: contents;
}
.process__head {
  grid-column: 1;
  grid-row: 2;
}
.process__head .lead {
  margin-top: 18px;
}
.steps {
  grid-column: 1;
  grid-row: 3;
  margin-top: clamp(40px, 5vw, 64px);
  padding-bottom: var(--section);
}
.step {
  position: relative;
  min-height: var(--step-h);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  transition: opacity 0.4s ease;
}
.step::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease-out);
}
.step__num {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}
.step__title {
  margin-top: 10px;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  letter-spacing: -0.02em;
}
.step__body {
  margin-top: 10px;
  color: var(--ink-2);
  max-width: 44ch;
}
:root.stage-on .step:not(.is-active) {
  opacity: 0.38;
}
:root.stage-on .step.is-active::before {
  transform: scaleX(1);
}

/* ---------- section scaffolding ---------- */

.rule {
  position: relative;
  height: 1px;
  background: var(--line);
  transform-origin: left center;
}
.section-head {
  max-width: 760px;
}
.section-head .lead {
  margin-top: 18px;
}

/* ---------- products: the StepFlag sheet ---------- */

.products {
  padding-block: var(--section);
}
.sf-wrap {
  margin-top: clamp(40px, 5vw, 64px);
}
.sf {
  --p: 1;
  position: relative;
  background: var(--sf-bg);
  color: var(--sf-ink);
  border-radius: 28px 28px 10px 10px;
  padding: clamp(28px, 5vw, 64px);
  font-family: var(--geist);
  transform: translateY(calc((1 - var(--p)) * 90px)) scale(calc(0.94 + 0.06 * var(--p)));
  transform-origin: 50% 0;
  overflow: hidden;
}
.sf :focus-visible {
  outline-color: #3b82f6;
}
.sf__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.sf__brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.sf__logo {
  height: 22px;
  width: auto;
}
.sf__kind {
  font-size: 0.875rem;
  color: var(--sf-ink-2);
  padding-left: 14px;
  border-left: 1px solid var(--sf-line-2);
  line-height: 1.2;
}
.sf__title {
  margin-top: clamp(24px, 3vw, 36px);
  font-size: clamp(2rem, 1.3rem + 2.4vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
  max-width: 14ch;
}
.sf__body {
  margin-top: 20px;
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.55;
  color: var(--sf-ink-2);
  max-width: 44ch;
}
.sf__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin-top: 32px;
}
.sf-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--sf-ink);
  color: var(--sf-on-ink);
  font-weight: 500;
  font-size: 0.9375rem;
  transition:
    background-color 0.15s,
    transform 0.3s var(--ease-out);
}
.sf-btn:hover {
  background: color-mix(in srgb, var(--sf-ink) 86%, var(--sf-bg));
}
.sf-btn .ic {
  width: 17px;
  height: 17px;
}
.sf__by {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--sf-ink-3);
}
.sf__by-sym {
  height: 16px;
  width: auto;
}
.sf__visual {
  position: relative;
  width: min(100%, 480px);
  aspect-ratio: 1;
  margin-left: auto;
}
/* The F sits up and to the left, so the chat card fills the corner an F leaves empty (lower right). */
.sf__stage {
  position: absolute;
  left: -20%;
  top: -12%;
  width: 100%;
  aspect-ratio: 1;
  pointer-events: none;
}
.sf-poster,
.sf__canvas,
.sf__canvas canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.sf__canvas canvas {
  opacity: 0;
  transition: opacity 0.6s ease;
}
.sf__stage.is-live .sf__canvas canvas {
  opacity: 1;
}
.sf-poster {
  transition: opacity 0.6s ease;
}
.sf__stage.is-live .sf-poster {
  opacity: 0;
}

.sf-chat {
  position: absolute;
  right: 0;
  bottom: -5%;
  width: min(288px, 64%);
  background: var(--sf-surface);
  border-radius: 14px;
  box-shadow: 0 0 0 1px var(--sf-line), var(--sf-shadow);
  font-size: 0.8125rem;
  line-height: 1.4;
  overflow: hidden;
}
.sf-chat__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--sf-line);
}
.sf-chat__avatar {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--sf-ink);
  color: var(--sf-on-ink);
  font-size: 0.75rem;
  font-weight: 600;
}
.sf-chat__name {
  font-weight: 600;
}
.sf-chat__tag {
  font-size: 0.6875rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--sf-fill);
  box-shadow: inset 0 0 0 1px var(--sf-line);
  color: var(--sf-ink-2);
}
.sf-chat__msg {
  padding: 12px;
}
.sf-chat__title {
  font-weight: 600;
}
.sf-chat__meta {
  color: var(--sf-ink-2);
}
.sf-chat__kb {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}
.sf-kb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--sf-line-2);
}
.sf-kb__box {
  display: grid;
  place-items: center;
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--sf-line-2);
  color: var(--sf-on-ink);
  transition:
    background-color 0.2s,
    box-shadow 0.2s;
}
.sf-kb__box .ic {
  width: 12px;
  height: 12px;
  stroke-width: 2.2;
  opacity: 0;
  transition: opacity 0.2s;
}
.sf-chat.is-checked .sf-kb .sf-kb__box,
:root:not(.js) .sf-kb .sf-kb__box,
:root.rm .sf-kb .sf-kb__box {
  background: var(--sf-ink);
  box-shadow: none;
}
.sf-chat.is-checked .sf-kb .ic,
:root:not(.js) .sf-kb .ic,
:root.rm .sf-kb .ic {
  opacity: 1;
}
.sf-chat.is-checked .sf-kb .sf-kb__box,
.sf-chat.is-checked .sf-kb .ic {
  transition-delay: calc(0.5s + var(--i) * 0.45s);
}
.sf-chat__done {
  display: block;
  margin-top: 10px;
  padding: 7px;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  background: var(--sf-fill);
  box-shadow: inset 0 0 0 1px var(--sf-line-2);
}
.sf__features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px clamp(24px, 3vw, 40px);
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 28px;
  border-top: 1px solid var(--sf-line);
}
.sf__features h4 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.sf__features p {
  margin-top: 6px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--sf-ink-2);
}

/* ---------- services ---------- */

.services {
  padding-block: var(--section);
}
.svc-wrap {
  position: relative;
  margin-top: clamp(40px, 5vw, 64px);
}
.svc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.svc {
  padding: clamp(24px, 3.4vw, 44px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.marks--grid {
  -webkit-mask-image: var(--plus), var(--plus), var(--plus), var(--plus), var(--plus), var(--plus), var(--plus), var(--plus), var(--plus);
  mask-image: var(--plus), var(--plus), var(--plus), var(--plus), var(--plus), var(--plus), var(--plus), var(--plus), var(--plus);
  -webkit-mask-position: 0 0, 50% 0, 100% 0, 0 50%, 50% 50%, 100% 50%, 0 100%, 50% 100%, 100% 100%;
  mask-position: 0 0, 50% 0, 100% 0, 0 50%, 50% 50%, 100% 50%, 0 100%, 50% 100%, 100% 100%;
}
.svc__ic {
  width: 44px;
  height: 44px;
  color: var(--ink-2);
}
.svc__ic [pathLength] {
  stroke-dasharray: 1 1;
}
.svc__ic .o {
  fill: currentColor;
  stroke: none;
  transition: fill 0.3s ease;
}
.svc:hover .svc__ic .o {
  fill: var(--cyan);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .svc:hover .svc__ic [pathLength] {
    animation: draw 0.9s var(--ease-io) both;
  }
}
.svc h3 {
  margin-top: 28px;
}
.svc p {
  margin-top: 10px;
  color: var(--ink-2);
  max-width: 42ch;
}
.services__cta {
  margin-top: clamp(32px, 4vw, 48px);
}

/* ---------- contact ---------- */

.contact {
  padding-block: var(--section);
}
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.contact__intro .lead {
  margin-top: 18px;
}
.channels {
  margin-top: 36px;
  border-top: 1px solid var(--line);
}
.channel {
  display: grid;
  grid-template-columns: 20px auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px 2px;
  border-bottom: 1px solid var(--line);
  transition: color 0.15s;
}
.channel .ic {
  width: 20px;
  height: 20px;
  color: var(--ink-2);
}
.channel__label {
  font-weight: 500;
}
.channel__value {
  justify-self: end;
  color: var(--ink-2);
  font-size: 0.9375rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.channel:hover .channel__value {
  color: var(--ink);
}
/* Instagram: a visible button to the profile, on the same link as the row */
.channel--cta {
  grid-template-columns: 20px auto minmax(0, 1fr) auto;
}
/* Same pill as the site's primary buttons (.btn--primary .btn--sm), stretched sideways */
.channel__cta.btn {
  min-width: 152px;
  padding: 0 20px;
  gap: 10px;
}
.channel__cta .ic {
  width: 16px;
  height: 16px;
  color: inherit;
  transition: transform 0.3s var(--ease-out);
}
.channel--cta:hover .channel__cta {
  background: color-mix(in srgb, var(--ink) 84%, var(--bg));
}
.channel--cta:hover .channel__cta .ic {
  transform: translate(2px, -2px);
}
@media (prefers-reduced-motion: reduce) {
  .channel--cta:hover .channel__cta .ic {
    transform: none;
  }
}
.ftr__channels .channel__cta {
  display: none;
}
/* Narrow column (phones, or the two-column contact on mid widths): the value goes under the
   label, so nothing is cut or overlapped */
.contact .channels {
  container-type: inline-size;
}
@container (max-width: 460px) {
  .channel {
    grid-template-columns: 20px minmax(0, 1fr);
    row-gap: 2px;
  }
  .channel__value {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
  }
  .channel--cta {
    grid-template-columns: 20px minmax(0, 1fr) auto;
  }
  .channel--cta .channel__value {
    grid-row: 2;
  }
  .channel--cta .channel__cta {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

.form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  padding: clamp(20px, 3vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 16px;
}
.field {
  display: grid;
  gap: 8px;
  align-content: start;
}
.field > label,
.field > legend {
  font-size: 0.875rem;
  font-weight: 500;
}
.field > legend {
  margin-bottom: 8px;
}
.field__opt {
  font-weight: 400;
  color: var(--ink-3);
}
.field__hint {
  margin-top: -4px;
  font-size: 0.8125rem;
  color: var(--ink-3);
}
.field input,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: var(--bg);
  font-size: 1rem;
  line-height: 1.4;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.field textarea {
  resize: vertical;
  min-height: 132px;
}
.field input:hover,
.field textarea:hover {
  border-color: color-mix(in srgb, var(--ink) 34%, transparent);
}
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 0;
  border-color: transparent;
}
.field.is-invalid input,
.field.is-invalid textarea {
  border-color: var(--danger);
}
.field__err {
  font-size: 0.8125rem;
  color: var(--danger);
}
.field[hidden],
.field__err[hidden] {
  display: none;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip,
.seg label {
  position: relative;
}
.chip input,
.seg input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.chip span {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: 0.875rem;
  transition:
    background-color 0.15s,
    color 0.15s,
    box-shadow 0.15s;
}
.chip:hover span {
  background: var(--fill);
}
.chip input:checked + span,
.seg input:checked + span {
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: none;
}
.chip input:focus-visible + span,
.seg input:focus-visible + span {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line-2);
  justify-self: start;
}
.seg span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.875rem;
  transition:
    background-color 0.15s,
    color 0.15s;
}
.seg .ic {
  width: 16px;
  height: 16px;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.form__privacy {
  font-size: 0.8125rem;
  color: var(--ink-3);
}
.form__status {
  font-size: 0.9375rem;
  font-weight: 500;
}
.form__status:empty {
  display: none;
}
.form__status.is-error {
  color: var(--danger);
}

/* ---------- footer ---------- */

.ftr {
  padding-block: clamp(56px, 7vw, 88px) 28px;
  border-top: 1px solid var(--line);
}
.ftr__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.ftr__logo {
  height: 36px;
  width: auto;
}
.ftr__brand p {
  margin-top: 18px;
  color: var(--ink-2);
}
.ftr__title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-3);
}
.ftr__col ul {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  font-size: 0.9375rem;
}
.ftr__col a {
  color: var(--ink-2);
  transition: color 0.15s;
}
.ftr__col a:hover {
  color: var(--ink);
}
.ftr__channels .channel {
  display: inline-flex;
  padding: 0;
  border: 0;
  gap: 8px;
}
.ftr__channels .channel .ic {
  width: 16px;
  height: 16px;
}
.ftr__channels .channel__value {
  display: none;
}
.ftr__channels .channel__label {
  font-weight: 400;
}
.ftr__base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--ink-3);
}
.ftr__prefs {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ---------- motion ---------- */

/* first view: rises in after the intro (or at once without it) */
:root.js:not(.rm) [data-in] {
  animation: rise 0.9s var(--ease-out) both;
  animation-delay: calc(var(--intro-d, 0.05s) + var(--i, 0) * 90ms);
}
[data-in="1"] {
  --i: 1;
}
[data-in="2"] {
  --i: 2;
}
[data-in="3"] {
  --i: 3;
}
:root.has-intro {
  --intro-d: 1.22s;
}
:root.has-intro.intro-skip {
  --intro-d: 0s;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
  }
}

/* the drawing draws itself */
:root.js:not(.rm) .p-front,
:root.js:not(.rm) .p-back {
  stroke-dasharray: 1 1;
  animation: draw 1.7s var(--ease-io) both;
  animation-delay: calc(var(--intro-d, 0.05s) + 0.1s);
}
:root.js:not(.rm) .ly__in,
:root.js:not(.rm) .lbl__t,
:root.js:not(.rm) .ly--dot {
  animation: fadeFrom0 0.9s ease both;
  animation-delay: calc(var(--intro-d, 0.05s) + 0.95s);
}
@keyframes fadeFrom0 {
  from {
    opacity: 0;
  }
}
:root.js:not(.rm) .dot-pulse {
  animation: pulse 2.6s var(--ease-out) infinite;
  animation-delay: calc(var(--intro-d, 0.05s) + 1.6s);
}
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.85;
  }
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}
:root.rm .dot-pulse {
  transform: scale(1.7);
  opacity: 0.45;
}

/* reveal on scroll (only once JS has checked what is already on screen) */
:root.reveal-on [data-reveal] {
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out),
    filter 0.7s var(--ease-out);
}
:root.reveal-on [data-reveal]:not(.is-in) {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(6px);
}
:root.reveal-on .rule[data-reveal] {
  transition: transform 1.2s var(--ease-io);
}
:root.reveal-on .rule[data-reveal]:not(.is-in) {
  opacity: 1;
  filter: none;
  transform: scaleX(0);
}
.svc:nth-child(2) {
  transition-delay: 70ms;
}
.svc:nth-child(3) {
  transition-delay: 140ms;
}
.svc:nth-child(4) {
  transition-delay: 210ms;
}

/* without JS the drawing shows at full strength (there is nothing to scroll through) */
:root:not(.js) .stage {
  --o-edge: 1 !important;
  --o-cons: 0.6 !important;
  --o-dim: 1 !important;
  --o-origin: 0.6 !important;
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .nav,
  .hdr__actions .lang-link {
    display: none;
  }
  .hdr__actions {
    margin-left: auto;
  }
  .hdr__menu {
    display: inline-grid;
  }
}

@media (max-width: 860px) {
  :root {
    --gutter: 20px;
    --logo-h: 26px;
    --intro-h: 96px;
    --intro-s: 0.27083;
  }
  .origin {
    display: block;
  }
  .hero {
    padding-bottom: 32px;
  }
  /* Phones: nothing is pinned. Heading, then the stage in the page, then the steps. */
  .process {
    display: block;
    padding-top: 56px;
    padding-bottom: var(--section);
  }
  .stage {
    position: relative;
    top: auto;
    height: auto;
    margin-top: 28px;
    --k: 2.9;
  }
  .stage__draw {
    flex: none;
    aspect-ratio: 1;
    max-height: min(60svh, 560px);
  }
  .steps {
    margin-top: 32px;
    padding-bottom: 0;
  }
  .step {
    min-height: 0;
    padding-bottom: 28px;
  }

  /* The tour (js/stage.js): the steps become cards to swipe, the states play on their own with a
     line that fills per step, and a finger turns the drawing. */
  :root.stage-tour .stage__bar {
    height: 52px;
    gap: 10px;
    padding: 0 8px 0 16px;
  }
  :root.stage-tour .stage__seg {
    width: 30px;
    height: 44px;
  }
  :root.stage-tour .stage__seg i {
    width: 22px;
  }
  :root.stage-tour .stage__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  :root.stage-tour .stage__play:not([hidden]) {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 36px;
    height: 36px;
    margin-left: 2px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--fill);
    box-shadow: inset 0 0 0 1px var(--line-2);
    color: var(--ink);
    cursor: pointer;
  }
  :root.stage-tour .stage__play:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
  }
  :root.stage-tour .stage__draw {
    touch-action: pan-y;
  }
  :root.stage-tour .stage.is-playing .stage__seg.is-active b {
    transform: scaleX(0);
    transition: none;
    animation: seg-fill var(--dwell, 6.5s) linear forwards;
  }
  :root.stage-tour .stage.is-held .stage__seg.is-active b {
    animation-play-state: paused;
  }
  /* the drawing draws itself when the stage comes into view, not at page load */
  :root.stage-tour .stage :is(.p-front, .p-back) {
    animation-delay: 0.15s;
  }
  :root.stage-tour .stage :is(.ly__in, .lbl__t, .ly--dot) {
    animation-delay: 1s;
  }
  :root.stage-tour .stage .dot-pulse {
    animation-delay: 1.6s;
  }
  :root.stage-tour .stage:not(.is-seen) :is(.p-front, .p-back, .ly__in, .lbl__t, .ly--dot, .dot-pulse) {
    animation-play-state: paused;
  }
  :root.stage-tour .steps {
    display: flex;
    gap: 20px;
    margin: 20px calc(-1 * var(--gutter)) 0;
    padding: 0 var(--gutter);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  :root.stage-tour .steps::-webkit-scrollbar {
    display: none;
  }
  :root.stage-tour .steps:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: -2px;
  }
  :root.stage-tour .step {
    flex: 0 0 min(84%, 400px);
    padding-bottom: 6px;
    scroll-snap-align: start;
  }
  :root.stage-tour .step:not(.is-active) {
    cursor: pointer;
  }
  .sf__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .sf__visual {
    width: 100%;
    aspect-ratio: auto;
  }
  .sf__stage {
    position: relative;
    left: auto;
    top: auto;
    margin: -24px auto 0;
    width: min(100%, 360px);
  }
  /* touch: a sideways drag turns the F (js/3d/sfmark.js); vertical moves still scroll the page */
  @media (pointer: coarse) {
    .sf__stage {
      pointer-events: auto;
      touch-action: pan-y;
    }
  }
  .sf-chat {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    max-width: 340px;
    margin: -48px auto 0;
  }
  .sf__features {
    grid-template-columns: minmax(0, 1fr);
  }
  .contact__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ftr__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ftr__brand {
    grid-column: 1 / -1;
  }
}

/* the smallest phones: the tour bar keeps its four steps and the play button inside the stage */
@media (max-width: 380px) {
  :root.stage-tour .stage__bar {
    gap: 8px;
    padding-left: 14px;
  }
  :root.stage-tour .stage__seg {
    width: 24px;
  }
  :root.stage-tour .stage__seg i {
    width: 18px;
  }
}
@media (max-width: 350px) {
  :root.stage-tour .stage__num {
    display: none;
  }
}

@media (max-width: 640px) {
  .hdr__cta {
    display: none;
  }
  .svc-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .marks--grid {
    -webkit-mask-image: var(--plus), var(--plus), var(--plus), var(--plus);
    mask-image: var(--plus), var(--plus), var(--plus), var(--plus);
    -webkit-mask-position: 0 0, 100% 0, 0 100%, 100% 100%;
    mask-position: 0 0, 100% 0, 0 100%, 100% 100%;
  }
  .form__row {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero__cta .btn,
  .form__actions .btn {
    flex: 1 1 auto;
  }
  .sf {
    border-radius: 22px 22px 8px 8px;
  }
  .ftr__base {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
