/* ============================================================
   BBQCOIN — pixel cookout theme
   Palette: charcoal / ember / flame / mustard / cream
   ============================================================ */

:root {
  --char: #14100c;
  --char-2: #1e1712;
  --char-3: #2a2019;
  --ember: #ff7a1a;
  --flame: #e63b2e;
  --mustard: #ffc42e;
  --cream: #ffe8c9;
  --cream-dim: #c9b096;
  --green: #7ec850;
  --border: #3d2f24;

  --font-head: 'Press Start 2P', monospace;
  --font-body: 'VT323', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--char);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 22px;
  line-height: 1.45;
  overflow-x: hidden;
  image-rendering: pixelated;
}

canvas { image-rendering: pixelated; image-rendering: crisp-edges; }

.logo-img { image-rendering: pixelated; }
.logo-nav { width: 40px; height: 40px; }
.logo-hero { width: 220px; height: 220px; }
.logo-footer { width: 56px; height: 56px; }

::selection { background: var(--ember); color: var(--char); }

/* ---------- fixed fx layers ---------- */

#embers {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.14) 2px 4px
  );
  mix-blend-mode: multiply;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 41;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.45) 100%);
}

#heat-meter {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: #000;
  z-index: 60;
}
#heat-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--flame), var(--ember), var(--mustard));
  transition: width 0.1s linear;
}

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

.nav {
  position: fixed;
  top: 6px; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: rgba(20, 16, 12, 0.88);
  border-bottom: 4px solid var(--border);
  backdrop-filter: blur(2px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 13px;
  color: var(--mustard);
  text-decoration: none;
  text-shadow: 3px 3px 0 rgba(0,0,0,0.6);
}

.nav-links {
  display: flex;
  gap: 26px;
}
.nav-links a {
  font-family: var(--font-head);
  font-size: 10px;
  color: var(--cream-dim);
  text-decoration: none;
  transition: color 0.1s steps(2);
}
.nav-links a:hover { color: var(--ember); }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 11px;
  text-decoration: none;
  padding: 14px 20px;
  cursor: pointer;
  border: 4px solid #000;
  box-shadow: 4px 4px 0 #000;
  transition: transform 0.08s steps(2), box-shadow 0.08s steps(2);
  user-select: none;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #000; }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 #000; }

.btn-primary { background: var(--ember); color: var(--char); }
.btn-primary:hover { background: var(--mustard); }
.btn-ghost { background: transparent; color: var(--cream); border-color: var(--cream); box-shadow: 4px 4px 0 var(--cream); }
.btn-ghost:hover { color: var(--ember); border-color: var(--ember); box-shadow: 2px 2px 0 var(--ember); }
.btn-x { background: var(--cream); color: var(--char); padding: 8px 14px; font-size: 9px; }
.btn-big { font-size: 13px; padding: 18px 28px; }

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

.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 200px;
}

.hero-inner { display: flex; flex-direction: column; align-items: center; gap: 28px; }

.hero-coin-wrap { animation: bob 2.4s steps(6) infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(34px, 8vw, 84px);
  color: var(--mustard);
  text-shadow:
    4px 4px 0 var(--flame),
    8px 8px 0 rgba(0,0,0,0.55);
  letter-spacing: 2px;
  display: flex;
}
.t-char { display: inline-block; animation: pop 0.4s steps(4) backwards; }
.t-char.accent { color: var(--ember); }
.t-char:nth-child(1) { animation-delay: 0.05s; }
.t-char:nth-child(2) { animation-delay: 0.12s; }
.t-char:nth-child(3) { animation-delay: 0.19s; }
.t-char:nth-child(4) { animation-delay: 0.26s; }
.t-char:nth-child(5) { animation-delay: 0.33s; }
.t-char:nth-child(6) { animation-delay: 0.40s; }
.t-char:nth-child(7) { animation-delay: 0.47s; }
@keyframes pop {
  from { transform: scale(0) translateY(30px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.hero-tag {
  font-size: 30px;
  color: var(--cream);
  min-height: 40px;
  letter-spacing: 1px;
}
.cursor { color: var(--ember); animation: blink 0.8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-ctas { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }

.hero-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}
.stat {
  border: 4px solid var(--border);
  background: var(--char-2);
  padding: 14px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 150px;
}
.stat-num { font-family: var(--font-head); font-size: 16px; color: var(--ember); }
.stat-label { font-size: 18px; color: var(--cream-dim); letter-spacing: 1px; }

.hero-grill {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
#hero-flames { margin-bottom: -26px; z-index: -1; position: relative; }

.scroll-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-head);
  font-size: 9px;
  color: var(--cream-dim);
  text-decoration: none;
  animation: blink 1.2s steps(1) infinite;
}

/* ---------- marquee ---------- */

.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-top: 4px solid #000;
  border-bottom: 4px solid #000;
  background: var(--flame);
  padding: 12px 0;
}
.marquee-track {
  display: flex;
  gap: 40px;
  width: max-content;
  animation: scroll-x 22s linear infinite;
}
.marquee-track span {
  font-family: var(--font-head);
  font-size: 13px;
  color: var(--cream);
  white-space: nowrap;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.4);
}
.marquee-track .m-sep { color: var(--mustard); }
@keyframes scroll-x {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

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

.section {
  position: relative;
  z-index: 2;
  max-width: 1080px;
  margin: 0 auto;
  padding: 120px 20px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(22px, 4.5vw, 40px);
  color: var(--mustard);
  text-shadow: 4px 4px 0 rgba(0,0,0,0.6);
  text-align: center;
}
.section-sub { font-size: 26px; color: var(--cream-dim); text-align: center; margin-bottom: 30px; }

/* ---------- reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.5s steps(5), transform 0.5s steps(5);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- timeline ---------- */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 34px;
  width: 100%;
  max-width: 760px;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 39px;
  top: 10px;
  bottom: 10px;
  width: 4px;
  background: repeating-linear-gradient(to bottom, var(--border) 0 8px, transparent 8px 16px);
}

.tl-item { display: flex; gap: 24px; align-items: flex-start; }
.tl-badge {
  flex: 0 0 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 12px;
  color: var(--char);
  background: var(--ember);
  border: 4px solid #000;
  box-shadow: 4px 4px 0 #000;
  z-index: 1;
}
.tl-item:nth-child(even) .tl-badge { background: var(--mustard); }
.tl-card {
  flex: 1;
  background: var(--char-2);
  border: 4px solid var(--border);
  padding: 20px 24px;
}
.tl-card h3 {
  font-family: var(--font-head);
  font-size: 13px;
  color: var(--ember);
  margin-bottom: 12px;
}
.tl-card p { color: var(--cream); }
.tl-card strong { color: var(--mustard); }

/* ---------- cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  width: 100%;
}
.card {
  background: var(--char-2);
  border: 4px solid var(--border);
  box-shadow: 6px 6px 0 #000;
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  transition: transform 0.1s steps(3), border-color 0.1s steps(3);
}
.card:hover { transform: translateY(-6px); border-color: var(--ember); }
.card h3 { font-family: var(--font-head); font-size: 13px; color: var(--mustard); }
.card p { color: var(--cream-dim); }

/* ---------- tokenomics ---------- */

.tokenomics-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  width: 100%;
  align-items: start;
}
@media (max-width: 760px) { .tokenomics-grid { grid-template-columns: 1fr; } }

.bars { display: flex; flex-direction: column; gap: 22px; }
.bar-row { display: flex; flex-direction: column; gap: 8px; }
.bar-label { font-family: var(--font-head); font-size: 10px; color: var(--cream); }
.bar {
  height: 28px;
  background: var(--char-3);
  border: 4px solid var(--border);
  position: relative;
}
.bar-fill {
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(90deg, var(--ember) 0 8px, var(--flame) 8px 16px);
  transition: width 1.2s steps(24);
}
.bar-row.animated .bar-fill { width: calc(var(--pct) * 1%); }
.bar-pct { font-family: var(--font-head); font-size: 10px; color: var(--mustard); align-self: flex-end; }

.tomo-facts {
  background: var(--char-2);
  border: 4px solid var(--border);
  box-shadow: 6px 6px 0 #000;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fact { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px dashed var(--border); padding-bottom: 10px; }
.fact-key { font-family: var(--font-head); font-size: 9px; color: var(--cream-dim); }
.fact-val { font-family: var(--font-head); font-size: 9px; color: var(--mustard); text-align: right; }
.fact-note { color: var(--cream-dim); font-size: 18px; margin-top: 6px; }

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

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  width: 100%;
}
.step {
  background: var(--char-2);
  border: 4px solid var(--border);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}
.step-num {
  position: absolute;
  top: -18px;
  left: -12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 14px;
  color: var(--char);
  background: var(--green);
  border: 4px solid #000;
  box-shadow: 3px 3px 0 #000;
}
.step h3 { font-family: var(--font-head); font-size: 11px; color: var(--ember); margin-top: 8px; }
.step p { color: var(--cream-dim); }

/* ---------- contract ---------- */

.ca-box {
  width: 100%;
  max-width: 760px;
  background: var(--char-2);
  border: 4px solid var(--ember);
  box-shadow: 8px 8px 0 #000;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}
.ca-label { font-family: var(--font-head); font-size: 10px; color: var(--ember); }
.ca-row {
  display: flex;
  gap: 14px;
  width: 100%;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
#ca-address {
  flex: 1;
  min-width: 260px;
  font-family: var(--font-body);
  font-size: 22px;
  color: var(--mustard);
  background: #000;
  border: 4px solid var(--border);
  padding: 12px 16px;
  word-break: break-all;
  user-select: all;
}
.btn-copy.copied { background: var(--green); }
.ca-links { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.ca-links a {
  font-family: var(--font-head);
  font-size: 9px;
  color: var(--cream-dim);
  text-decoration: none;
  transition: color 0.1s steps(2);
}
.ca-links a:hover { color: var(--ember); }
.step a { color: var(--mustard); }
.ca-note { color: var(--cream-dim); font-size: 18px; }

.final-cta {
  margin-top: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.final-cta h3 {
  font-family: var(--font-head);
  font-size: clamp(16px, 3vw, 26px);
  color: var(--mustard);
  text-shadow: 3px 3px 0 rgba(0,0,0,0.6);
}

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

.footer {
  position: relative;
  z-index: 2;
  border-top: 4px solid var(--border);
  background: var(--char-2);
  margin-top: 80px;
  padding: 50px 20px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer p { color: var(--cream); }
.footer .disclaimer { color: var(--cream-dim); font-size: 18px; max-width: 720px; }

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .nav-links { display: none; }
  body { font-size: 20px; }
  .hero { padding-bottom: 220px; }
  .timeline::before { left: 29px; }
  .tl-badge { flex-basis: 60px; height: 60px; font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
