/* tudum — www.the79.xyz
 * Hand-authored static site, no build step. The palette mirrors the mobile
 * app's theme (mobile/src/theme/colors.ts): warm cream ground, warm ink,
 * clay/terracotta accent; money-green for gains. Light + dark via
 * prefers-color-scheme.
 */

:root {
  --bg: #faf9f5;
  --bg-tint: #f0ede4;
  --surface: #ffffff;
  --surface-elevated: #fffdf9;
  --border: #e8e3d7;
  --text: #262624;
  --text-secondary: #6d685e;
  --text-muted: #a8a296;
  --primary: #c15f3c;
  /* Deepened clay for filled buttons — keeps white label text readable. */
  --primary-strong: #ac4e2e;
  --primary-muted: #f3e5dd;
  --primary-text: #ffffff;
  --accent: #7c8c54;
  --accent-muted: #eceedd;
  --accent-text: #5f6c40;
  --gradient-start: #c15f3c;
  --gradient-end: #d98a63;
  --positive: #3e8e4f;
  --positive-muted: #e4f0e2;
  --negative: #c0362c;
  --warning: #c0892b;
  --warning-muted: #f5ebd8;
  --warning-text: #8a5f1e;
  --shadow: rgba(60, 45, 30, 0.12);
  --nav-bg: rgba(250, 249, 245, 0.85);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #201f1c;
    --bg-tint: #2a2925;
    --surface: #2e2c27;
    --surface-elevated: #34322c;
    --border: #3a3831;
    --text: #edeae0;
    --text-secondary: #b4aea1;
    --text-muted: #7c7668;
    --primary: #d97757;
    --primary-strong: #d97757;
    --primary-muted: #3a281f;
    --primary-text: #201f1c;
    --accent: #9fb06a;
    --accent-muted: #2b2e1e;
    --accent-text: #9fb06a;
    --gradient-start: #c15f3c;
    --gradient-end: #8a4a2e;
    --positive: #5bb06a;
    --positive-muted: #1e2a1e;
    --negative: #e0685e;
    --warning: #e0a54b;
    --warning-muted: #362d1c;
    --warning-text: #e0a54b;
    --shadow: rgba(0, 0, 0, 0.4);
    --nav-bg: rgba(32, 31, 28, 0.85);
  }
}

* {
  box-sizing: border-box;
}

/* Classes below set display:flex/inline-flex, which would override the UA's
 * [hidden] rule — keep the hidden attribute authoritative. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
.display {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- nav ------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

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

.wordmark svg {
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 15px;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }
}

/* ---- buttons ---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.06s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

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

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 3px solid var(--primary-muted);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary-strong);
  color: var(--primary-text);
  box-shadow: 0 6px 18px var(--shadow);
}

.btn-primary:hover {
  background: var(--primary);
  color: var(--primary-text);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--bg-tint);
  color: var(--text);
}

.btn-lg {
  padding: 15px 28px;
  font-size: 17px;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

/* ---- hero ------------------------------------------------------------- */

.hero {
  padding: 72px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero {
    padding-top: 48px;
  }
}

.eyebrow {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--primary-muted);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(34px, 5.2vw, 52px);
}

.hero .lede {
  font-size: 19px;
  color: var(--text-secondary);
  max-width: 34em;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 10px;
}

.hero-note {
  font-size: 14px;
  color: var(--text-muted);
}

/* ---- app preview card -------------------------------------------------- */

.preview {
  position: relative;
}

.preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 24px 60px var(--shadow);
  padding: 26px 26px 22px;
  max-width: 380px;
  margin: 0 auto;
}

.num {
  font-variant-numeric: tabular-nums;
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.preview-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.preview-title {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 2px;
}

.preview-sub {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: 0 0 14px;
}

.preview-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.preview-figure {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.preview-networth {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.chip-positive {
  background: var(--positive-muted);
  color: var(--positive);
}

.chip-verified {
  background: var(--accent-muted);
  color: var(--accent-text);
}

.chip-quiet {
  background: var(--bg-tint);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
}

.chip-warning {
  background: var(--warning-muted);
  color: var(--warning-text);
}

.preview-spark {
  display: block;
  width: 100%;
  height: auto;
  margin: 16px 0 4px;
}

.preview-chat {
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 16px;
  display: grid;
  gap: 10px;
}

.bubble {
  border-radius: 16px;
  padding: 10px 14px;
  font-size: 14.5px;
  line-height: 1.45;
  max-width: 90%;
}

.bubble-user {
  justify-self: end;
  background: var(--primary-muted);
  color: var(--text);
  border-bottom-right-radius: 6px;
}

.bubble-rai {
  justify-self: start;
  background: var(--bg-tint);
  color: var(--text);
  border-bottom-left-radius: 6px;
}

.bubble-rai .chip {
  margin-top: 8px;
}

.preview-footnote {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 14px;
}

/* ---- sections ---------------------------------------------------------- */

.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--bg-tint);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section h2 {
  font-size: clamp(26px, 3.6vw, 36px);
  max-width: 22em;
}

.section .sub {
  color: var(--text-secondary);
  max-width: 40em;
  margin-bottom: 36px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 8px 24px var(--shadow);
}

.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-muted);
  color: var(--primary);
  margin-bottom: 14px;
}

.card h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

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

.card .tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--primary-muted);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---- steps ------------------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 24px 24px 24px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-strong);
  color: var(--primary-text);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 14px;
}

.step h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

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

/* ---- cited figures ("every number carries its receipt") ----------------- */

.figure-states {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.figure-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px 24px;
}

.figure-card p {
  font-size: 14.5px;
  color: var(--text-secondary);
  margin: 0;
}

.figure-state {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.figure-state-verified {
  color: var(--accent-text);
}

.figure-state-warning {
  color: var(--warning-text);
}

.figure-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 12px;
  flex-wrap: wrap;
}

.figure-amount {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  border-bottom: 1px dotted var(--text-muted);
  padding-bottom: 2px;
}

.figure-unit {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
}

.figure-amount-stripped {
  color: var(--text-muted);
  border-bottom: 1px dashed var(--warning);
}

.chip-warning svg {
  flex: none;
}

.provenance {
  margin-top: 18px;
  max-width: 640px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 24px;
}

.provenance-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.provenance-grid {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px 16px;
  margin-top: 14px;
  font-size: 14px;
}

.provenance-key {
  color: var(--text-muted);
}

.provenance-mono {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.provenance-note {
  margin: 14px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-text);
}

/* ---- savings showcase ---------------------------------------------------- */

.savings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

@media (max-width: 860px) {
  .savings-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.savings-sub {
  margin-bottom: 18px;
}

.savings-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.showcase {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 16px 44px var(--shadow);
  padding: 22px 24px;
}

.showcase-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.showcase-kicker {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.showcase-total {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.showcase-lines {
  display: flex;
  flex-direction: column;
  margin-top: 14px;
}

.showcase-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.showcase-name {
  font-size: 15px;
  font-weight: 600;
}

.showcase-spacer {
  flex: 1;
}

.showcase-amount {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.showcase-unit {
  font-weight: 500;
  color: var(--text-secondary);
}

/* ---- pricing -------------------------------------------------------------- */

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  align-items: stretch;
  /* Room for the floating "Most popular" badge on the featured plan. */
  margin-top: 14px;
}

.plan {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
}

.plan-featured {
  border: 1.5px solid var(--primary);
  box-shadow: 0 16px 44px var(--shadow);
}

.plan-badge {
  position: absolute;
  top: -11px;
  left: 24px;
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--primary-strong);
  color: var(--primary-text);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.plan-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.plan-name-primary {
  color: var(--primary);
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 10px;
}

.plan-amount {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.plan-per {
  font-size: 15px;
  color: var(--text-secondary);
}

.plan-quota {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 4px;
}

.plan-features {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14.5px;
  color: var(--text-secondary);
}

.plans-note {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---- honesty panel ------------------------------------------------------ */

.honesty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

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

.honesty blockquote {
  margin: 0;
  padding: 22px 26px;
  border-left: 4px solid var(--primary);
  background: var(--surface);
  border-radius: 0 16px 16px 0;
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.5;
}

.honesty ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.honesty li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--text-secondary);
  font-size: 16px;
}

.honesty li svg {
  flex: none;
  margin-top: 3px;
  color: var(--positive);
}

/* ---- CTA band ----------------------------------------------------------- */

.cta-band {
  text-align: center;
  padding: 72px 0;
}

.cta-band h2 {
  margin-left: auto;
  margin-right: auto;
}

.cta-band .sub {
  color: var(--text-secondary);
  max-width: 36em;
  margin: 0 auto 26px;
  text-align: center;
}

.cta-band .hero-cta {
  justify-content: center;
}

/* ---- footer ------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 48px;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  justify-content: space-between;
}

.footer a {
  color: var(--text-secondary);
}

.footer .disclaimer {
  flex-basis: 100%;
  margin-top: 4px;
}

/* ---- utility pages (open app / verify / reset / 404) -------------------- */

.page-narrow {
  max-width: 560px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 16px 44px var(--shadow);
  padding: 34px;
}

.panel h1 {
  font-size: 30px;
}

.panel .sub {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.panel-actions {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px;
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-top: 22px;
}

.qr-wrap img {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}

.qr-wrap p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hint {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 18px;
}

ol.instructions {
  margin: 0 0 8px;
  padding-left: 22px;
  color: var(--text-secondary);
  display: grid;
  gap: 8px;
  font-size: 15.5px;
}

/* status blocks on token pages */

.status {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 14px;
  font-size: 15.5px;
  margin: 8px 0 4px;
}

.status svg {
  flex: none;
  margin-top: 2px;
}

.status-pending {
  background: var(--bg-tint);
  color: var(--text-secondary);
}

.status-success {
  background: var(--positive-muted);
  color: var(--positive);
}

.status-error {
  background: var(--primary-muted);
  color: var(--negative);
}

.spinner {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
  border-radius: 50%;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* forms */

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.field label {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.field input {
  font: inherit;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  color: var(--text);
}

.field input:focus-visible {
  outline: 3px solid var(--primary-muted);
  outline-offset: 1px;
  border-color: var(--primary);
}

.env-note {
  display: inline-block;
  margin-bottom: 14px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-muted);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
