:root {
  --night: #0b1020;
  --night-2: #111a30;
  --panel: #151f3a;
  --line: #26325a;
  --ink: #05070d;
  --cream: #f3ead7;
  --muted: #9aa3bd;
  --amber: #ffb547;
  --ember: #ff7a1a;
  --tie: #e0262b;
  --radius: 18px;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(60% 40% at 15% 0%, rgba(255,122,26,.10), transparent 70%),
    radial-gradient(50% 40% at 100% 30%, rgba(80,100,200,.14), transparent 70%),
    var(--night);
  color: var(--cream);
  font-family: var(--display);
  line-height: 1.55;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--amber); }
.amber { color: var(--amber) !important; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 12px max(clamp(16px, 4vw, 48px), calc((100% - 1184px) / 2));
  background: rgba(11,16,32,.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo { border-radius: 50%; box-shadow: 0 0 0 2px var(--ink), 0 0 14px rgba(255,122,26,.35); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { letter-spacing: .06em; font-size: 15px; font-weight: 800; }
.brand-text small { color: var(--muted); font-size: 12px; }
.brand { justify-self: start; }
.nav-links {
  display: flex; gap: 4px; padding: 5px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(21,31,58,.6);
}
.nav-links a {
  text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500;
  padding: 7px 16px; border-radius: 999px; transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--cream); background: rgba(255,122,26,.12); }
.nav-cta { display: flex; align-items: center; gap: 10px; justify-self: end; }

.dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--ember); margin-right: 6px; vertical-align: middle;
  box-shadow: 0 0 10px var(--ember);
}
.dot.live { animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .3; } }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 12px;
  font-weight: 700; text-decoration: none; font-size: 15px;
  border: 2px solid var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.btn-ember { background: var(--ember); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.btn-ember:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink), 0 0 30px rgba(255,122,26,.45); }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 12px; border: 1px solid var(--line); text-decoration: none; font-size: 16px;
}
.icon-btn:hover { border-color: var(--cream); }

/* ---------- COMIC FRAME ---------- */
.frame, .smoke-scene {
  position: relative; margin: 0;
  border: 3px solid var(--ink); border-radius: 6px;
  box-shadow: 10px 10px 0 var(--ink), 0 30px 80px rgba(0,0,0,.5);
  overflow: hidden; background: var(--panel);
}
.frame img, .smoke-scene img { display: block; width: 100%; height: auto; }
.tilt-r { transform: rotate(1.5deg); }

/* ---------- HERO ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(32px, 5vw, 72px);
  max-width: 1280px; margin: 0 auto;
  padding: clamp(32px, 5vw, 72px) clamp(16px, 4vw, 48px) 56px;
}
.smoke-scene {
  animation: scene-in 1.2s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes scene-in { from { opacity: 0; transform: scale(.96) rotate(-1deg); } }
.scene-art { position: relative; animation: kenburns 24s ease-in-out infinite alternate; transform-origin: 37% 25%; }
/* the forearm pivots at the elbow, the hand at the wrist; JS poses both each frame */
/* boxes are in % of the picture; the ember sits on the cigar tip inside the hand box */
.smoke-scene .arm {
  position: absolute; left: 36.045%; top: 28.23%; width: 7.656%; height: auto;
  transform-origin: 46.875% 91.667%; will-change: transform;
}
.hand {
  position: absolute; left: 31.26%; top: 18.26%; width: 8.293%; height: 10.925%;
  transform-origin: 76.9% 100%; will-change: transform;
}
.hand .ember { width: 108.5%; left: 75%; top: 8.76%; }
@keyframes kenburns { to { transform: scale(1.06); } }
.smoke-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }

/* the lit tip of the cigar; JS positions it and drives the inhale */
.ember {
  position: absolute; z-index: 2; width: 9%; aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,230,160,.95) 0, rgba(255,140,40,.7) 22%, rgba(255,90,20,.25) 48%, transparent 70%);
  mix-blend-mode: screen; opacity: 0;
  animation: ignite 1.4s .6s ease-out forwards;
  transition: transform 1.1s ease-in, filter 1.1s ease-in;
}
.ember.inhale { transform: translate(-50%, -50%) scale(1.7); filter: brightness(1.5); }
@keyframes ignite { 0% { opacity: 0; } 30% { opacity: 1; } 45% { opacity: .5; } 100% { opacity: .85; } }

.eyebrow { font-size: 12px; letter-spacing: .18em; color: var(--amber); margin: 0 0 16px; }
h1, h2, h3 { font-weight: 800; line-height: .98; margin: 0; letter-spacing: -.025em; }
h1 { font-size: clamp(52px, 7.4vw, 104px); }
h1 em, h2 em { font-size: 1.08em; letter-spacing: -.01em; }
h2 { font-size: clamp(36px, 5vw, 68px); }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: #c9cfe0; max-width: 32em; margin: 24px 0 0; }
.lede strong { color: var(--cream); }
.hero-copy { animation: rise .9s .25s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }

.ca {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 28px;
  padding: 8px 8px 8px 16px; border: 1px dashed var(--line); border-radius: 12px;
  background: var(--night-2); max-width: 100%;
}
.ca-label { color: var(--muted); font-size: 12px; }
.ca-value { font-size: 14px; }
.ca-copy {
  font: 600 12px var(--mono); cursor: pointer;
  background: var(--cream); color: var(--ink); border: 0; border-radius: 8px; padding: 7px 12px;
}
.ca-copy:hover { background: var(--amber); }

/* ---------- MARQUEE ---------- */
.marquee {
  overflow: hidden; border-block: 3px solid var(--ink);
  background: var(--ember); color: var(--ink); transform: rotate(-1.2deg);
  margin: 24px -10px;
}
/* two identical groups; each carries its own trailing gap so -50% lands exactly on the copy */
.marquee-track {
  display: flex; width: max-content; padding: 14px 0;
  font-weight: 800; font-size: clamp(16px, 2vw, 22px); letter-spacing: .04em; white-space: nowrap;
  animation: marquee 64s linear infinite;
  will-change: transform;
}
.marquee-group { display: flex; flex-shrink: 0; gap: 28px; padding-right: 28px; }
.marquee-track i { font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- SECTIONS ---------- */
section { scroll-margin-top: 80px; }
.section { max-width: 1280px; margin: 0 auto; padding: clamp(56px, 8vw, 110px) clamp(16px, 4vw, 48px); }

/* panel */
.panel {
  border: 2px solid var(--line); border-radius: var(--radius); background: var(--panel);
  overflow: hidden; box-shadow: 8px 8px 0 var(--ink);
}
.panel-head {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 22px; font-size: 12px; letter-spacing: .08em; border-bottom: 1px solid var(--line);
}
.stats { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { padding: 28px 22px; display: flex; flex-direction: column; gap: 6px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.stat-value { font-size: clamp(36px, 4.5vw, 56px); font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--amber); text-shadow: 0 0 24px rgba(255,181,71,.35); }
.stat-note { color: var(--muted); font-size: 14px; }
.dread { padding: 22px; border-top: 1px solid var(--line); }
.dread-top { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .08em; margin-bottom: 10px; }
.dread-top span:last-child { color: var(--ember); }
.dread-bar { height: 14px; border-radius: 99px; background: var(--ink); overflow: hidden; border: 1px solid var(--line); }
.dread-fill {
  height: 100%; width: 87%;
  background: linear-gradient(90deg, #4c63c9, var(--amber), var(--ember), var(--tie));
  transition: width 1.2s ease;
}
.dread-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 8px; }

/* lore */
.lore-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.lore-text h2 { margin-bottom: 28px; }
.lore-text p { font-size: 19px; color: #c9cfe0; margin: 0 0 18px; }
.lore-text .big { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.05; color: var(--cream); font-weight: 800; letter-spacing: -.02em; }

/* why cards */
.why h2 { max-width: 15em; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.card {
  padding: 28px; border-radius: var(--radius); border: 2px solid var(--line); background: var(--panel);
  box-shadow: 6px 6px 0 var(--ink); transition: transform .2s, border-color .2s;
}
.card:hover { transform: translate(-3px, -3px); border-color: var(--muted); }
.card h3 { font-size: 30px; margin: 18px 0 10px; }
.card p { color: #c9cfe0; margin: 0; }
.num { color: var(--amber); font-size: 13px; }
.card-ember { background: var(--ember); color: var(--ink); border-color: var(--ink); }
.card-ember p, .card-ember .num { color: var(--ink); }

/* memes */
.meme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 44px; }
.meme {
  margin: 0; overflow: hidden; display: flex; flex-direction: column;
  border: 3px solid var(--ink); border-radius: 6px; background: var(--panel);
  box-shadow: 6px 6px 0 var(--ink); transition: transform .2s;
}
.meme:nth-child(odd) { transform: rotate(-1deg); }
.meme:nth-child(even) { transform: rotate(1deg); }
.meme:hover { transform: rotate(0) translateY(-4px); }
.meme-headline {
  background: var(--tie); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .03em;
  padding: 10px 14px; border-bottom: 3px solid var(--ink); min-height: 4.2em;
}
.meme-img { all: unset; cursor: zoom-in; display: block; }
.meme-img img { display: block; width: 100%; height: auto; }
.meme-img:focus-visible { outline: 3px solid var(--amber); outline-offset: -3px; }
.meme figcaption { padding: 14px; border-top: 3px solid var(--ink); font-size: 15px; color: #c9cfe0; flex: 1; }

/* cta: rain scene left, headline right */
.cta {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: clamp(560px, 82vh, 820px);
  display: flex; align-items: center;
  border-block: 3px solid var(--ink);
  background: var(--night);
}
.cta-blur {
  position: absolute; inset: -40px; z-index: -3;
  background: url(assets/rain.webp) center 40% / cover;
  filter: blur(40px) brightness(.35) saturate(1.2);
}
.cta-art {
  position: absolute; left: 0; top: 0; z-index: -2;
  height: 100%; aspect-ratio: 1;
  -webkit-mask-image: linear-gradient(90deg, #000 62%, transparent 98%);
          mask-image: linear-gradient(90deg, #000 62%, transparent 98%);
}
.cta-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cta-art .ember { width: 7%; }
.rain {
  position: absolute; inset: -25% -15%; z-index: -1; pointer-events: none; opacity: .45;
  transform: rotate(15deg);
  background-image:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='320'><g stroke='rgb%28200%2C215%2C255%29' stroke-opacity='0.75' stroke-width='1.2' stroke-linecap='round'><line x1='58.6' y1='48.3' x2='58.6' y2='84.7'/><line x1='13.9' y1='171.5' x2='13.9' y2='203.3'/><line x1='11.3' y1='162.4' x2='11.3' y2='189.0'/><line x1='78.2' y1='22.4' x2='78.2' y2='49.8'/><line x1='76.6' y1='264.6' x2='76.6' y2='292.6'/><line x1='40.7' y1='200.8' x2='40.7' y2='241.9'/><line x1='103.7' y1='126.9' x2='103.7' y2='168.6'/></g></svg>"),
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='220'><g stroke='rgb%28200%2C215%2C255%29' stroke-opacity='0.45' stroke-width='1' stroke-linecap='round'><line x1='6.5' y1='188.9' x2='6.5' y2='203.8'/><line x1='18.0' y1='25.9' x2='18.0' y2='41.0'/><line x1='97.3' y1='39.8' x2='97.3' y2='57.6'/><line x1='76.4' y1='81.9' x2='76.4' y2='99.4'/><line x1='8.4' y1='13.1' x2='8.4' y2='27.2'/><line x1='81.3' y1='94.1' x2='81.3' y2='109.2'/><line x1='70.1' y1='99.7' x2='70.1' y2='114.7'/><line x1='94.7' y1='153.8' x2='94.7' y2='168.2'/><line x1='68.8' y1='115.5' x2='68.8' y2='136.3'/></g></svg>");
  background-size: 180px 320px, 120px 220px;
  animation: rain .6s linear infinite;
  will-change: background-position;
}
/* each layer moves exactly one tile height per loop, so the cycle restarts seamlessly */
@keyframes rain { from { background-position: 0 0, 0 0; } to { background-position: 0 320px, 0 220px; } }
.cta-inner {
  margin-left: auto; width: min(100%, 720px);
  padding: clamp(48px, 7vw, 96px) clamp(16px, 4vw, 56px);
  display: flex; flex-direction: column; align-items: flex-end; gap: 16px; text-align: right;
}
.cta h2 {
  font-size: clamp(44px, 5.6vw, 86px); line-height: .98; margin-bottom: 16px;
  text-shadow: 0 4px 30px rgba(5,7,13,.6);
}
.cta-accent { display: block; color: var(--amber); }
.pill-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 99px; border: 2px solid var(--line);
  background: rgba(5,7,13,.85); color: var(--cream);
  font: 700 16px var(--display); text-decoration: none; cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.pill:hover { transform: translateY(-2px); border-color: var(--cream); }
.pill-ember { background: var(--ember); color: var(--ink); border-color: var(--ink); box-shadow: 0 0 0 4px rgba(255,122,26,.25); }
.pill-ember:hover { border-color: var(--ink); box-shadow: 0 0 0 6px rgba(255,122,26,.3), 0 0 30px rgba(255,122,26,.5); }
.pill-arrow {
  display: grid; place-items: center; width: 26px; height: 26px; margin-right: -10px;
  border-radius: 50%; background: var(--ink); color: var(--amber); font-size: 14px;
}
.pill-x { font-size: 15px; }
.pill-sm { padding: 9px 18px; font-size: 14px; }
.cta-token {
  margin-top: 12px; width: 100%;
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 20px;
  padding: 18px 22px; text-align: left;
  background: rgba(5,7,13,.88); border: 2px solid var(--line); border-radius: 6px;
  box-shadow: 6px 6px 0 var(--ink);
}
.cta-token strong { display: block; font-size: 20px; font-weight: 800; }
.cta-token span { color: var(--muted); font-size: 12px; }
.cta-token code { font-size: 14px; color: var(--cream); }

/* footer */
.footer { padding: 40px clamp(16px, 4vw, 48px); max-width: 1280px; margin: 0 auto; }
.footer-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--cream); }
.disclaimer { color: var(--muted); font-size: 13px; max-width: 70em; margin: 24px 0 12px; }
.copy { color: var(--muted); font-size: 12px; margin: 0; }

/* lightbox */
.lightbox {
  padding: 0; border: 3px solid var(--ink); border-radius: 6px; background: var(--ink);
  max-width: min(92vw, 900px); box-shadow: 10px 10px 0 var(--ember);
}
.lightbox::backdrop { background: rgba(5,7,13,.85); backdrop-filter: blur(4px); }
.lightbox img { display: block; width: 100%; height: auto; max-height: 88vh; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; cursor: pointer;
  border: 2px solid var(--ink); border-radius: 10px; background: var(--cream); color: var(--ink); font-size: 18px;
}

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--amber); color: var(--ink); padding: 10px 18px; border-radius: 10px;
  border: 2px solid var(--ink); font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1080px) {
  .meme-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .hero, .lore-grid { grid-template-columns: 1fr; }
  .stats, .cards { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
  .tilt-r { transform: none; }
  .cta { flex-direction: column; align-items: stretch; min-height: 0; }
  .cta-art {
    position: relative; width: 100%; height: auto;
    -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
            mask-image: linear-gradient(180deg, #000 70%, transparent);
  }
  .cta-inner { margin: -80px 0 0; width: 100%; align-items: flex-start; text-align: left; padding-top: 0; }
  .pill-row { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .brand-text small { display: none; }
  .brand-text strong { font-size: 13px; }
  .nav { gap: 12px; }
  .nav-cta .icon-btn { display: none; }
  .nav-cta .btn { padding: 9px 14px; font-size: 14px; box-shadow: 3px 3px 0 var(--ink); }
  .frame, .smoke-scene { box-shadow: 6px 6px 0 var(--ink); }
    .meme-grid { grid-template-columns: 1fr; }
  .meme { transform: none !important; }
  .cta-token { grid-template-columns: 1fr auto; }
  .cta-token > div { grid-column: 1 / -1; }
  .pill { padding: 11px 18px; font-size: 15px; }
}

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