@font-face {
  font-family: "Open Runde";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/OpenRunde-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Open Runde";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/OpenRunde-Medium.woff2") format("woff2");
}

@font-face {
  font-family: "Open Runde";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/OpenRunde-Semibold.woff2") format("woff2");
}

@font-face {
  font-family: "Open Runde";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/OpenRunde-Bold.woff2") format("woff2");
}

:root {
  --header-height: 72px;
  --font-sans: "Open Runde", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;
  --font-display: "Open Runde", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;
  --paper: #f7f5ef;
  --paper-soft: #fffdfa;
  --ink: #171717;
  --muted: #625e56;
  --line: #d8d0c2;
  --red: #96312f;
  --blue: #2d5d7b;
  --green: #5f7b45;
  --amber: #b7792f;
  --card-title: #171717;
  --card-muted: #625e56;
  --coral: #f0905f;
  --sage: #93b86e;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  background:
    radial-gradient(120% 90% at 50% 8%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 55%),
    radial-gradient(80% 60% at 72% 78%, rgba(150, 49, 47, 0.05) 0%, rgba(150, 49, 47, 0) 60%),
    linear-gradient(rgba(23, 23, 23, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 23, 0.022) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 100%, 100% 100%, 52px 52px, 52px 52px;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

h1,
p {
  margin-top: 0;
}

.site-header {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 0 44px;
  border-bottom: 1px solid rgba(23, 23, 23, 0.06);
  background: rgba(247, 245, 239, 0.72);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -0.01em;
}

.header-links {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.header-links a,
.site-footer a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 160ms ease;
}

.header-links a:hover,
.site-footer a:hover {
  color: var(--red);
}

.machine-page {
  display: flex;
  flex-direction: column;
  gap: 88px;
  padding: 112px 40px 96px;
}

.machine-stage {
  display: grid;
  gap: 24px;
  width: min(1480px, 100%);
  margin: 0 auto;
}

.stage-improve {
  min-height: calc(100svh - 208px);
  align-content: center;
}

.stage-hero {
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.28fr);
  gap: 56px;
  align-items: center;
  min-height: calc(100svh - 208px);
}

.stage-hero .route-map {
  width: 100%;
}

.machine-copy {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  max-width: none;
}

.stage-hero .machine-copy {
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.stage-hero .machine-copy .hero-tagline {
  max-width: none;
  margin: 0;
  color: var(--red);
  font-size: clamp(20px, 1.6vw, 28px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.005em;
  text-align: left;
}

.stage-hero .machine-copy .hero-blurb {
  max-width: 48ch;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.15vw, 18px);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
  text-align: left;
}

.stage-improve .machine-copy {
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px 48px;
}

.stage-improve .machine-copy > p:last-child {
  max-width: 34ch;
  margin-bottom: 10px;
  font-size: clamp(18px, 1.5vw, 24px);
  text-align: right;
}

h1 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: clamp(72px, 8.5vw, 150px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.035em;
}

h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(44px, 5vw, 84px);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.machine-copy > p:last-child {
  max-width: 410px;
  margin-bottom: 6px;
  color: var(--red);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.005em;
  text-align: right;
}

.learn-machine {
  position: relative;
  padding: 0;
}

.route-map {
  display: block;
  width: min(820px, 100%);
  height: auto;
  margin: 0 auto;
  overflow: visible;
}

.route-line {
  fill: none;
  stroke-linecap: round;
  stroke-width: 3.4;
  stroke-dasharray: 2 16;
  animation: route-flow 1.5s linear infinite;
}

@keyframes route-flow {
  to {
    stroke-dashoffset: -54;
  }
}

.route-line-work {
  stroke: rgba(45, 93, 123, 0.5);
}

.route-line-private {
  stroke: rgba(95, 123, 69, 0.52);
  animation-delay: -0.4s;
}

.route-line-escalate {
  stroke: rgba(150, 49, 47, 0.55);
  animation-delay: -0.8s;
}

.route-line-signal {
  stroke: rgba(23, 23, 23, 0.4);
  animation-delay: -1.2s;
}

.route-line-private-signal,
.route-line-escalate-signal {
  stroke: rgba(183, 121, 47, 0.5);
  animation-delay: -1.6s;
}

.route-line-feedback {
  stroke: rgba(95, 123, 69, 0.5);
  animation-delay: -0.6s;
}

.route-dot {
  opacity: 0.9;
}

.route-dot-work {
  fill: rgba(45, 93, 123, 0.75);
  offset-path: path("M250 132 C418 118 454 230 518 298");
  offset-rotate: 0deg;
  animation: dot-flow 2.6s ease-in-out infinite;
  animation-delay: -0.6s;
}

.route-dot-private {
  fill: rgba(23, 23, 23, 0.78);
  offset-path: path("M505 376 C414 430 354 500 318 548");
  offset-rotate: 0deg;
  animation: dot-flow 2.6s ease-in-out infinite;
  animation-delay: -2.1s;
}

.route-dot-escalate {
  fill: rgba(23, 23, 23, 0.78);
  offset-path: path("M700 380 C800 430 852 472 826 508");
  offset-rotate: 0deg;
  animation: dot-flow 2.6s ease-in-out infinite;
}

.route-dot-signal {
  fill: rgba(23, 23, 23, 0.78);
  offset-path: path("M585 376 C602 492 607 584 594 666");
  offset-rotate: 0deg;
  animation: dot-flow 2.6s ease-in-out infinite;
  animation-delay: -1.3s;
}

.route-dot-model {
  fill: rgba(95, 123, 69, 0.82);
  offset-path: path("M440 700 C330 742 200 702 244 648");
  offset-rotate: 0deg;
  animation: dot-flow 2.6s ease-in-out infinite;
  animation-delay: -1.9s;
}

@keyframes dot-flow {
  0% {
    offset-distance: 0%;
    opacity: 0;
  }
  16% {
    opacity: 1;
  }
  84% {
    opacity: 1;
  }
  100% {
    offset-distance: 100%;
    opacity: 0;
  }
}

.route-box rect {
  rx: 18px;
  fill: var(--paper-soft);
  stroke-width: 2;
  filter: url(#routeShadow);
}

.route-box text {
  dominant-baseline: middle;
  fill: rgba(23, 23, 23, 0.82);
  font-family: var(--font-sans);
  font-size: 27px;
  font-weight: 760;
  letter-spacing: -0.01em;
  text-anchor: middle;
}

.route-box-work rect {
  stroke: rgba(45, 93, 123, 0.55);
}

.route-box-airbox rect {
  fill: url(#airboxFill);
  stroke: rgba(23, 23, 23, 0.2);
  filter: url(#airboxShadow);
}

.route-box-airbox text {
  fill: #ffffff;
  font-size: 30px;
  font-weight: 820;
  letter-spacing: 0.005em;
}

.route-box-private rect {
  stroke: rgba(95, 123, 69, 0.6);
}

.route-box-escalate rect {
  stroke: rgba(150, 49, 47, 0.62);
}

.route-box text.route-subtext {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  fill: rgba(23, 23, 23, 0.5);
}

.route-box-signal rect {
  stroke: rgba(183, 121, 47, 0.6);
}

.metric-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.metric-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid rgba(23, 23, 23, 0.08);
  border-radius: 22px;
  background: var(--paper-soft);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 30px 60px -44px rgba(23, 23, 23, 0.45);
}

.metric-panel {
  overflow: hidden;
  border: 1px solid rgba(23, 23, 23, 0.07);
  border-radius: 16px;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(23, 23, 23, 0.03) 0%, rgba(23, 23, 23, 0) 60%),
    rgba(23, 23, 23, 0.012);
}

.metric-svg {
  display: block;
  width: 100%;
  height: auto;
}

.metric-tag {
  align-self: flex-start;
  margin-top: 22px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(95, 123, 69, 0.14);
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.metric-title {
  margin: 16px 0 7px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--card-title);
}

.metric-desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.42;
  color: var(--card-muted);
}

.m-grid {
  stroke: rgba(23, 23, 23, 0.08);
  stroke-width: 1;
}

.m-line {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.m-coral {
  stroke: var(--coral);
}

.m-sage {
  stroke: var(--sage);
}

.m-white {
  fill: none;
  stroke: rgba(23, 23, 23, 0.5);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.m-dash {
  stroke-dasharray: 1 13;
}

.m-bar {
  stroke-width: 7;
  stroke-linecap: round;
}

.m-bar-sage {
  stroke: var(--sage);
}

.m-bar-coral {
  stroke: var(--coral);
}

.m-area-coral {
  fill: url(#areaCoral);
  stroke: none;
}

.m-area-sage {
  fill: url(#areaSage);
  stroke: none;
}

.m-dot {
  stroke: var(--paper-soft);
  stroke-width: 3;
}

.m-dot-coral {
  fill: var(--coral);
}

.m-dot-sage {
  fill: var(--sage);
}

.metric-gallery.js .metric-card {
  opacity: 0;
  transform: translateY(16px);
}

.metric-gallery.js.in-view .metric-card {
  animation: card-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.metric-gallery.js.in-view .metric-card:nth-child(2) {
  animation-delay: 0.1s;
}

.metric-gallery.js.in-view .metric-card:nth-child(3) {
  animation-delay: 0.2s;
}

@keyframes card-in {
  to {
    opacity: 1;
    transform: none;
  }
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 40px 24px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer span {
  color: var(--ink);
  font-weight: 750;
}

@media (max-width: 980px) {
  .site-header,
  .machine-page,
  .site-footer {
    padding-right: 28px;
    padding-left: 28px;
  }

  h1 {
    font-size: 72px;
  }

  h2 {
    font-size: 44px;
  }

  .stage-hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .machine-copy > p:last-child {
    font-size: 17px;
  }

  .route-box text {
    font-size: 27px;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: absolute;
    min-height: 64px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .header-links {
    gap: 12px;
  }

  .header-links a {
    font-size: 12px;
  }

  .machine-page {
    align-items: start;
    padding-top: 96px;
    padding-bottom: 42px;
  }

  .machine-stage {
    gap: 18px;
  }

  .machine-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  h1 {
    font-size: 58px;
  }

  h2 {
    font-size: 46px;
  }

  .stage-hero,
  .stage-improve {
    min-height: 0;
  }

  .stage-improve .machine-copy > p:last-child {
    text-align: left;
  }

  .metric-gallery {
    grid-template-columns: 1fr;
  }

  .machine-copy > p:last-child {
    max-width: 300px;
    font-size: 19px;
    text-align: left;
  }

  .route-map {
    width: min(560px, 100%);
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 24px;
  }
}

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