/* LootLocal launch shell — THE HONEST LEDGER (docs/launch-shell.md).
   Two-staging law: business pages are DAYLIGHT paper (purple = ink,
   gold = value, mint = verified); /for-customers is NIGHT (#0D0D14).
   Gradients only on loot objects, never section backgrounds. */

@font-face {
  font-family: 'Jakarta';
  src: url('/assets/jakarta-800.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
  /* Metric overrides pin CLS to zero while the woff2 swaps in. */
  ascent-override: 105%;
  descent-override: 28%;
}

:root {
  --paper: #F6F5FB;
  --card: #FFFFFF;
  --ink: #17151F;
  --muted: #575368;
  --line: rgba(23, 21, 31, .13);
  --purple: #4F5BD5;
  --berry: #7048E8;
  --gold: #F5A623;
  --gold-deep: #E07C05;
  --mint: #12B886;
  --night: #0D0D14;
  --radius: 18px;
  --display: 'Jakarta', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--purple); }
main { display: block; }

/* ── Type scale ─────────────────────────────────────────────────────── */
h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.06;
  text-wrap: balance;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.4rem, 6.5vw, 4.6rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.015em; }
p  { margin: 0 0 1em; color: var(--muted); max-width: 62ch; }
p strong, li strong { color: var(--ink); }
.kicker {
  font: 700 .78rem/1 var(--body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 14px;
}
.num, .mono { font-variant-numeric: tabular-nums; }

/* ── Layout ─────────────────────────────────────────────────────────── */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }
section { padding: 72px 0; }
.grid2 {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; gap: 32px; } }

/* Perforation divider — the receipt's serrated edge as a section rule. */
.perf {
  height: 14px;
  background: radial-gradient(circle at 8px 0, transparent 6px, var(--paper) 6.5px);
  background-size: 16px 14px;
  background-position: 0 -7px;
  filter: drop-shadow(0 -1px 0 var(--line));
}

/* ── Nav ────────────────────────────────────────────────────────────── */
header.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 62px; }
.logo {
  font-family: var(--display); font-weight: 800; font-size: 1.2rem;
  color: var(--ink); text-decoration: none; letter-spacing: -0.02em;
}
.logo b { color: var(--purple); }
.nav nav { margin-left: auto; display: flex; gap: 20px; align-items: center; }
.nav nav a {
  color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 600;
}
.nav nav a:hover, .nav nav a[aria-current] { color: var(--ink); }
.nav nav a.cta { color: #fff; }
@media (max-width: 640px) { .nav nav a.hide-s { display: none; } }

/* ── Buttons — the app's own controls (54px pill, 18px radius) ─────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 28px; border-radius: var(--radius);
  font: 700 1rem var(--body); text-decoration: none; cursor: pointer;
  border: 0; position: relative;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s;
}
.btn:active { transform: scale(.965); }
.btn:focus-visible { outline: 3px solid var(--berry); outline-offset: 3px; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #5B6BE8, #7048E8);
  box-shadow: 0 6px 18px rgba(79, 91, 213, .32);
}
.btn-primary:hover { box-shadow: 0 10px 26px rgba(79, 91, 213, .42); transform: translateY(-1px); }
.btn-gold {
  color: #3D2600;
  background: linear-gradient(135deg, #F7B733, #E07C05);
  box-shadow: 0 6px 18px rgba(224, 124, 5, .32);
}
.btn-gold:hover { box-shadow: 0 10px 26px rgba(224, 124, 5, .45); transform: translateY(-1px); }
.btn-ghost { color: var(--ink); background: transparent; border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
/* One gold ring pulse on press — playful DNA, no coin-slot pay-to-play. */
.btn-gold::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(245, 166, 35, .55); opacity: 0; pointer-events: none;
}
.btn-gold:active::after { animation: ring .5s ease-out; }
@keyframes ring {
  0% { opacity: 1; box-shadow: 0 0 0 0 rgba(245, 166, 35, .55); }
  100% { opacity: 0; box-shadow: 0 0 0 18px rgba(245, 166, 35, 0); }
}

/* ── The receipt ────────────────────────────────────────────────────── */
.receipt {
  background: #fff;
  color: var(--ink);
  width: min(360px, 100%);
  margin: 0 auto;
  padding: 26px 26px 34px;
  font: 600 .95rem/1.5 ui-monospace, 'SF Mono', Menlo, monospace;
  letter-spacing: .01em;
  border-radius: 6px 6px 0 0;
  box-shadow: 0 18px 44px rgba(23, 21, 31, .16), 0 2px 8px rgba(23, 21, 31, .08);
  -webkit-mask-image: radial-gradient(circle at 8px 100%, transparent 6px, #000 6.5px);
  mask-image: radial-gradient(circle at 8px 100%, transparent 6px, #000 6.5px);
  -webkit-mask-size: 16px 100%;
  mask-size: 16px 100%;
  transform: rotate(-1.2deg);
}
.receipt .r-head {
  text-align: center; font-weight: 800; letter-spacing: .12em;
  border-bottom: 1.5px dashed var(--line); padding-bottom: 12px; margin-bottom: 12px;
}
.receipt .r-line {
  display: flex; justify-content: space-between; gap: 12px; padding: 5px 0;
}
.receipt .r-line .tick { color: var(--mint); font-weight: 800; }
.receipt .r-big {
  font-family: var(--display); font-size: 3.4rem; letter-spacing: -0.02em;
  color: var(--gold-deep); text-align: center; padding: 10px 0 4px;
  font-variant-numeric: tabular-nums;
}
.receipt .r-big small { font-size: 1.2rem; color: var(--muted); }
.receipt .r-foot {
  border-top: 1.5px dashed var(--line); margin-top: 12px; padding-top: 12px;
  text-align: center; color: var(--muted); font-size: .8rem;
}
/* Self-printing: staggered line reveal, zero JS, zero CLS (space reserved). */
.receipt.print > * { opacity: 0; transform: translateY(6px); animation: rprint .45s ease-out forwards; }
.receipt.print > *:nth-child(1) { animation-delay: .15s; }
.receipt.print > *:nth-child(2) { animation-delay: .5s; }
.receipt.print > *:nth-child(3) { animation-delay: .85s; }
.receipt.print > *:nth-child(4) { animation-delay: 1.1s; }
.receipt.print > *:nth-child(5) { animation-delay: 1.35s; }
.receipt.print > *:nth-child(6) { animation-delay: 1.6s; }
.receipt.print > *:nth-child(7) { animation-delay: 1.85s; }
.receipt.print > *:nth-child(8) { animation-delay: 2.15s; }
@keyframes rprint { to { opacity: 1; transform: none; } }

/* ── Monument numbers ───────────────────────────────────────────────── */
.monuments {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
@media (max-width: 820px) { .monuments { grid-template-columns: repeat(2, 1fr); } }
.monument {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px;
}
.monument .val {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.6rem, 5.5vw, 3.6rem); letter-spacing: -0.03em;
  color: var(--gold-deep); font-variant-numeric: tabular-nums; line-height: 1;
}
.monument .val small { font-size: .55em; }
.monument .cap { color: var(--ink); font-weight: 700; margin-top: 10px; font-size: .95rem; }
.monument .sub { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.microtick {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .74rem; font-weight: 700; color: var(--mint); margin-top: 10px;
}
.microtick::before { content: '✓'; font-weight: 800; }

/* ── Cards / feature strip ──────────────────────────────────────────── */
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 820px) { .cards3 { grid-template-columns: 1fr; } }
.fcard {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 24px;
}
.fcard .emoji { font-size: 1.9rem; display: block; margin-bottom: 12px; }

/* Margin note — the auditor's annotation. */
.margin-note {
  border-left: 3px solid var(--gold); padding: 4px 0 4px 16px;
  color: var(--muted); font-size: .95rem; max-width: 56ch;
}
.margin-note b { color: var(--ink); }

/* ── House rules plaque ─────────────────────────────────────────────── */
.plaque {
  background: linear-gradient(180deg, #FFFDF6, #FBF3DF);
  border: 1px solid rgba(224, 124, 5, .35);
  border-radius: var(--radius); padding: 30px 28px;
  box-shadow: inset 0 1px 0 #fff, 0 10px 30px rgba(23, 21, 31, .07);
}
.plaque h3 { letter-spacing: .1em; text-transform: uppercase; font-size: .95rem; color: var(--gold-deep); }
.plaque ul { margin: 12px 0 0; padding: 0; list-style: none; }
.plaque li { padding: 7px 0 7px 26px; position: relative; color: var(--ink); font-weight: 600; font-size: .97rem; }
.plaque li::before { content: '✓'; position: absolute; left: 0; color: var(--mint); font-weight: 800; }

/* ── Reveal on scroll ───────────────────────────────────────────────── */
.rv { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.rv.in { opacity: 1; transform: none; }

/* ── Phone frame + stamp card (how-it-works) ────────────────────────── */
.phone {
  width: 290px; border-radius: 40px; background: var(--night);
  padding: 14px; box-shadow: 0 24px 60px rgba(23, 21, 31, .28);
  margin: 0 auto;
}
.phone .screen {
  border-radius: 28px; background: #17151F; padding: 18px; min-height: 420px;
  display: flex; flex-direction: column; gap: 14px;
}
.lootcard {
  border-radius: var(--radius); padding: 18px;
  background: linear-gradient(135deg, #5B6BE8, #7048E8);
  color: #fff; font-weight: 800; font-family: var(--display);
}
.lootcard .t { font-size: 1.05rem; }
.lootcard .s { font-weight: 600; font-family: var(--body); font-size: .8rem; opacity: .85; }
.stamps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stamp {
  aspect-ratio: 1; border-radius: 12px; border: 2px dashed rgba(255, 255, 255, .35);
  display: grid; place-items: center; font-size: 1.2rem;
  color: transparent; transform: scale(.9);
  transition: all .35s cubic-bezier(.34,1.56,.64,1);
}
.phone .bar { height: 10px; border-radius: 99px; background: rgba(255,255,255,.14); overflow: hidden; }
.phone .bar i {
  display: block; height: 100%; width: 8%; border-radius: 99px;
  background: linear-gradient(90deg, #F7B733, #E07C05);
  transition: width .6s cubic-bezier(.22,1,.36,1);
}
.phone .pts { color: var(--gold); font: 800 1rem var(--display); font-variant-numeric: tabular-nums; }
[data-step="1"] .stamp:nth-child(-n+2),
[data-step="2"] .stamp:nth-child(-n+4),
[data-step="3"] .stamp:nth-child(-n+6),
[data-step="4"] .stamp:nth-child(-n+6) {
  color: #fff; border-style: solid; border-color: var(--gold);
  background: rgba(245, 166, 35, .18); transform: scale(1);
}
[data-step="1"] .bar i { width: 30%; }
[data-step="2"] .bar i { width: 62%; }
[data-step="3"] .bar i { width: 99%; }
[data-step="4"] .bar i { width: 99%; }
.sticky-col { position: sticky; top: 90px; align-self: start; }
@media (max-width: 860px) {
  .sticky-col { position: static; transform: scale(.92); transform-origin: top center; }
}
.step { padding: 34px 0; border-bottom: 1px dashed var(--line); }
.step .n {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 12px; background: var(--ink); color: var(--gold);
  font: 800 1.1rem var(--display); margin-bottom: 12px;
}

/* ── NIGHT staging (/for-customers) ─────────────────────────────────── */
body.night { background: var(--night); color: #ECEAF4; }
body.night p { color: #A7A3B8; }
body.night .kicker { color: var(--gold); }
body.night header.nav {
  background: color-mix(in srgb, var(--night) 82%, transparent);
  border-color: rgba(255, 255, 255, .09);
}
body.night .logo, body.night .nav nav a:hover, body.night .nav nav a[aria-current] { color: #fff; }
body.night .nav nav a { color: #A7A3B8; }
body.night .nav nav a.cta { color: #3D2600; }
body.night .fcard { background: #16141F; border-color: rgba(255, 255, 255, .08); }
body.night .fcard b, body.night .fcard h3 { color: #fff; }
body.night .perf { display: none; }
body.night .microtick { color: var(--mint); }

/* The street: six shop windows glowing in the app's card gradients. */
.street { display: flex; gap: 14px; justify-content: center; align-items: flex-end; padding: 30px 0 0; }
.window {
  width: clamp(40px, 9vw, 86px); height: clamp(64px, 14vw, 128px);
  border-radius: 14px 14px 4px 4px; opacity: .9;
  animation: winglow 7s ease-in-out infinite;
}
.window:nth-child(1) { background: linear-gradient(160deg, #5B6BE8, #7048E8); animation-delay: 0s; }
.window:nth-child(2) { background: linear-gradient(160deg, #EC4899, #8B5CF6); animation-delay: .35s; height: clamp(80px, 16vw, 150px); }
.window:nth-child(3) { background: linear-gradient(160deg, #0EA5E9, #6366F1); animation-delay: .7s; }
.window:nth-child(4) { background: linear-gradient(160deg, #F59E0B, #EF4444); animation-delay: 1.05s; height: clamp(76px, 15vw, 142px); }
.window:nth-child(5) { background: linear-gradient(160deg, #14B8A6, #22C55E); animation-delay: 1.4s; }
.window:nth-child(6) { background: linear-gradient(160deg, #8B5CF6, #EC4899); animation-delay: 1.75s; height: clamp(70px, 14.5vw, 136px); }
@keyframes winglow {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 255, 255, 0); filter: brightness(.85); }
  12% { box-shadow: 0 0 44px rgba(255, 255, 255, .35); filter: brightness(1.15); }
  24% { box-shadow: 0 0 0 rgba(255, 255, 255, 0); filter: brightness(.85); }
}
.pavement {
  height: 2px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent);
  margin-top: 0;
}
.superwin {
  margin: 34px auto 0; width: min(340px, 92%);
  border-radius: var(--radius); padding: 24px;
  background: linear-gradient(135deg, #5B6BE8, #7048E8);
  box-shadow: 0 18px 60px rgba(112, 72, 232, .45);
  color: #fff; text-align: center;
  animation: spring .9s cubic-bezier(.22, 1.6, .36, 1) .4s backwards;
}
.superwin .pill {
  display: inline-block; font: 700 .72rem/1 var(--body); letter-spacing: .16em;
  background: rgba(255, 255, 255, .18); border-radius: 99px; padding: 7px 12px;
}
.superwin .big {
  font: 800 clamp(2.8rem, 9vw, 4rem) var(--display); letter-spacing: -0.03em;
  color: var(--gold); font-variant-numeric: tabular-nums; line-height: 1.05;
}
@keyframes spring { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* Confetti (one-shot, JS-spawned spans) */
.confetti-zone { position: relative; }
.cf {
  position: absolute; top: 40%; left: 50%; width: 9px; height: 14px;
  border-radius: 2px; pointer-events: none; opacity: 0;
  animation: cf 1.3s ease-out forwards;
}
@keyframes cf {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); }
}
.badge-soon {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  border: 1.5px solid rgba(255, 255, 255, .35); border-radius: 14px;
  padding: 12px 26px; color: #fff; text-decoration: none;
}
.badge-soon small { font-size: .72rem; color: #A7A3B8; letter-spacing: .08em; text-transform: uppercase; }
.badge-soon b { font-family: var(--display); font-size: 1.05rem; }

/* ── Footer + solvency pulse ────────────────────────────────────────── */
footer.site {
  border-top: 1px solid var(--line); padding: 44px 0 70px; margin-top: 40px;
  font-size: .92rem;
}
body.night footer.site { border-color: rgba(255, 255, 255, .09); }
footer.site .cols { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: center; }
footer.site nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--ink); }
body.night footer.site a:hover { color: #fff; }
.solvency {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid rgba(18, 184, 134, .4); border-radius: 99px;
  padding: 8px 16px; color: var(--mint); font-weight: 700; font-size: .85rem;
  text-decoration: none;
}
.solvency i {
  width: 8px; height: 8px; border-radius: 99px; background: var(--mint);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(18,184,134,.5); } 50% { box-shadow: 0 0 0 7px rgba(18,184,134,0); } }

/* Honesty microline under hero CTAs */
.honesty { font-size: .84rem; color: var(--muted); max-width: 52ch; margin-top: 16px; }
.honesty b { color: var(--ink); }
body.night .honesty b { color: #ECEAF4; }

/* FAQ */
details.faq {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 4px 20px; margin-bottom: 10px;
}
details.faq summary { font-weight: 700; cursor: pointer; padding: 14px 0; color: var(--ink); }
details.faq p { padding-bottom: 14px; }

/* Pricing receipt table */
table.rtable { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.rtable th, table.rtable td { text-align: left; padding: 10px 8px; border-bottom: 1.5px dashed var(--line); }
table.rtable td.n { text-align: right; font-weight: 800; font-family: var(--display); }
table.rtable tr.total td { border-bottom: 0; color: var(--gold-deep); font-size: 1.15rem; }

/* ── Reduced motion: everything lands lit, printed, and still ───────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .receipt.print > * { animation: none; opacity: 1; transform: none; }
  .rv { opacity: 1; transform: none; transition: none; }
  .window, .superwin, .solvency i, .btn { animation: none !important; transition: none; }
  .stamp { transition: none; }
  .cf { display: none; }
}
