:root {
  --ink: #121319;
  --ink-soft: #5f6272;
  --indigo: #000049;
  --indigo-hover: #3131a3;
  --accent: #4a4af4;
  --blue-wash: #ccd6ff;
  --aqua: #a9dff8;
  --page: #f8f8fa;
  --surface: #ffffff;
  --inset: #edeef2;
  --border: #dddee2;
  --success: #007832;
  --font-display: "SF Pro Display", "Avenir Next", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shell: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

svg {
  display: block;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 18px;
  color: white;
  background: var(--indigo);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(calc(100% - 32px), var(--shell));
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgb(248 248 250 / 92%);
  backdrop-filter: blur(16px);
}

.nav {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--indigo);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-decoration: none;
}

.wordmark svg {
  width: 30px;
  height: 30px;
  overflow: visible;
}

.wordmark path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wordmark circle {
  fill: var(--page);
  stroke: var(--accent);
  stroke-width: 2;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.nav-links a:not(.nav-github):hover {
  color: var(--accent);
}

.nav-github {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border: 1.5px solid var(--indigo);
  border-radius: 24px;
  color: var(--indigo) !important;
}

.nav-github:hover {
  color: var(--accent) !important;
  border-color: var(--accent);
}

.nav-github svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.hero {
  min-height: 710px;
  display: grid;
  grid-template-columns: minmax(0, 0.93fr) minmax(500px, 1.07fr);
  align-items: center;
  gap: 64px;
  padding-block: 72px 88px;
}

.hero-copy {
  align-self: center;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.eyebrow > span {
  width: 24px;
  height: 2px;
  background: var(--accent);
}

.eyebrow.light {
  color: #b9bbca;
}

.eyebrow.light > span {
  background: #8396ff;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(54px, 6vw, 82px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -3.5px;
}

h1 em {
  color: var(--accent);
  font-style: normal;
}

.hero .eyebrow {
  margin-bottom: 28px;
}

.hero-lede {
  max-width: 540px;
  margin-bottom: 32px;
  color: var(--ink-soft);
  font-size: 20px;
  line-height: 1.55;
}

.hero-actions,
.cta-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.install-command {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px 5px 20px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
}

.install-command code {
  color: var(--indigo);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
}

.copy-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border: 0;
  border-radius: 20px;
  color: white;
  background: var(--indigo);
  cursor: pointer;
}

.copy-button:hover {
  background: var(--indigo-hover);
}

.copy-button svg,
.icon-copy svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.button-secondary,
.button-primary {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 26px;
  font-size: 16px;
  font-weight: 650;
  text-decoration: none;
}

.button-secondary {
  border: 1.5px solid var(--indigo);
  color: var(--indigo);
  background: transparent;
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.button-primary {
  border: 1.5px solid var(--indigo);
  color: #f7f7f8;
  background: var(--indigo);
}

.button-primary:hover {
  border-color: var(--indigo-hover);
  background: var(--indigo-hover);
}

.button-primary svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.hero-meta {
  display: flex;
  gap: 20px;
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.hero-meta span + span {
  position: relative;
}

.hero-meta span + span::before {
  position: absolute;
  top: 50%;
  left: -11px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #b1b1be;
  content: "";
  transform: translateY(-50%);
}

.chart-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 8px;
}

.chart-label {
  margin-bottom: 4px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.chart-header h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.3px;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 16px;
  color: var(--success);
  background: #e4f7e8;
  font-size: 12px;
  font-weight: 700;
}

.live-badge span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgb(0 120 50 / 20%);
  }
  50% {
    box-shadow: 0 0 0 5px rgb(0 120 50 / 0%);
  }
}

.chart-wrap {
  padding: 0 16px;
}

.calibration-chart {
  width: 100%;
  height: auto;
}

.grid path {
  fill: none;
  stroke: #e7e7ec;
  stroke-width: 1;
}

.grid path:first-child {
  stroke: #9ea0ad;
}

.ideal-line {
  fill: none;
  stroke: #b1b1be;
  stroke-width: 1.5;
  stroke-dasharray: 6 7;
}

.spline-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
  stroke-linecap: round;
  transition: d 400ms ease;
}

.observations circle {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 3;
}

.axis-labels text {
  fill: #777987;
  font-family: var(--font-body);
  font-size: 11px;
}

.chart-controls {
  padding: 12px 24px 24px;
}

.chart-controls label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
}

.chart-controls label span {
  color: var(--ink-soft);
}

.chart-controls label strong {
  color: var(--indigo);
}

input[type="range"] {
  width: 100%;
  height: 4px;
  margin: 6px 0 18px;
  border-radius: 2px;
  appearance: none;
  background: linear-gradient(to right, var(--accent) 37.5%, var(--inset) 37.5%);
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  border: 4px solid var(--surface);
  border-radius: 50%;
  appearance: none;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.legend {
  display: flex;
  gap: 22px;
  color: var(--ink-soft);
  font-size: 11px;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.legend i {
  width: 20px;
  height: 2px;
}

.legend-spline {
  background: var(--accent);
}

.legend-ideal {
  border-top: 2px dashed #b1b1be;
}

.signal-strip {
  color: white;
  background: var(--indigo);
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.signal-grid > div {
  min-height: 132px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 36px 28px;
  border-left: 1px solid rgb(255 255 255 / 18%);
}

.signal-grid > div:last-child {
  border-right: 1px solid rgb(255 255 255 / 18%);
}

.signal-grid strong {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -1px;
}

.signal-grid span {
  color: #c7c8d3;
  font-size: 13px;
}

.section {
  padding-block: 128px;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 56px;
}

.section-heading .eyebrow,
.final-cta .eyebrow {
  margin-bottom: 24px;
}

.section-heading h2,
.final-cta h2,
.code-copy h2 {
  margin-bottom: 20px;
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -2px;
}

.section-heading > p {
  max-width: 680px;
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1.6;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  min-height: 370px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.feature-card-wide {
  min-height: 330px;
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 60px minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  align-items: center;
  gap: 24px;
  background: var(--blue-wash);
}

.feature-number {
  align-self: flex-start;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.feature-card h3 {
  margin-bottom: 12px;
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -0.7px;
}

.feature-card p {
  max-width: 500px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.6;
}

.feature-card:not(.feature-card-wide) h3 {
  margin-top: 48px;
}

.mini-chart {
  align-self: stretch;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgb(255 255 255 / 55%);
}

.mini-chart svg {
  width: 100%;
  height: 100%;
}

.mini-grid {
  fill: none;
  stroke: rgb(0 0 73 / 12%);
  stroke-width: 1;
}

.mini-line {
  fill: none;
  stroke: var(--indigo);
  stroke-width: 4;
  stroke-linecap: round;
}

.mini-chart circle {
  fill: var(--blue-wash);
  stroke: var(--indigo);
  stroke-width: 2;
}

.method-pills {
  display: flex;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}

.method-pills span {
  padding: 8px 12px;
  border-radius: 16px;
  color: var(--indigo);
  background: var(--inset);
  font-family: var(--font-mono);
  font-size: 12px;
}

.dark-card {
  border-color: var(--ink);
  color: white;
  background: var(--ink);
}

.dark-card .feature-number {
  color: #8396ff;
}

.dark-card p {
  color: #c7c8d3;
}

.control-lines {
  display: grid;
  gap: 13px;
  margin-top: auto;
}

.control-lines span {
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: #3b3c45;
}

.control-lines span::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--line-width);
  border-radius: inherit;
  background: #8396ff;
  content: "";
}

.code-section {
  padding-block: 128px;
  color: white;
  background: var(--ink);
}

.code-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  align-items: center;
  gap: 96px;
}

.code-copy p {
  color: #b9bbca;
  font-size: 18px;
  line-height: 1.6;
}

.code-copy .eyebrow {
  margin-bottom: 24px;
}

.steps {
  display: grid;
  gap: 20px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  align-items: center;
  gap: 14px;
}

.steps li > span {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid #4e505a;
  border-radius: 50%;
  color: #aab5ff;
  font-family: var(--font-mono);
  font-size: 12px;
}

.steps div {
  display: flex;
  flex-direction: column;
}

.steps strong {
  font-size: 15px;
}

.steps small {
  color: #9698a5;
  font-size: 13px;
}

.code-window {
  overflow: hidden;
  border: 1px solid #3b3c45;
  border-radius: var(--radius-md);
  background: #191a21;
}

.window-bar {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  border-bottom: 1px solid #353743;
}

.window-bar > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #5b5d68;
}

.window-bar p {
  margin: 0 auto;
  color: #9698a5;
  font-family: var(--font-mono);
  font-size: 12px;
  transform: translateX(23px);
}

.icon-copy {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 17px;
  color: #b9bbca;
  background: transparent;
  cursor: pointer;
}

.icon-copy:hover {
  color: white;
  background: #2d3039;
}

.code-window pre {
  margin: 0;
  padding: 30px;
  overflow-x: auto;
  color: #e7e7ec;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.9;
  tab-size: 2;
}

.syntax-purple {
  color: #aab5ff;
}

.syntax-number {
  color: #8bd89d;
}

.syntax-string {
  color: #92d6f0;
}

.code-output {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px 30px;
  border-top: 1px solid #353743;
  background: #14151a;
}

.code-output span {
  padding: 4px 8px;
  border-radius: 10px;
  color: #8bd89d;
  background: rgb(89 177 109 / 14%);
  font-family: var(--font-mono);
  font-size: 10px;
}

.code-output code {
  color: #b9bbca;
  font-family: var(--font-mono);
  font-size: 12px;
}

.final-cta {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: end;
  gap: 80px;
}

.final-cta h2 {
  margin-bottom: 0;
}

.cta-copy p {
  margin-bottom: 28px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.6;
}

.text-link {
  color: var(--indigo);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.text-link:hover {
  color: var(--accent);
}

.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  min-height: 160px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
}

.footer-wordmark {
  justify-self: start;
}

.footer-wordmark circle {
  fill: var(--surface);
}

.footer-inner p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.footer-links {
  display: flex;
  justify-self: end;
  gap: 24px;
}

.footer-links a {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-links a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 3px solid rgb(74 74 244 / 35%);
  outline-offset: 3px;
}

@media (max-width: 1020px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .hero-copy {
    max-width: 700px;
  }

  .chart-card {
    max-width: 680px;
  }

  .signal-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .signal-grid > div:nth-child(2) {
    border-right: 1px solid rgb(255 255 255 / 18%);
  }

  .feature-card-wide {
    grid-template-columns: 48px 1fr;
  }

  .feature-card-wide .mini-chart {
    grid-column: 1 / -1;
    min-height: 210px;
  }

  .code-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .code-copy {
    max-width: 700px;
  }

  .final-cta {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 40px;
  }

  .cta-copy {
    max-width: 620px;
  }
}

@media (max-width: 720px) {
  .nav {
    min-height: 68px;
  }

  .nav-links > a:not(.nav-github) {
    display: none;
  }

  .nav-links {
    gap: 0;
  }

  .hero {
    min-height: auto;
    padding-block: 64px 72px;
  }

  h1 {
    font-size: clamp(48px, 15vw, 66px);
    letter-spacing: -2.5px;
  }

  .hero-lede {
    font-size: 18px;
  }

  .hero-actions,
  .install-command,
  .button-secondary {
    width: 100%;
  }

  .install-command {
    justify-content: space-between;
  }

  .hero-meta {
    gap: 16px;
    flex-wrap: wrap;
  }

  .chart-header {
    align-items: flex-start;
  }

  .live-badge {
    padding: 5px 8px;
  }

  .chart-wrap {
    padding: 0 2px;
  }

  .legend {
    flex-direction: column;
    gap: 6px;
  }

  .signal-grid {
    grid-template-columns: 1fr;
  }

  .signal-grid > div {
    min-height: 92px;
    padding: 24px 20px;
    border-right: 1px solid rgb(255 255 255 / 18%);
    border-bottom: 1px solid rgb(255 255 255 / 18%);
  }

  .signal-grid > div:last-child {
    border-bottom: 0;
  }

  .section,
  .code-section {
    padding-block: 88px;
  }

  .section-heading h2,
  .final-cta h2,
  .code-copy h2 {
    font-size: 40px;
    letter-spacing: -1.5px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card-wide {
    display: flex;
  }

  .feature-card {
    min-height: 330px;
    padding: 24px;
  }

  .feature-card-wide .mini-chart {
    width: 100%;
    min-height: 180px;
    margin-top: auto;
  }

  .code-window pre {
    padding: 24px 20px;
    font-size: 12px;
  }

  .code-output {
    padding-inline: 20px;
    overflow-x: auto;
  }

  .cta-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-block: 40px;
  }

  .footer-links {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
