/* Homepage. style.css supplies the tokens, topbar, buttons, footer and dark mode. */
:root{
}
:root { --gx: clamp(16px, 4vw, 32px); --hd: var(--heading-text, var(--navy-900)); }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
.skip-link { position: absolute; left: 12px; top: 8px; z-index: 60; transform: translateY(-150%); padding: 8px 14px; background: var(--card); color: var(--ink); }
.skip-link:focus { transform: none; }
main.home-main { width: 100%; max-width: none; margin: 0; padding: 0; flex: 1; }
.home-main a:focus-visible { outline: 3px solid var(--gold-dark); outline-offset: 4px; }
.hero a:focus-visible { outline-color: var(--gold); }
.home-nav { display: flex; gap: 4px; }
.home-nav a { color: var(--on-fill); text-decoration: none; font-weight: 600; font-size: var(--fs-md); padding: 8px 14px; border-radius: var(--sw-m); }
.home-nav a:hover { background: rgba(255,255,255,.14); }

/* Hero */
.hero { position: relative; overflow: hidden; color: var(--on-fill); border-radius: 0 0 160px 0 / 0 0 64px 0;
  background: radial-gradient(55% 75% at 90% 15%, rgba(232,184,75,.30), transparent 62%), radial-gradient(50% 70% at 0% 100%, rgba(91,141,239,.30), transparent 62%), linear-gradient(120deg, var(--navy-900), var(--navy-800) 60%, var(--navy-700)); }
.hero-in { max-width: 1080px; margin: 0 auto; padding: clamp(36px, 7vw, 84px) var(--gx) clamp(56px, 8vw, 104px); display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.hero .hero-copy h1 { color: var(--on-fill); font-family: var(--font-head); font-size: clamp(2.4rem, 5.6vw, 4rem); line-height: 1.04; letter-spacing: -.025em; margin: 0 0 .45em; }
.hero-lede { color: var(--on-fill); font-size: clamp(1.02rem, 1.6vw, 1.2rem); line-height: var(--lh-loose); max-width: 33rem; margin: 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 22px 28px; margin-top: 32px; }
.hero-cta div { display: flex; flex-direction: column; gap: 10px; max-width: 15.5rem; }
.hero-cta .btn { margin: 0; }
.hero-cta small { color: var(--on-fill); font-size: var(--fs-md); line-height: var(--lh-body); }
.btn.on-dark { background: rgba(255,255,255,.12); color: var(--on-fill); border: 1.5px solid rgba(255,255,255,.42); }
.btn.on-dark:hover { background: var(--white); color: var(--navy-900); }

/* Payday slip: the one memorable element */
.slip-wrap { justify-self: center; width: 100%; max-width: 430px; transform: rotate(1.6deg); filter: drop-shadow(0 24px 34px rgba(0,0,0,.4)); }
.slip { color: var(--ink); }
.slip-a, .slip-b { --y: 100%; background: var(--card);
  -webkit-mask: radial-gradient(circle 11px at 0 var(--y), #0000 10.5px, #000 11px) left / 51% 100% no-repeat, radial-gradient(circle 11px at 100% var(--y), #0000 10.5px, #000 11px) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 11px at 0 var(--y), #0000 10.5px, #000 11px) left / 51% 100% no-repeat, radial-gradient(circle 11px at 100% var(--y), #0000 10.5px, #000 11px) right / 51% 100% no-repeat; }
.slip-a { padding: 24px 24px 22px; border-radius: 44px 0 0 0 / 20px 0 0 0; }
.slip-b { --y: 0; padding: 20px 24px 24px; border-radius: 0 0 44px 0 / 0 0 20px 0; border-top: 2px dashed color-mix(in srgb, var(--muted) 45%, transparent); }
.slip-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.slip h2 { font-size: var(--fs-3xl); margin: 0; color: var(--hd); }
.tag { background: rgba(232,184,75,.25); color: var(--hd); border-radius: var(--sw-s); padding: 3px 14px; font-size: var(--fs-sm); font-weight: 700; white-space: nowrap; }
.slip-a p { margin: 10px 0 0; color: var(--muted); line-height: var(--lh-body); }
.ledger { margin: 14px 0 0; }
.ledger div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.ledger dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.ledger .out dd { color: var(--coral-fill-dark); }
html.dark-mode .ledger .out dd { color: var(--coral); }
.ledger .sum { border: 0; padding-bottom: 0; font-weight: 800; color: var(--hd); }
.slip label { display: flex; justify-content: space-between; font-weight: 700; color: var(--hd); }
.slip label strong { font-variant-numeric: tabular-nums; }
.slip input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; margin: 4px 0 0; padding: 0; border: 0; background: none; cursor: pointer; --fill: 28.5%; }
.slip input[type="range"]:focus { outline: none; }
.slip label:has(+ input[type="range"]:focus-visible) { text-decoration: underline 2px; text-underline-offset: 4px; }
.slip input[type="range"]::-webkit-slider-runnable-track { height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--mint) var(--fill), var(--line) var(--fill)); }
.slip input[type="range"]::-moz-range-track { height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--mint) var(--fill), var(--line) var(--fill)); }
.slip input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -9px; border-radius: 50%; border: 3px solid var(--navy-900); background: linear-gradient(135deg, var(--gold), var(--gold-dark)); box-shadow: var(--shadow-sm); }
.slip input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--navy-900); background: var(--gold); box-shadow: var(--shadow-sm); }
.scale { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--muted); }
.bar { display: grid; grid-template-columns: 45fr 5fr 20fr 50fr; gap: 3px; height: 14px; margin-top: 14px; transition: grid-template-columns .25s ease; }
.bar i { background: var(--c); border-radius: 4px; }
.key { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 0; padding: 0; list-style: none; font-size: var(--fs-sm); color: var(--muted); }
.key li::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; background: var(--c); }
.result { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.result > div { padding: 12px 16px; border-radius: var(--sw-m); }
.result .save { background: rgba(63,191,143,.18); }
.result .spend { background: rgba(232,184,75,.24); }
.result span { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.result b, .result output { font: 800 var(--fs-5xl)/var(--lh-tight) var(--font-head); color: var(--hd); font-variant-numeric: tabular-nums; }
@keyframes print { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes fill-bar { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }

/* Sections */
.wrap { max-width: 1080px; margin: 0 auto; padding: clamp(48px, 7vw, 84px) var(--gx) 0; }
.home-main > .wrap:last-child { padding-bottom: clamp(48px, 7vw, 88px); }
.wrap h2 { font-family: var(--font-head); font-size: clamp(1.7rem, 3.2vw, 2.3rem); line-height: var(--lh-tight); max-width: 24ch; margin: 0 0 .35em; color: var(--hd); }
.wrap > p { max-width: 62ch; margin: 0; color: var(--muted); font-size: var(--fs-base); line-height: var(--lh-loose); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 30px 0 0; padding: 0; list-style: none; }
.home-preview { display: grid; grid-template-columns: 1fr 1.6fr; align-items: center; gap: clamp(20px, 5vw, 60px); }
.home-preview p { margin: 0; color: var(--muted); line-height: var(--lh-loose); }
.preview-frame { aspect-ratio: 16 / 9; border-radius: var(--sw-m); overflow: hidden; isolation: isolate; box-shadow: var(--shadow); }
.preview-play, .preview-frame video { position: relative; display: block; width: 100%; height: 100%; }
.preview-frame video { object-fit: cover; }
.preview-play img { display: block; width: 100%; height: auto; }
.preview-play .btn { position: absolute; right: 3.65%; bottom: max(8px, 5%); margin: 0; padding: 8px 14px; min-height: 44px; font-size: var(--fs-sm); }
.preview-frame video[hidden], .preview-play[hidden] { display: none; }

/* Preview intro: the frame prints out like the payday slip when it scrolls into view. */
.preview-media { position: relative; }
.preview-media::before { content: ""; position: absolute; z-index: 2; top: -9px; left: -12px; right: -12px; height: 14px; border-radius: 99px; opacity: 0; pointer-events: none;
  background: linear-gradient(var(--navy-700), var(--navy-900));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 3px 0 -1px var(--gold), 0 10px 18px rgba(0,0,0,.28); }
.preview-play::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 84px; transform: translateY(-100%); opacity: 0; pointer-events: none;
  background: linear-gradient(rgba(232,184,75,0), rgba(232,184,75,.32) calc(100% - 3px), var(--gold) calc(100% - 3px)); }
@keyframes print-paper { from { clip-path: inset(0 -4px 100%); } to { clip-path: inset(-4px); } }
@keyframes print-head { from { top: -2px; opacity: 1; } to { top: calc(100% + 6px); opacity: 1; } }
@keyframes print-slot { 0% { opacity: 0; transform: scaleX(.15); } 10%, 72% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes print-stamp { from { opacity: 0; transform: scale(1.6) rotate(-8deg); } to { opacity: 1; transform: none; } }
.tiles li { background: var(--card); border: 1px solid var(--line); border-radius: var(--sw-m); padding: 26px 22px 22px; box-shadow: var(--shadow); }
.tiles h3 { font-family: var(--font-head); font-size: var(--fs-xl); margin: 0 0 .4em; color: var(--hd); }
.tiles p { margin: 0; color: var(--muted); line-height: var(--lh-body); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: s; margin: 32px 0 26px; padding: 0; list-style: none; }
.steps li { counter-increment: s; position: relative; padding-top: 66px; color: var(--muted); line-height: var(--lh-loose); }
.steps li::before { content: counter(s); position: absolute; top: 0; left: 0; width: 50px; height: 50px; display: grid; place-items: center; background: var(--gold); color: var(--navy-900); border-radius: var(--sw-m); font: 800 var(--fs-3xl) var(--font-head); box-shadow: var(--shadow-sm); }
.steps li::after { content: ""; position: absolute; top: 24px; left: 66px; right: -16px; height: 2px; background: repeating-linear-gradient(90deg, var(--gold-dark) 0 6px, transparent 6px 12px); }
.steps li:last-child::after { display: none; }
.steps strong { display: block; margin-bottom: 6px; font: 800 var(--fs-2xl) var(--font-head); color: var(--hd); }
.price { display: grid; grid-template-columns: 1fr 1.15fr; background: var(--card); border: 1px solid var(--line); border-radius: var(--sw-l); box-shadow: var(--shadow); overflow: hidden; }
.price > div { padding: clamp(26px, 4vw, 44px); }
.price .free { background: linear-gradient(145deg, rgba(232,184,75,.3), rgba(232,184,75,.07)); }
.price h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.price h3 { font-family: var(--font-head); font-size: var(--fs-2xl); margin: 0 0 .4em; color: var(--hd); }
.price p { margin: 0; color: var(--muted); line-height: var(--lh-loose); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-top: 22px; }
.actions .btn { margin: 0; }

@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; }
  .slip-wrap { transform: none; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .price { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .home-preview { grid-template-columns: 1fr; }
  .home-nav { display: none; }
  .hero { border-radius: 0 0 80px 0 / 0 0 40px 0; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .steps li { padding: 0 0 0 66px; min-height: 50px; }
  .steps li::after { display: none; }
}
@media (max-width: 520px) {
  .tiles { grid-template-columns: 1fr; }
  .hero-cta div { max-width: none; width: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  .print-wait .slip { clip-path: inset(0 0 100% 0); }
  .print-go .slip { animation: print 1.05s .08s cubic-bezier(.35,.15,.25,1) backwards; }
  .print-go .bar { animation: fill-bar .55s .65s ease-out backwards; }
  .print-wait .preview-play { clip-path: inset(0 -4px 100%); }
  .print-go .preview-play { animation: print-paper 1.3s .1s cubic-bezier(.35,.15,.25,1) backwards; }
  .print-go .preview-play::after { animation: print-head 1.3s .1s cubic-bezier(.35,.15,.25,1) backwards; }
  .print-go .preview-play .btn { animation: print-stamp .6s 1s cubic-bezier(.2,.9,.3,1.3) backwards; }
  .preview-media.print-go::before { animation: print-slot 1.8s backwards; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar { transition: none; }
}

/* About and contact (moved from about.html) */
.about { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.about h2 { margin: 0; }
.about p { margin: 14px 0 0; max-width: 46ch; color: var(--muted); font-size: var(--fs-base); line-height: var(--lh-loose); }
.about .about-tag { margin-top: 6px; font-size: var(--fs-lg); }
.about .about-links { margin: 0; }
.contact { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 5vw, 56px); align-items: center; color: var(--on-fill); padding: clamp(28px, 5vw, 56px); border-radius: var(--sw-l); box-shadow: var(--shadow-lg);
  background: radial-gradient(50% 90% at 100% 0%, rgba(232,184,75,.28), transparent 65%), linear-gradient(120deg, var(--navy-900), var(--navy-800) 60%, var(--navy-700)); }
.wrap .contact h2 { color: inherit; max-width: 20ch; }
.contact p { margin: 0; color: inherit; line-height: var(--lh-loose); }
.contact .contact-addr { margin-top: 14px; font-weight: 700; overflow-wrap: anywhere; }
.contact-actions { display: flex; flex-direction: column; gap: 10px; }
.contact-actions .btn { margin: 0; }
.contact-actions .btn.on-dark { color: var(--on-fill); }
.contact-actions .btn.on-dark:hover { color: var(--navy-900); }
.contact-actions .contact-msg { min-height: 1.4em; font-size: var(--fs-md); text-align: center; }
.contact-actions small { font-size: var(--fs-sm); line-height: var(--lh-body); text-align: center; }
.contact a:focus-visible, .contact button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
@media (max-width: 900px) { .about, .contact { grid-template-columns: 1fr; } }
