/* PARIUM public site — design system (PP-2, #579).
 *
 * Founder direction (2026-08-15): light-first, warm, human — Airbnb-school composition
 * (generous whitespace, big friendly type, soft elevated cards, pill CTAs) with our own
 * palette: warm off-white ground, warm near-black ink, ONE warm accent (amber-clay — ours,
 * deliberately not any other brand's coral). Inspiration, never imitation: no borrowed
 * trade dress, no remote fonts (self-contained system-ui humanist stack, like the canvas).
 *
 * The site defines its OWN token set (--p-*). It is deliberately NOT bound to the game's
 * --crash-* brand seam: the studio surface breathes light while the GAME surfaces on these
 * pages (equality beat, teaser frame, live verify demonstration) stay dark per the design
 * handoff §4 stage rule — dark "stage moments" framed inside light pages. Stage-resident
 * text uses --p-stage-fg (always light), never --p-ink.
 *
 * Register (handoff §1): calm, legible, understated. Persuade by demonstration, never by
 * adjective. Single deliberate LIGHT commit, painted explicitly — no theme flip.
 */

:root {
  /* Light studio surface */
  --p-ground: #faf6ef;
  --p-card: #fffdf8;
  --p-ink: #292319;
  --p-muted: #6e6558;
  --p-faint: #a89d8c;
  --p-line: rgba(58, 48, 32, 0.14);
  --p-line-soft: rgba(58, 48, 32, 0.08);

  /* The one warm accent — amber-clay */
  --p-accent: #b45309;
  --p-accent-deep: #8a3e06;
  --p-accent-tint: #f7ead9;

  /* Dark stage moments (handoff §4: the play-stage stays dark; text always light) */
  --p-stage: #0d0b12;
  --p-stage-2: #14111c;
  --p-stage-fg: #f0eadb;
  --p-stage-muted: #a49c8f;
  --p-stage-line: rgba(240, 234, 219, 0.14);

  /* Game palette quoted inside stage moments only */
  --p-gold: #d4af37;
  --p-equality: #7dd3fc;
  --p-win: #4ccb8a;
  --p-loss: #e05c4a;

  --p-radius: 22px;
  --p-radius-sm: 14px;
  --p-shadow:
    0 1px 2px rgba(41, 32, 16, 0.05),
    0 12px 32px rgba(41, 32, 16, 0.08);
  --p-font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--p-ground);
  color: var(--p-ink);
  font-family: var(--p-font);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* In-text links stay underlined (never color-only); chrome links (nav, pills,
   wordmark) opt out below. */
a {
  color: var(--p-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--p-accent-deep);
}

.site-nav a,
.footer-nav a,
.wordmark,
.pill {
  text-decoration: none;
}

.open-list a {
  font-weight: 620;
}

a:focus-visible,
button:focus-visible,
.pill:focus-visible {
  outline: 3px solid var(--p-accent);
  outline-offset: 3px;
  border-radius: 6px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: rgba(58, 48, 32, 0.06);
  border-radius: 6px;
  padding: 2px 7px;
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 26px 0 10px;
}

.wordmark {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.34em;
  color: var(--p-ink);
  text-transform: uppercase;
  text-decoration: none;
}

.wordmark:hover {
  color: var(--p-ink);
  text-decoration: none;
}

.wordmark .mark-tail {
  color: var(--p-accent);
  margin-left: -0.3em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14.5px;
  font-weight: 550;
}

.site-nav a {
  color: var(--p-ink);
}

.site-nav a:hover {
  color: var(--p-accent-deep);
}

.lang-switch {
  border: 1px solid var(--p-line);
  border-radius: 999px;
  padding: 5px 14px;
  color: var(--p-ink);
  background: var(--p-card);
}

/* At phone widths the header keeps only the first nav link + the language pill;
   the hidden destinations remain one scroll away (sections + footer nav). */
@media (max-width: 599px) {
  .site-nav a:not(:first-child):not(.lang-switch) {
    display: none;
  }
}

/* ---------- Type ---------- */

h1 {
  font-size: clamp(38px, 7.6vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.022em;
  font-weight: 700;
  margin: 0 0 20px;
  max-width: 14ch;
}

h2 {
  font-size: clamp(26px, 4.4vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.018em;
  font-weight: 680;
  margin: 0 0 14px;
  max-width: 22ch;
}

h3 {
  font-size: 18px;
  font-weight: 650;
  margin: 0 0 8px;
}

.lede {
  font-size: clamp(17px, 2.3vw, 20px);
  color: var(--p-muted);
  max-width: 34em;
  margin: 0 0 30px;
}

.kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--p-accent);
  margin-bottom: 14px;
}

.section {
  padding: clamp(52px, 9vw, 104px) 0 0;
}

.section:last-of-type {
  padding-bottom: clamp(52px, 9vw, 104px);
}

.muted {
  color: var(--p-muted);
}

.small {
  font-size: 14px;
}

/* ---------- Pills ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 13px 26px;
  font-size: 16px;
  font-weight: 620;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pill:hover {
  text-decoration: none;
}

.pill-primary {
  background: var(--p-accent);
  color: #fffdf8;
}

.pill-primary:hover {
  background: var(--p-accent-deep);
  color: #fffdf8;
}

.pill-quiet {
  border-color: var(--p-line);
  background: var(--p-card);
  color: var(--p-ink);
}

.pill-quiet:hover {
  border-color: var(--p-faint);
  color: var(--p-ink);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* ---------- Cards ---------- */

.card {
  background: var(--p-card);
  border: 1px solid var(--p-line-soft);
  border-radius: var(--p-radius);
  box-shadow: var(--p-shadow);
  padding: clamp(22px, 4vw, 34px);
}

.card-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  margin: 30px 0;
}

@media (min-width: 760px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card-grid .card {
  box-shadow: none;
  padding: 24px;
}

.card-grid h3 {
  margin-top: 2px;
}

.card-grid p {
  margin: 0;
  color: var(--p-muted);
  font-size: 15px;
}

/* ---------- Dark stage moments (handoff §4) ---------- */

.stage-card {
  background: linear-gradient(180deg, var(--p-stage-2), var(--p-stage));
  color: var(--p-stage-fg);
  border-radius: var(--p-radius);
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: var(--p-shadow);
  padding: clamp(24px, 4.5vw, 40px);
  overflow: hidden;
}

.stage-card a {
  color: var(--p-equality);
}

.stage-card a:hover {
  color: var(--p-equality);
}

.stage-card .kicker {
  color: var(--p-gold);
}

.stage-card h2 {
  max-width: 26ch;
}

.stage-card code {
  background: rgba(240, 234, 219, 0.08);
  color: var(--p-stage-fg);
}

.stage-muted {
  color: var(--p-stage-muted);
}

/* Equality beat */

.beat-figure {
  margin: 10px 0 26px;
}

.beat-figure svg {
  display: block;
  width: 100%;
  height: auto;
}

.beat-curve {
  stroke-dasharray: 720;
  stroke-dashoffset: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .beat-curve {
    animation: beat-draw 2.4s ease-out both;
  }

  .beat-dot {
    animation: beat-arrive 0.6s ease-out 2.1s both;
  }
}

@keyframes beat-draw {
  from {
    stroke-dashoffset: 720;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes beat-arrive {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.rule-rows {
  display: grid;
  gap: 12px;
  margin: 0 0 20px;
}

.rule-row {
  display: grid;
  gap: 6px 18px;
  align-items: baseline;
  border: 1px solid var(--p-stage-line);
  border-radius: var(--p-radius-sm);
  padding: 16px 20px;
}

@media (min-width: 700px) {
  .rule-row {
    grid-template-columns: 12em auto 1fr;
  }
}

.rule-name {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--p-stage-muted);
  font-weight: 650;
}

.rule-expr {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.rule-outcome {
  font-size: 15px;
  color: var(--p-stage-muted);
}

.rule-row.rule-parium {
  border-color: rgba(125, 211, 252, 0.45);
  background: rgba(125, 211, 252, 0.06);
}

.rule-parium .rule-name,
.rule-parium .rule-outcome {
  color: var(--p-equality);
}

.rule-parium .rule-expr {
  color: var(--p-stage-fg);
}

/* ---------- Teaser ---------- */

.teaser-frame {
  position: relative;
  border-radius: var(--p-radius-sm);
  overflow: hidden;
  border: 1px solid var(--p-stage-line);
  margin: 8px 0 18px;
}

.teaser-frame img,
.teaser-frame video {
  display: block;
  width: 100%;
  height: auto;
}

.teaser-frame video[hidden] {
  display: none;
}

.teaser-caption {
  margin: 0;
  font-size: 15px;
  color: var(--p-stage-muted);
}

.teaser-caption a {
  font-weight: 600;
}

/* ---------- Verify page ---------- */

.step-list {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  margin: 30px 0 10px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

@media (min-width: 760px) {
  .step-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-list li {
  counter-increment: step;
  background: var(--p-card);
  border: 1px solid var(--p-line-soft);
  border-radius: var(--p-radius);
  padding: 24px;
}

.step-list li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--p-accent-tint);
  color: var(--p-accent-deep);
  font-weight: 700;
  margin-bottom: 14px;
}

.step-list p {
  margin: 0;
  color: var(--p-muted);
  font-size: 15px;
}

.proof-rows {
  display: grid;
  gap: 10px;
  margin: 20px 0 8px;
}

.proof-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--p-stage-line);
  border-radius: var(--p-radius-sm);
  padding: 14px 16px;
  font-size: 15px;
}

.proof-row .proof-mark {
  font-weight: 700;
  color: var(--p-stage-muted);
  font-variant-numeric: tabular-nums;
}

.proof-row.good .proof-mark {
  color: var(--p-win);
}

.proof-row.bad .proof-mark {
  color: var(--p-loss);
}

.proof-row strong {
  display: block;
  font-weight: 650;
}

.proof-row span {
  color: var(--p-stage-muted);
  overflow-wrap: anywhere;
}

.open-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.open-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: baseline;
  border-top: 1px solid var(--p-line-soft);
  padding-top: 10px;
  font-size: 15px;
}

.open-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

/* ---------- Demo + contact ---------- */

.split {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-line {
  font-weight: 620;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--p-line);
  margin-top: clamp(52px, 9vw, 104px);
  padding: 30px 0 44px;
  font-size: 14px;
  color: var(--p-muted);
}

.site-footer .age-notice {
  font-weight: 650;
  color: var(--p-ink);
  margin: 0 0 8px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
}

.footer-nav a {
  color: var(--p-muted);
}
