:root {
  color-scheme: light;
  --paper: #f7f4ee; /* page background, warm off-white */
  --paper-2: #efeae0; /* alternate section band */
  --card: #ffffff;
  --ink: #12211e; /* body text and headings */
  --ink-muted: #56625e; /* secondary text, AA on --paper */
  --rule: #dcd5c8; /* hairlines, borders */
  --teal: #0f766e; /* primary brand, buttons, links */
  --teal-deep: #0b4f4a; /* button hover, hero figure */
  --teal-soft: #dcefeb; /* tints, chart fill */
  --brass: #a8721c; /* plumb bob, savings figures (AA on --paper for large text only) */
  --brass-text: #85590f; /* brass used for small text */
  --on-teal: #ffffff;
  --shadow: 0 1px 2px rgba(18, 33, 30, 0.05), 0 18px 40px -20px rgba(18, 33, 30, 0.22);

  --pad: clamp(1.25rem, 5vw, 3rem);
  --space: clamp(5rem, 10vw, 9rem);
  --display: Fraunces, Georgia, "Times New Roman", serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #0e1716;
    --paper-2: #131f1d;
    --card: #182624;
    --ink: #e9efec;
    --ink-muted: #9fb0ab;
    --rule: #2a3a37;
    --teal: #2dd4bf;
    --teal-deep: #5eead4;
    --teal-soft: #123a37;
    --brass: #e0a94a;
    --brass-text: #e8b867;
    --on-teal: #062a27;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 18px 40px -20px rgba(0, 0, 0, 0.7);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

.num {
  font-variant-numeric: tabular-nums;
}

.container {
  width: min(1120px, 100% - 2 * var(--pad));
  margin-inline: auto;
}

/* Typography */

h1,
h2,
.step-num,
.big-num,
.gap-amount,
.card-figure {
  font-family: var(--display);
  font-optical-sizing: auto;
}

h1,
h2 {
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variation-settings: "SOFT" 50;
}

h1 {
  font-size: clamp(2.6rem, 6vw + 1rem, 5.25rem);
  line-height: 1.02;
}

h2 {
  font-size: clamp(1.9rem, 3vw + 1rem, 3rem);
  line-height: 1.1;
  max-width: 20ch;
  text-wrap: balance;
}

h3 {
  font-family: var(--body);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  margin-bottom: 1rem;
}

.body-copy {
  max-width: 56ch;
  margin-top: 1.5rem;
}

.lead {
  max-width: 34ch;
  margin-top: 1.5rem;
  font-size: 1.1875rem;
  color: var(--ink-muted);
}

/* Buttons and links */

a {
  color: var(--teal);
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: var(--teal);
  color: var(--on-teal);
  font-weight: 600;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.btn:hover {
  background: var(--teal-deep);
}

.btn:active {
  transform: translateY(1px);
}

.btn-small {
  font-size: 0.9375rem;
}

.btn-large {
  height: 52px;
  padding: 0 1.75rem;
  font-size: 1.0625rem;
}

.btn-xl {
  height: 60px;
  padding: 0 2.25rem;
  font-size: 1.125rem;
}

.arrow {
  display: inline-block;
  transition: transform 160ms var(--ease);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease;
}

.text-link:hover {
  color: var(--teal-deep);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.text-link:active {
  opacity: 0.8;
}

/* Logo */

.logo {
  display: inline-flex;
  gap: 0.4em;
  min-height: 44px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.logo-mark {
  width: auto;
  flex: none;
}

.brass-fill {
  fill: var(--brass);
}

.bob-shine {
  fill: none;
  stroke: var(--paper);
  stroke-opacity: 0.4;
  stroke-width: 1;
}

.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  transform: translateY(2px);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 64px;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 160ms ease;
}

.nav-link:hover {
  color: var(--teal);
}

.nav-link:active {
  opacity: 0.7;
}

.nav .btn {
  margin-left: 0.5rem;
}

@media (max-width: 719px) {
  .nav-link {
    display: none;
  }
}

/* Bands */

main {
  position: relative;
}

.band {
  padding-block: var(--space);
}

.band-paper {
  background: var(--paper);
}

.band-alt {
  background: var(--paper-2);
}

/* Plumb line */

.plumb-line,
.dot-h2::before {
  display: none;
}

@media (min-width: 1024px) {
  .plumb-line {
    display: block;
    position: absolute;
    z-index: 1;
    top: 0;
    bottom: 0;
    left: calc((100% - min(1120px, 100% - 2 * var(--pad))) / 2 - 2.5rem);
    width: 1px;
    background: var(--rule);
    pointer-events: none;
  }

  .plumb-fill {
    position: absolute;
    inset: 0;
    background: var(--teal);
    transform: scaleY(0);
    transform-origin: top;
  }

  .plumb-bob {
    position: absolute;
    left: 50%;
    top: 0;
    height: auto;
    transform: translate(-50%, 0);
  }

  .dot-h2 {
    position: relative;
  }

  .dot-h2::before {
    content: "";
    display: block;
    position: absolute;
    z-index: 2;
    left: calc(-2.5rem - 3px);
    top: calc(0.55em - 3.5px);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1px solid var(--brass);
    background: var(--paper);
    transition: background-color 300ms ease;
  }

  .band-alt .dot-h2::before {
    background: var(--paper-2);
  }

  .dot-h2.is-reached::before {
    background: var(--brass);
  }
}

@supports (animation-timeline: scroll()) {
  @media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
    .plumb-fill {
      animation: plumb-grow linear both;
      animation-timeline: scroll(root);
    }

    .plumb-bob {
      animation: plumb-drop linear both;
      animation-timeline: scroll(root);
    }
  }
}

@keyframes plumb-grow {
  to {
    transform: scaleY(1);
  }
}

@keyframes plumb-drop {
  to {
    top: 100%;
    transform: translate(-50%, -100%);
  }
}

@media (min-width: 1024px) and (prefers-reduced-motion: reduce) {
  .plumb-fill {
    transform: scaleY(1);
  }

  .plumb-bob {
    top: 100%;
    transform: translate(-50%, -100%);
  }

  .dot-h2::before {
    background: var(--brass);
  }
}

/* Hero */

.hero {
  padding-top: clamp(3rem, 6vw, 5.5rem);
}

.hero-grid {
  display: grid;
  gap: 3.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 2rem;
}

.reassure {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

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

.pay-card {
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 24px;
  box-shadow: var(--shadow);
  transition: transform 400ms var(--ease);
  animation: card-in 600ms var(--ease) backwards;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

.card-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.card-figure {
  margin-top: 0.25rem;
  font-size: clamp(2.75rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--teal-deep);
}

.card-per {
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.stack-bar {
  display: flex;
  gap: 2px;
  height: 12px;
  margin-top: 1.5rem;
}

.seg {
  display: block;
  height: 100%;
  border-radius: 999px;
  transform-origin: left;
  animation: seg-in 700ms var(--ease) backwards;
}

.seg-pi {
  flex: 2022.62 1 0;
  background: var(--teal);
  animation-delay: 300ms;
}

.seg-tax {
  flex: 400 1 0;
  background: var(--brass);
  animation-delay: 420ms;
}

.seg-ins {
  flex: 125 1 0;
  background: var(--ink-muted);
  animation-delay: 540ms;
}

@keyframes seg-in {
  from {
    transform: scaleX(0);
  }
}

.legend {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.25rem;
  font-size: 0.9375rem;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.legend-name {
  flex: 1;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

.dot-pi {
  background: var(--teal);
}

.dot-tax {
  background: var(--brass);
}

.dot-ins {
  background: var(--ink-muted);
}

.card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.card-stats dt {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.card-stats dd {
  font-weight: 600;
}

.card-caption {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 7fr 5fr;
    gap: 4rem;
  }

  .pay-card {
    transform: rotate(-1.5deg);
  }

  .pay-card:hover {
    transform: rotate(0deg);
  }
}

@media (min-width: 960px) {
  .pay-card {
    animation-name: card-in-rotated;
  }
}

@keyframes card-in-rotated {
  from {
    opacity: 0;
    transform: translateY(16px) rotate(-1.5deg);
  }
}

/* The gap */

.gap-visual {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 3.5rem;
}

.gap-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.gap-head-1 {
  width: 79.4%;
}

.gap-head-2 {
  grid-row: 3;
  margin-top: 20px;
}

.gap-label {
  font-weight: 600;
  font-size: 0.9375rem;
}

.gap-amount {
  font-size: clamp(1.4rem, 2vw + 0.6rem, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.gap-bar {
  display: flex;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
}

.gap-bar-1 {
  position: relative;
}

.gap-seg {
  display: block;
  height: 100%;
}

.gap-pi {
  width: 79.4%;
  background: var(--teal);
}

.gap-tax {
  width: 15.7%;
  background: var(--brass);
  border-left: 2px solid var(--paper-2);
  transform-origin: left;
}

.gap-ins {
  width: 4.9%;
  background: var(--ink-muted);
  border-left: 2px solid var(--paper-2);
  transform-origin: left;
}

.gap-box {
  grid-row: 2;
  justify-self: end;
  width: 20.6%;
  height: 48px;
  border: 1px dashed var(--rule);
  border-radius: 8px;
}

.gap-note {
  grid-row: 2;
  justify-self: end;
  align-self: center;
  width: 20.6%;
  padding: 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--brass-text);
}

.gap-head-1 {
  grid-row: 1;
}

.gap-bar-2 {
  grid-row: 4;
}

.gap-bar-1 {
  grid-row: 2;
  grid-column: 1;
}

.gap-box,
.gap-note {
  grid-column: 1;
}

@media (max-width: 719px) {
  .gap-note {
    grid-row: 5;
    justify-self: start;
    width: auto;
    margin-top: 1rem;
    padding: 0;
    font-size: 0.9375rem;
  }

  .gap-box {
    border-color: var(--brass);
  }
}

.js .gap .extra {
  transform: scaleX(0);
}

.js .gap.is-in .extra {
  transform: none;
  transition: transform 700ms var(--ease);
}

/* How it works */

.steps {
  display: grid;
  gap: 2.5rem;
  margin-top: 3.5rem;
}

.step-num {
  display: block;
  font-size: 3.5rem;
  font-weight: 500;
  line-height: 1;
  color: var(--teal);
  margin-bottom: 1rem;
}

.step p {
  color: var(--ink-muted);
}

@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }

  .step {
    padding-inline: 2rem;
  }

  .step:first-child {
    padding-left: 0;
  }

  .step:last-child {
    padding-right: 0;
  }

  .step + .step {
    border-left: 1px solid var(--rule);
  }
}

.js .steps .step {
  opacity: 0;
  transform: translateY(12px);
}

.js .steps.is-in .step {
  opacity: 1;
  transform: none;
  transition:
    opacity 600ms var(--ease),
    transform 600ms var(--ease);
}

.js .steps.is-in .step:nth-child(2) {
  transition-delay: 100ms;
}

.js .steps.is-in .step:nth-child(3) {
  transition-delay: 200ms;
}

/* Paying it down */

.paydown-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.big-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin-top: 2.5rem;
}

.big-stat {
  display: flex;
  flex-direction: column;
}

.big-num {
  white-space: nowrap;
  font-size: clamp(1.9rem, 2vw + 1rem, 2.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--brass-text);
}

.big-label {
  margin-top: 0.25rem;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.chart {
  display: block;
  height: auto;
  overflow: visible;
}

.chart text {
  font-family: var(--body);
  font-size: 12px;
  fill: var(--ink-muted);
}

.chart-frame {
  fill: var(--card);
  stroke: var(--rule);
}

.chart-grid line {
  stroke: var(--rule);
  stroke-width: 1;
}

.chart-grid .axis {
  stroke: var(--ink-muted);
  stroke-opacity: 0.5;
}

.chart-band {
  fill: var(--brass);
  fill-opacity: 0.15;
}

.chart .chart-note {
  fill: var(--brass-text);
  font-weight: 600;
}

.chart-area {
  fill: var(--teal-soft);
}

.chart-base {
  stroke: var(--ink-muted);
  stroke-width: 2;
  stroke-dasharray: 6 5;
}

.chart-extra {
  stroke: var(--teal);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart-end circle {
  fill: var(--brass);
}

.chart .chart-end text {
  fill: var(--brass-text);
  font-weight: 600;
}

.js .chart-wrap .chart-extra {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.js .chart-wrap .chart-area,
.js .chart-wrap .chart-end {
  opacity: 0;
}

.js .chart-wrap.is-in .chart-extra {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.2s ease-in-out;
}

.js .chart-wrap.is-in .chart-area {
  opacity: 1;
  transition: opacity 1.2s ease-in-out;
}

.js .chart-wrap.is-in .chart-end {
  opacity: 1;
  transition: opacity 400ms ease 1.2s;
}

.paydown h2 {
  font-size: clamp(1.9rem, 2vw + 1rem, 2.5rem);
}

.chart-key {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem 1.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.chart-key li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.key-swatch {
  width: 28px;
  height: 0;
  border-top: 2px dashed var(--ink-muted);
}

.key-extra {
  border-top: 3px solid var(--teal);
}

@media (max-width: 719px) {
  .chart text {
    font-size: 22px;
  }

  .chart .lbl-160k,
  .chart .tick-2035 {
    display: none;
  }

  .chart .end-1 {
    y: 226px;
  }

  .chart .end-2 {
    y: 250px;
  }

  .chart-key {
    justify-content: flex-start;
  }
}

@media (min-width: 960px) {
  .paydown-grid {
    grid-template-columns: 6fr 6fr;
    gap: 4rem;
  }
}

/* Features */

.features {
  display: grid;
  gap: 2.5rem 2rem;
  margin-top: 3.5rem;
}

.feature {
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.icon {
  display: block;
  margin-bottom: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--teal);
  transition: color 160ms ease;
}

.feature:hover .icon {
  color: var(--teal-deep);
}

.feature p {
  color: var(--ink-muted);
}

@media (min-width: 620px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Try it */

.browser {
  margin-top: 3rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.browser-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding-inline: 16px;
  border-bottom: 1px solid var(--rule);
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rule);
}

.browser-pill {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 16px;
  border-radius: 999px;
  background: var(--paper-2);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-muted);
}

.browser-body {
  padding: 8px;
}

.browser-body iframe {
  display: block;
  width: 100%;
  height: min(80vh, 860px);
  border: 0;
  border-radius: 12px;
  background: var(--card);
}

@media (max-width: 719px) {
  .browser-body iframe {
    height: 640px;
  }
}

.fullscreen {
  margin-top: 1.25rem;
  text-align: center;
}

/* Closing */

.closing-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.closing-bob {
  width: auto;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.closing h2 {
  max-width: none;
  font-size: clamp(2.4rem, 5vw + 1rem, 4.5rem);
  line-height: 1.02;
}

.closing .lead {
  margin-bottom: 2.5rem;
}

/* Footer */

.site-footer {
  padding-block: 2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-mark {
  width: auto;
  flex: none;
  color: var(--ink);
}

@media (min-width: 720px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .footer-brand {
    flex-direction: row;
    gap: 0.75rem;
  }
}

/* Reduced motion: final state, no transitions */

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
