/* ironwood.live — dark-only, warm near-black + Zcash gold */
:root {
  --bg: #0e0c08;
  --bg-raise: #16120a;
  --bg-glass: #1a150b;
  --line: rgba(244, 183, 40, 0.14);
  --line-soft: rgba(244, 183, 40, 0.07);
  --gold: #F4B728;
  --gold-dim: #b3811e;
  --gold-deep: #6e5313;
  --orchard: #c2661c;
  --ironwood: #F4B728;
  --sapling: #8a7434;
  --sprout: #6f7d4a;
  --transp: #4d453a;
  --lockbox: #756a5c;
  --text: #f3ead4;
  --muted: #a4977a;
  --faint: #6e6450;
  --warn: #e0a13c;
  --err: #d96c4f;
  --disp: 'Sora', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--disp);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
a { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--line); }
a:hover { border-bottom-color: var(--gold); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px;
}
.hidden { display: none !important; }
.gold { color: var(--gold); }

/* ---------- topbar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line-soft);
  position: sticky; top: 0; z-index: 20;
  background: rgba(14, 12, 8, 0.88);
  backdrop-filter: blur(8px);
}
.brand { font-weight: 800; font-size: 1.05rem; letter-spacing: 0.02em; border: none; color: var(--text); }
.brand-dot { color: var(--gold); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.price { font-size: 0.8rem; color: var(--muted); }
.price .up { color: #9fbf6a; }
.price .down { color: var(--err); }
.badge {
  font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.1em;
  padding: 3px 8px; border-radius: 4px;
}
.badge-warn { background: rgba(224, 161, 60, 0.15); color: var(--warn); border: 1px solid rgba(224, 161, 60, 0.4); }
.btn-share {
  font-family: var(--mono); font-size: 0.78rem; font-weight: 500;
  color: var(--bg); background: var(--gold);
  border: none; border-radius: 6px; padding: 7px 14px; cursor: pointer;
}
.btn-share:hover { background: #ffcb45; }

/* ---------- banner / toast ---------- */
.banner {
  background: rgba(217, 108, 79, 0.12); color: var(--err);
  border-bottom: 1px solid rgba(217, 108, 79, 0.35);
  font-family: var(--mono); font-size: 0.8rem;
  padding: 8px clamp(16px, 4vw, 40px); text-align: center;
}
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--bg);
  font-family: var(--mono); font-size: 0.8rem; font-weight: 500;
  padding: 9px 18px; border-radius: 8px; z-index: 50;
}

/* ---------- hero ---------- */
main { max-width: 980px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.hero { text-align: center; padding: clamp(40px, 8vh, 84px) 0 30px; }
.eyebrow {
  font-size: clamp(0.62rem, 1.8vw, 0.78rem); letter-spacing: 0.22em;
  color: var(--gold-dim); margin-bottom: 22px;
}
.hero-h1 { font-size: clamp(1.5rem, 4.5vw, 2.4rem); font-weight: 700; margin-bottom: 20px; }
.hero-h1-sm { font-size: clamp(1rem, 3vw, 1.35rem); font-weight: 600; color: var(--muted); margin-bottom: 4px; }

.countdown { display: flex; justify-content: center; align-items: baseline; gap: clamp(4px, 1.5vw, 14px); }
.cd-cell { display: flex; flex-direction: column; align-items: center; min-width: clamp(58px, 14vw, 130px); }
.cd-num {
  font-size: clamp(2.4rem, 10vw, 5.6rem); font-weight: 700; line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 42px rgba(244, 183, 40, 0.25);
}
.cd-lab { font-size: 0.68rem; letter-spacing: 0.22em; color: var(--faint); margin-top: 10px; text-transform: uppercase; }
.cd-sep { font-size: clamp(1.6rem, 6vw, 3.4rem); color: var(--gold-deep); align-self: flex-start; padding-top: clamp(4px, 1vw, 12px); }
.cd-anyblock { font-family: var(--mono); color: var(--gold); letter-spacing: 0.15em; margin-top: 14px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }

.pct-wrap { margin: 6px 0 10px; }
.pct-big {
  font-size: clamp(3.4rem, 15vw, 8.5rem); font-weight: 700; line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 60px rgba(244, 183, 40, 0.3);
}

.substats {
  display: flex; justify-content: center; gap: clamp(18px, 5vw, 60px);
  margin-top: 34px; flex-wrap: wrap;
}
.substat { display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.substat-num { font-size: clamp(1rem, 3vw, 1.45rem); font-weight: 500; color: var(--text); }
.substat-lab { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.hero-note { margin-top: 26px; font-size: 0.82rem; color: var(--muted); }

/* ---------- sections ---------- */
.section { padding: clamp(30px, 6vh, 56px) 0; border-top: 1px solid var(--line-soft); }
.section-h { font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 700; margin-bottom: 22px; }

/* ---------- turnstile visual ---------- */
#turnstile-section { border-top: none; padding-top: 8px; }
.turnstile {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(10px, 3vw, 28px);
  align-items: end; max-width: 720px; margin: 0 auto;
}
.chamber { text-align: center; }
.chamber-glass {
  position: relative; height: clamp(150px, 30vw, 230px);
  border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(180deg, rgba(244,183,40,0.03), rgba(244,183,40,0.01));
  overflow: hidden;
}
.chamber-fill {
  position: absolute; left: 0; right: 0; bottom: 0; height: 0%;
  transition: height 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.fill-orchard { background: linear-gradient(180deg, rgba(194,102,28,0.55), rgba(194,102,28,0.82)); box-shadow: 0 -1px 0 rgba(244,183,40,0.5); }
.fill-ironwood { background: linear-gradient(180deg, rgba(244,183,40,0.55), rgba(244,183,40,0.85)); box-shadow: 0 -1px 0 #ffd76a; }
.chamber-name { margin-top: 12px; font-size: 0.72rem; letter-spacing: 0.24em; color: var(--muted); font-weight: 700; }
.chamber-amt { font-size: clamp(0.9rem, 2.6vw, 1.25rem); font-weight: 700; color: var(--gold); margin-top: 3px; }
.chamber-sub { font-size: 0.68rem; color: var(--faint); margin-top: 2px; }

.gate { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-bottom: 64px; }
.gate-svg { width: clamp(44px, 8vw, 72px); height: auto; }
.gate-post { stroke: var(--gold-deep); stroke-width: 5; }
.gate-hub { fill: var(--gold); }
.gate-arm { stroke: var(--gold); stroke-width: 4; stroke-linecap: round; }
.gate-arms { transform-origin: 40px 60px; }
.gate-lock rect { fill: none; stroke: var(--muted); stroke-width: 2.5; }
.gate-lock path { stroke: var(--muted); stroke-width: 2.5; }
.gate-state { font-size: 0.6rem; letter-spacing: 0.18em; color: var(--faint); white-space: nowrap; }

body[data-phase="active"] .gate-lock { display: none; }
body[data-phase="active"] .gate-state { color: var(--gold); }
body[data-phase="active"] .gate-arms { animation: spin 7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* flow particles (active only) */
.particles { position: absolute; inset: 0; pointer-events: none; }
.particle {
  position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold); opacity: 0;
  animation: flow 3.2s linear infinite;
}
@keyframes flow {
  0% { transform: translateX(0); opacity: 0; }
  12% { opacity: 0.9; }
  88% { opacity: 0.9; }
  100% { transform: translateX(calc(50vw)); opacity: 0; }
}
body:not([data-phase="active"]) .particle { display: none; }

@media (prefers-reduced-motion: reduce) {
  .particle, .cd-anyblock { animation: none !important; }
  body[data-phase="active"] .gate-arms { animation: none; }
  .chamber-fill { transition: none; }
  html { scroll-behavior: auto; }
}

.turnstile-caption {
  text-align: center; max-width: 640px; margin: 26px auto 0;
  font-size: 0.85rem; color: var(--muted);
}

/* ---------- pool bar ---------- */
.poolbar {
  display: flex; height: 34px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line);
}
.poolseg { height: 100%; min-width: 2px; }
.poollegend {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px;
}
.poollegend li { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--muted); }
.poollegend .amt { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.finenote { margin-top: 12px; font-size: 0.72rem; color: var(--faint); }

/* ---------- chart ---------- */
.chart-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.chart-head .section-h { margin-bottom: 0; }
.win-btns { display: flex; gap: 6px; }
.win-btn {
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
  background: none; border: 1px solid var(--line); border-radius: 6px;
  padding: 5px 12px; cursor: pointer;
}
.win-btn:hover { color: var(--text); }
.win-btn-on { color: var(--bg); background: var(--gold); border-color: var(--gold); font-weight: 700; }
.chart-box {
  margin-top: 18px; border: 1px solid var(--line-soft); border-radius: 12px;
  background: var(--bg-raise); padding: 10px; overflow-x: auto;
}
#chart { width: 100%; height: auto; display: block; min-width: 320px; }
.chart-legend { display: flex; gap: 20px; align-items: center; margin-top: 12px; font-size: 0.72rem; color: var(--muted); flex-wrap: wrap; }
.cl-item { display: flex; align-items: center; gap: 7px; }
.cl-swatch { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.sw-orchard { background: var(--orchard); }
.sw-ironwood { background: var(--ironwood); }
.cl-note { color: var(--faint); }

/* ---------- story ---------- */
.section-story .beat {
  display: grid; grid-template-columns: auto 1fr; gap: 18px;
  padding: 20px 0; border-bottom: 1px solid var(--line-soft);
}
.beat-num { color: var(--gold-deep); font-size: 0.85rem; font-weight: 700; padding-top: 4px; }
.beat h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 8px; }
.beat p { font-size: 0.9rem; color: var(--muted); }
.beat em { color: var(--text); font-style: italic; }
.factbox {
  margin-top: 22px; padding: 18px 20px;
  border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 10px; background: var(--bg-raise);
}
.factbox h4 { font-size: 0.85rem; letter-spacing: 0.04em; color: var(--gold); margin-bottom: 8px; }
.factbox p { font-size: 0.85rem; color: var(--muted); }

/* ---------- sprout ---------- */
.section-sprout p { font-size: 0.92rem; color: var(--muted); max-width: 760px; }

/* ---------- readiness ---------- */
.readiness { list-style: none; display: grid; gap: 12px; }
.readiness li {
  display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start;
  font-size: 0.88rem; color: var(--muted);
  padding: 12px 16px; border: 1px solid var(--line-soft); border-radius: 10px;
  background: var(--bg-raise);
}
.readiness strong { color: var(--text); }
.r-ok { color: #9fbf6a; font-weight: 700; }
.r-mid { color: var(--gold); font-weight: 700; }
.r-warn { color: var(--warn); font-weight: 700; }

/* ---------- embed ---------- */
.embed summary { cursor: pointer; font-weight: 700; color: var(--gold); font-size: 0.95rem; }
.embed p { margin: 14px 0 10px; font-size: 0.85rem; color: var(--muted); }
.embed-code {
  background: var(--bg-raise); border: 1px solid var(--line-soft); border-radius: 10px;
  padding: 14px 16px; font-size: 0.74rem; line-height: 1.6; overflow-x: auto;
  margin-bottom: 12px; white-space: pre;
}

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line-soft); margin-top: 40px;
  padding: 30px clamp(16px, 4vw, 40px) 44px;
  text-align: center; font-size: 0.75rem; color: var(--faint);
  display: grid; gap: 8px;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--gold); }

/* ---------- responsive ---------- */
@media (max-width: 560px) {
  .turnstile { grid-template-columns: 1fr auto 1fr; gap: 8px; }
  .gate { padding-bottom: 48px; }
  .substats { gap: 16px 26px; }
  .substat { min-width: 96px; }
  .topbar-right .price { display: none; }
}
@media (max-width: 380px) {
  .cd-cell { min-width: 52px; }
  .cd-num { font-size: 2.1rem; }
}
