:root {
  --bg: #05070f;
  --bg-2: #080c1a;
  --navy: #0b1226;
  --line: rgba(245, 197, 66, 0.14);
  --gold: #f5c542;
  --gold-hi: #ffe89a;
  --gold-lo: #c9931f;
  --cobalt: #2f5bff;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.58);
  --radius: 20px;
  --maxw: 1080px;
  --grad-gold: linear-gradient(140deg, #ffe89a 0%, #f5c542 38%, #e0a71c 68%, #ffdd7a 100%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 500ms ease;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--gold); color: #10121a; }

/* ---------- background layers ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(180deg, #060913 0%, #070b17 40%, #05070f 100%),
    radial-gradient(120% 80% at 50% -10%, rgba(47, 91, 255, 0.16), transparent 60%);
}
.bg-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(80% 60% at 50% 20%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(80% 60% at 50% 20%, #000 0%, transparent 75%);
}
.bg-glow {
  position: fixed;
  top: -22vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, 150vw);
  aspect-ratio: 1;
  z-index: -2;
  background: radial-gradient(closest-side, rgba(245, 197, 66, 0.20), rgba(245, 197, 66, 0.05) 55%, transparent 72%);
  filter: blur(8px);
  pointer-events: none;
}
#sparkles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 32px);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(5, 7, 15, 0.62);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 15px;
}
.nav-brand img { width: 26px; height: 26px; }
.nav-links { display: flex; align-items: center; gap: clamp(12px, 3vw, 26px); }
.nav-links a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  transition: color 160ms ease;
}
.nav-links a:hover { color: #fff; }
.nav-links a:not(.nav-cta) { display: none; }
.nav-cta {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--grad-gold);
  color: #14100a !important;
  font-weight: 800;
  box-shadow: 0 6px 18px -8px rgba(245, 197, 66, 0.9);
}

/* ---------- layout ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(18px, 5vw, 28px); }

.section {
  padding: clamp(64px, 11vw, 120px) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.section-title {
  font-size: clamp(28px, 6.5vw, 46px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0 0 10px;
}
.section-sub {
  margin: 0 0 clamp(28px, 5vw, 44px);
  color: var(--muted);
  font-size: clamp(15px, 3.6vw, 17px);
}

/* ---------- hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(20px, 5vw, 40px) 0 clamp(44px, 7vw, 64px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 clamp(14px, 3vw, 22px);
  padding: 7px 15px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(245, 197, 66, 0.05);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.72);
}
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(245, 197, 66, 0.7);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(245, 197, 66, 0.6); }
  70%  { box-shadow: 0 0 0 9px rgba(245, 197, 66, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 197, 66, 0); }
}

/* the square */
.tile-wrap {
  position: relative;
  display: block;
  width: min(72vw, 46vh, 330px);
  aspect-ratio: 1;
  margin: 0 0 clamp(-30px, -3.5vw, -6px);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: float 6.5s ease-in-out infinite;
  transition: transform 220ms cubic-bezier(.2,.9,.3,1.4);
}
.tile-wrap:active { transform: scale(0.955); }
.tile { width: 100%; height: 100%; object-fit: contain; position: relative; z-index: 2; }
.tile-shadow {
  position: absolute;
  left: 50%;
  bottom: 9%;
  transform: translateX(-50%);
  width: 46%;
  height: 16px;
  background: radial-gradient(closest-side, rgba(245, 197, 66, 0.22), transparent 78%);
  filter: blur(12px);
  z-index: 1;
  animation: shadowPulse 6.5s ease-in-out infinite;
}
/* shimmer sweep */
.tile-sweep {
  position: absolute;
  inset: 24% 27%;
  z-index: 3;
  border-radius: 14%;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(#000 70%, transparent 100%);
  mask-image: radial-gradient(#000 70%, transparent 100%);
}
.tile-sweep::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -140%;
  width: 55%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.62), transparent);
  transform: rotate(18deg);
  animation: sweep 4.6s cubic-bezier(.5,0,.2,1) infinite;
}
@keyframes sweep {
  0%, 62%  { left: -140%; }
  100%     { left: 200%; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}
@keyframes shadowPulse {
  0%, 100% { opacity: 0.85; transform: translateX(-50%) scale(1); }
  50%      { opacity: 0.45; transform: translateX(-50%) scale(0.82); }
}

.title {
  margin: 0;
  font-size: clamp(46px, 13vw, 100px);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.92;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 8px 34px rgba(245, 197, 66, 0.22));
}

.ticker-tag {
  margin: 12px 0 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: clamp(13px, 3.6vw, 16px);
  font-weight: 700;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.8);
}

.lede {
  margin: clamp(16px, 3vw, 22px) 0 0;
  max-width: 22ch;
  font-size: clamp(19px, 4.8vw, 27px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.28;
  color: rgba(255, 255, 255, 0.92);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(22px, 4vw, 30px);
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 15px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 160ms ease, box-shadow 200ms ease, background 200ms ease;
}
.btn:active { transform: translateY(1px) scale(0.985); }
.btn-gold {
  background: var(--grad-gold);
  color: #14100a;
  box-shadow: 0 14px 34px -14px rgba(245, 197, 66, 0.95), inset 0 1px 0 rgba(255,255,255,0.55);
}
.btn-gold:hover { box-shadow: 0 18px 44px -14px rgba(245, 197, 66, 1); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(245,197,66,0.4); }

/* ---------- marquee ---------- */
.marquee {
  position: relative;
  overflow: hidden;
  margin: 0 calc(50% - 50vw);
  width: 100vw;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(245,197,66,0.06), rgba(47,91,255,0.05), rgba(245,197,66,0.06));
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 22px;
  width: max-content;
  animation: scroll 38s linear infinite;
  white-space: nowrap;
}
.marquee-track span {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}
.marquee-track i { color: var(--gold); font-size: 9px; font-style: normal; }
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- cards ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.card {
  position: relative;
  padding: 26px 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
  overflow: hidden;
  transition: border-color 220ms ease, transform 220ms ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 197, 66, 0.55), transparent);
}
.card:hover { border-color: rgba(245, 197, 66, 0.32); transform: translateY(-3px); }
.card-num {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 12px;
}
.card h3 {
  margin: 0 0 8px;
  font-size: clamp(18px, 4.6vw, 21px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card-hero {
  background: linear-gradient(170deg, rgba(245, 197, 66, 0.13), rgba(245, 197, 66, 0.02));
  border-color: rgba(245, 197, 66, 0.24);
}

/* ---------- meme section ---------- */
.meme {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 6vw, 56px);
  align-items: center;
}
.meme-copy p {
  color: var(--muted);
  font-size: clamp(15px, 3.8vw, 17px);
  max-width: 52ch;
}
.meme-kicker { color: var(--gold) !important; font-weight: 700; }
.meme-art { display: flex; justify-content: center; }
.meme-art img {
  width: min(72vw, 340px);
  filter: drop-shadow(0 24px 60px rgba(245, 197, 66, 0.28));
  animation: float 7.5s ease-in-out infinite;
  -webkit-mask-image: radial-gradient(closest-side, #000 64%, rgba(0, 0, 0, 0.35) 82%, transparent 96%);
  mask-image: radial-gradient(closest-side, #000 64%, rgba(0, 0, 0, 0.35) 82%, transparent 96%);
}

/* ---------- CA ---------- */
.ca { text-align: center; }
.ca .section-title, .ca .section-sub { text-align: center; }
.ca-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px 16px 18px;
  border: 1px solid rgba(245, 197, 66, 0.28);
  border-radius: 16px;
  background: rgba(245, 197, 66, 0.045);
  cursor: pointer;
  text-align: left;
  color: #fff;
  font: inherit;
  transition: background 200ms ease, border-color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.ca-box:hover { background: rgba(245, 197, 66, 0.09); border-color: rgba(245, 197, 66, 0.5); }
.ca-box code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: clamp(11px, 3.1vw, 15px);
  letter-spacing: -0.01em;
  color: var(--gold-hi);
  word-break: break-all;
  line-height: 1.4;
}
.ca-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--grad-gold);
  color: #14100a;
  font-size: 13px;
  font-weight: 800;
}
.ca-box.copied .ca-copy { background: #7ee08a; }

/* ---------- footer ---------- */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(44px, 8vw, 68px) clamp(18px, 5vw, 28px) calc(48px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}
.footer img { margin: 0 auto 14px; opacity: 0.9; width: 30px; height: 30px; }
.footer-line {
  margin: 0 0 14px;
  font-size: clamp(15px, 3.8vw, 17px);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.footer-links a { color: var(--muted); transition: color 160ms ease; }
.footer-links a:hover { color: var(--gold); }
.footer-fine {
  margin: 18px 0 0;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.34);
  font-family: "JetBrains Mono", monospace;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 26px);
  z-index: 60;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--grad-gold);
  color: #14100a;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 16px 40px -14px rgba(245, 197, 66, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 260ms cubic-bezier(.2,.9,.3,1.3);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- midas mode ---------- */
body.midas {
  background: #f6c945;
  --text: #17130a;
  --muted: rgba(23, 19, 10, 0.66);
  --line: rgba(23, 19, 10, 0.2);
  --grad-gold: linear-gradient(140deg, #2a1f06, #4a3608 60%, #221a04);
}
body.midas .bg-grid {
  background:
    linear-gradient(180deg, #ffe07a 0%, #f5c542 45%, #e0a71c 100%);
}
body.midas .bg-grid::after { opacity: 0.5; background-image:
    linear-gradient(rgba(0,0,0,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.06) 1px, transparent 1px); }
body.midas .bg-glow { background: radial-gradient(closest-side, rgba(255,255,255,0.5), transparent 70%); }
body.midas .nav { background: rgba(246, 201, 69, 0.7); border-bottom-color: rgba(23,19,10,0.12); }
body.midas .eyebrow {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(23, 19, 10, 0.18);
  color: rgba(23, 19, 10, 0.8);
}
body.midas .dot { background: #4a3608; }
body.midas .title { filter: drop-shadow(0 6px 22px rgba(0,0,0,0.18)); }
body.midas .ticker-tag { color: rgba(23,19,10,0.75); }
body.midas .lede { color: #17130a; }
body.midas .card,
body.midas .ca-box { background: rgba(255,255,255,0.34); border-color: rgba(23,19,10,0.16); }
body.midas .card-num,
body.midas .meme-kicker,
body.midas .ca-box code { color: #3a2b06 !important; }
body.midas .btn-ghost { background: rgba(255,255,255,0.4); border-color: rgba(23,19,10,0.2); color: #17130a; }
body.midas .nav-cta,
body.midas .btn-gold,
body.midas .ca-copy,
body.midas .toast { color: #ffe9a8 !important; }
body.midas .marquee { background: rgba(255,255,255,0.25); }
body.midas .marquee-track span { color: rgba(23,19,10,0.8); }
body.midas .marquee-track i { color: #4a3608; }
body.midas .footer-fine { color: rgba(23,19,10,0.45); }

/* ---------- responsive ---------- */
@media (min-width: 620px) {
  .nav-links a:not(.nav-cta) { display: inline; }
  .br-mobile { display: none; }
  .lede { max-width: 30ch; }
}

@media (min-width: 780px) {
  .cards { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .card { padding: 30px 26px 28px; }
  .meme { grid-template-columns: 1.15fr 0.85fr; }
  .meme-art img { width: min(34vw, 380px); }
  .ca-box { padding: 20px 20px 20px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
}
