/* TRFL — cave-dark treasure artifact.
   cave      #161210  warm brown-black ground
   parchment #E8D9B0  map-paper text
   fire      #FF7A2F  the burn
   gold      #C9A648  doubloon accents
   ink       #8B7B62  faded secondary
   seal      #B33A2B  wax red                                              */

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

:root {
  --cave: #161210;
  --cave-2: #1e1814;
  --parchment: #e8d9b0;
  --fire: #ff7a2f;
  --gold: #c9a648;
  --ink: #8b7b62;
  --seal: #b33a2b;
  --disp: "Rye", serif;
  --body: "Alegreya Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(1200px 500px at 50% -10%, #241b14 0%, transparent 70%),
    var(--cave);
  color: var(--parchment);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

a { color: var(--gold); }
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--fire);
  outline-offset: 3px;
}
code { font-family: var(--mono); font-size: 0.85em; word-break: break-all; }
em { color: var(--gold); font-style: italic; }

/* ------------------------------------------------------------- sections */
section, header.hero, footer.foot {
  max-width: 60rem;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}

.sec-title {
  font-family: var(--disp);
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: 0.04em;
  color: var(--gold);
  text-align: center;
}
.sec-title::after {
  content: "";
  display: block;
  width: 5.5rem;
  height: 1px;
  margin: 0.9rem auto 0;
  background: linear-gradient(90deg, transparent, var(--ink), transparent);
}
.sec-sub {
  text-align: center;
  color: var(--ink);
  margin: 0.8rem 0 2.6rem;
}

/* ------------------------------------------------------------------ hero */
.hero { text-align: center; padding-top: 5.5rem; }
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}
.hero-ticker {
  font-family: var(--disp);
  font-weight: 400;
  font-size: clamp(4.5rem, 16vw, 9rem);
  line-height: 1;
  margin-top: 1.2rem;
  color: var(--parchment);
  text-shadow:
    0 0 40px rgba(255, 122, 47, 0.18),
    0 2px 0 #0a0806;
}
.hero-name {
  font-family: var(--disp);
  font-size: clamp(1rem, 3.2vw, 1.5rem);
  color: var(--gold);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-top: 0.4rem;
}
.hero-motto {
  display: inline-block;
  margin-top: 1.6rem;
  padding: 0.3rem 1.1rem;
  border: 1px solid var(--seal);
  border-radius: 2px;
  transform: rotate(-1.2deg);
  color: var(--seal);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.hero-thesis {
  max-width: 34rem;
  margin: 1.8rem auto 0;
  color: var(--parchment);
}
.hero-actions { margin-top: 2.2rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 0.85rem 1.7rem;
  border-radius: 3px;
  font-family: var(--body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.btn-fire {
  background: linear-gradient(180deg, #ff8d4d, var(--fire) 55%, #d85a14);
  color: #221007;
  box-shadow: 0 0 22px rgba(255, 122, 47, 0.25);
}
.btn-fire:hover { filter: brightness(1.08); }
.btn-fire[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.btn-ghost { border: 1px solid var(--ink); color: var(--parchment); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* --------------------------------------------------------------- furnace */
.furnace {
  position: relative;
  text-align: center;
  border-top: 1px solid #2a221b;
  overflow: hidden;
}
.burn-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
}
.burn-count {
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(2.4rem, 9vw, 5.2rem);
  line-height: 1.15;
  margin-top: 0.4rem;
  color: var(--fire);
  text-shadow: 0 0 34px rgba(255, 122, 47, 0.35);
  font-variant-numeric: tabular-nums;
}
.seal {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--seal);
  text-decoration: none;
  border-bottom: 1px dotted var(--seal);
  padding-bottom: 2px;
}
.seal:hover { color: #d85040; }
.seal-ring {
  display: inline-grid;
  place-items: center;
  width: 1.5rem; height: 1.5rem;
  border: 1.5px solid var(--seal);
  border-radius: 50%;
  transform: rotate(-8deg);
  font-size: 0.8rem;
}

.gauge {
  max-width: 30rem;
  height: 10px;
  margin: 2.4rem auto 0;
  border: 1px solid #3a2f24;
  border-radius: 6px;
  background: #100c09;
  overflow: hidden;
}
.gauge-fill {
  height: 100%;
  width: 0%;
  border-radius: 6px;
  background: linear-gradient(90deg, #d85a14, var(--fire), #ffb347);
  transition: width 1.2s ease;
}
.gauge-note { margin-top: 0.7rem; color: var(--ink); font-size: 0.95rem; }
.gauge-note span { color: var(--fire); font-family: var(--mono); }

.furnace-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 2.6rem;
}
.furnace-stats dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
}
.furnace-stats dd {
  font-family: var(--mono);
  font-size: 1.35rem;
  color: var(--parchment);
  margin-top: 0.3rem;
  font-variant-numeric: tabular-nums;
}
.crank-note {
  max-width: 32rem;
  margin: 2.6rem auto 0;
  font-size: 0.95rem;
  color: var(--ink);
}

/* embers — pure CSS, decorative only */
.embers { position: absolute; inset: 0; pointer-events: none; }
.embers i {
  position: absolute;
  bottom: -6px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--fire);
  opacity: 0;
  animation: rise 7s linear infinite;
}
.embers i:nth-child(1) { left: 18%; animation-delay: 0s;   animation-duration: 8s; }
.embers i:nth-child(2) { left: 31%; animation-delay: 2.2s; animation-duration: 6.5s; }
.embers i:nth-child(3) { left: 44%; animation-delay: 4.1s; animation-duration: 9s; }
.embers i:nth-child(4) { left: 55%; animation-delay: 1.3s; animation-duration: 7s; }
.embers i:nth-child(5) { left: 67%; animation-delay: 3.4s; animation-duration: 8.5s; }
.embers i:nth-child(6) { left: 78%; animation-delay: 5.2s; animation-duration: 6s; }
.embers i:nth-child(7) { left: 88%; animation-delay: 0.7s; animation-duration: 7.5s; }
@keyframes rise {
  0%   { transform: translateY(0) scale(1);     opacity: 0; }
  8%   { opacity: 0.7; }
  60%  { opacity: 0.35; }
  100% { transform: translateY(-72vh) scale(0.3); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .embers i { animation: none; display: none; }
  .gauge-fill { transition: none; }
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------------------------ map */
.map { border-top: 1px solid #2a221b; }
.trail {
  list-style: none;
  max-width: 36rem;
  margin: 0 auto;
  position: relative;
}
.trail::before {
  content: "";
  position: absolute;
  left: 0.95rem;
  top: 1.6rem;
  bottom: 1.6rem;
  border-left: 2px dashed #3a2f24;
}
.trail li { position: relative; padding: 0 0 2.4rem 3.2rem; }
.trail li:last-child { padding-bottom: 0; }
.mark {
  position: absolute;
  left: 0; top: 0.1rem;
  display: grid;
  place-items: center;
  width: 2rem; height: 2rem;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  background: var(--cave-2);
  color: var(--gold);
  font-family: var(--disp);
  font-size: 0.95rem;
}
.mark-fire { border-color: var(--fire); color: var(--fire); }
.trail h3 { font-family: var(--body); font-weight: 700; font-size: 1.15rem; color: var(--parchment); }
.trail p { color: var(--ink); margin-top: 0.35rem; }

/* ------------------------------------------------------------- receipts */
.receipts { border-top: 1px solid #2a221b; }
.no-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1.1rem;
}
.no-grid li {
  border: 1px solid #2e251d;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--cave-2), #191410);
  padding: 1.4rem 1.3rem;
}
.no-grid h3 {
  font-family: var(--disp);
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--gold);
  letter-spacing: 0.04em;
}
.no-grid p { color: var(--ink); font-size: 0.95rem; margin-top: 0.55rem; }
.verify {
  display: inline-block;
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--fire);
  text-decoration: none;
  border-bottom: 1px dotted var(--fire);
}
.verify:hover { color: #ffb347; }

.addresses {
  margin-top: 2.4rem;
  border-top: 1px dashed #2e251d;
  padding-top: 1.6rem;
}
.addresses p { margin-bottom: 0.5rem; }
.addr-label {
  display: inline-block;
  width: 5.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}
.addresses code { color: var(--parchment); }

/* ----------------------------------------------------------------- feed */
.feed { text-align: center; border-top: 1px solid #2a221b; }
.feed-copy { max-width: 32rem; margin: 0 auto; color: var(--ink); }
.feed-addr {
  display: inline-block;
  margin-top: 1.4rem;
  padding: 0.8rem 1.2rem;
  border: 1px dashed var(--gold);
  border-radius: 3px;
  color: var(--gold);
  background: var(--cave-2);
}

/* ----------------------------------------------------------------- foot */
.foot { text-align: center; border-top: 1px solid #2a221b; padding-bottom: 3.5rem; }
.foot-motto {
  font-family: var(--disp);
  color: var(--seal);
  letter-spacing: 0.12em;
  font-size: 1.1rem;
}
.foot-legal {
  max-width: 38rem;
  margin: 1.2rem auto 0;
  font-size: 0.85rem;
  color: var(--ink);
}
.foot-links { margin-top: 1.4rem; display: flex; gap: 1.6rem; justify-content: center; }
.foot-links a {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
