/* ===== Brand variables — sourced from the Dollar Sense logo (assets/logo.png) ===== */
:root {
  --navy: #0b1a2c;
  --navy-deep: #060f1c;
  --navy-soft: #16293f;
  --gold: #c9a35a;
  --gold-light: #e8cf9a;
  --gold-dark: #a17f3a;
  --brand-ink: #101c2c;
  --brand-muted: #5c6b7c;
  --brand-bg: #f8f6f1;
  --brand-card: #ffffff;
  --brand-border: #e7e2d6;
  --font-heading: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --font-body: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(11, 26, 44, 0.08);
  --shadow-lift: 0 18px 40px rgba(11, 26, 44, 0.16);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  /* overflow-x hidden must be on BOTH html and body: with it only on body,
     the root scroller is still <html>, so transformed/absolute descendants
     (the 3D carousel cards) escape and force a horizontal scroll — which is
     what made phones shrink-to-fit and feel "not responsive". */
  overflow-x: hidden;
  /* Firefox — slim gold scrollbar to match the WebKit styling below */
  scrollbar-width: thin;
  scrollbar-color: var(--gold) rgba(16, 28, 44, 0.08);
}

/* ===== Scrollbar (WebKit) =====
   The stock chunky gray bar clashed with the design; this slims it down
   and dresses the thumb in the brand gold. Applies to inner scroll areas
   too (e.g. the tracker's entries table). */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: rgba(16, 28, 44, 0.06);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 45%, var(--gold-dark));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  background-clip: padding-box;
}
::-webkit-scrollbar-corner { background: transparent; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--brand-ink);
  background: var(--brand-bg);
  line-height: 1.55;
  overflow-x: hidden;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.18;
  margin: 0 0 0.5em;
}
h1 { font-weight: 800; }

p { margin: 0 0 1em; }

a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

/* ===== Scroll-reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active { transform: translateY(1px) scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
  color: var(--navy-deep);
  box-shadow: 0 8px 20px rgba(201, 163, 90, 0.35);
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: skewX(-20deg);
  transition: left 0.65s ease;
  pointer-events: none;
}
.btn-primary:hover::after {
  left: 130%;
}
@media (prefers-reduced-motion: reduce) {
  .btn-primary::after { transition: none; }
}
.btn-primary:hover {
  box-shadow: 0 12px 26px rgba(201, 163, 90, 0.48);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--navy);
  color: var(--gold-light);
}
.btn-secondary:hover { background: var(--navy-soft); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-outline:hover { background: rgba(11, 26, 44, 0.06); transform: translateY(-2px); }

.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* Compact header-only sizing — the nav/logo/button cluster is a lot of
   content for one row, especially in a wider monospace typeface. */
.btn-header {
  padding: 7px 14px;
  font-size: 0.78rem;
}

/* "Get the tracker" gets its own identity instead of the generic navy
   outline: a gold border/text, a small download glyph, and a soft
   gold wash that fills in on hover — a quieter sibling to the solid
   gold primary button, not just a copy of it. */
.btn-tracker {
  color: var(--gold-dark);
  border: 1.5px solid var(--gold);
  background: rgba(201, 163, 90, 0.06);
}
.btn-tracker svg {
  width: 13px;
  height: 13px;
  transition: transform 0.25s ease;
}
.btn-tracker:hover {
  background: linear-gradient(135deg, rgba(232, 207, 154, 0.35), rgba(201, 163, 90, 0.22));
  border-color: var(--gold-dark);
  color: var(--navy-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(201, 163, 90, 0.22);
}
.btn-tracker:hover svg { transform: translate(1px, -1px); }

/* On the dark glass header the outline button needs the light gold, and a
   solid gold hover so the label stays crisp over the blurred backdrop. */
.site-header .btn-tracker {
  color: var(--gold-light);
  border-color: rgba(232, 207, 154, 0.65);
  background: rgba(232, 207, 154, 0.08);
}
.site-header .btn-tracker:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border-color: var(--gold-light);
  color: var(--navy-deep);
}

.btn-disabled {
  background: #e9e6dd;
  color: #a6a190;
  cursor: not-allowed;
  box-shadow: none;
}

/* ===== Header =====
   Navy frosted glass so the bar melts into the aurora hero instead of
   sitting on it as a white strip. A gold gradient hairline runs along the
   bottom edge; the badge mark + wordmark replace the dark-text lockup,
   which would disappear on this background. */
.site-header {
  /* Near-opaque at rest — at the top of the page nothing has scrolled
     underneath yet, so a low alpha just blends with the cream body and
     reads as washed-out gray. The frosted-glass look kicks in on scroll. */
  background: rgba(6, 15, 28, 0.96);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  position: sticky;
  top: 0;
  z-index: 20;
  transition: background 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(201, 163, 90, 0) 0%,
    rgba(201, 163, 90, 0.55) 18%,
    rgba(232, 207, 154, 0.9) 50%,
    rgba(201, 163, 90, 0.55) 82%,
    rgba(201, 163, 90, 0) 100%);
  pointer-events: none;
}
.site-header.is-scrolled {
  background: rgba(6, 15, 28, 0.88);
  box-shadow: 0 10px 30px rgba(3, 8, 16, 0.45);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 24px;
}
/* Pinned to the far right — logo and nav sit close together on the left,
   this group gets the flexible gap, matching the reference's layout. */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}
.logo img {
  height: 32px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 10px rgba(232, 207, 154, 0.35));
  transition: height 0.25s ease;
}
.site-header.is-scrolled .logo img {
  height: 27px;
}
.logo-word {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: #f4f1e8;
  white-space: nowrap;
}
.logo-word em {
  font-style: normal;
  background: linear-gradient(120deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Nav ===== */
.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: 36px;
}
.site-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.82rem;
  color: #e9e4d8;
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}
.site-nav a:not(.btn):hover { color: var(--gold-light); }
.site-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: right 0.25s ease;
}
.site-nav a:not(.btn):hover::after { right: 0; }
.nav-follow { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gold-light);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .header-actions { display: none; }
  .nav-toggle { display: flex; }
  .nav-follow { display: inline-flex; }

  /* A sticky element with backdrop-filter re-blurs everything behind it on
     every scroll frame — a top scroll-jank source on phones. The header is
     96% opaque anyway, so dropping the blur is visually near-invisible. */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: rgba(6, 15, 28, 0.96);
    border-bottom: 1px solid rgba(201, 163, 90, 0.35);
    box-shadow: 0 18px 40px rgba(3, 8, 16, 0.5);
    padding: 8px 20px 18px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
  }
  .site-nav.is-open {
    max-height: 320px;
    opacity: 1;
    padding: 12px 20px 22px;
  }
  .site-nav a { padding: 10px 0; width: 100%; }
  .site-nav .nav-follow { margin-top: 8px; }
}

/* ===== Shared background canvas =====
   The hero and the chart carousel sit inside one .canvas wrapper with a single
   SVG behind BOTH of them, so the waves are literally one continuous image
   rather than two backgrounds meeting at a seam. Both sections are therefore
   transparent — the canvas is the only thing painting back there. */
.canvas {
  position: relative;
  isolation: isolate;
}
.canvas-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  background: #1a1030; /* fallback under the SVG while it paints */
}
.canvas-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.canvas > .hero,
.canvas > .preview {
  position: relative;
  z-index: 1;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 76px 0 48px;
  background: transparent;
  color: #f4f1e8;
}
.hero-coin {
  position: absolute;
  border: 1.5px solid rgba(201, 163, 90, 0.35);
  border-radius: 50%;
  pointer-events: none;
}
.hero-coin--1 { width: 64px; height: 64px; top: 18%; right: 14%; animation: drift 7s ease-in-out infinite; }
.hero-coin--2 { width: 34px; height: 34px; top: 62%; right: 26%; animation: drift 9s ease-in-out infinite 1s; }
.hero-coin--3 { width: 20px; height: 20px; top: 30%; right: 32%; animation: drift 6s ease-in-out infinite 0.5s; }
@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.7; }
  50% { transform: translateY(-16px) rotate(8deg); opacity: 1; }
}

/* Wave layers drift very slowly and very slightly — the reference reads as a
   still image with life in it, not an animation, so keep the motion subtle. */
.cv-wave {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  will-change: transform;
}
.cv-wave--bloom  { animation: cv-drift-a 44s ease-in-out infinite alternate; }
.cv-wave--violet { animation: cv-drift-b 52s ease-in-out infinite alternate; }
.cv-wave--teal   { animation: cv-drift-c 60s ease-in-out infinite alternate; }

@keyframes cv-drift-a {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-26px, 16px) scale(1.02); }
}
@keyframes cv-drift-b {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(22px, -14px) scale(1.015); }
}
@keyframes cv-drift-c {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-18px, 12px) scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-coin, .cv-wave { animation: none; }
}

.hero-inner {
  position: relative;
  max-width: 720px;
  z-index: 1;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 0.6em;
}
.hero h1 {
  font-size: clamp(2rem, 4.4vw, 3rem);
  color: #ffffff;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: 1.08rem;
  color: #cdd6e2;
  max-width: 56ch;
}

.offer-card {
  margin-top: 30px;
  background: rgba(16, 30, 48, 0.55);
  border: 1px solid rgba(201, 163, 90, 0.35);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  padding: 26px;
  position: relative;
  backdrop-filter: blur(6px);
}
.offer-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy-deep);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.offer-card p { color: #e7e9ee; }

/* Progress bar — spots claimed toward the first-1,000 offer */
.progress-wrap {
  margin: 16px 0 20px;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--gold-light);
  margin-bottom: 6px;
  font-weight: 600;
}
.progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
  background-size: 200% 100%;
  transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
  animation: shimmer 2.4s linear infinite;
}
@keyframes shimmer {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

/* ===== Preview rail (3D focus carousel) ===== */
/* Picks up exactly where the hero left off (#0b1a2c), then eases toward the
   light page below — one flowing background, not a second one bolted on. */
.preview {
  position: relative;
  padding: 72px 0 96px;
  background: transparent;
  color: #f4f1e8;
}
/* Soft dissolve from the shared canvas into the cream section that follows. */
.preview::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 160px;
  background: linear-gradient(180deg, rgba(248, 246, 241, 0) 0%, rgba(248, 246, 241, 0.55) 62%, var(--brand-bg) 100%);
  pointer-events: none;
  z-index: 1;
}
.preview .section-title { color: #ffffff; }
.preview .section-sub { color: #aab6c6; }

.rail {
  position: relative;
  margin-top: 4px;
  /* Keep the off-stage carousel cards from widening the page. Generous
     vertical padding so the active card's tall shadow isn't clipped. */
  overflow: hidden;
  padding: 30px 0;
  margin-block: -26px;
}
.rail:focus { outline: none; }
.rail:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 6px;
  border-radius: 12px;
}

.rail-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(55% 45% at 50% 32%, var(--glow, #2a78d6) 0%, transparent 70%);
  opacity: 0.26;
  filter: blur(70px);
  transition: background 1s ease;
}

.rail-stage {
  position: relative;
  height: 470px;
  perspective: 1400px;
  touch-action: pan-y;
}

.rail-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 330px;
  height: 410px;
  background: var(--brand-card);
  border-radius: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 24px 60px rgba(3, 8, 16, 0.55);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform-style: preserve-3d;
  /* Hidden backfaces stop sub-pixel flicker during the 3D transforms. */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.85s ease, filter 0.85s ease;
  will-change: transform;
}
.rail-card:not(.is-active) { cursor: pointer; }
.rail-card svg {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: visible;
}

/* Dashboard-tile header: a KPI label, a big hero number, and a trend pill —
   turns each card from "just a chart" into a real analytics widget. */
.rail-head {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rail-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.rail-kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--brand-muted);
}
.rail-tag {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #8a7a4d;
  background: linear-gradient(135deg, #f4edda, #e8ddc1);
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.rail-head-val {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.rail-kpi {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--brand-ink);
  letter-spacing: -0.02em;
}
.rail-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.rail-delta--good { color: #0b7a3b; background: rgba(11, 138, 62, 0.12); }
.rail-delta--bad  { color: #b3311f; background: rgba(192, 57, 43, 0.12); }
.rail-delta--flat { color: #5c6b7c; background: rgba(92, 107, 124, 0.12); }

/* Slim muted caption at the bottom of a card, for balance / "sample" honesty. */
.rail-foot {
  flex-shrink: 0;
  border-top: 1px solid var(--brand-border);
  padding-top: 9px;
  font-size: 0.74rem;
  color: var(--brand-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.rail-foot .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent, var(--gold));
  flex-shrink: 0;
}

/* Info + controls row */
.rail-footer {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 26px;
}
/* Fixed height: descriptions differ in length between slides, and without this
   the footer resizes on each swap and shoves the rest of the page around. */
.rail-info {
  flex: 1 1 auto;
  min-height: 124px;
}
.rail-meta {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin: 0 0 6px;
}
.rail-title {
  font-size: 1.6rem;
  color: #ffffff;
  margin: 0 0 6px;
}
.rail-desc {
  color: #aab6c6;
  max-width: 46ch;
  margin: 0;
  font-size: 0.95rem;
}
.rail-info.swap .rail-meta,
.rail-info.swap .rail-title,
.rail-info.swap .rail-desc {
  animation: info-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.rail-info.swap .rail-title { animation-delay: 0.05s; }
.rail-info.swap .rail-desc { animation-delay: 0.1s; }
@keyframes info-in {
  from { opacity: 0; transform: translateY(10px); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: none; }
}

.rail-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
/* Solid dark pill so the arrows + "2 / 5" stay legible over any wave color
   behind them (previously a near-transparent white on bright teal = invisible). */
.rail-pill {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(9, 13, 28, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 4px;
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(3, 8, 16, 0.3);
}
.rail-pill button {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #ffffff;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.rail-pill button:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}
.rail-pill button:active { transform: scale(0.94); }
.rail-counter {
  min-width: 46px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}
.rail-cta { gap: 6px; }

/* Donut */
.donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
}
.donut-chart { overflow: visible; }
.donut-seg {
  cursor: pointer;
  transform-origin: 100px 100px;
  transition: stroke-width 0.2s ease, opacity 0.4s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0;
  transform: scale(0.8) rotate(-14deg);
}
.donut-seg:hover, .donut-seg:focus-visible {
  stroke-width: 30;
  outline: none;
}
.rail-card.is-active .donut-seg {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}
.donut-seg:nth-of-type(2) { transition-delay: 0s; }
.donut-seg:nth-of-type(3) { transition-delay: 0.05s; }
.donut-seg:nth-of-type(4) { transition-delay: 0.1s; }
.donut-seg:nth-of-type(5) { transition-delay: 0.15s; }
.donut-seg:nth-of-type(6) { transition-delay: 0.2s; }
.donut-seg:nth-of-type(7) { transition-delay: 0.25s; }

.donut-total {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  fill: var(--brand-ink);
}
.donut-total-label {
  font-family: var(--font-body);
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  fill: var(--brand-muted);
}

.chart-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chart-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--brand-ink);
}
.chart-legend li strong {
  margin-left: auto;
  color: var(--brand-muted);
  font-weight: 600;
}
.chart-legend--compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
  width: 100%;
  flex-shrink: 0;
}
.chart-legend--compact li { font-size: 0.74rem; }
.chart-legend--row {
  flex-direction: row;
  gap: 20px;
  margin-top: 2px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.chart-legend--row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--brand-muted);
  font-weight: 600;
}
.swatch {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: var(--c, var(--gold));
  flex-shrink: 0;
}

/* Bar chart */
.bar-chart { overflow: visible; }
.bar-gridlines line {
  stroke: #eceae0;
  stroke-width: 1;
}
.bar-income, .bar-expense {
  transition: opacity 0.2s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-box: fill-box;
  transform-origin: bottom;
  cursor: pointer;
  transform: scaleY(0);
}
.bar-income { fill: #2a78d6; }
.bar-expense { fill: #eb6834; }
.rail-card.is-active .bar-income,
.rail-card.is-active .bar-expense {
  transform: scaleY(1);
}
.bar-pair:nth-of-type(2) rect { transition-delay: 0s; }
.bar-pair:nth-of-type(3) rect { transition-delay: 0.05s; }
.bar-pair:nth-of-type(4) rect { transition-delay: 0.1s; }
.bar-pair:nth-of-type(5) rect { transition-delay: 0.15s; }
.bar-pair:nth-of-type(6) rect { transition-delay: 0.2s; }
.bar-pair:nth-of-type(7) rect { transition-delay: 0.25s; }
.bar-pair:hover .bar-income,
.bar-pair:hover .bar-expense {
  opacity: 0.6;
}
.bar-pair:hover rect:hover {
  opacity: 1;
  transform: scaleY(1.02);
}
.bar-month-labels text,
.col-day-labels text {
  font-size: 9px;
  fill: var(--brand-muted);
  text-anchor: middle;
  font-family: var(--font-body);
}

/* Line chart */
.line-chart { overflow: visible; }
.line-area {
  fill: #008300;
  opacity: 0;
  stroke: none;
  transition: opacity 0.6s ease;
  transition-delay: 0.55s;
}
.line-stroke {
  fill: none;
  stroke: #008300;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.65, 0, 0.35, 1);
}
.rail-card.is-active .line-stroke { stroke-dashoffset: 0; }
.rail-card.is-active .line-area { opacity: 0.1; }
.line-dots circle {
  fill: #008300;
  stroke: var(--brand-card);
  stroke-width: 2;
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: 0.7s;
}
.line-end-label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  fill: var(--brand-ink);
  opacity: 0;
  transition: opacity 0.35s ease;
  transition-delay: 0.85s;
}
.rail-card.is-active .line-dots circle { opacity: 1; transform: scale(1); }
.rail-card.is-active .line-end-label { opacity: 1; }

/* Horizontal bar (debt) */
.hbar-chart { overflow: visible; }
.hbar-label {
  font-size: 11px;
  font-weight: 600;
  fill: var(--brand-ink);
  font-family: var(--font-body);
}
.hbar-bar {
  fill: #2a78d6;
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.rail-card.is-active .hbar-bar { transform: scaleX(1); }
.hbar-row:nth-of-type(1) .hbar-bar { transition-delay: 0s; }
.hbar-row:nth-of-type(2) .hbar-bar { transition-delay: 0.1s; }
.hbar-row:nth-of-type(3) .hbar-bar { transition-delay: 0.2s; }
.hbar-value {
  font-size: 11px;
  font-weight: 700;
  fill: var(--brand-muted);
  font-family: var(--font-body);
}

/* Column chart (weekday) */
.col-chart { overflow: visible; }
.col-baseline { stroke: #e1e0d9; stroke-width: 1; }
.col-bar {
  fill: #eb6834;
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: bottom;
  transform: scaleY(0);
  transition: opacity 0.2s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.rail-card.is-active .col-bar { transform: scaleY(1); }
.col-bars .col-bar:nth-of-type(1) { transition-delay: 0s; }
.col-bars .col-bar:nth-of-type(2) { transition-delay: 0.04s; }
.col-bars .col-bar:nth-of-type(3) { transition-delay: 0.08s; }
.col-bars .col-bar:nth-of-type(4) { transition-delay: 0.12s; }
.col-bars .col-bar:nth-of-type(5) { transition-delay: 0.16s; }
.col-bars .col-bar:nth-of-type(6) { transition-delay: 0.2s; }
.col-bars .col-bar:nth-of-type(7) { transition-delay: 0.24s; }
.col-bar:hover { opacity: 0.85; }
.col-peak-label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  fill: var(--brand-ink);
  opacity: 0;
  transition: opacity 0.3s ease;
  transition-delay: 0.45s;
}
.rail-card.is-active .col-peak-label { opacity: 1; }

/* ===== Mobile performance =====
   Phones were laggy because several large, gaussian-blurred layers drift
   forever — the aurora waves, the hero coins, the footer glows. Continuously
   re-compositing blurred layers pegs mobile GPUs. Freeze them here: the static
   aurora still looks rich, and nobody notices a 60s drift on a phone. Desktop
   keeps the full motion. Respects reduce-motion regardless. */
@media (max-width: 768px) {
  .cv-wave--bloom,
  .cv-wave--violet,
  .cv-wave--teal,
  .hero-coin--1,
  .hero-coin--2,
  .hero-coin--3,
  .footer-glow--a,
  .footer-glow--b {
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .rail-stage { height: 430px; }
  .rail-card {
    width: 258px;
    height: 380px;
    padding: 14px;
    /* Phones can't keep 5 cards on permanent GPU layers with filters — the
       layer churn is what makes the rail "blink". Let the browser promote
       layers only during the transition instead. */
    will-change: auto;
  }
  /* blur(70px) across the whole rail is the biggest single cost on mobile;
     the radial gradient reads as a soft glow on its own without the filter. */
  .rail-glow { filter: none; opacity: 0.22; }
  .rail-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
  }
  .rail-desc { max-width: 34ch; }
  .rail-title { font-size: 1.35rem; }
  .rail-info { min-height: 148px; }
}

@media (prefers-reduced-motion: reduce) {
  .rail-card { transition: none; }
  .preview::before { animation: none; }
  .rail-info.swap .rail-meta,
  .rail-info.swap .rail-title,
  .rail-info.swap .rail-desc { animation: none; }
  .donut-seg, .bar-income, .bar-expense, .line-stroke, .line-area,
  .line-dots circle, .line-end-label, .hbar-bar, .col-bar, .col-peak-label {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }
}

/* ===== Tools section ===== */
.tools { padding: 56px 0 24px; }
.section-title { font-size: 1.75rem; }
.section-sub { color: var(--brand-muted); margin-bottom: 32px; }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
}
.tools-grid > .tool-card:nth-child(1) { transition-delay: 0s; }
.tools-grid > .tool-card:nth-child(2) { transition-delay: 0.06s; }
.tools-grid > .tool-card:nth-child(3) { transition-delay: 0.12s; }
.tools-grid > .tool-card:nth-child(4) { transition-delay: 0.18s; }
.tools-grid > .tool-card:nth-child(5) { transition-delay: 0.24s; }
.tools-grid > .tool-card:nth-child(6) { transition-delay: 0.3s; }

.tool-card {
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.tool-card--live:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(201, 163, 90, 0.5);
}

.tool-card--locked {
  opacity: 0.72;
}
.tool-card--locked h3,
.tool-card--locked p {
  color: var(--brand-muted);
}

.tool-icon {
  font-size: 1.7rem;
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f3ecd9, #e7dcc0);
}
.tool-card--locked .tool-icon {
  background: #eee9dd;
  filter: grayscale(0.3);
}

.tool-status {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-muted);
  background: #eef0ea;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.tool-status--live {
  color: var(--navy-deep);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

.tool-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.tool-card p { font-size: 0.92rem; color: var(--brand-muted); flex-grow: 1; }

.unlock-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--brand-border);
}
.unlock-note {
  font-size: 0.85rem;
  color: var(--brand-muted);
  margin-bottom: 10px;
}
.follow-hint {
  font-size: 0.82rem;
  color: var(--brand-muted);
  margin-top: 8px;
}
.unlock-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  animation: pop-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.unlock-form input[type="email"] {
  flex: 1 1 160px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--brand-border);
  font-size: 0.92rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.unlock-form input[type="email"]:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 163, 90, 0.25);
}
.form-error {
  flex-basis: 100%;
  color: #b3261e;
  font-size: 0.82rem;
  margin: 4px 0 0;
}
.unlock-success {
  margin-top: 14px;
  padding: 14px;
  background: linear-gradient(135deg, #f3ecd9, #ece0c2);
  border: 1px solid rgba(201, 163, 90, 0.4);
  border-radius: 10px;
  font-size: 0.9rem;
  animation: pop-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.unlock-success p { margin-bottom: 10px; }
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

/* ===== How it works ===== */
.how { padding: 24px 0 72px; }
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.steps > li:nth-child(1) { transition-delay: 0s; }
.steps > li:nth-child(2) { transition-delay: 0.1s; }
.steps > li:nth-child(3) { transition-delay: 0.2s; }
.steps li {
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  padding: 20px;
  font-size: 0.95rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.steps li:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy-deep);
  font-weight: 700;
  font-size: 0.85rem;
  margin-right: 10px;
}

/* ===== About ===== */
.about { padding: 24px 0 80px; }
.about-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: start;
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}
.about-badge img {
  width: 84px;
  height: 84px;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.about-lede {
  font-size: 1.02rem;
  color: var(--brand-muted);
  max-width: 64ch;
}
.about-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.tag {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--navy);
  background: linear-gradient(135deg, #f3ecd9, #e7dcc0);
  padding: 5px 12px;
  border-radius: 999px;
}
.about-disclaimer {
  font-size: 0.82rem;
  color: var(--brand-muted);
  border-top: 1px dashed var(--brand-border);
  padding-top: 14px;
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .about-inner { grid-template-columns: 1fr; padding: 24px; }
  .about-badge img { width: 56px; height: 56px; }
}

/* ===== Footer ===== */
.site-footer {
  position: relative;
  background: var(--navy-deep);
  color: #c9d0dc;
  padding: 44px 0 22px;
  overflow: hidden;
}
/* A thin lit seam along the top edge, echoing the wave crest above it. */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 207, 154, 0.55), transparent);
}

/* Two slow drifting glows — the footer's own quiet version of the hero/canvas
   motion, so it doesn't read as a flat, static block. */
.footer-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
}
.footer-glow--a {
  width: 340px; height: 340px;
  left: -100px; top: -140px;
  background: radial-gradient(circle, rgba(201, 163, 90, 0.28), transparent 70%);
  animation: footer-drift-a 26s ease-in-out infinite alternate;
}
.footer-glow--b {
  width: 300px; height: 300px;
  right: -80px; bottom: -160px;
  background: radial-gradient(circle, rgba(42, 120, 214, 0.22), transparent 70%);
  animation: footer-drift-b 32s ease-in-out infinite alternate;
}
@keyframes footer-drift-a {
  from { transform: translate(0, 0); }
  to   { transform: translate(40px, 24px); }
}
@keyframes footer-drift-b {
  from { transform: translate(0, 0); }
  to   { transform: translate(-30px, -20px); }
}
@media (prefers-reduced-motion: reduce) {
  .footer-glow { animation: none; }
}

.logo--footer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.logo--footer:hover { transform: translateY(-2px); }
.logo-badge {
  height: 34px;
  width: 34px;
  border-radius: 9px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.logo--footer:hover .logo-badge { transform: rotate(-8deg) scale(1.06); }
.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: #f4f1e8;
}
.site-footer .btn-outline {
  color: var(--gold-light);
  border-color: rgba(232, 207, 154, 0.55);
}
.site-footer .btn-outline:hover {
  background: rgba(232, 207, 154, 0.1);
}
.footer-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.footer-note {
  color: #93a1b4;
  font-size: 0.88rem;
  margin: 6px 0 0;
}

/* Social icons — circular, understated by default, gold and lifted on hover.
   Staggered entrance delay so they pop in one after another, not all at once. */
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #c9d0dc;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s ease,
    color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.social-btn svg { width: 17px; height: 17px; }
.social-btn:hover, .social-btn:focus-visible {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border-color: transparent;
  color: var(--navy-deep);
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 10px 22px rgba(201, 163, 90, 0.35);
  outline: none;
}
.social-btn:active { transform: translateY(-1px) scale(0.96); }
.footer-social .social-btn:nth-child(1) { transition-delay: 0s; }
.footer-social .social-btn:nth-child(2) { transition-delay: 0.05s; }
.footer-social .social-btn:nth-child(3) { transition-delay: 0.1s; }
.footer-social .social-btn:nth-child(4) { transition-delay: 0.15s; }

.fine-print {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #6f7d90;
  font-size: 0.78rem;
  margin: 24px 0 0;
}

/* ===== Mobile ===== */
@media (max-width: 480px) {
  .header-inner { flex-direction: row; gap: 10px; align-items: center; }
  .hero { padding: 48px 0 32px; }
  .offer-card { padding: 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
