/* TruWorth site. "Paycheck autopsy": receipt cream, deep ink, acid lime, violet and coral.
   Motion is scroll-driven and explanatory (the salary shrinks, the receipt prints, the future draws).
   Only transform / opacity / filter animate. Everything settles to its final state under reduced motion. */

:root {
  --ink: #120f24;
  --ink-2: #1d1838;
  --paper: #fbf5e9;
  --paper-2: #f3ead6;
  --violet: #7c5cff;
  --coral: #ff4d5e;
  --tangerine: #ff8a3d;
  --lime: #c6f432;
  --teal: #14c8b4;
  --pink: #ff4fa3;
  --amber: #ffb800;
  --muted: #6b6480;
  --line: rgba(18, 15, 36, 0.12);
  --brand: linear-gradient(100deg, var(--violet), var(--pink) 50%, var(--tangerine));
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --r: 28px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 18px/1.55 var(--display); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
html, body { overflow-x: clip; }
.grid > * { min-width: 0; }
a { color: inherit; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

/* Paper grain: an SVG noise tile, multiplied in. */
.grain::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.07 0 0 0 0 0.06 0 0 0 0 0.14 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; padding: 12px 0;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; font-weight: 600; }
.nav nav a { text-decoration: none; opacity: .75; transition: opacity 160ms ease; }
@media (hover: hover) and (pointer: fine) { .nav nav a:hover { opacity: 1; } }
.pill {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none;
  font: 700 15px/1 var(--display); padding: 12px 18px; border-radius: 999px; color: #fff; background: var(--ink);
  transition: transform 160ms var(--ease-out);
}
.pill:active { transform: scale(0.97); }
.pill.lime { background: var(--lime); color: var(--ink); }
.pill.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
@media (max-width: 760px) { .nav nav { display: none; } .nav .pill { margin-left: auto; } }

/* ---------- Type ---------- */
.eyebrow { font: 700 13px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--violet); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.035em; line-height: .95; margin: 0; }
h1 { font-size: clamp(52px, 9vw, 128px); font-weight: 800; }
h2 { font-size: clamp(40px, 6vw, 84px); font-weight: 800; }
h3 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.grad { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(19px, 2vw, 23px); color: var(--muted); max-width: 34ch; }
section { position: relative; }

/* ---------- Hero: the shrinking salary (sticky, scroll-driven) ---------- */
.hero { height: 260vh; }
.hero .stage { position: sticky; top: 0; height: 100svh; display: grid; align-items: center; overflow: hidden; }
.hero .grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero h1 { margin: 18px 0 22px; }
.meter { position: relative; height: 1.1em; font: 800 clamp(40px, 6.4vw, 92px)/1 var(--display); letter-spacing: -.04em; margin: 10px 0 18px; }
.meter span { position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; filter: blur(8px); transform: translateY(14px);
  transition: opacity 320ms var(--ease-out), filter 320ms var(--ease-out), transform 320ms var(--ease-out); }
.meter span.on { opacity: 1; filter: blur(0); transform: none; }
.meter small { font-size: .38em; letter-spacing: -.01em; color: var(--muted); font-weight: 600; }
.meter .paper { text-decoration: line-through; text-decoration-thickness: .08em; text-decoration-color: var(--coral); }
.meter .real { color: var(--violet); }
.caption-box {
  display: inline-block; font: italic 400 20px/1.35 var(--serif); background: #fff1bf; border: 2px solid var(--ink);
  padding: 8px 14px; box-shadow: 5px 5px 0 var(--ink); max-width: 32ch;
}
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.phone {
  position: relative; border-radius: 46px; padding: 10px; background: var(--ink); box-shadow: 0 40px 80px -30px rgba(18, 15, 36, .55);
  transform: perspective(1400px) rotateY(var(--ry, -14deg)) rotateX(var(--rx, 6deg)) translateY(var(--ty, 0px));
  will-change: transform; width: min(360px, 100%); margin-inline: auto;
}
.phone img { border-radius: 38px; aspect-ratio: 1206 / 2622; object-fit: cover; width: 100%; }
.peek { position: absolute; width: 150px; right: -36px; bottom: 40px; z-index: 2; transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out); }
.peek.alt { opacity: 0; transform: translateY(10px) scale(.96); }
.hero.shocked .peek.main { opacity: 0; transform: translateY(10px) scale(.96); }
.hero.shocked .peek.alt { opacity: 1; transform: none; }
.scrollhint { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); font: 600 13px var(--mono); color: var(--muted); }
@media (max-width: 900px) {
  .hero .grid { grid-template-columns: 1fr; gap: 10px; }
  .hero .phone { width: min(230px, 62vw); }
  .peek { width: 96px; right: -20px; bottom: 20px; }
  .lead { font-size: 18px; }
}

/* ---------- Receipt: prints as you scroll ---------- */
.receipt-sec { height: 300vh; background: var(--ink); color: var(--paper); }
.receipt-sec .stage { position: sticky; top: 0; height: 100svh; display: grid; align-items: center; overflow: hidden; }
.receipt-sec .grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: center; }
.receipt-sec .eyebrow { color: var(--lime); }
.receipt-sec .lead { color: rgba(251, 245, 233, .7); }
.receipt {
  font: 500 15px/1.6 var(--mono); color: var(--ink); background: var(--paper); padding: 26px 24px 30px; width: min(420px, 100%);
  margin-inline: auto; position: relative; transform: rotate(-1.5deg); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
  -webkit-mask: radial-gradient(circle at 8px 0, transparent 7px, #000 7.5px) -8px 0 / 16px 100% repeat-x,
                radial-gradient(circle at 8px 100%, transparent 7px, #000 7.5px) -8px 0 / 16px 100% repeat-x;
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.receipt .head { text-align: center; border-bottom: 1.5px dashed var(--ink); padding-bottom: 10px; margin-bottom: 10px; }
.receipt .head b { font-size: 18px; letter-spacing: .1em; }
.receipt .row { display: flex; justify-content: space-between; gap: 12px; opacity: 0; transform: translateY(6px);
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out); }
.receipt .row.on { opacity: 1; transform: none; }
.receipt .row.sub { border-top: 1.5px dashed var(--ink); margin-top: 6px; padding-top: 6px; font-weight: 800; }
.receipt .row .neg { color: var(--coral); }
.receipt .total { margin-top: 14px; border-top: 3px double var(--ink); padding-top: 10px; display: flex; justify-content: space-between; align-items: baseline;
  font: 800 30px/1 var(--display); letter-spacing: -.03em; }
.receipt .total span:last-child { color: var(--violet); }
.receipt .stamp { position: absolute; right: -24px; bottom: -36px; width: 120px; transform: rotate(10deg) scale(.9); opacity: 0;
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out); }
.receipt.done .stamp { opacity: 1; transform: rotate(10deg); }
.fine { font: 500 12px/1.4 var(--mono); opacity: .6; margin-top: 18px; }
@media (max-width: 900px) {
  .receipt-sec .grid { grid-template-columns: 1fr; gap: 18px; }
  .receipt-sec h2 { font-size: 38px; }
  .receipt { font-size: 12.5px; padding: 18px 16px 22px; }
  .receipt-sec .lead { display: none; }
}

/* ---------- Ticker of Nugget's lines ---------- */
.ticker { background: var(--lime); color: var(--ink); overflow: hidden; border-block: 2px solid var(--ink); }
.ticker .track { display: flex; gap: 48px; width: max-content; padding: 16px 0; animation: tick 60s linear infinite;
  font: italic 400 24px/1 var(--serif); white-space: nowrap; }
.ticker .track span::before { content: "✺"; font-style: normal; margin-right: 48px; color: var(--violet); }
@keyframes tick { to { transform: translateX(-50%); } }
@media (hover: hover) { .ticker:hover .track { animation-play-state: paused; } }

/* ---------- Features: glass cards with ASCII texture ---------- */
.features { padding: 140px 0 120px; }
.features .head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 56px; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  --tint: var(--violet);
  position: relative; border-radius: var(--r); padding: 26px; min-height: 300px; overflow: hidden; isolation: isolate;
  background: color-mix(in srgb, #fff 62%, transparent); border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 24px 50px -30px color-mix(in srgb, var(--tint) 60%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transform: perspective(900px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
  display: flex; flex-direction: column; gap: 12px;
}
.card::before { /* ASCII dither: $ and # thickening into the bottom right corner */
  content: "";
  position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='32'%3E%3Ctext x='2' y='12' font-family='monospace' font-size='9' fill='%23120f24' opacity='.35'%3E. : + $%3C/text%3E%3Ctext x='4' y='27' font-family='monospace' font-size='9' fill='%23120f24' opacity='.35'%3E* # $ :%3C/text%3E%3C/svg%3E");
  -webkit-mask: radial-gradient(120% 120% at 100% 100%, #000 0%, transparent 62%); mask: radial-gradient(120% 120% at 100% 100%, #000 0%, transparent 62%);
}
.card::after { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(90% 90% at 100% 100%, color-mix(in srgb, var(--tint) 30%, transparent), transparent 70%); }
.card .k { font: 700 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--tint); }
.card .big { font: 800 44px/1 var(--display); letter-spacing: -.04em; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card .nug { position: absolute; right: 14px; top: 14px; width: 74px; }
.card.wide { grid-column: span 2; }
@media (max-width: 960px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } .card.wide { grid-column: auto; } }

/* Reveal on view (JS adds .in; CSS-only fallback shows everything) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Future you: the chart draws ---------- */
.future { height: 220vh; background: linear-gradient(180deg, var(--paper), var(--paper-2)); }
.future .stage { position: sticky; top: 0; height: 100svh; display: grid; align-items: center; }
.chart { position: relative; margin-top: 40px; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .path { fill: none; stroke: url(#g); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: var(--draw, 1); }
.chart .area { fill: url(#ga); opacity: calc(1 - var(--draw, 1)); }
.chart .dot { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.6); transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out); }
.chart .dot.on { opacity: 1; transform: none; }
.chart .lbl { font: 700 15px var(--mono); fill: var(--ink); }
.chart .yr { font: 600 13px var(--mono); fill: var(--muted); }
.future .old { position: absolute; right: 0; top: -40px; width: 150px; opacity: 0; transform: translateY(20px); transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out); }
.future.end .old { opacity: 1; transform: none; }

/* ---------- Screens ---------- */
.screens { padding: 120px 0; background: var(--ink); color: var(--paper); overflow: hidden; }
.screens .eyebrow { color: var(--lime); }
.screens .row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 60px; align-items: start; }
.screens figure { margin: 0; transform: translateY(var(--py, 0px)); will-change: transform; }
.screens figure img { border-radius: 30px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7); border: 6px solid #2a2450; }
.screens figcaption { margin-top: 14px; font: 600 14px var(--mono); opacity: .7; }
@media (max-width: 760px) { .screens .row3 { grid-template-columns: 1fr; max-width: 340px; margin-inline: auto; } }

/* ---------- Honest money ---------- */
.honest { padding: 130px 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 50px; }
.slab { border-radius: var(--r); padding: 34px; border: 2px solid var(--ink); background: #fff; box-shadow: 8px 8px 0 var(--ink); }
.slab.violet { background: var(--violet); color: #fff; box-shadow: 8px 8px 0 var(--ink); }
.slab h3 { margin-bottom: 12px; font-size: 32px; }
.slab ul { padding-left: 20px; margin: 14px 0 0; }
.slab li { margin: 6px 0; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }

/* ---------- Founder ---------- */
.founder { padding: 110px 0; background: var(--paper-2); border-block: 2px solid var(--ink); }
.founder .q { font: italic 400 clamp(30px, 4.4vw, 56px)/1.12 var(--serif); max-width: 22ch; }
.founder .who { display: flex; gap: 14px; align-items: center; margin-top: 26px; font-weight: 700; }
.founder .badge { font: 700 12px var(--mono); letter-spacing: .12em; padding: 8px 12px; border-radius: 999px; background: var(--ink); color: var(--lime); }

/* ---------- FAQ ---------- */
.faq { padding: 120px 0; }
.faq details { border-top: 1.5px solid var(--ink); padding: 22px 0; }
.faq details:last-child { border-bottom: 1.5px solid var(--ink); }
.faq summary { cursor: pointer; list-style: none; font: 700 22px/1.3 var(--display); letter-spacing: -.01em; display: flex; justify-content: space-between; gap: 20px; }
.faq summary::after { content: "+"; font-weight: 400; transition: transform 200ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin: 12px 0 0; color: var(--muted); max-width: 70ch; }

/* ---------- CTA + footer ---------- */
.cta { padding: 130px 0; text-align: center; background: var(--brand); color: #fff; position: relative; overflow: hidden; }
.cta h2 { font-size: clamp(44px, 7vw, 100px); }
.cta img { width: 160px; margin: 0 auto 18px; }
.cta p { font-size: 20px; opacity: .9; }
.cta .pill { margin-top: 18px; }
footer { padding: 40px 0 60px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
footer .links { display: flex; gap: 18px; margin-left: auto; }
footer a { text-decoration: none; font-weight: 600; color: var(--ink); }

/* ---------- Legal pages ---------- */
.doc { padding: 70px 0 110px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(44px, 7vw, 76px); margin-bottom: 10px; }
.doc h2 { font-size: 28px; letter-spacing: -.02em; margin: 44px 0 10px; line-height: 1.1; }
.doc p, .doc li { color: #3b3550; }
.doc .updated { font: 600 13px var(--mono); color: var(--muted); }
.doc .box { background: #fff; border: 2px solid var(--ink); border-radius: 18px; padding: 20px 22px; box-shadow: 6px 6px 0 var(--ink); margin: 26px 0; }

/* ---------- Reduced motion: no choreography, final states ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero, .receipt-sec, .future { height: auto; }
  .hero .stage, .receipt-sec .stage, .future .stage { position: static; height: auto; padding: 90px 0; }
  .ticker .track { animation: none; flex-wrap: wrap; width: auto; white-space: normal; }
  .phone, .card, .screens figure { transform: none !important; }
  .reveal, .receipt .row, .chart .dot, .meter span { transition: opacity 200ms ease; transform: none; filter: none; }
}
