/* Real Budget's home page: the app's own teal and mint, its own Windows type, and a pinned app window the story
   scrolls past. */
:root {
  --teal: #1a464d;
  --teal-deep: #102e33;
  --teal-ink: #163b42;
  --mint: #6fd6c8;
  --mint-ink: #1e897f;
  --paper: #f4f7f6;
  --card: #ffffff;
  --ink: #15262a;
  --ink-2: #4a5b5f;
  --line: #d6e2df;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --text: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--mint-ink); text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--mint); outline-offset: 4px; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--mint); color: var(--teal-deep); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
kbd { font: 600 0.85em var(--text); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; background: var(--card); }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: #eaf6f3;
  background:
    radial-gradient(1200px 600px at 85% 110%, rgba(111, 214, 200, 0.16), transparent 60%),
    linear-gradient(180deg, var(--teal) 0%, var(--teal-deep) 100%);
  overflow: hidden;
}
/* the shared header (chrome.css) floats over the hero */
.hero { padding-top: 80px; }

.hero-body {
  flex: 1;
  padding: 0 clamp(20px, 5vw, 64px) 96px;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  align-items: center;
  gap: 48px clamp(32px, 5vw, 96px);
}
.paydays {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 34px;
  padding: 0;
}
.paydays button {
  font-size: 15px;
  padding: 6px 15px;
  border-radius: 999px;
  border: 1px solid rgba(207, 233, 228, 0.28);
  color: #bcd9d3;
  background: transparent;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  animation: chip 0.5s ease-out forwards;
}
.paydays button:nth-child(2) { animation-delay: 0.08s; }
.paydays button:nth-child(3) { animation-delay: 0.16s; }
.paydays button:nth-child(4) { animation-delay: 0.24s; }
.paydays button:hover { border-color: rgba(207, 233, 228, 0.6); color: #fff; }
.paydays button:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }
.paydays button:nth-child(5) { animation-delay: 0.32s; }
.paydays button.now {
  background: #eaf6f3;
  border-color: #eaf6f3;
  color: var(--teal-deep);
  font-weight: 600;
}
.paydays button.now::after {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--mint-ink);
  vertical-align: 2px;
}
@keyframes chip { to { opacity: 1; transform: none; } }

.hero h1 {
  font: 700 clamp(44px, 5.4vw, 92px)/1.02 var(--display);
  letter-spacing: -0.025em;
  margin: 0 0 26px;
  color: #fff;
  text-wrap: balance;
}
.lede { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.55; max-width: 36em; margin: 0 0 36px; color: #cfe9e4; }
.get { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.get p { margin: 0; font-size: 15px; color: #a9cbc5; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 26px; height: 42px;
  margin-left: -13px;
  border: 2px solid rgba(207, 233, 228, 0.5);
  border-radius: 14px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px;
  width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px;
  background: var(--mint);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0%, 100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(14px); opacity: 0; } }

/* ---------------------------------------------------------------- the payday card */
.payday {
  margin: 0;
  justify-self: end;
  width: min(100%, 470px);
  padding: 24px 24px 18px;
  border-radius: 18px;
  background: #f7faf9;
  color: var(--ink);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
  font-size: 15px;
  animation: rise 0.9s 0.3s cubic-bezier(0.22, 0.8, 0.24, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(24px) rotate(-1.5deg); } }
.pd-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.pd-name { font: 650 22px var(--display); color: var(--ink); }
.pd-name b { font-weight: 650; }
.pd-date { color: #6a7b7e; font-size: 13px; }
.pd-deposit {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #e6f4f1;
  color: var(--teal-ink);
  font-weight: 600;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.22, 0.8, 0.24, 1);
}
.pd-deposit.in { opacity: 1; transform: none; }
.pd-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint-ink); }
.pd-amt { margin-left: auto; font-variant-numeric: tabular-nums; color: #157a70; }
.pd-ready {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  margin: 16px 0 10px;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(160deg, #e9f6f3, #f3faf8);
  border: 1px solid #cfe7e1;
}
.pd-label { grid-column: 1 / -1; color: #4a5b5f; font-weight: 600; }
.pd-big { font: 700 40px/1.1 var(--display); color: #17705f; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.pd-done {
  align-self: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #17705f;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.payday.finished .pd-done { opacity: 1; transform: none; }
.pd-rows { list-style: none; margin: 0; padding: 0; }
.pd-rows li {
  display: grid;
  grid-template-columns: 1fr 90px 84px;
  align-items: center;
  gap: 12px;
  padding: 7px 4px;
  border-bottom: 1px solid #e3ebe9;
  color: #8a9a9c;
  transition: color 0.3s ease;
}
.pd-rows li.on { color: var(--ink); }
.pd-cat { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-bar { height: 6px; border-radius: 3px; background: #e3ebe9; overflow: hidden; }
.pd-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: #1e897f; transition: width 0.45s cubic-bezier(0.22, 0.8, 0.24, 1); }
.pd-val { text-align: right; font-variant-numeric: tabular-nums; }
.pd-again {
  margin-top: 14px;
  border: 0;
  background: none;
  padding: 4px 0;
  color: var(--mint-ink);
  font: 600 14px var(--text);
  cursor: pointer;
}
.pd-again:hover { text-decoration: underline; }
.pd-again:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; border-radius: 4px; }

/* ---------------------------------------------------------------- tour */
.tour {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.6fr);
  gap: 0 clamp(28px, 4vw, 64px);
  padding: 0 clamp(20px, 4vw, 56px);
  max-width: 1720px;
  margin: 0 auto;
}
.stage-col { grid-column: 2; grid-row: 1; }
.steps { grid-column: 1; grid-row: 1; padding: 22vh 0 30vh; }

.pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
}
.window {
  width: 100%;
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 30px 70px -20px rgba(16, 46, 51, 0.45), 0 0 0 1px rgba(16, 46, 51, 0.1);
  overflow: hidden;
  transform-origin: 50% 0;
  transform: perspective(1400px) rotateX(16deg) scale(0.9) translateY(40px);
  opacity: 0;
  transition: transform 1.1s cubic-bezier(0.22, 0.8, 0.24, 1), opacity 0.7s ease;
}
.window.in { transform: none; opacity: 1; }
.titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 0 0 14px;
  background: #e9efed;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-2);
}
.titlebar .title b { font-weight: 600; color: var(--ink); margin-left: 6px; }
.titlebar .title b::before { content: "/"; margin-right: 8px; color: #9fb2ae; font-weight: 400; }
.controls { margin-left: auto; display: flex; height: 100%; }
.controls i { width: 44px; height: 100%; position: relative; }
.controls i::before { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; margin-left: -5px; border-top: 1px solid #5b6d70; }
.controls i:nth-child(2)::before { height: 10px; margin-top: -5px; border: 1px solid #5b6d70; }
.controls i:nth-child(3)::before, .controls i:nth-child(3)::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 13px; margin-left: -6.5px; border-top: 1px solid #5b6d70;
  transform: rotate(45deg);
}
.controls i:nth-child(3)::after { transform: rotate(-45deg); }

.viewport { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper); }
.stage {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  transition: transform 0.9s cubic-bezier(0.22, 0.8, 0.24, 1);
}
.stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.stage img.on { opacity: 1; }
.spot {
  position: absolute;
  border-radius: 10px;
  box-shadow: 0 0 0 2px var(--mint), 0 0 0 4000px rgba(16, 46, 51, 0.32);
  transition: left 0.9s cubic-bezier(0.22, 0.8, 0.24, 1), top 0.9s cubic-bezier(0.22, 0.8, 0.24, 1),
    width 0.9s cubic-bezier(0.22, 0.8, 0.24, 1), height 0.9s cubic-bezier(0.22, 0.8, 0.24, 1), opacity 0.5s ease;
  pointer-events: none;
}
.spot.off { opacity: 0; }
.progress { height: 3px; background: #e9efed; }
.progress span { display: block; height: 100%; width: 0; background: var(--mint-ink); transition: width 0.6s ease; }

.step {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0.28;
  transition: opacity 0.45s ease;
}
.step.on { opacity: 1; }
.kicker { font: 600 15px var(--text); color: var(--mint-ink); margin: 0 0 8px; }
.step h3 { font: 700 clamp(28px, 2.6vw, 40px)/1.12 var(--display); letter-spacing: -0.015em; margin: 0 0 16px; text-wrap: balance; }
.step p { margin: 0 0 12px; color: var(--ink-2); max-width: 30em; }
.inline-shot { display: none; }

/* ---------------------------------------------------------------- privacy promise */
.yours {
  background: var(--teal-deep);
  color: #d6ece8;
  padding: clamp(80px, 12vw, 150px) clamp(20px, 5vw, 64px);
}
.yours h2 {
  font: 700 clamp(36px, 5vw, 68px)/1.05 var(--display);
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 auto 56px;
  width: min(1180px, 100%);
  text-wrap: balance;
}
.promises {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  width: min(1180px, 100%);
  margin: 0 auto;
}
.promises > div { border-top: 2px solid var(--mint); padding-top: 18px; }
.promises h3 { font: 650 21px var(--display); color: #fff; margin: 0 0 8px; }
.promises p { margin: 0; color: #b5d3cd; font-size: 17px; }
.yours a { color: var(--mint); }

/* ---------------------------------------------------------------- call to action and footer */
.cta {
  text-align: center;
  padding: clamp(80px, 11vw, 140px) 20px;
}
.cta h2 { font: 700 clamp(34px, 4.4vw, 58px)/1.08 var(--display); letter-spacing: -0.02em; margin: 0 0 16px; }
.cta p { max-width: 34em; margin: 0 auto 30px; color: var(--ink-2); }

/* ---------------------------------------------------------------- narrow screens: each step shows its own picture */
@media (max-width: 1080px) {
  .hero-body { grid-template-columns: 1fr; padding-top: 24px; }
  .payday { justify-self: start; }
}
@media (max-width: 520px) {
  .pd-rows li { grid-template-columns: 1fr auto; }
  .pd-bar { display: none; }
  .payday { padding: 20px 18px 14px; }
}
@media (max-width: 900px) {
  .tour { display: block; }
  .stage-col { display: none; }
  .steps { padding: 56px 0 24px; }
  .step { min-height: 0; opacity: 1; margin-bottom: 64px; }
  .inline-shot {
    display: block;
    margin-top: 18px;
    border-radius: 10px;
    box-shadow: 0 18px 40px -18px rgba(16, 46, 51, 0.45), 0 0 0 1px rgba(16, 46, 51, 0.1);
  }
  .promises { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------------------------------------------------------------- dark */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #0f2226;
    --card: #142b30;
    --ink: #e6efed;
    --ink-2: #a8bbb8;
    --line: #23403f;
    --mint-ink: var(--mint);
  }
  .titlebar, .progress { background: #18333a; }
  .titlebar .title b::before { color: #5b7570; }
  .controls i::before, .controls i:nth-child(2)::before, .controls i:nth-child(3)::before, .controls i:nth-child(3)::after { border-color: #a8bbb8; }
  .yours { background: #0a1a1d; }
}

/* ---------------------------------------------------------------- less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .paydays button { animation: none; opacity: 1; transform: none; }
  .scroll-cue span { animation: none; }
  .payday { animation: none; }
  .pd-deposit, .pd-bar i, .pd-done { transition: none; }
  .window { transition: none; transform: none; opacity: 1; }
  .stage, .spot, .stage img, .step, .progress span { transition: none; }
}

/* ---------------------------------------------------------------- the timeline card's month strip */
.tl-strip { margin: -4px 0 16px; }
.tl-track { position: relative; height: 10px; border-radius: 5px; background: #e3ebe9; }
.tl-seg { position: absolute; top: 0; bottom: 0; border-radius: 5px; background: #b9d6d0; }
.tl-seg.now { background: var(--mint-ink); }
.tl-seg.open { background: repeating-linear-gradient(135deg, #b9d6d0 0 4px, transparent 4px 7px); }
.tl-ends { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: #6a7b7e; }

/* ---------------------------------------------------------------- the download button (opens the Microsoft Store) */
.get-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 26px 14px 20px;
  border-radius: 14px;
  background: var(--mint);
  color: var(--teal-deep);
  text-decoration: none;
  line-height: 1.2;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 10px 24px -12px rgba(0, 0, 0, 0.55);
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.get-btn b { display: block; font: 700 21px/1.15 var(--display); letter-spacing: -0.01em; }
.get-btn small { display: block; margin-top: 3px; font: 500 14px/1.2 var(--text); opacity: 0.8; }
.get-btn svg { flex: none; }
.get-btn:hover { background: #8fe3d7; transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 14px 28px -12px rgba(0, 0, 0, 0.6); }
.get-btn:active { transform: none; }
.get-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.get-btn.on-light { background: var(--teal); color: #fff; box-shadow: 0 10px 24px -14px rgba(16, 46, 51, 0.7); }
.get-btn.on-light:hover { background: var(--teal-deep); }
.get-btn.on-light:focus-visible { outline-color: var(--mint-ink); }
.get p { line-height: 1.45; }
@media (prefers-reduced-motion: reduce) { .get-btn, .get-btn:hover { transition: none; transform: none; } }

/* ---------------------------------------------------------------- the exchanges under stocks and shares */
.exchanges { margin: 0.6em 0 0; padding-left: 1.1em; }
.exchanges li { margin: 0.3em 0; }
.exchanges b { font-weight: 650; }
