:root {
  color-scheme: light;
  --ink: #121212;
  --muted: #777773;
  --faint: #aaa9a3;
  --line: #dfdfda;
  --hero: #f3f3ef;
  --paper: #ffffff;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--hero);
  color: var(--ink);
  font-family: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  padding: 30px clamp(24px, 4vw, 64px);
  pointer-events: none;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 4vw, 54px);
  font-size: 13px;
  letter-spacing: -0.01em;
  pointer-events: auto;
}

.nav__item {
  position: relative;
  padding: 4px 0;
  text-decoration: none;
  white-space: nowrap;
}

.nav__item--active {
  font-weight: 650;
}

.nav__item--active::after {
  position: absolute;
  right: 0;
  bottom: -3px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 400ms var(--ease);
}

.nav__item--active:hover::after,
.nav__item--active:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav__item--disabled {
  color: #777773;
  cursor: default;
}

.hero {
  position: relative;
  height: 116vh;
  min-height: 720px;
}

.income {
  position: fixed;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: min(100%, 1200px);
  padding: 0 24px;
  text-align: center;
  transform: translate(-50%, -48%);
  transform-origin: center;
  will-change: opacity, transform;
}

.income__label,
.income__period {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.income__value {
  margin: 8px 0 13px;
  font-size: clamp(112px, 23vw, 330px);
  font-weight: 450;
  letter-spacing: -0.085em;
  line-height: 0.85;
}

.income__period {
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.scroll-cue {
  position: absolute;
  z-index: 2;
  bottom: 34px;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateX(-50%);
  transition: opacity 180ms linear;
}

.scroll-cue__line {
  width: 1px;
  height: 32px;
  overflow: hidden;
  background: var(--line);
}

.scroll-cue__line::after {
  display: block;
  width: 100%;
  height: 55%;
  background: var(--ink);
  content: "";
  animation: scroll-line 1.8s var(--ease) infinite;
}

@keyframes scroll-line {
  0% {
    transform: translateY(-140%);
  }
  55%,
  100% {
    transform: translateY(210%);
  }
}

.statistics {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.statistics__inner {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: clamp(52px, 7vw, 84px) clamp(24px, 4vw, 52px) 36px;
}

.stats-grid {
  display: grid;
  grid-auto-flow: dense;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.stat-card {
  min-height: 210px;
  padding: 28px 0 24px;
}

.stat-card--income,
.stat-card--goals {
  grid-column: span 6;
}

.stat-card--income {
  padding-right: clamp(24px, 3vw, 40px);
  border-right: 1px solid var(--line);
}

.stat-card--goals {
  padding-left: clamp(24px, 3vw, 40px);
}

.stat-card--chart {
  grid-column: span 12;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: center;
  gap: clamp(36px, 5vw, 72px);
  min-height: 230px;
  border-top: 1px solid var(--line);
}

.stat-card--x {
  grid-column: span 12;
  min-height: 300px;
  padding-top: 32px;
  padding-bottom: 30px;
  border-top: 1px solid var(--line);
}

.x-stat__numbers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(48px, 10vw, 140px);
  margin-top: 34px;
}

.x-stat__value {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0;
}

.x-stat__count {
  font-size: clamp(76px, 10vw, 132px);
  font-weight: 430;
  letter-spacing: -0.075em;
  line-height: 0.82;
}

.x-stat__label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
}

.stat-card--x .stat-card__note {
  margin-top: 32px;
  font-size: 12px;
}
.stat-card__topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.stat-card h3,
.stat-card__topline span {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
}

.stat-card__topline span {
  color: var(--muted);
  font-weight: 400;
}

.stat-card__value {
  margin: 42px 0 18px;
  font-size: clamp(38px, 4vw, 52px);
  font-weight: 450;
  letter-spacing: -0.045em;
  line-height: 1;
}

.stat-card__value span {
  color: var(--faint);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
}

.progress {
  position: relative;
  height: 1px;
  background: var(--line);
}

.progress span {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--progress);
  height: 1px;
  background: var(--ink);
}

.stat-card__note {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.goal-dots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.goal-dots span {
  height: 2px;
  background: var(--line);
}

.chart-copy .stat-card__value {
  margin-top: 42px;
}

.chart {
  align-self: center;
  padding-top: 16px;
}

.chart__plot {
  position: relative;
  height: 120px;
}

.chart__gridline {
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: #ededeb;
}

.chart__gridline--top {
  top: 0;
}

.chart__gridline--middle {
  top: 50%;
}

.chart__gridline--bottom {
  bottom: 0;
}

.chart svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 120px;
  overflow: visible;
}

.chart__line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.chart__labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--faint);
  font-size: 9px;
}

@media (max-width: 760px) {
  .site-header {
    padding: 24px 18px;
  }

  .nav {
    justify-content: space-between;
    gap: 12px;
    font-size: 11px;
  }

  .hero {
    min-height: 620px;
  }

  .income__value {
    font-size: clamp(108px, 43vw, 180px);
  }

  .stat-card--income,
  .stat-card--goals,
  .stat-card--x,
  .stat-card--chart {
    grid-column: span 12;
  }

  .stat-card--income {
    padding-right: 0;
    border-right: 0;
  }

  .stat-card--goals {
    padding-left: 0;
    border-top: 1px solid var(--line);
  }

  .stat-card--chart {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .chart-copy .stat-card__value {
    margin-top: 42px;
  }

  .statistics__inner {
    padding-top: 44px;
  }

  .stat-card {
    min-height: 190px;
  }

  .stat-card--chart {
    min-height: 320px;
  }

  .x-stat__numbers {
    gap: 20px;
    margin-top: 38px;
  }

  .stat-card--x {
    min-height: 270px;
  }

  .x-stat__value {
    display: block;
  }

  .x-stat__count {
    display: block;
    font-size: clamp(70px, 25vw, 104px);
  }

  .x-stat__label {
    display: block;
    margin-top: 10px;
    font-size: 11px;
  }
}

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

  .scroll-cue__line::after {
    animation: none;
  }
}
