:root {
  --bg: #0b0b10;
  --surface: #14141c;
  --text: #f4f2ee;
  --muted: #a3a1ab;
  --line: rgba(255,255,255,.08);
  /* rainbow brand */
  --c1: #ff3b6b; /* R - hot pink/red */
  --c2: #ff8a1f; /* I - orange */
  --c3: #ffd23f; /* S - yellow */
  --c4: #3ee07a; /* C - green */
  --c5: #3bd1ff; /* B - cyan */
  --c6: #6b6bff; /* I - indigo */
  --c7: #c35cff; /* O - violet */
  --rainbow: linear-gradient(90deg, var(--c1), var(--c2), var(--c3), var(--c4), var(--c5), var(--c6), var(--c7), var(--c1));
  --display: 'Clash Display', 'Satoshi', system-ui, sans-serif;
  --body: 'Satoshi', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--body); font-size: clamp(1rem, .95rem + .25vw, 1.125rem);
  line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.r1 { color: var(--c1); } .r2 { color: var(--c2); } .r3 { color: var(--c3); }
.r4 { color: var(--c4); } .r5 { color: var(--c5); } .r6 { color: var(--c6); }
.r7 { color: var(--c7); } .rdot { color: var(--text); }

#cells { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .nav, .footer { position: relative; z-index: 2; }

/* Nav */
.nav {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  width: min(1100px, calc(100% - 32px)); display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px 10px 20px; border-radius: 999px; z-index: 10;
  background: rgba(20,20,28,.55); border: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.nav-mark { font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; }
.nav nav { display: flex; gap: 4px; align-items: center; }
.nav nav a { padding: 8px 14px; border-radius: 999px; font-size: .9rem; color: var(--muted); transition: color .2s, background .2s; }
.nav nav a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.nav nav .nav-cta { color: var(--bg); background: var(--text); font-weight: 700; }
.nav nav .nav-cta:hover { color: var(--bg); background: #fff; }

/* Hero */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 120px 20px 80px; position: relative;
}
.eyebrow {
  font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; margin: 0 0 28px;
}
.wordmark {
  font-family: var(--display); font-weight: 700; line-height: .9; margin: 0;
  font-size: clamp(4rem, 17vw, 15rem); letter-spacing: -.02em; display: flex; flex-wrap: nowrap;
}
.wordmark .l {
  display: inline-block; opacity: 0; transform: translateY(60%) rotate(8deg) scale(.8);
  animation: letterIn 1s var(--ease) forwards, bob 5s ease-in-out infinite;
  text-shadow: 0 0 40px currentColor;
  transition: transform .4s var(--ease), filter .4s;
  cursor: default;
}
.wordmark .l:nth-child(1) { animation-delay: .05s, 1.1s; }
.wordmark .l:nth-child(2) { animation-delay: .12s, 1.3s; }
.wordmark .l:nth-child(3) { animation-delay: .19s, 1.5s; }
.wordmark .l:nth-child(4) { animation-delay: .26s, 1.7s; }
.wordmark .l:nth-child(5) { animation-delay: .33s, 1.9s; }
.wordmark .l:nth-child(6) { animation-delay: .40s, 2.1s; }
.wordmark .l:nth-child(7) { animation-delay: .47s, 2.3s; }
.wordmark .l:nth-child(8) { animation-delay: .54s, 2.5s; }
.wordmark .l.pop { animation: pop .6s var(--ease); opacity: 1; }
@keyframes letterIn { to { opacity: 1; transform: none; } }
@keyframes bob { 0%,100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.25) rotate(-6deg); } 100% { transform: scale(1); } }

.tagline { font-size: clamp(1.05rem, .9rem + .8vw, 1.5rem); color: var(--muted); margin: 28px 0 36px; max-width: 40ch; }
.tagline b { font-weight: 700; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 14px 26px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; transition: transform .3s var(--ease), box-shadow .3s; position: relative;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, .nav a:focus-visible { outline: 2px solid var(--c5); outline-offset: 3px; }
.btn-rainbow { background: var(--rainbow); background-size: 200% 100%; animation: flow 6s linear infinite; padding: 2px; }
.btn-rainbow span { background: var(--bg); border-radius: 999px; padding: 12px 24px; display: block; transition: background .3s, color .3s; }
.btn-rainbow:hover span { background: transparent; color: var(--bg); }
.btn-rainbow:hover { box-shadow: 0 10px 40px -10px var(--c7), 0 10px 40px -10px var(--c1); }
.btn-ghost { border: 1px solid var(--line); color: var(--muted); }
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,.25); }
.btn-lg span { padding: 16px 32px; font-size: 1.15rem; }
@keyframes flow { to { background-position: 200% 0; } }

.scroll-cue { position: absolute; bottom: 28px; width: 26px; height: 42px; border: 2px solid var(--line); border-radius: 20px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--rainbow); background-size: 400% 100%; animation: cue 1.8s ease-in-out infinite, flow 4s linear infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* Sections */
.section { width: min(1100px, calc(100% - 40px)); margin: 0 auto; padding: clamp(80px, 12vw, 160px) 0; }
h2 { font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 1.4rem + 3vw, 4rem); line-height: 1.05; margin: 0 0 20px; letter-spacing: -.01em; }
.rainbow-text { background: var(--rainbow); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: flow 8s linear infinite; }

.acro { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.acro-item {
  background: rgba(20,20,28,.6); border: 1px solid var(--line); border-radius: 22px; padding: 26px 22px 28px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .5s var(--ease), border-color .4s, box-shadow .4s;
}
.acro-item:hover { transform: translateY(-6px); border-color: rgba(255,255,255,.2); }
.acro-item:nth-child(1):hover { box-shadow: 0 20px 60px -25px var(--c1); }
.acro-item:nth-child(2):hover { box-shadow: 0 20px 60px -25px var(--c2); }
.acro-item:nth-child(3):hover { box-shadow: 0 20px 60px -25px var(--c3); }
.acro-item:nth-child(4):hover { box-shadow: 0 20px 60px -25px var(--c4); }
.acro-item:nth-child(5):hover { box-shadow: 0 20px 60px -25px var(--c5); }
.acro-letter { font-family: var(--display); font-weight: 700; font-size: 4.5rem; line-height: 1; display: block; margin-bottom: 18px; text-shadow: 0 0 30px currentColor; }
.acro-bio { white-space: nowrap; letter-spacing: -.02em; }
.acro-item h3 { font-family: var(--display); font-weight: 600; font-size: 1.3rem; margin: 0 0 6px; }
.acro-item p { margin: 0; color: var(--muted); font-size: .95rem; }

.lab { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.lab-frame { position: relative; border-radius: 24px; padding: 2px; background: var(--rainbow); background-size: 200% 100%; animation: flow 10s linear infinite; }
.lab-frame img { border-radius: 22px; width: 100%; }
.lab-glow { position: absolute; inset: 10%; z-index: -1; background: var(--rainbow); filter: blur(60px); opacity: .45; }
.lab-copy p { color: var(--muted); max-width: 42ch; }

.contact { text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact p { color: var(--muted); margin: 0 0 32px; }

.footer {
  width: min(1100px, calc(100% - 40px)); margin: 0 auto; padding: 30px 0 40px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; color: var(--muted); font-size: .85rem;
}

/* Reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.acro .reveal:nth-child(2) { transition-delay: .08s; }
.acro .reveal:nth-child(3) { transition-delay: .16s; }
.acro .reveal:nth-child(4) { transition-delay: .24s; }
.acro .reveal:nth-child(5) { transition-delay: .32s; }
.hero .reveal { transition-delay: .6s; }
.hero .tagline.reveal { transition-delay: .75s; }
.hero .hero-actions.reveal { transition-delay: .9s; }

@media (max-width: 900px) {
  .acro { grid-template-columns: repeat(2, 1fr); }
  .acro-item:last-child { grid-column: span 2; }
  .lab { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .nav nav a:not(.nav-cta) { display: none; }
  .acro { grid-template-columns: 1fr; }
  .acro-item:last-child { grid-column: auto; }
  .footer { flex-direction: column; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .wordmark .l, .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
.wordmark .rdot { cursor: pointer; }
.wordmark .rdot:hover { filter: drop-shadow(0 0 18px #fff); }
/* Easter egg: fade page content so the channel is visible */
main, .footer { transition: opacity 1.6s var(--ease); }
body.channel-on main, body.channel-on .footer { opacity: .15; }
