@font-face {
  font-family: "Inter Tight";
  src: url("fonts/of-inter-tight-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/of-inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --field: #151513;
  --lime: #faff69;
  --grey: #414141;
  --panel: #1c1c19;
  --panel-2: #242420;
  --ink: #f4f4ef;
  --rule: rgba(244, 244, 239, 0.12);
  --muted: rgba(244, 244, 239, 0.52);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(72% 58% at 16% 54%, rgba(250, 255, 105, 0.05), transparent 68%),
    var(--field);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

.stage {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: clamp(8px, 1.5vh, 18px);
  padding: clamp(18px, 2.6vh, 34px) clamp(18px, 3.4vw, 56px) clamp(16px, 2.4vh, 28px);
}

.claim {
  display: flex;
  align-items: center;
  gap: 10px;
}

.claim p {
  margin: 0;
  font-size: clamp(10.5px, 0.92vw, 13px);
  letter-spacing: 0.015em;
  color: var(--muted);
  max-width: 46ch;
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  gap: clamp(4px, 1vh, 12px);
  padding-bottom: clamp(2px, 0.8vh, 10px);
}

.scope {
  position: relative;
  width: 100%;
  height: clamp(56px, 12vh, 112px);
  margin-bottom: clamp(10px, 1.8vh, 24px);
  border-bottom: 1px solid var(--rule);
  background-image:
    repeating-linear-gradient(to right, var(--rule) 0 1px, transparent 1px 10%),
    repeating-linear-gradient(to bottom, var(--rule) 0 1px, transparent 1px 25%);
}

.scope svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.curve {
  fill: none;
  stroke: var(--lime);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  animation: fade 0.8s ease-out 0.15s forwards;
}

.area {
  fill: var(--lime);
  fill-opacity: 0.06;
  opacity: 0;
  animation: fade 0.9s ease-out 0.35s forwards;
}

@keyframes fade {
  to {
    opacity: 1;
  }
}

.needle,
.pip {
  position: absolute;
  left: var(--nx, 50%);
  pointer-events: none;
}

.needle {
  top: -4px;
  bottom: 0;
  width: 1px;
  background: rgba(250, 255, 105, 0.25);
  transform: translateX(-0.5px);
}

.pip {
  top: var(--ny, 50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 0 3px rgba(250, 255, 105, 0.13),
    0 0 14px rgba(250, 255, 105, 0.6);
}

.value {
  display: flex;
  align-items: baseline;
  gap: clamp(10px, 1.4vw, 22px);
}

.digits {
  display: block;
  font-family: "Inter Tight", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(3.4rem, 23.5vw, 21rem);
  line-height: 0.8;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  color: var(--lime);
  white-space: nowrap;
}

.unit {
  padding-bottom: 0.7em;
  font-size: clamp(10px, 1.05vw, 14px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.cost {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-size: clamp(11.5px, 1.05vw, 14px);
  letter-spacing: 0.01em;
}

.cost span:first-child {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.cost-note {
  color: var(--muted);
  letter-spacing: 0.02em;
}

.console {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 4.5vw, 72px);
  padding-top: clamp(10px, 1.8vh, 20px);
  border-top: 1px solid var(--rule);
}

.fader {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.head label {
  font-size: clamp(10px, 0.82vw, 11.5px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.head output {
  font-family: "Inter Tight", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(15px, 1.5vw, 21px);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.fader input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: ew-resize;
  --p: 50%;
}

.fader input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(
    to right,
    var(--lime) 0 var(--p),
    var(--grey) var(--p) 100%
  );
}

.fader input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 32px;
  margin-top: -15px;
  border: 0;
  border-radius: 2px;
  background-color: var(--lime);
  background-image: linear-gradient(var(--field), var(--field));
  background-size: 2px 12px;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 0 0 4px var(--field);
  transition: box-shadow 0.15s ease;
}

.fader input[type="range"]:hover::-webkit-slider-thumb,
.fader input[type="range"]:active::-webkit-slider-thumb {
  box-shadow:
    0 0 0 4px var(--field),
    0 0 0 5px rgba(250, 255, 105, 0.45);
}

.fader input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow:
    0 0 0 4px var(--field),
    0 0 0 6px var(--lime);
}

.fader input[type="range"]::-moz-range-track {
  height: 2px;
  border-radius: 1px;
  background: var(--grey);
}

.fader input[type="range"]::-moz-range-progress {
  height: 2px;
  border-radius: 1px;
  background: var(--lime);
}

.fader input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 32px;
  border: 0;
  border-radius: 2px;
  background-color: var(--lime);
  background-image: linear-gradient(var(--field), var(--field));
  background-size: 2px 12px;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 0 0 4px var(--field);
}

.fader input[type="range"]:focus-visible::-moz-range-thumb {
  box-shadow:
    0 0 0 4px var(--field),
    0 0 0 6px var(--lime);
}

.ticks {
  height: 5px;
  margin-top: -2px;
  background-image: repeating-linear-gradient(
    to right,
    rgba(244, 244, 239, 0.26) 0 1px,
    transparent 1px 12.5%
  );
}

.foot a {
  color: var(--ink);
  font-size: clamp(11px, 1vw, 13px);
  letter-spacing: 0.04em;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--grey);
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}

.foot a:hover {
  color: var(--lime);
  border-color: var(--lime);
}

.foot a:focus-visible {
  outline: 1px solid var(--lime);
  outline-offset: 4px;
}

@media (min-width: 641px) {
  .hero {
    justify-content: flex-end;
    padding-bottom: clamp(16px, 3vh, 34px);
  }
}

@media (max-width: 640px) {
  .stage {
    gap: 10px;
  }

  .console {
    grid-template-columns: 1fr;
    gap: clamp(8px, 1.8vh, 16px);
  }

  .scope {
    height: 64px;
    margin-bottom: 14px;
  }

  .value {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .digits {
    font-size: clamp(3.6rem, 28vw, 10rem);
  }

  .unit {
    padding-bottom: 0;
    margin-top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .curve,
  .area {
    animation: none;
    opacity: 1;
  }

  .fader input[type="range"]::-webkit-slider-thumb,
  .foot a {
    transition: none;
  }
}
