/* =============================================================================
   $WEN FLYWHEEL — STYLES
   Light, comfy, crypto-native. Warm off-white · soft cards · Wendy's accents.
   ============================================================================= */

:root {
  /* Surfaces — warm Wendy's cream */
  --bg:        #FBF4EA;   /* warm cream page */
  --bg-alt:    #FFFDF8;   /* alternating section / cards */
  --surface:   #FFFFFF;
  --surface-2: #F6ECDD;   /* soft cream */

  /* Ink — warm charcoal */
  --ink:       #211711;
  --ink-soft:  #6F6052;
  --ink-faint: #A89381;

  /* Lines */
  --line:      #EDE2D2;
  --line-2:    #E1D2BC;

  /* Brand — Wendy's red + Frosty cream / chocolate */
  --red:       #E2203B;   /* Wendy's red */
  --red-ink:   #B0152A;   /* deep Wendy's red */
  --red-soft:  #FCE9EB;
  --cream:     #F4E7D5;   /* Frosty cream */
  --cream-soft:#FBF1E2;
  --caramel:   #C98A4B;   /* warm Frosty caramel accent */
  --frosty:    #6E4A37;   /* Frosty chocolate (text accent) */
  --green:     #15A34A;   /* live / positive indicators only */
  --green-soft:#E6F6EC;

  /* Effects */
  --radius:    18px;
  --radius-sm: 12px;
  --shadow:    0 1px 2px rgba(27,23,20,.04), 0 8px 28px rgba(27,23,20,.06);
  --shadow-lg: 0 2px 6px rgba(27,23,20,.05), 0 24px 60px rgba(27,23,20,.10);
  --ring:      0 0 0 4px rgba(225,29,51,.12);

  --font:  'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --header-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--bg);
  background-image: url("pattern.svg");
  background-size: 280px 280px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 760px; }

.mono { font-family: var(--mono); font-feature-settings: "tnum" 1; }

a { color: inherit; text-decoration: none; }

/* ----------------------------------------------------- Live dot ------------ */
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); display: inline-block; flex: none;
  box-shadow: 0 0 0 0 rgba(21,163,74,.45);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(21,163,74,.45); }
  70%  { box-shadow: 0 0 0 7px rgba(21,163,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(21,163,74,0); }
}

/* ----------------------------------------------------- Buttons ------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap; line-height: 1;
}
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--red); color: #fff;
  box-shadow: 0 6px 18px rgba(225,29,51,.28);
}
.btn-primary:hover { background: var(--red-ink); box-shadow: 0 10px 26px rgba(225,29,51,.34); transform: translateY(-1px); }

.btn-ghost {
  background: var(--surface); color: var(--ink);
  border-color: var(--line-2); box-shadow: var(--shadow);
}
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-1px); }

/* ======================================================= HEADER =========== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,248,244,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(27,23,20,.05); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 18px; }

.brand { display: flex; align-items: center; }
.brand-name {
  font-family: 'Fredoka', var(--font); font-weight: 700; font-size: 25px;
  color: var(--red); letter-spacing: .01em; line-height: 1;
}

.nav { display: flex; gap: 4px; margin: 0 auto; }
.nav a {
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
  padding: 8px 12px; border-radius: 8px; transition: color .15s, background .15s;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.active { color: var(--red); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.ca-mini {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 7px 13px; cursor: pointer;
  font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--ink);
  transition: border-color .15s, transform .1s;
}
.ca-mini:hover { border-color: var(--ink); }
.ca-mini:active { transform: translateY(1px); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }

/* ========================================================= HERO =========== */
.hero { position: relative; padding: 72px 0 60px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 50% -8%, rgba(201,138,75,.16), transparent 70%),
    radial-gradient(50% 45% at 85% 10%, rgba(226,32,59,.10), transparent 70%);
}
.hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 7px 15px; font-size: 13px; font-weight: 500;
  color: var(--ink-soft); box-shadow: var(--shadow);
}

.hero-title {
  font-size: clamp(38px, 7vw, 72px); line-height: 1.02; letter-spacing: -.03em;
  font-weight: 800; margin: 22px 0 0;
}
.hero-title .accent { color: var(--red); }

.hero-sub {
  max-width: 620px; margin: 22px auto 0; font-size: 18px; color: var(--ink-soft);
}
.hero-sub strong { color: var(--ink); }

/* CA box */
.ca-box {
  margin-top: 30px; width: 100%; max-width: 600px;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
  cursor: pointer; transition: border-color .15s, box-shadow .2s, transform .1s;
  text-align: left;
}
.ca-box:hover { border-color: var(--red); box-shadow: var(--shadow-lg); }
.ca-box:active { transform: translateY(1px); }
.ca-box-label { font-size: 12px; font-weight: 600; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .08em; }
.ca-box-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.ca-box-value { font-family: var(--mono); font-size: clamp(12px, 2.4vw, 15px); font-weight: 600; flex: 1; word-break: break-all; }
.ca-copy-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  background: var(--red-soft); color: var(--red-ink); border: 0;
  border-radius: 9px; padding: 9px 13px; font-weight: 600; font-size: 14px;
  cursor: pointer; font-family: var(--font); transition: background .15s;
}
.ca-copy-btn:hover { background: #f9d9de; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-actions.center { justify-content: center; }

/* Hero ticker */
.hero-ticker {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin-top: 34px;
}
.tick {
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 18px; min-width: 130px; box-shadow: var(--shadow); text-align: left;
}
.tick-label { font-size: 12px; color: var(--ink-faint); font-weight: 500; }
.tick-val { font-size: 18px; font-weight: 700; }

/* ===================================================== SECTIONS =========== */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--red);
}
.section-title { font-size: clamp(28px, 4.5vw, 42px); letter-spacing: -.02em; font-weight: 800; margin-top: 8px; line-height: 1.1; }
.section-lede { color: var(--ink-soft); font-size: 17px; margin-top: 12px; max-width: 620px; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.section-head.center .section-lede { margin-left: auto; margin-right: auto; }

/* Story prose */
.prose p { font-size: 18px; color: var(--ink-soft); margin-top: 18px; }
.prose strong { color: var(--ink); }
.prose-flow {
  background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 14px 18px; font-size: 14px !important;
  color: var(--red-ink) !important; font-weight: 600; text-align: center;
}
.gl { font-weight: 700; color: var(--ink) !important; font-size: 20px !important; }

/* ===================================================== FLYWHEEL =========== */
.flywheel-wrap { display: flex; justify-content: center; }

#flywheel.section-alt {
  background: radial-gradient(circle at 50% 42%, #FBEEDB, var(--bg-alt) 78%);
}
.flywheel {
  position: relative; width: min(560px, 92vw); aspect-ratio: 1; margin: 8px auto 0;
}
.flywheel::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 98%; height: 98%; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--cream) 0%, rgba(244,231,213,.5) 46%, transparent 70%);
}
.flywheel-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring-track { fill: none; stroke: var(--line-2); stroke-width: 1.1; }
.ring-spin {
  fill: none; stroke: url(#ringGrad); stroke-width: 2.4; stroke-linecap: round;
  stroke-dasharray: 60 178; transform-origin: 50% 50%;
  animation: spin 9s linear infinite; filter: drop-shadow(0 0 3px rgba(225,29,51,.25));
}
.ring-comet { fill: var(--red); transform-origin: 50% 50%; animation: spin 9s linear infinite; filter: drop-shadow(0 0 4px rgba(225,29,51,.6)); }
@keyframes spin { to { transform: rotate(360deg); } }

.hub {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 33%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 32%, var(--cream-soft), #fff 72%);
  border: 1px solid var(--line-2);
  display: grid; place-content: center; text-align: center; box-shadow: var(--shadow-lg);
}
.hub-frosty { display: block; margin: 0 auto 2px; }
.hub-frosty svg { width: clamp(26px, 5.5vw, 34px); height: auto; display: block; filter: drop-shadow(0 3px 5px rgba(110,74,55,.25)); }
.hub-sym { font-weight: 800; font-size: clamp(17px, 3.6vw, 24px); letter-spacing: -.02em; color: var(--red); }
.hub-tag { font-size: 10px; color: var(--frosty); text-transform: uppercase; letter-spacing: .14em; margin-top: 2px; font-weight: 600; }

.node {
  position: absolute; transform: translate(-50%, -50%);
  width: 142px; max-width: 30vw;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 13px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 1px; text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.node:hover { transform: translate(-50%, -50%) scale(1.05); box-shadow: var(--shadow-lg); border-color: var(--red); z-index: 3; }
.node-n {
  position: absolute; top: -9px; left: -9px; width: 22px; height: 22px;
  background: var(--red); color: #fff; border-radius: 50%; font-size: 12px;
  font-weight: 700; display: grid; place-items: center; box-shadow: 0 3px 8px rgba(225,29,51,.35);
}
.node-t { font-weight: 700; font-size: 14px; letter-spacing: -.01em; }
.node-d { font-size: 12px; color: var(--ink-faint); }

/* pentagon positions (5 nodes, R≈38%) */
.node-1 { left: 50%;   top: 12%; }
.node-2 { left: 86%;   top: 38.5%; }
.node-3 { left: 72%;   top: 81%; }
.node-4 { left: 28%;   top: 81%; }
.node-5 { left: 14%;   top: 38.5%; }

.flywheel-flow { display: none; list-style: none; max-width: 520px; margin: 0 auto; }
.flywheel-flow li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line-2); }
.flywheel-flow li:last-child { border-bottom: 0; }
.flow-n { width: 28px; height: 28px; flex: none; background: var(--red); color: #fff; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.flywheel-flow b { display: block; }
.flywheel-flow span { color: var(--ink-soft); font-size: 14px; }

.flywheel-copy {
  max-width: 640px; margin: 44px auto 0; text-align: center;
  font-size: 14px; color: var(--ink-soft); background: var(--surface-2);
  border: 1px solid var(--line-2); border-radius: var(--radius); padding: 18px 22px;
}

/* ====================================================== STAT GRID ========= */
.live-pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px;
  font-weight: 600; color: var(--green); background: var(--green-soft);
  border-radius: 999px; padding: 7px 13px;
}

.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card.accent-card { background: linear-gradient(160deg, #fff, var(--cream)); border-color: #E7D5BC; }
.stat-label { font-size: 13px; color: var(--ink-faint); font-weight: 600; letter-spacing: .01em; }
.stat-val { font-size: 26px; font-weight: 700; margin-top: 8px; letter-spacing: -.02em; }
.stat-sub { font-size: 13px; font-weight: 600; margin-top: 4px; }
.up { color: var(--green); }
.down { color: var(--red); }
.muted { color: var(--ink-faint) !important; font-weight: 600; }
.stat-proof { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--red); }
.stat-proof:hover { text-decoration: underline; }
.stats-live { grid-template-columns: repeat(3, 1fr); }

/* ======================================================== CHART =========== */
.chart-frame {
  position: relative; width: 100%; height: 540px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.chart-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.chart-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-faint); font-size: 15px; }

/* ===================================================== TREASURY =========== */
.pending-banner {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--cream-soft); border: 1px solid #E7D5BC;
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 22px;
  color: var(--frosty); font-size: 15px;
}
.pending-banner[hidden] { display: none; }
.pending-banner strong { color: var(--ink); }
.pending-icon { font-size: 20px; line-height: 1.4; }

/* ====================================================== LEDGERS =========== */
.table-wrap {
  overflow-x: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.ledger { width: 100%; border-collapse: collapse; min-width: 640px; }
.ledger thead th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-faint); font-weight: 700; padding: 16px 18px;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.ledger th.num, .ledger td.num { text-align: right; }
.ledger tbody td { padding: 15px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ledger tbody tr:last-child td { border-bottom: 0; }
.ledger tbody tr:hover { background: var(--surface-2); }
.ledger .mono { font-family: var(--mono); }
.tag {
  display: inline-block; background: var(--green-soft); color: var(--green);
  font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 7px;
}
.tag.burn { background: var(--red-soft); color: var(--red-ink); }
.proof-link { color: var(--red); font-weight: 600; }
.proof-link:hover { text-decoration: underline; }
.ledger-empty { text-align: center; color: var(--ink-faint); padding: 36px !important; }
.ledger-center th, .ledger-center td,
.ledger-center th.num, .ledger-center td.num { text-align: center; }

.disclaimer {
  margin-top: 16px; font-size: 13px; color: var(--ink-faint);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 16px;
}

/* ====================================================== ROADMAP =========== */
.roadmap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.phase {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 20px; box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .2s;
}
.phase:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.phase-num { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--red); }
.phase h3 { font-size: 17px; margin: 6px 0 12px; letter-spacing: -.01em; }
.phase ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.phase li { position: relative; padding-left: 18px; font-size: 14px; color: var(--ink-soft); }
.phase li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }

/* ====================================================== RECEIPTS ========== */
.receipts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.receipt {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: transform .18s, box-shadow .2s, border-color .2s;
}
.receipt:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.receipt h3 { font-size: 16px; letter-spacing: -.01em; }
.receipt p { font-size: 14px; color: var(--ink-soft); margin: 8px 0 16px; flex: 1; }
.receipt-link { color: var(--red); font-weight: 600; font-size: 14px; }
.receipt-link:hover { text-decoration: underline; }

/* ====================================================== CTA BAND ========== */
.cta-band {
  background: linear-gradient(135deg, var(--red), #c0142a);
  color: #fff; padding: 70px 0; text-align: center;
}
.cta-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cta-band h2 { font-size: clamp(26px, 4vw, 40px); letter-spacing: -.02em; }
.cta-band p { color: rgba(255,255,255,.82); font-size: 14px; }
.cta-band .btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.3); box-shadow: none; }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.2); border-color: #fff; }
.cta-band .btn-primary { background: #fff; color: var(--red); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.cta-band .btn-primary:hover { background: #fff; }

/* ======================================================== FOOTER ========== */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 48px 0; }
.footer-inner { display: flex; flex-direction: column; gap: 18px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand strong { display: block; font-family: 'Fredoka', var(--font); font-weight: 700; font-size: 20px; color: var(--red); }
.footer-brand span { font-size: 14px; color: var(--ink-soft); }
.footer-disclaimer { font-size: 12px; color: var(--ink-faint); max-width: 820px; line-height: 1.6; }

/* ======================================================== TOAST ============ */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ====================================================== REVEAL ============= */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ==================================================== RESPONSIVE =========== */
@media (max-width: 1000px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .roadmap { grid-template-columns: repeat(2, 1fr); }
  .receipts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg-alt); border-bottom: 1px solid var(--line);
    padding: 8px; margin: 0; box-shadow: var(--shadow-lg); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; border-radius: 8px; }
  .nav-toggle { display: flex; }
  .buy-top-hide { display: none; }
}

@media (max-width: 680px) {
  .section { padding: 60px 0; }
  .hero { padding: 48px 0 44px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stats-live { grid-template-columns: repeat(2, 1fr); }
  .stat-card { padding: 16px; }
  .stat-val { font-size: 21px; }
  .roadmap { grid-template-columns: 1fr; }
  .receipts-grid { grid-template-columns: 1fr; }
  .flywheel { display: none; }
  .flywheel-flow { display: block; }
  .ca-mini { display: none; }
  .chart-frame { height: 420px; }
  .section-head { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
