:root {
  --yellow: #f6c400;
  --yellow-deep: #e0b000;
  --ink: #14110b;
  --ink-soft: #3a3428;
  --cream: #fff6d2;
  --paper: #fffdf4;
  --line: rgba(20, 17, 11, 0.16);
  --hat: #111111;
  --glow: rgba(255, 248, 210, 0.55);
  --display: "Titan One", "Fredoka", system-ui, sans-serif;
  --text: "Fredoka", "Trebuchet MS", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--text);
  background: radial-gradient(1200px 700px at 80% -10%, #ffe36a 0%, transparent 55%),
              radial-gradient(900px 600px at -10% 110%, #ffd54a 0%, transparent 50%),
              var(--yellow);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.lab-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(20, 17, 11, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 17, 11, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 40%, transparent 80%);
  animation: grid-drift 28s linear infinite;
}
@keyframes grid-drift {
  from { background-position: 0 0; }
  to { background-position: 72px 72px; }
}

.glassware {
  position: fixed; inset: -8% -4%; width: 108%; height: 116%;
  z-index: 0; pointer-events: none; opacity: 0.22;
}
.ware-stroke {
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 12 18;
  animation: ware-flow 18s linear infinite;
}
.ware-stroke circle { fill: rgba(255,255,255,0.35); stroke: #fff; }
@keyframes ware-flow { to { stroke-dashoffset: -420; } }

#fizz { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
#lamp {
  position: fixed; width: 420px; height: 420px; z-index: 1; pointer-events: none;
  background: radial-gradient(circle, var(--glow), transparent 68%);
  transform: translate(-50%, -50%);
  opacity: 0.7; mix-blend-mode: screen;
}
.grain {
  position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.nav, main, .foot { position: relative; z-index: 3; }

.nav {
  position: sticky; top: 0; z-index: 8;
  display: flex; align-items: center; gap: 18px;
  padding: 14px 28px;
  background: rgba(246, 196, 0, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 2px solid var(--ink);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; font-family: var(--display);
  font-size: 1.35rem; letter-spacing: 0.02em;
}
.brand img {
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  animation: brand-bob 3.4s ease-in-out infinite;
}
@keyframes brand-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.nav-links { display: flex; gap: 22px; margin-left: auto; font-weight: 600; }
.nav-links a { text-decoration: none; position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 3px;
  background: var(--ink); transition: width 0.25s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-x {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--paper); text-decoration: none; font-weight: 600;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-x:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; position: relative; }
.nav-toggle i {
  position: absolute; left: 8px; right: 8px; height: 3px; background: var(--ink);
}
.nav-toggle i:first-of-type { top: 14px; }
.nav-toggle i:last-of-type { top: 23px; }

.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px;
  align-items: center; padding: 72px 7vw 48px;
}
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--cream); font-weight: 600; font-size: 0.92rem;
  animation: chip-in 0.8s ease both;
}
.chip img { width: 16px; height: 16px; border-radius: 50%; }
@keyframes chip-in { from { opacity: 0; transform: translateY(10px); } }
h1 {
  font-family: var(--display);
  font-size: clamp(3.4rem, 9vw, 7.4rem);
  line-height: 0.9; letter-spacing: 0.01em;
  text-shadow: 4px 4px 0 #fff, 7px 7px 0 var(--ink);
  animation: title-pop 0.9s cubic-bezier(.2,1.4,.3,1) both;
}
@keyframes title-pop { from { opacity: 0; transform: scale(0.86) rotate(-2deg); } }
.ticker-sym {
  margin: 10px 0 16px;
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  animation: fade-up 0.8s 0.15s ease both;
}
.lead {
  max-width: 34rem; font-size: 1.15rem; line-height: 1.55; color: var(--ink-soft);
  animation: fade-up 0.8s 0.22s ease both;
}
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } }

.ca {
  display: flex; align-items: center; gap: 12px; width: min(100%, 520px);
  margin: 22px 0 18px; padding: 10px 12px 10px 10px;
  border: 2px solid var(--ink); border-radius: 16px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.2s ease;
}
.ca:hover { transform: translate(-2px, -2px); }
.ca span {
  flex: none; padding: 6px 10px; border-radius: 10px;
  background: var(--ink); color: var(--yellow); font-weight: 700;
}
.ca code { flex: 1; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca em { font-style: normal; font-weight: 700; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border: 2px solid var(--ink); border-radius: 999px;
  text-decoration: none; font-weight: 700;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn.ink { background: var(--ink); color: var(--yellow); }
.btn.ink img { filter: invert(1) sepia(1) saturate(6) hue-rotate(6deg); }
.btn.pale { background: var(--paper); }

.icon-rail { display: flex; gap: 12px; list-style: none; margin-top: 22px; }
.icon-rail a {
  display: grid; place-items: center; width: 48px; height: 48px;
  border: 2px solid var(--ink); border-radius: 14px; background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.25s ease;
}
.icon-rail a:hover { transform: translateY(-5px) rotate(-4deg); }
.icon-rail img { width: 24px; height: 24px; object-fit: contain; }

.hero-mark {
  position: relative; display: grid; place-items: center;
  min-height: 460px; animation: mark-in 1s 0.1s ease both;
}
@keyframes mark-in { from { opacity: 0; transform: scale(0.9); } }
.hero-mark img {
  width: min(78%, 420px); border-radius: 50%;
  border: 4px solid var(--ink);
  box-shadow: 0 0 0 12px rgba(255,255,255,0.35), 10px 12px 0 var(--ink);
  animation: hat-sway 5.5s ease-in-out infinite;
  position: relative; z-index: 2;
}
@keyframes hat-sway {
  0%, 100% { transform: rotate(-1.5deg); }
  50% { transform: rotate(2deg); }
}
.orbit {
  position: absolute; border: 2px dashed var(--ink); border-radius: 50%;
  opacity: 0.35;
}
.orbit-a { width: 86%; aspect-ratio: 1; animation: spin 18s linear infinite; }
.orbit-b { width: 68%; aspect-ratio: 1; animation: spin 12s linear infinite reverse; }
.orbit::before, .orbit::after {
  content: ""; position: absolute; width: 14px; height: 22px;
  border: 2px solid var(--ink); border-radius: 0 0 40% 40%;
  background: rgba(255,255,255,0.65);
}
.orbit::before { top: -8px; left: 46%; }
.orbit::after { bottom: -6px; right: 18%; transform: rotate(160deg); }
@keyframes spin { to { transform: rotate(360deg); } }
.hat-glow {
  position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, #fff6b8, transparent 70%);
  filter: blur(12px); animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(1.08); opacity: 0.7; } }

.tape {
  overflow: hidden; border-block: 2px solid var(--ink);
  background: var(--ink); color: var(--yellow);
  padding: 12px 0;
}
.tape-track {
  display: flex; gap: 48px; width: max-content;
  font-family: var(--display); font-size: 1.15rem; letter-spacing: 0.04em;
  animation: tape 22s linear infinite;
}
@keyframes tape { to { transform: translateX(-50%); } }

section { padding: 88px 7vw; }
.section-head { margin-bottom: 28px; }
.kicker {
  display: inline-block; margin-bottom: 8px;
  padding: 4px 10px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--cream); font-weight: 700; font-size: 0.82rem;
  letter-spacing: 0.08em; text-transform: uppercase;
}
h2 {
  font-family: var(--display);
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1; text-shadow: 3px 3px 0 rgba(255,255,255,0.7);
}
.sub, .brief { max-width: 40rem; margin-top: 12px; font-size: 1.08rem; color: var(--ink-soft); line-height: 1.55; }

.ledger {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 32px;
}
.ledger article {
  padding: 22px; background: var(--paper);
  border: 2px solid var(--ink); border-radius: 22px;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 0.25s ease;
}
.ledger article:hover { transform: translateY(-6px) rotate(-0.6deg); }
.idx { font-family: var(--display); font-size: 1.3rem; margin-bottom: 8px; }
.ledger h3 { font-family: var(--display); font-size: 1.45rem; margin-bottom: 8px; }
.ledger p:last-child { color: var(--ink-soft); line-height: 1.5; }

.steps { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.steps li {
  display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: start;
  padding: 20px; background: var(--cream);
  border: 2px solid var(--ink); border-radius: 22px;
  box-shadow: 5px 5px 0 var(--ink);
}
.step-ico {
  width: 64px; height: 64px; display: grid; place-items: center;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 18px;
}
.step-ico img { width: 34px; height: 34px; object-fit: contain; }
.step-no { font-family: var(--display); }
.steps h3 { font-family: var(--display); font-size: 1.4rem; margin: 4px 0 8px; }
.steps p { color: var(--ink-soft); margin-bottom: 10px; }
.steps a { font-weight: 700; }

.bezel {
  border: 2px solid var(--ink); border-radius: 24px; overflow: hidden;
  background: var(--paper);
  box-shadow: 8px 8px 0 var(--ink);
}
.bezel-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; background: var(--ink); color: var(--yellow);
  font-weight: 600; font-size: 0.92rem;
}
.bezel-bar a { color: var(--yellow); font-weight: 700; }
.bezel iframe { width: 100%; height: 640px; border: 0; background: #fff; }

.banner {
  margin: 8px 0 22px;
  border: 2px solid var(--ink); border-radius: 24px; overflow: hidden;
  box-shadow: 8px 8px 0 var(--ink);
  background: var(--yellow);
}
.banner img {
  width: 100%; aspect-ratio: 3 / 1; object-fit: cover; object-position: center;
  animation: banner-breathe 8s ease-in-out infinite;
}
@keyframes banner-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}
.join-panel {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 24px; background: var(--paper);
  border: 2px solid var(--ink); border-radius: 22px;
  box-shadow: 5px 5px 0 var(--ink);
}
.join-sym { font-family: var(--display); font-size: 1.6rem; margin-bottom: 6px; }
.join-panel p:last-of-type { color: var(--ink-soft); max-width: 36rem; }

.foot {
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  padding: 28px 7vw 40px; border-top: 2px solid var(--ink);
}
.foot-brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); }
.foot-brand img { border-radius: 50%; border: 2px solid var(--ink); }
.foot p { max-width: 28rem; color: var(--ink-soft); font-size: 0.95rem; }
.foot-links { display: flex; gap: 16px; font-weight: 700; }

.reveal { opacity: 0; transform: translateY(22px); animation: reveal 0.7s ease forwards; }
@keyframes reveal { to { opacity: 1; transform: none; } }

@media (max-width: 980px) {
  .hero, .ledger, .steps, .foot, .join-panel { grid-template-columns: 1fr; display: grid; }
  .join-panel, .foot { display: flex; flex-wrap: wrap; }
  .hero-mark { min-height: 340px; order: -1; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; padding: 16px 22px 20px;
    background: var(--yellow); border-bottom: 2px solid var(--ink);
  }
  .nav.open .nav-links { display: flex; }
  .nav-x span { display: none; }
  .bezel iframe { height: 480px; }
}
