/* ============ TOKENS ============ */
:root {
  --bg: #f8f6f2;
  --text: #0d0d0d;
  --muted: #6b6760;
  --red: #cc2222;
  --green: #16a34a;
  --blue: #2563eb;
  --border: #d8d4cc;
  --surface: #f3f0ea;
  --surface2: #ece8e0;
  --mono: 'IBM Plex Mono', monospace;
  --cond: 'Barlow Condensed', sans-serif;
  --serif: 'Cormorant Garamond', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}

/* grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

h2 {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.05;
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

.red { color: var(--red); }
.green { color: var(--green); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  padding: 14px 22px;
  min-height: 44px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.btn:hover { transform: translateY(-1px); opacity: 0.92; }
.btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--text); }
.btn-light { background: var(--bg); color: var(--text); }

/* ============ NAV ============ */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
}
.nav-brand {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}
.nav-brand span { color: var(--text); }
.nav-cta {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--text);
  padding: 10px 14px;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.nav-cta:hover { background: var(--text); color: var(--bg); }

/* ============ HERO ============ */
.hero {
  text-align: center;
  padding: 12px 28px 72px;
}
.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 28px;
}
.hero-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--blue);
  filter: grayscale(0.35);
  margin-bottom: 24px;
}
.hero h1 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(64px, 17vw, 104px);
  line-height: 0.9;
  margin-bottom: 22px;
}
.hero-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 30px;
}

/* ============ SECTIONS (generic) ============ */
.section { padding: 56px 28px; border-top: 1px solid var(--border); }
.section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-bottom: 10px;
}
.section-sub { font-size: 13px; color: var(--muted); margin-bottom: 26px; }

/* ============ ABOUT ============ */
.about-para { margin: 18px 0 30px; }
.fact-rows { border-top: 1px solid var(--border); margin-bottom: 28px; }
.fact-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.fact-num {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 30px;
}
.fact-note { font-size: 12px; color: var(--muted); }
.about-sign { font-family: var(--serif); font-style: italic; font-size: 20px; }

/* ============ MY PROOF ============ */
.proof-grid { display: grid; gap: 22px; }
.proof-item figcaption { font-size: 11px; color: var(--muted); margin-top: 8px; }
.proof-img-slot {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  background: var(--surface2);
}

/* ============ THE LEDGER ============ */
.ledger {
  border-top: 3px solid var(--red);
  background: var(--surface);
  padding: 40px 28px;
}
.ledger-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  animation: floatIn 0.5s ease both;
}
.ledger-header .rule { flex: 1; height: 1px; background: var(--border); }
.ledger-title { font-size: 10px; color: var(--muted); white-space: nowrap; }

.live-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
  animation: floatIn 0.5s ease 0.08s both;
}
.live-left { display: flex; align-items: center; gap: 8px; }
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-live 1.8s ease-out infinite;
}
@keyframes pulse-live {
  0%   { box-shadow: 0 0 0 0 rgba(22,163,74,0.5); }
  70%  { box-shadow: 0 0 0 9px rgba(22,163,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}
@keyframes floatIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes stripeMove {
  from { background-position: 0 0; }
  to   { background-position: 56px 0; }
}
@keyframes shimmerSweep {
  from { transform: translateX(-120%); }
  to   { transform: translateX(220%); }
}
@keyframes dangerPulse {
  0%, 100% { text-shadow: 0 0 24px rgba(204, 34, 34, 0.35); }
  50%       { text-shadow: 0 0 42px rgba(204, 34, 34, 0.6); }
}
.live-label { font-size: 10px; font-weight: 600; color: var(--green); letter-spacing: 0.12em; }
.live-updated { font-size: 11px; color: var(--muted); }
.delta-badge { font-size: 11px; font-weight: 600; color: var(--green); }

.ledger-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  margin-bottom: 34px;
  animation: floatIn 0.6s ease 0.15s both;
}
.owed-label { font-size: 12px; color: var(--muted); }
.debt-number {
  font-family: var(--cond);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(58px, 16vw, 124px);
  line-height: 0.95;
  color: var(--red);
  letter-spacing: -0.01em;
  animation: dangerPulse 2.4s ease-in-out infinite;
}
.debt-context { font-size: 11px; color: var(--muted); margin-top: 6px; }

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.stat-row .label { font-size: 10px; color: var(--muted); letter-spacing: 0.08em; }
.stat-row .value { font-family: var(--cond); font-weight: 700; font-size: 19px; white-space: nowrap; }

.progress-wrap { margin-bottom: 38px; animation: floatIn 0.5s ease 0.28s both; }
.progress-track {
  position: relative;
  height: 36px;
  border: 1px solid var(--text);
  background: var(--bg);
  overflow: hidden;
}
.progress-fill {
  position: relative;
  overflow: hidden;
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(
    45deg,
    var(--green)  0,      var(--green)  14px,
    #15803d       14px,   #15803d       28px
  );
  background-size: 56px 56px;
  animation: stripeMove 0.9s linear infinite;
  transition: width 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.progress-fill::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 40%;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.45) 50%, rgba(255,255,255,0) 100%);
  animation: shimmerSweep 1.6s ease-in-out infinite;
}
.progress-pct {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 600;
}
.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted);
  margin-top: 7px;
  letter-spacing: 0.05em;
}

.mini-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.18em;
  margin-bottom: 14px;
}

.cards-section { margin-bottom: 38px; animation: floatIn 0.5s ease 0.40s both; }
.card-row { padding: 13px 0; border-bottom: 1px solid var(--border); }
.card-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.card-name { font-size: 13px; font-weight: 600; flex: 1; }
.card-type {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--border);
  padding: 2px 7px;
  color: var(--muted);
}
.card-bar-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.card-bar {
  flex: 1;
  height: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
}
.card-bar-fill { height: 100%; background: var(--green); }
.card-pct { font-size: 10px; color: var(--muted); white-space: nowrap; }
.card-amounts { font-size: 11px; }
.card-amounts .paid { color: var(--green); font-weight: 600; }
.card-amounts .remaining { color: var(--muted); }

.txn-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.txn-icon {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.txn-icon.payment { color: var(--green); }
.txn-icon.interest { color: var(--red); }
.txn-icon.income { color: var(--blue); }
.txn-body { flex: 1; min-width: 0; }
.txn-desc { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.txn-date { font-size: 10px; color: var(--muted); }
.txn-amount { font-size: 13px; font-weight: 600; white-space: nowrap; }
.txn-amount.payment { color: var(--green); }
.txn-amount.interest { color: var(--red); }
.txn-amount.income { color: var(--blue); }

/* ============ WAR CHEST ============ */
.warchest {
  border-top: 3px solid var(--green);
  background: var(--surface);
  padding: 56px 28px;
}
.warchest-box {
  position: relative;
  border: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
}
.warchest-blur {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
  padding: 30px 24px;
}
.wc-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.wc-label { font-size: 11px; color: var(--muted); }
.wc-value { font-family: var(--cond); font-weight: 700; font-size: 24px; }
.warchest-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: rgba(248, 246, 242, 0.55);
}
.lock-icon { font-size: 22px; margin-bottom: 10px; }
.unlock-title {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 28px;
  margin-bottom: 6px;
}
.unlock-sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.warchest-success {
  padding: 30px 24px;
  text-align: center;
  color: var(--green);
  font-weight: 600;
}

/* ============ EMAIL FORMS ============ */
.email-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  width: 100%;
  max-width: 420px;
}
.email-form input {
  flex: 1;
  min-width: 180px;
  font-family: var(--mono);
  font-size: 13px;
  padding: 12px 14px;
  border: 1px solid var(--text);
  background: var(--bg);
  color: var(--text);
}
.email-form input:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.form-msg { font-size: 12px; margin-top: 10px; }
.form-msg.ok { color: var(--green); }
.form-msg.err { color: var(--red); }

/* ============ HUB ============ */
.hub {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0 28px 28px;
}
.ledger-inner {
  border-top: 3px solid var(--red);
  background: var(--surface);
  margin: 0 -28px;
  padding: 40px 28px;
}

/* ============ PEOPLE ============ */
.people-grid { display: grid; gap: 18px; margin-top: 24px; }
@media (min-width: 520px) { .people-grid { grid-template-columns: 1fr 1fr; } }
.person-card {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 24px 20px;
}
.person-name { font-family: var(--cond); font-weight: 700; font-size: 22px; margin-bottom: 4px; }
.person-role { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 12px; }
.person-desc { font-size: 12px; color: var(--muted); line-height: 1.7; }

/* ============ TABS ============ */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.tab-btn {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.tab-btn.active { color: var(--text); border-bottom-color: var(--text); }
.tab-btn:hover { color: var(--text); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.link-stack { display: flex; flex-direction: column; gap: 0; }
.link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: background 0.1s ease;
}
.link-row:hover { background: var(--surface); padding-left: 8px; padding-right: 8px; margin: 0 -8px; }
.link-platform { font-family: var(--cond); font-weight: 700; font-size: 20px; }
.link-arrow { font-size: 11px; color: var(--muted); }

/* ============ THE ARSENAL ============ */
.arsenal-grid { display: grid; gap: 18px; }
@media (min-width: 520px) { .arsenal-grid { grid-template-columns: 1fr 1fr; } }
.arsenal-card {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.arsenal-name { font-family: var(--cond); font-weight: 700; font-size: 24px; }
.arsenal-desc { font-size: 12px; color: var(--muted); margin-bottom: 8px; }

/* ============ DEBT WARS ============ */
.debtwars {
  background: #0d0d0d;
  color: #f8f6f2;
  text-align: center;
  padding: 72px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.dw-eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: #8a867e;
  margin-bottom: 16px;
}
.dw-title {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 52px;
  color: #f8f6f2;
  margin-bottom: 10px;
}
.dw-sub { font-size: 14px; color: #8a867e; margin-bottom: 28px; }
.dw-form input {
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  color: #f8f6f2;
}
.dw-form input:focus-visible { outline: 2px solid #f8f6f2; }
.dw-caption { font-size: 11px; color: #8a867e; margin-top: 14px; }
.debtwars .form-msg.ok { color: #4ade80; }

/* ============ VIDEOS ============ */
.video-stack { display: grid; gap: 20px; margin-top: 24px; }
.video-frame {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  background: var(--surface2);
}
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ============ SOCIALS ============ */
.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
}
.social-btn {
  border: 1px solid var(--text);
  padding: 18px 16px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: background 0.12s ease, color 0.12s ease;
}
.social-btn:hover { background: var(--text); color: var(--bg); }
.social-btn:hover .social-handle { color: inherit; }
.social-name { font-family: var(--cond); font-weight: 700; font-size: 19px; }
.social-handle { font-size: 11px; color: var(--muted); }

/* ============ FOOTER ============ */
.footer-capture {
  border-top: 1px solid var(--border);
  padding: 48px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.footer-capture-text { font-size: 13px; margin-bottom: 18px; }
.footer {
  border-top: 1px solid var(--border);
  padding: 28px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}

/* ============ MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .live-dot { animation: none; }
  .progress-fill { transition: none; animation: none; }
  .progress-fill::after { animation: none; }
  .debt-number { animation: none; }
  .ledger-header, .live-bar, .ledger-top, .progress-wrap, .cards-section { animation: none; opacity: 1; transform: none; }
}

/* ============ MOBILE ============ */

/* All phones — vertical rhythm, type scale, component sizing */
@media (max-width: 640px) {
  /* Headings */
  h2 { font-size: 28px; }

  /* Vertical padding: trim excess breathing room on small screens */
  .hero          { padding-top: 40px; padding-bottom: 48px; }
  .section       { padding-top: 40px; padding-bottom: 40px; }
  .ledger        { padding-top: 28px; padding-bottom: 32px; }
  .warchest      { padding-top: 40px; padding-bottom: 40px; }
  .debtwars      { padding-top: 48px; padding-bottom: 48px; }
  .footer-capture{ padding-top: 36px; padding-bottom: 36px; }

  /* Hero: tighter photo, less margin */
  .hero-photo { width: 96px; height: 96px; margin-bottom: 20px; }

  /* Arsenal cards: tighter padding */
  .arsenal-card { padding: 18px 16px; }

  /* Debt Wars title */
  .dw-title { font-size: 42px; }

  /* War Chest overlay: more usable padding */
  .warchest-overlay { padding: 20px; }

  /* Social buttons: enforce tap target height */
  .social-btn { min-height: 44px; justify-content: center; }

  /* Ledger: tighten delta badge line */
  .live-updated { font-size: 10px; }
}

/* Narrow — email forms stack full-width */
@media (max-width: 480px) {
  .email-form {
    flex-direction: column;
    align-items: stretch;
  }
  .email-form input {
    min-width: 0;
    font-size: 16px; /* prevents iOS auto-zoom on focus */
  }
  .email-form button {
    width: 100%;
  }
}

/* Very narrow — hide middle progress label to prevent crowding */
@media (max-width: 420px) {
  .progress-labels span:nth-child(2) { display: none; }
}

/* Sub-380px — tighten horizontal padding */
@media (max-width: 380px) {
  .nav,
  .hero,
  .section,
  .ledger,
  .warchest,
  .debtwars,
  .footer-capture,
  .footer { padding-left: 16px; padding-right: 16px; }
}
