/* routr.io v1 — see ../../README.md for the motion inventory.
   The first part of this file is the fonoster.com v1 foundation (tokens, nav, atmosphere, numbers, pipeline,
   code windows, deploy cards, final CTA, footer, reveal), kept in sync by hand. Routr-specific rules follow. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #181818;
  --surface: #202020;
  --surface-raised: #252525;
  --surface-sunken: #121212;
  --border: #333333;
  --hl-border: rgba(255, 255, 255, 0.32);
  --text-1: #ffffff;
  --text-2: #e8e8e8;
  --text-3: #c2c2c2;
  --text-4: #8d8d8d;
  --accent: #39e19e;
  --on-accent: #011900;
  --accent-text: #39e19e;
  --danger: #f97066;
  --overlay-1: rgba(255, 255, 255, 0.04);
  --overlay-2: rgba(255, 255, 255, 0.07);
  --sunk-1: rgba(0, 0, 0, 0.2);
  --bubble-a: #333333;
  --dot: rgba(255, 255, 255, 0.13);
  --dot-hi: rgba(255, 255, 255, 0.6);
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  --code-k: #82aaff;
  --code-v: #e8c07d;
  --code-p: #8d8d8d;
  --code-c: #6e6e6e;
  --code-ln: #555555;

  --font: "Poppins", system-ui, sans-serif;
  --mono: "Roboto Mono", ui-monospace, monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-1: 150ms;
  --dur-2: 240ms;
  --dur-3: 600ms;

  --pad: 80px;
  --gutter: max(var(--pad), calc((100vw - 1440px) / 2 + var(--pad)));
  --section: 128px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f4f4f4;
  --surface-raised: #ffffff;
  --surface-sunken: #efefef;
  --border: #e8e8e8;
  --hl-border: rgba(0, 0, 0, 0.22);
  --text-1: #252525;
  --text-2: #555555;
  --text-3: #6b6b6b;
  --text-4: #8d8d8d;
  --accent-text: #008751;
  --danger: #d92d20;
  --overlay-1: rgba(0, 0, 0, 0.03);
  --overlay-2: rgba(0, 0, 0, 0.06);
  --sunk-1: rgba(0, 0, 0, 0.03);
  --bubble-a: #e8e8e8;
  --dot: rgba(0, 0, 0, 0.1);
  --dot-hi: rgba(0, 0, 0, 0.38);
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.1);
  --code-k: #2f5bd8;
  --code-v: #9a5b00;
  --code-p: #8d8d8d;
  --code-c: #9a9a9a;
  --code-ln: #c2c2c2;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-1);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
}
h1, h2, h3, p {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--text-1);
  outline-offset: 3px;
  border-radius: 6px;
}
.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.mono {
  font-family: var(--mono);
}
.br-m,
.show-m {
  display: none;
}

.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-inline: var(--pad);
}
.section {
  padding-block: var(--section);
}
section[id] {
  scroll-margin-top: 72px;
}

/* ---------- Type ---------- */
.t-display {
  font-weight: 600;
  font-size: clamp(42px, 6.1vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.t-h1 {
  font-weight: 600;
  font-size: clamp(36px, 5.6vw, 80px);
  line-height: 1.04;
  letter-spacing: -0.031em;
}
.t-h2 {
  font-weight: 600;
  font-size: clamp(32px, 3.9vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.027em;
}
.t-h3 {
  font-weight: 600;
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.t-lead {
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.5;
  color: var(--text-2);
}
.t-sub {
  font-size: 18px;
  color: var(--text-3);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font: 500 13px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.tag {
  padding: 2px 8px;
  border: 1px solid var(--hl-border);
  border-radius: 6px;
  font: 400 11px var(--mono);
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-3);
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: 600 15px/1 var(--font);
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--dur-1) var(--ease-out), filter var(--dur-1) var(--ease-out),
    background-color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out);
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn--primary:hover {
  filter: brightness(1.06);
}
.btn--secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-1);
  font-weight: 500;
}
.btn--secondary:hover {
  background: var(--surface-raised);
  border-color: var(--hl-border);
}
.btn--sm {
  height: 40px;
  padding: 0 18px;
}
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 15px;
  color: var(--text-1);
}
.arrow-link .icon {
  transition: transform var(--dur-1) var(--ease-out);
}
.arrow-link:hover .icon {
  transform: translateX(3px);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background-color var(--dur-2) var(--ease-out);
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
}
.nav__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: inline-flex;
}
.logo img {
  height: 32px;
  width: auto;
}
.logo--light,
:root[data-theme="light"] .logo--dark {
  display: none !important;
}
:root[data-theme="light"] .logo--light {
  display: block !important;
}
.nav__links {
  display: flex;
  gap: 36px;
  font-size: 15px;
}
.nav__links a {
  color: var(--text-2);
  transition: color var(--dur-1) var(--ease-out);
}
.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--text-1);
}
.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.gh-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: 500 14px var(--mono);
  transition: border-color var(--dur-1) var(--ease-out);
}
.gh-chip:hover {
  border-color: var(--hl-border);
}
.gh-chip .i-star {
  width: 14px;
  height: 14px;
  color: var(--text-2);
}
.nav__menu {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  place-items: center;
  cursor: pointer;
}
.nav__menu .icon {
  width: 24px;
  height: 24px;
}
.sheet {
  border-top: 1px solid var(--border);
  padding: 12px var(--pad) 24px;
  display: grid;
  gap: 4px;
  transform-origin: top;
  animation: sheet-in var(--dur-2) var(--ease-out);
}
.sheet[hidden] {
  display: none;
}
.sheet a:not(.btn) {
  padding: 12px 0;
  font-size: 18px;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
}
.sheet .btn {
  margin-top: 16px;
}
@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* ---------- Notice bar ----------
   A thin strip above the nav for announcements. It scrolls away and the nav stays sticky.
   It's the one blue element on the site (a transparent sky tint) so it reads apart from the green CTAs.
   The icon sits inline so it stays attached to the text when the line wraps.
   assets/js/notice.js draws the markup on every page and holds the message, link, icon, and on/off switch. */
.notice {
  --notice-bg: rgba(14, 165, 233, 0.14);
  --notice-line: rgba(14, 165, 233, 0.32);
  --notice-text: #7dd3fc;
  --notice-strong: #e0f2fe;
  --notice-icon: #38bdf8;
  background: var(--notice-bg);
  border-bottom: 1px solid var(--notice-line);
  color: var(--notice-text);
  font-size: 13px;
  line-height: 1.5;
}
:root[data-theme="light"] .notice {
  --notice-bg: rgba(14, 165, 233, 0.08);
  --notice-line: rgba(14, 165, 233, 0.26);
  --notice-text: #075985;
  --notice-strong: #0c4a6e;
  --notice-icon: #0284c7;
}
.notice__in {
  padding-block: 10px;
  text-align: center;
  text-wrap: balance;
}
.notice__icon {
  margin-right: 8px;
  vertical-align: -3px;
  color: var(--notice-icon);
}
.notice strong {
  color: var(--notice-strong);
  font-weight: 500;
}
.notice__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  color: var(--notice-strong);
  font-weight: 500;
  white-space: nowrap;
}
.notice__link span {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur-1) var(--ease-out);
}
.notice__link:hover span {
  text-decoration-color: currentColor;
}
.notice__link .icon {
  width: 14px;
  height: 14px;
  transition: transform var(--dur-1) var(--ease-out);
}
.notice__link:hover .icon {
  transform: translateX(2px);
}
@media (max-width: 640px) {
  /* Left-aligned with a hanging indent: wrapped lines start under the text, not the icon. */
  .notice__in {
    padding-left: calc(var(--pad) + 24px);
    text-indent: -24px;
    text-align: left;
    text-wrap: pretty;
  }
  .notice__link {
    text-indent: 0;
  }
}

/* ---------- Atmosphere: dot grid + light wave ----------
   The grid matches the design at rest. A single soft line of light sweeps across it
   once shortly after load, then every 10s (the sweep itself takes ~2.2s). */
.atmos {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.dots,
.dots__wave {
  position: absolute;
  inset: 0;
  background-size: 28px 28px;
}
.dots {
  background-image: radial-gradient(circle, var(--dot) 1.1px, transparent 1.7px);
  -webkit-mask-image: radial-gradient(ellipse 65% 70% at var(--mx, 75%) var(--my, 42%), #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 65% 70% at var(--mx, 75%) var(--my, 42%), #000 0%, transparent 72%);
}
.dots__wave {
  --band: 140px;
  background-image: radial-gradient(circle, var(--dot-hi) 1.3px, transparent 1.9px);
  -webkit-mask-image: linear-gradient(100deg, transparent 0%, rgba(0, 0, 0, 0.35) 32%, #000 50%, rgba(0, 0, 0, 0.35) 68%, transparent 100%);
  mask-image: linear-gradient(100deg, transparent 0%, rgba(0, 0, 0, 0.35) 32%, #000 50%, rgba(0, 0, 0, 0.35) 68%, transparent 100%);
  -webkit-mask-size: var(--band) 100%;
  mask-size: var(--band) 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: calc(var(--band) * -1) 0;
  mask-position: calc(var(--band) * -1) 0;
  animation: wave 10s var(--ease-in-out) 0.8s infinite;
}
@keyframes wave {
  0% {
    -webkit-mask-position: calc(var(--band) * -1) 0;
    mask-position: calc(var(--band) * -1) 0;
  }
  22%,
  100% {
    -webkit-mask-position: calc(100% + var(--band)) 0;
    mask-position: calc(100% + var(--band)) 0;
  }
}
/* Heroes get a slower pass: ~4.5s across, starting every 12s. */
.hero .dots__wave,
.aphero .dots__wave {
  animation: wave-slow 12s var(--ease-in-out) 0.8s infinite;
}
@keyframes wave-slow {
  0% {
    -webkit-mask-position: calc(var(--band) * -1) 0;
    mask-position: calc(var(--band) * -1) 0;
  }
  38%,
  100% {
    -webkit-mask-position: calc(100% + var(--band)) 0;
    mask-position: calc(100% + var(--band)) 0;
  }
}
.atmos--center {
  --mx: 50%;
  --my: 32%;
}
.atmos--bottom {
  --mx: 50%;
  --my: 100%;
}

/* ---------- Home: hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
}
.hero__in {
  position: relative;
  display: flex;
  align-items: center;
  gap: 64px;
  padding-block: 72px 88px;
}
.hero__copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  color: var(--text-2);
  transition: border-color var(--dur-1) var(--ease-out);
}
.badge:hover {
  border-color: var(--hl-border);
}
.badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-2);
}
.badge .icon {
  width: 14px;
  height: 14px;
  transition: transform var(--dur-1) var(--ease-out);
}
.badge:hover .icon {
  transform: translateX(2px);
}
.ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Home: numbers ---------- */
.numbers {
  border-block: 1px solid var(--border);
}
.numbers__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.num {
  padding: 56px 40px;
  border-left: 1px solid var(--border);
}
.num:first-child {
  padding-left: 0;
  border-left: 0;
}
.num__value {
  display: block;
  font-weight: 600;
  font-size: 72px;
  line-height: 1;
  letter-spacing: -0.035em;
}
.num__label {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-2);
}
.odo {
  display: inline-flex;
}
.odo__col {
  display: inline-block;
  height: 1em;
  overflow: hidden;
  transition: width 1.4s var(--ease-out);
}
.odo__strip {
  display: flex;
  flex-direction: column;
  transition: transform 1.4s var(--ease-out);
  transition-delay: calc(var(--i) * 80ms);
}
.odo__strip span,
.odo__ch {
  display: block;
  height: 1em;
  line-height: 1;
  text-align: center;
}
.odo__ch {
  opacity: 0;
  transition: opacity var(--dur-3) var(--ease-out) 300ms;
}
.is-in .odo__strip {
  transform: translateY(calc(var(--d) * -1em));
}
.is-in .odo__ch {
  opacity: 1;
}

/* ---------- Home: pipeline ---------- */
.pipe {
  padding-top: 32px;
}
.pipe__flow {
  display: flex;
  align-items: center;
  margin-top: 56px;
}
.step {
  flex: 1;
  min-width: 0;
  height: 240px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  animation: step-glow 6s var(--ease-in-out) infinite;
  animation-delay: calc(var(--i) * 1.2s);
}
.step__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--overlay-2);
}
.step__icon .icon {
  width: 26px;
  height: 26px;
}
.step__name {
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.018em;
}
.step__vendors {
  font: 400 14px/1.6 var(--mono);
  color: var(--text-2);
}
.plink {
  --len: 56px;
  --dot-size: 10px;
  position: relative;
  width: var(--len);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.plink::before {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--overlay-2);
}
.plink i {
  width: var(--dot-size);
  height: var(--dot-size);
  border-radius: 50%;
  background: var(--text-4);
}
.plink::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: var(--dot-size);
  height: var(--dot-size);
  margin-top: calc(var(--dot-size) / -2);
  border-radius: 50%;
  background: var(--text-1);
  box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.35);
  opacity: 0;
  animation: travel 6s var(--ease-in-out) infinite;
  animation-delay: calc(var(--i) * 1.2s - 0.55s);
}
@keyframes step-glow {
  0%, 24%, 100% {
    border-color: var(--border);
    background-color: var(--surface);
  }
  7%, 15% {
    border-color: var(--hl-border);
    background-color: var(--surface-raised);
  }
}
@keyframes travel {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  2% {
    opacity: 1;
  }
  9% {
    transform: translateX(calc(var(--len) - var(--dot-size)));
    opacity: 1;
  }
  11%, 100% {
    transform: translateX(calc(var(--len) - var(--dot-size)));
    opacity: 0;
  }
}

/* ---------- Code band (home Autopilot block) ---------- */
.band {
  background: var(--surface);
  border-block: 1px solid var(--border);
}
.split {
  display: flex;
  align-items: center;
  gap: 80px;
}
.split__copy {
  width: 440px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.split__copy .t-sub {
  font-size: 17px;
  line-height: 1.5;
}
.window {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
  box-shadow: var(--shadow);
}
.window__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font: 400 13px var(--mono);
  color: var(--text-4);
}
.window__bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(249, 112, 102, 0.6);
}
.window__bar i:nth-child(2) {
  background: rgba(245, 165, 36, 0.6);
}
.window__bar i:nth-child(3) {
  background: rgba(57, 225, 158, 0.6);
  margin-right: 8px;
}
.code {
  margin: 0;
  padding: 24px 28px;
  overflow-x: auto;
  font: 400 14px/1.6 var(--mono);
  counter-reset: ln;
  color: var(--code-p);
}
.code .l {
  display: block;
  white-space: pre;
}
.code .l::before {
  counter-increment: ln;
  content: counter(ln);
  display: inline-block;
  width: 2ch;
  margin-right: 20px;
  text-align: right;
  color: var(--code-ln);
}
.code .k {
  color: var(--code-k);
}
.code .v {
  color: var(--code-v);
}
.code .c {
  color: var(--code-c);
}
.term {
  padding: 18px 28px;
  border-top: 1px solid var(--border);
  background: var(--sunk-1);
  font: 400 14px/1.6 var(--mono);
}
.term__line {
  display: flex;
  gap: 10px;
  white-space: pre;
}
.term__prompt {
  color: var(--code-p);
}
.term__out {
  color: var(--text-2);
  transition: opacity var(--dur-2) var(--ease-out);
}
.term__out.is-hidden {
  opacity: 0;
}
.caret {
  display: inline-block;
  width: 8px;
  height: 1.15em;
  margin-left: 1px;
  vertical-align: -3px;
  background: var(--text-1);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ---------- Home: deploy ---------- */
.deploy__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.dcard {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  transition: transform var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}
.dcard:hover {
  transform: translateY(-2px);
  border-color: var(--hl-border);
}
.dcard--hi {
  background: var(--surface-raised);
  border-color: var(--hl-border);
}
.dcard > .icon {
  width: 32px;
  height: 32px;
}
.dcard__name {
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.018em;
}
.dcard__line {
  color: var(--text-3);
}
.dcard .arrow-link {
  margin-top: 12px;
}

/* ---------- Final CTA + footer ---------- */
.final {
  position: relative;
  overflow: hidden;
  text-align: center;
  background: radial-gradient(120% 140% at 50% 100%, var(--overlay-1), transparent 70%);
}
.final--rule {
  border-top: 1px solid var(--border);
}
.final__in {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding-block: 144px;
}
.final .ctas {
  justify-content: center;
}
.footer {
  border-top: 1px solid var(--border);
}
.footer__in {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding-block: 32px;
}
.footer__copy {
  justify-self: start;
  font-size: 13px;
  color: var(--text-4);
}
.footer__links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--text-2);
}
.footer .prefs {
  justify-self: end;
}
.footer__links a:hover {
  color: var(--text-1);
}
.prefs {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
}
.prefs__item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  color: var(--text-4);
}
.prefs__item .icon {
  width: 14px;
  height: 14px;
}
.prefs__item select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: none;
  padding: 0 18px 0 0;
  font-weight: 500;
  font-size: 12px;
  color: var(--text-3);
  cursor: pointer;
}
.prefs__item .chev {
  position: absolute;
  right: 12px;
  width: 12px;
  height: 12px;
  pointer-events: none;
}
.prefs__div {
  width: 1px;
  height: 14px;
  background: var(--border);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  color: var(--text-2);
}
.pill .icon {
  width: 14px;
  height: 14px;
}
/* ---------- Reveal ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 60ms);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}
.is-paused,
.is-paused * {
  animation-play-state: paused !important;
}


/* ====================================================================
   routr.io — everything below is Routr-specific. The rules above are the
   fonoster.com foundations (tokens, nav, atmosphere, numbers, pipeline,
   code windows, deploy cards, final CTA, footer, reveal).
   ==================================================================== */

/* ---------- Routr tokens: teal accent on the shared dark system ---------- */
:root {
  --accent: #5fcfce;
  --on-accent: #001a1a;
  --accent-text: #5fcfce;
  --accent-subtle: #0b3d3d;
  --success: #39e19e;
  --warning: #f5a524;
  --danger: #f97066;
}
:root[data-theme="light"] {
  --accent-text: #1f8f8e;
  --accent-subtle: #ddf7f7;
  --success: #008751;
  --warning: #b45309;
  --danger: #d92d20;
}

/* ---------- Logo (inline SVG, follows the theme) ---------- */
.logo svg {
  width: 106px;
  height: 28px;
  display: block;
}
.logo .logo__text {
  fill: var(--text-1);
}
.logo .logo__dot {
  fill: var(--accent);
}
.fonoster-logo {
  height: 32px;
  width: auto;
}
.fonoster-logo--light,
:root[data-theme="light"] .fonoster-logo--dark {
  display: none;
}
:root[data-theme="light"] .fonoster-logo--light {
  display: block;
}

/* ---------- Section header (eyebrow + title + sub) ---------- */
.sec-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.sec-head .t-sub {
  max-width: 760px;
  line-height: 1.5;
}

/* ---------- Windows: shared bits for the trace, hop, and failover boards ---------- */
.board {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
  box-shadow: var(--shadow);
  font: 400 13px/1.6 var(--mono);
}
.chip-node {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-1);
  font: 500 12px/1.3 var(--mono);
  white-space: nowrap;
  transition: background-color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out),
    color var(--dur-2) var(--ease-out);
}
.chip-node small {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-4);
}
.chip-node.is-on,
.chip-node.is-fixed {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--accent-text);
}
.chip-link {
  flex: 1;
  min-width: 16px;
  height: 2px;
  background: var(--overlay-2);
  transition: background-color var(--dur-2) var(--ease-out);
}
.chip-link.is-on {
  background: var(--accent);
}
.log {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.log__row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  white-space: pre;
}
.log__t {
  color: var(--code-ln);
}
.log__dir {
  width: 1ch;
  color: var(--text-4);
}
.log__dir--in {
  color: var(--accent-text);
}
.log__row b {
  font-weight: 500;
  color: var(--text-1);
}
.log__row span {
  color: var(--text-3);
}
.log__row.ok b {
  color: var(--success);
}
.log__row.bad b,
.log__row.bad span {
  color: var(--danger);
}
.js .log--anim .log__row {
  opacity: 0;
  transform: translate3d(0, 4px, 0);
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
}
.js .log--anim .log__row.is-shown {
  opacity: 1;
  transform: none;
}

/* ---------- Hero: SIP trace ---------- */
.hero__in {
  align-items: center;
}
.trace {
  width: 560px;
  flex-shrink: 0;
  position: relative;
}
.trace__glow {
  position: absolute;
  inset: -40px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.07), transparent 65%);
  pointer-events: none;
}
.trace .board {
  position: relative;
}
.trace__path {
  display: flex;
  align-items: center;
  padding: 24px 28px 8px;
}
.trace__log {
  padding: 12px 28px 24px;
}

/* ---------- Fonoster band ---------- */
.engine__row {
  display: grid;
  grid-template-columns: 1fr 411px;
  gap: 24px;
  margin-top: 48px;
}
.ecard {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-raised);
}
.ecard--side {
  gap: 20px;
  background: var(--surface);
}
.ecard__line {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.45;
}
.ecard__title {
  font-weight: 600;
  font-size: 20px;
}
.ecard__text {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-3);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chips span {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font: 400 13px var(--mono);
  color: var(--text-3);
}
.list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  color: var(--text-3);
}
.list li {
  display: flex;
  align-items: center;
  gap: 12px;
}
.list .icon {
  width: 18px;
  height: 18px;
  color: var(--text-3);
}

/* ---------- Architecture ---------- */
.arch .pipe__flow {
  margin-top: 56px;
}
.arch .step {
  height: 256px;
}
.arch .step__name {
  font-size: 24px;
}
.arch .step__vendors {
  font-size: 13px;
}
.services {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 56px;
}
.services__label {
  margin-right: 12px;
  font: 500 12px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-4);
}
.svc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
}
.svc .icon {
  color: var(--text-3);
}

/* ---------- Split sections (Connect, Resilience, Programmable) ---------- */
.split--rev .split__copy {
  order: 2;
}
.section--band {
  background: var(--surface);
  border-block: 1px solid var(--border);
}
.points {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}
.points li {
  display: flex;
  align-items: center;
  gap: 12px;
}
.points .icon {
  width: 18px;
  height: 18px;
  color: var(--accent-text);
}

/* ---------- Scale: hop board + distribution cards ---------- */
.hop {
  margin-top: 56px;
  padding: 28px 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.hop__path {
  display: flex;
  align-items: center;
}
.hop .chip-node {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
}
.hop .log__hop {
  width: 230px;
  flex-shrink: 0;
  font-weight: 500;
  color: var(--text-1);
}
.hop .log__row.ok .log__hop {
  color: var(--success);
}
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: border-color var(--dur-2) var(--ease-out);
}
.card:hover {
  border-color: var(--hl-border);
}
.card > .icon {
  width: 24px;
  height: 24px;
}
.card__title {
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
}
.card__line {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-3);
}

/* ---------- Resilience: failover board ---------- */
.fail {
  flex: 1;
  min-width: 0;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.fail__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  color: var(--text-1);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--success);
  transition: color var(--dur-2) var(--ease-out);
}
.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.status.is-degraded {
  color: var(--warning);
}
.fail__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.stat__v {
  font: 600 24px/1.2 var(--font);
  letter-spacing: -0.02em;
  color: var(--text-1);
}
.stat__v.ok {
  color: var(--success);
}
.stat__l {
  font-size: 11px;
  color: var(--text-4);
}
.fail__rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.frow {
  display: flex;
  align-items: center;
  gap: 12px;
}
.frow__name {
  width: 110px;
  color: var(--text-3);
}
.frow__dots {
  display: flex;
  gap: 6px;
  width: 60px;
}
.frow__dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  transition: background-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.frow__dots i.is-down {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--danger);
}
.frow__note {
  font-size: 12px;
  color: var(--text-4);
}
.frow--hi .frow__note {
  color: var(--text-1);
}
.fail__events {
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}
.fail__events .log__hop {
  width: 100px;
  flex-shrink: 0;
  font-weight: 500;
  color: var(--text-1);
}
.fail__events .log__row.bad .log__hop,
.fail__events .log__row.bad span {
  color: var(--danger);
}
.fail__events .log__row.ok .log__hop,
.fail__events .log__row.ok span {
  color: var(--success);
}

.deploy__grid,
.links-2,
.cards-3,
.quotes {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.links-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.dcard,
.card,
.quote {
  min-width: 0;
}
.dcard .arrow-link.mono {
  font-size: 13px;
  text-align: left;
}

/* ---------- Community ---------- */
.quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.quote {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 20px;
}
.quote > .icon {
  width: 20px;
  height: 20px;
  color: var(--text-4);
}
.quote p {
  flex: 1;
  font-size: 17px;
  line-height: 1.5;
}
.quote__who {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.quote__who b {
  font-weight: 500;
  font-size: 14px;
}
.quote__who span {
  font-size: 13px;
  color: var(--text-3);
}
.links-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}
.links-2 .dcard {
  gap: 12px;
}
.links-2 .dcard > .icon {
  width: 28px;
  height: 28px;
}
.links-2 .dcard__name {
  font-size: 24px;
}

/* ---------- 404 ---------- */
.nf {
  position: relative;
  overflow: hidden;
}
.nf__in {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  padding-block: 96px;
}
.nf h1 {
  font-weight: 600;
  font-size: clamp(36px, 4.5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.031em;
}
.nf .dots__wave {
  animation: wave-slow 12s var(--ease-in-out) 0.8s infinite;
}

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  :root {
    --pad: 40px;
    --section: 104px;
  }
  .hero__in {
    gap: 32px;
  }
  .trace {
    width: 480px;
  }
  .split {
    gap: 48px;
  }
  .split__copy {
    width: 380px;
  }
  .num {
    padding-inline: 28px;
  }
  .num__value {
    font-size: 60px;
  }
  .engine__row {
    grid-template-columns: 1fr 360px;
  }
  .hop .log__hop {
    width: 200px;
  }
}

@media (max-width: 960px) {
  .hero__in,
  .split {
    flex-direction: column;
    align-items: stretch;
  }
  .split--rev .split__copy {
    order: 0;
  }
  .trace {
    width: 100%;
    max-width: 560px;
    margin: 8px auto 0;
  }
  .split__copy {
    width: 100%;
  }
  .engine__row,
  .cards-3,
  .quotes,
  .links-2,
  .deploy__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .pipe__flow {
    flex-direction: column;
    align-items: stretch;
  }
  .arch .step,
  .step {
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 20px;
  }
  .arch .step__name,
  .step__name {
    font-size: 18px;
  }
  .step__vendors {
    font-size: 12px;
  }
  .plink {
    width: 2px;
    height: 24px;
    margin-left: 47px;
  }
  .plink::before {
    width: 2px;
    height: 100%;
    flex: none;
  }
  .plink i,
  .plink::after {
    display: none;
  }
  .hop__path {
    flex-wrap: wrap;
    gap: 8px;
  }
  .hop .chip-link {
    min-width: 24px;
  }
  .hop .log__row {
    flex-direction: column;
    gap: 0;
    white-space: normal;
  }
  .hop .log__hop {
    width: auto;
  }
  .fail__stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --pad: 24px;
    --section: 72px;
  }
  .br-m {
    display: inline;
  }
  .show-m {
    display: block;
  }
  .hide-m,
  .show-d {
    display: none;
  }
  .nav__in {
    height: 60px;
  }
  .nav__links,
  .nav__actions .btn {
    display: none;
  }
  .nav__menu {
    display: grid;
  }
  .gh-chip {
    border: 0;
    padding: 0;
    gap: 6px;
    font-size: 13px;
  }
  .gh-chip .i-github {
    display: none;
  }
  .hero__in {
    padding-block: 48px 56px;
    gap: 24px;
  }
  .hero__copy {
    gap: 24px;
  }
  .badge {
    font-size: 12px;
    padding: 6px 12px;
  }
  .ctas {
    flex-direction: column;
    width: 100%;
  }
  .ctas .btn {
    width: 100%;
  }
  .board {
    font-size: 11px;
  }
  .trace__path {
    flex-wrap: wrap;
    gap: 8px 0;
    padding: 18px 20px 6px;
  }
  .trace__path .chip-link {
    min-width: 22px;
    flex: 0 0 22px;
  }
  .trace__log,
  .hop {
    padding: 10px 20px 20px;
  }
  .hop {
    gap: 16px;
    margin-top: 32px;
  }
  .hop .chip-node {
    padding: 7px 9px;
    font-size: 11px;
  }
  .hop .chip-node small {
    display: none;
  }
  .log__row {
    gap: 10px;
  }
  .numbers .container {
    padding: 0;
  }
  .numbers__grid {
    grid-template-columns: 1fr 1fr;
  }
  .num,
  .num:first-child {
    padding: 32px 24px;
  }
  .num:nth-child(odd) {
    border-left: 0;
  }
  .num:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }
  .num__value {
    font-size: 40px;
  }
  .num__label {
    font-size: 13px;
  }
  .engine__row {
    margin-top: 24px;
    gap: 16px;
  }
  .ecard {
    padding: 24px;
    gap: 16px;
    border-radius: 16px;
  }
  .ecard__line {
    font-size: 16px;
  }
  .ecard__title {
    font-size: 17px;
  }
  .ecard__text,
  .list {
    font-size: 14px;
  }
  .arch .pipe__flow {
    margin-top: 24px;
  }
  .services {
    margin-top: 24px;
    flex-direction: column;
    align-items: flex-start;
  }
  .services__label {
    font-size: 11px;
  }
  .svc {
    padding: 9px 14px;
    font-size: 13px;
  }
  .split__copy .t-sub {
    font-size: 15px;
  }
  .code {
    padding: 18px 16px;
    font-size: 11px;
  }
  .code .l::before {
    display: none;
  }
  .term {
    padding: 14px 16px;
    font-size: 11px;
  }
  .cards-3 {
    margin-top: 24px;
    gap: 12px;
  }
  .card {
    padding: 24px;
    gap: 10px;
    border-radius: 16px;
  }
  .card__title {
    font-size: 18px;
  }
  .card__line {
    font-size: 14px;
  }
  .points {
    font-size: 14px;
  }
  .fail {
    padding: 20px;
    gap: 14px;
  }
  .fail__stats {
    gap: 10px;
  }
  .stat__v {
    font-size: 20px;
  }
  .frow__name {
    width: 84px;
  }
  .frow__dots {
    width: 44px;
  }
  .fail__events {
    font-size: 11px;
  }
  .fail__events .log__row {
    flex-wrap: wrap;
    gap: 0 8px;
    white-space: normal;
  }
  .fail__events .log__hop {
    width: auto;
  }
  .hop .log__t {
    display: none;
  }
  .dcard {
    padding: 24px;
    gap: 10px;
  }
  .dcard .arrow-link.mono {
    font-size: 12px;
  }
  .dcard__name {
    font-size: 20px;
  }
  .quotes {
    margin-top: 24px;
    gap: 12px;
  }
  .quote {
    padding: 24px;
    gap: 14px;
    border-radius: 16px;
  }
  .quote p {
    font-size: 15px;
  }
  .links-2 {
    gap: 12px;
    margin-top: 12px;
  }
  .links-2 .dcard__name {
    font-size: 20px;
  }
  .final__in {
    padding-block: 88px;
    gap: 28px;
  }
  .final .t-h1 {
    font-size: 34px;
  }
  .t-sub {
    font-size: 16px;
  }
  .footer__in {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .footer__links {
    gap: 24px;
  }
  .footer__copy {
    order: 4;
  }
  .nf__in {
    padding-block: 48px 64px;
    gap: 16px;
  }
  .dots,
  .dots__wave {
    background-size: 24px 24px;
  }
}

/* ---------- Reduced motion: final states, no loops ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 1ms !important;
    transition-delay: 0s !important;
  }
}
