/* PROOF — snap-panel dossier rebuild. Vanilla, self-contained, no webfonts. */

:root {
  --bg: #0d0d10;
  --bg-alt: #111114;
  --surface: #17171bcc;
  --line: #2b2b32;
  --ink: #f2efe6;
  --muted: #b3aca0;
  --faint: #7c766c;
  --accent: #e0a83c;
  --accent-ink: #14100a;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body { scroll-snap-type: y mandatory; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: .5rem 1rem; z-index: 100; border-radius: 0 0 8px 0;
  font-weight: 700; text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------- topbar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: .7rem;
  padding: .8rem 1.25rem;
  background: linear-gradient(180deg, rgba(8,8,10,.85), rgba(8,8,10,0));
}
.wordmark {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--ink); text-decoration: none; font-weight: 800;
  letter-spacing: .14em; font-size: .9rem;
}
.wordmark img { display: block; border-radius: 50%; }
.topbar .proj {
  color: var(--accent); font-weight: 800; letter-spacing: .14em; font-size: .9rem;
  border-left: 1px solid var(--line); padding-left: .7rem;
}
.topbar .gh { margin-left: auto; color: var(--muted); text-decoration: none; font-size: .85rem; }
.topbar .gh:hover { color: var(--ink); }

/* ---------- panels ---------- */
.panel {
  position: relative;
  height: 100svh;
  min-height: 560px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  display: block;
}
.panel .bg {
  position: absolute; inset: -12% 0;
  background: #0a0a0d center / cover no-repeat;
  background-image: var(--bgimg);
  will-change: transform;
}
@supports (animation-timeline: view()) {
  .panel .bg { animation: bgdrift linear both; animation-timeline: view(); }
}
@keyframes bgdrift {
  from { transform: translateY(-6%); }
  to { transform: translateY(6%); }
}
.scrim { position: absolute; inset: 0; pointer-events: none; }
.s1 { background: linear-gradient(200deg, rgba(8,8,10,.25) 20%, rgba(8,8,10,.92) 78%); }
.s2 { background: linear-gradient(180deg, rgba(8,8,10,.72), rgba(8,8,10,.94) 60%, rgba(8,8,10,.97)); }
.s3 { background: linear-gradient(105deg, rgba(8,8,10,.9) 30%, rgba(8,8,10,.35) 75%); }
.s5 { background: linear-gradient(180deg, rgba(8,8,10,.68), rgba(8,8,10,.93) 62%, rgba(8,8,10,.98)); }
.p4, .p6, .p7 { background: radial-gradient(120% 90% at 50% 110%, #16161b 0%, var(--bg) 60%); }
.p6::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 45% at 78% 30%, rgba(224,168,60,.10), transparent 70%);
}

.content {
  position: absolute; z-index: 2;
  padding: max(3.5rem, env(safe-area-inset-top)) 1.5rem 2.5rem;
  width: 100%;
}
.pos-bottom-left { bottom: 0; left: 0; max-width: 42rem; }
.pos-top-right { top: 0; right: 0; text-align: right; max-width: 42rem; }
.pos-top-left { top: 0; left: 0; max-width: 42rem; }
.pos-mid-left { top: 50%; left: 0; transform: translateY(-50%); max-width: 44rem; }
.pos-mid-right { top: 50%; right: 0; transform: translateY(-50%); text-align: right; max-width: 34rem; }
.pos-bottom-full { bottom: 0; left: 0; right: 0; }

.kicker {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 .8rem;
}
.giant {
  margin: 0;
  font-weight: 800;
  font-size: clamp(3.6rem, 17vw, 11rem);
  line-height: .92;
  letter-spacing: -.035em;
  color: var(--ink);
  text-wrap: balance;
}
.pos-top-right .giant, .pos-mid-right .giant { margin-left: auto; }
.line {
  margin: 1rem 0 0;
  font-size: clamp(1.25rem, 4.6vw, 1.9rem);
  font-weight: 650; letter-spacing: -.01em;
  color: var(--ink);
}
.line2 { margin: 1rem 0 0; font-size: 1.05rem; color: var(--muted); font-weight: 600; }
.fine { margin: 1rem 0 0; font-size: .82rem; color: var(--faint); max-width: 34rem; line-height: 1.6; }
.pos-top-right .fine, .pos-mid-right .fine { margin-left: auto; }

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  transform: translateY(26px);
  transition: opacity .7s ease, clip-path .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; clip-path: inset(0 0 0 0); transform: none; }

/* ---------- buttons ---------- */
.ctas { margin: 1.4rem 0 0; }
.btn {
  display: inline-block; padding: .85rem 1.7rem;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid var(--accent); border-radius: 999px;
  font-weight: 700; font-size: .95rem; text-decoration: none;
  transition: transform .25s ease, background .25s ease, color .25s ease;
  min-height: 48px; line-height: 1.4; cursor: pointer; font-family: var(--sans);
}
.btn:hover { transform: translateY(-2px); background: #f0bd55; }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: rgba(224,168,60,.12); }

/* ---------- 2 · bars ---------- */
.bars { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: .85rem; max-width: 46rem; }
.bars li {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: .25rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: .8rem .95rem;
  backdrop-filter: blur(6px);
}
.blabel { font-size: .85rem; font-weight: 650; color: var(--ink); }
.btrack {
  height: 10px; border-radius: 999px; background: #242429;
  overflow: hidden;
}
.bfill {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, #8a6420, var(--accent));
  transition: width 1.4s cubic-bezier(.16,1,.3,1);
}
.bfill.zero { width: 2px; background: var(--faint); }
.bnum {
  font-family: var(--mono); font-size: 1.5rem; font-weight: 700;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.bsrc { font-size: .72rem; color: var(--faint); }

/* ---------- 3 · stats ---------- */
.stat-pair { display: flex; gap: 1rem; margin-top: 1.4rem; flex-wrap: wrap; }
.stat {
  flex: 1 1 12rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 1rem 1.1rem; backdrop-filter: blur(6px);
}
.bignum { margin: 0; font-family: var(--mono); font-size: clamp(1.7rem, 7vw, 2.6rem); font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.slabel { margin: .4rem 0 0; font-size: .8rem; color: var(--muted); }

/* ---------- 4 · basis ---------- */
.basis { display: grid; gap: 1rem; margin-top: 1.4rem; grid-template-columns: 1fr 1fr; max-width: 40rem; }
.basis-col { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; }
.badge {
  display: inline-block; margin: 0 0 .5rem;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  border: 1px solid; border-radius: 999px; padding: .3rem .8rem; font-weight: 700;
}
.badge.reported { color: #9fd0a8; border-color: #3c5a44; }
.badge.modelled { color: var(--accent); border-color: #6b5222; }
.bdesc { margin: 0; font-size: .85rem; color: var(--muted); }

/* ---------- 5 · receipts ---------- */
.receipts {
  list-style: none; margin: 1.4rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; max-width: 46rem;
}
.receipts li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: .85rem 1rem; backdrop-filter: blur(6px);
  display: flex; flex-direction: column; gap: .25rem;
}
.receipts a { color: var(--ink); font-weight: 700; font-size: .92rem; text-decoration: none; }
.receipts a:hover { color: var(--accent); }
.receipts span { font-size: .75rem; color: var(--faint); }

/* ---------- 6 · dataset ---------- */
.code { margin: 1.2rem 0 0; }
.code code {
  font-family: var(--mono); font-size: 1rem; color: var(--accent);
  background: #101014; border: 1px solid var(--line); border-radius: 10px;
  padding: .7rem 1.1rem; display: inline-block;
}
.pos-mid-right .code { margin-left: auto; }
.feats { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: .5rem; }
.feats li { font-size: .95rem; color: var(--muted); font-weight: 550; }
.feats li::before { content: "— "; color: var(--accent); }
.pos-mid-right .feats { justify-items: end; }

/* ---------- 7 · notify ---------- */
.notify { margin-top: 1.4rem; max-width: 30rem; }
.notify label {
  display: block; font-size: .85rem; font-weight: 650; color: var(--ink);
  margin-bottom: .5rem;
}
.fields { display: flex; gap: .6rem; }
.fields input {
  flex: 1; min-width: 0; padding: .85rem 1.1rem;
  background: #101014; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); font-size: 1rem; font-family: var(--sans); min-height: 48px;
}
.fields input::placeholder { color: var(--faint); }
.fields input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.fields .btn { border-radius: 999px; }
.field-error { min-height: 1.4em; margin: .4rem 0 0; font-size: .82rem; color: #e08a8a; }
.notify.done .fields, .notify.done label { display: none; }
.notify-success { display: none; font-size: 1rem; color: var(--accent); font-weight: 650; }
.notify.done .notify-success { display: block; }

/* ---------- footer ---------- */
.site-foot {
  background: #09090b; border-top: 1px solid var(--line);
  scroll-snap-align: start; padding: 2.5rem 1.5rem 3rem;
}
.foot-inner { max-width: 46rem; margin: 0 auto; text-align: center; }
.badge-link { display: inline-block; }
.badge-link img { display: block; max-width: 260px; height: auto; margin: 0 auto; }
.site-foot nav { display: flex; gap: 1.4rem; justify-content: center; margin: 1.4rem 0 0; flex-wrap: wrap; }
.site-foot nav a { color: var(--muted); text-decoration: none; font-size: .85rem; }
.site-foot nav a:hover { color: var(--ink); }
.micro { margin: 1.2rem 0 0; font-size: .75rem; color: var(--faint); }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .receipts { grid-template-columns: 1fr 1fr; }
  .basis { grid-template-columns: 1fr; }
  .fields { flex-direction: column; }
  .fields .btn { width: 100%; }
  .giant { font-size: clamp(3.2rem, 20vw, 5.5rem); }
  .pos-mid-left, .pos-mid-right { top: auto; bottom: 0; transform: none; text-align: left; }
  .pos-top-right { text-align: left; }
  .pos-mid-right .fine { margin-left: 0; }
  .pos-mid-right .code { margin-left: 0; }
  .pos-mid-right .feats { justify-items: start; }
  /* p2: stack header + bars in flow so nothing overlaps on small screens */
  .panel.p2 { display: flex; flex-direction: column; justify-content: flex-end; }
  .panel.p2 .content { position: static; width: auto; }
  .panel.p2 .pos-top-right { padding-top: 3.2rem; padding-bottom: 0; }
  .panel.p2 .pos-bottom-full { padding-top: .6rem; padding-bottom: 1.5rem; }
  .panel.p2 .giant { font-size: clamp(2.8rem, 18vw, 4.5rem); }
  .panel.p2 .fine { margin-top: .7rem; }
  .bars { gap: .5rem; margin-top: .8rem; }
  .bars li { padding: .55rem .75rem; gap: .2rem; }
  .blabel { font-size: .78rem; }
  .bnum { font-size: 1.3rem; }
  .bsrc { font-size: .68rem; }
}
@media (min-width: 641px) and (max-width: 1024px) {
  .receipts { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .content { padding-left: 3rem; padding-right: 3rem; }
  .pos-bottom-full .bars { grid-template-columns: repeat(5, 1fr); gap: .8rem; }
  .bars li { grid-template-rows: auto 10px auto auto; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; clip-path: none; transform: none; transition: none; }
  .panel .bg { animation: none; }
  .bfill { transition: none; }
  .btn:hover { transform: none; }
}
