/* ============ Elybean · base, header, hero ============ */
@font-face {
  font-family: Rubik;
  src: url(assets/fonts/rubik-variable.woff2) format('woff2-variations'), url(assets/fonts/rubik-variable.woff2) format('woff2');
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: Mali;
  src: url(assets/fonts/mali-semibold.woff2) format('woff2');
  font-weight: 500 800;
  font-display: swap;
}
:root {
  --ink: #092c44;
  --ink-2: #061d30;
  --cream: #fff9e9;
  --paper: #fff6dc;
  --sky: #a7e3ed;
  --blue: #11a9e1;
  --bean: #2fb6ea;
  --bean-deep: #0b7fb8;
  --gold: #ffdc6e;
  --pink: #ff9cbc;
  --grass: #9bd660;
  --mint: #d9efde;
  --line: 2.5px solid var(--ink);
  --shadow: 4px 5px 0 var(--ink);
  --hand: Mali, 'Comic Sans MS', 'Chalkboard SE', cursive;
  --wrap: min(1240px, 90vw);
  color: var(--ink);
  font: 400 17px/1.55 Rubik, system-ui, Arial, sans-serif;
  background: var(--cream);
  scroll-behavior: smooth;
}
* { box-sizing: border-box; }
body { margin: 0; overflow-x: clip; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 4px solid #e2477e; outline-offset: 4px; }
::selection { background: var(--gold); color: var(--ink); }
.hand { font-family: var(--hand); font-weight: 600; letter-spacing: -.01em; }
.skip { position: absolute; top: -6em; left: 1em; z-index: 90; background: white; padding: 10px; }
.skip:focus { top: 4px; }

/* Lenis smooth scrolling */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }

/* ---------- shared bits ---------- */
.eyebrow, .chapter-tag, .sticker, .phase {
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}
.eyebrow { display: inline-flex; gap: 8px; align-items: center; margin: 0 0 12px; color: #29627a; }
.chapter-tag { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; }
.chapter-tag i { width: 11px; height: 11px; border-radius: 50%; background: var(--bean); border: 2px solid currentColor; box-shadow: 0 0 0 3px #2fb6ea33; }
.mega {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.035em;
  line-height: .9;
  font-size: clamp(44px, 7.2vw, 112px);
  margin: 0 0 22px;
  text-wrap: balance;
}
.mega .accent, .accent { color: var(--bean-deep); }
.lede { font-size: clamp(18px, 1.5vw, 22px); max-width: 38em; margin: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #42cf7f; border: 2px solid var(--ink); display: inline-block; flex: none; }
.section { padding: clamp(70px, 9vw, 130px) max(5vw, calc((100vw - 1240px) / 2)); position: relative; }

.tokenlink, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: var(--line);
  border-radius: 999px;
  box-shadow: 3px 4px 0 var(--ink);
  font-weight: 800;
  transition: transform .18s cubic-bezier(.3,1.6,.5,1), box-shadow .18s;
  white-space: nowrap;
}
.button { min-height: 54px; padding: 12px 24px; font-size: 16px; }
.button:hover, .tokenlink:hover { transform: translate(-1px, -3px) rotate(-1.5deg); box-shadow: 5px 7px 0 var(--ink); }
.button:active, .tokenlink:active { transform: translate(2px, 2px) scale(.97); box-shadow: 1px 1px 0 var(--ink); }
.primary { background: var(--bean); color: var(--ink); }
.pale { background: var(--cream); }
.gold { background: var(--gold); color: var(--ink); }
.ghost { background: transparent; color: var(--cream); border-color: var(--cream); box-shadow: 3px 4px 0 #ffffff55; }

/* bean-shaped scalloped edge on top of a section */
.edge-top { position: relative; }
.edge-top::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: -29px;
  height: 30px;
  background: inherit;
  background-position: top;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 30'%3E%3Cpath d='M0 26h64v4H0z'/%3E%3Cpath d='M9 30C3 23 5 11 17 9c8-1 12 4 18 3 8-2 18-3 21 6 3 8-1 12-3 12Z'/%3E%3C/svg%3E") 0 100% / 64px 30px repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 30'%3E%3Cpath d='M0 26h64v4H0z'/%3E%3Cpath d='M9 30C3 23 5 11 17 9c8-1 12 4 18 3 8-2 18-3 21 6 3 8-1 12-3 12Z'/%3E%3C/svg%3E") 0 100% / 64px 30px repeat-x;
  pointer-events: none;
}

/* ---------- tickers ---------- */
.ticker { overflow: hidden; white-space: nowrap; user-select: none; }
.ticker-track { display: flex; width: max-content; }
.ticker-half { display: flex; flex: none; align-items: center; }
.ticker span { display: inline-flex; align-items: center; gap: 22px; margin-right: 22px; }
.ticker b { font-size: .9em; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--cream);
  border-bottom: var(--line);
  transition: transform .4s cubic-bezier(.2,.8,.2,1), background-color .3s, border-color .3s;
}
.site-header.tucked { transform: translateY(-101%); }
/* Landing page: the header floats over the hero and stays see-through until you scroll. */
body[data-page="home"] .site-header { position: fixed; left: 0; right: 0; }
body[data-page="home"] .hero { padding-top: var(--header-h, 99px); }
.site-header.at-top { background-color: transparent; border-bottom-color: transparent; }
.site-header.at-top .motion-switch { border-color: var(--ink); background: #ffffff55; }
.navwrap {
  width: var(--wrap);
  height: 66px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 30px);
}
.brand { display: inline-flex; gap: 9px; align-items: center; font-size: 32px; font-weight: 900; line-height: 1; letter-spacing: -.06em; }
.brand img { width: 42px; height: 36px; object-fit: contain; transform: rotate(-9deg); filter: drop-shadow(1px 2px 0 var(--ink)); transition: transform .4s cubic-bezier(.3,1.8,.5,1); }
.brand:hover img { transform: rotate(8deg) scale(1.12); }
.navwrap nav { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 40px); font-size: 14px; font-weight: 700; margin-inline: auto 0; }
.navwrap nav a { padding: 12px 0; position: relative; }
.navwrap nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 6px; height: 3px; border-radius: 3px; background: var(--bean); transform: scaleX(0) rotate(-3deg); transform-origin: left; transition: transform .25s; }
.navwrap nav a:hover::after { transform: scaleX(1) rotate(-3deg); }
.navwrap nav a.nav-play.current::after { transform: scaleX(1) rotate(-3deg); }
.stop-cta { min-height: 44px; padding: 8px 18px; font-size: 15px; margin-top: 12px; }
.motion-switch { display: grid; place-items: center; flex: 0 0 38px; height: 38px; background: transparent; border: 1.5px solid #9da99e; border-radius: 50%; }
.motion-switch:hover { background: var(--gold); }
.tokenlink[aria-disabled] { cursor: default; }
.tokenlink { padding: 9px 18px; background: var(--gold); font-size: 14px; min-height: 44px; box-shadow: 2px 3px 0 var(--ink); }
.menu { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-bottom: var(--line);
  background: #13a6fd;
  touch-action: pan-y;
}
.hero-sky { position: absolute; inset: -3% 0 0; z-index: -1; pointer-events: none; background: #13a6fd url(assets/hero-meadow.webp) center bottom / cover no-repeat; }
.hero-stage {
  position: relative;
  width: min(1240px, 92vw);
  margin: auto;
  min-height: clamp(660px, calc(100svh - 96px), 940px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(20px, 2.6vw, 36px) 0 clamp(34px, 4vw, 54px);
}
.kicker { position: relative; z-index: 3; }
.sticker {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 14px;
  border: var(--line); border-radius: 8px;
  box-shadow: 2px 3px 0 var(--ink);
  transform: rotate(-3deg);
  background: var(--gold);
  font-size: clamp(11px, .95vw, 14px);
  margin: 0;
}
/* --fs sizes the wordmark, --bw sizes the peeking bean. */
.hero-stage { --fs: min(14vw, 214px); --bw: clamp(230px, 24vw, 350px); }
.wordmark {
  position: relative;
  z-index: 2;
  margin: 6px 0 0;
  font-size: var(--fs);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.075em;
  color: var(--cream);
  white-space: nowrap;
  -webkit-text-stroke: .06em var(--ink);
  paint-order: stroke fill;
  text-shadow: .03em .06em 0 var(--ink);
}
.wordmark span { display: inline-block; cursor: default; }
.wordmark span:nth-child(2) { rotate: -7deg; }
.wordmark span:nth-child(3) { rotate: 5deg; }
.wordmark span:nth-child(4) { rotate: -3deg; }
.wordmark span:nth-child(6) { rotate: -5deg; }
/* The bean peeks over the top edge of the card; his cut-off bottom hides behind it. */
.hero-bean { position: relative; z-index: 1; width: var(--bw); margin: clamp(6px, 1vw, 14px) auto calc(var(--bw) * -.05); }
.bean-button { display: block; width: 100%; background: transparent; border: 0; padding: 0; position: relative; touch-action: manipulation; }
.bean-tilt { display: block; transform-origin: 50% 100%; }
.bean-button img { display: block; width: 100%; height: auto; transform-origin: 50% 100%; }
.rays { position: absolute; inset: -40% -46% -10%; z-index: -1; border-radius: 50%; background: repeating-conic-gradient(from 0deg, #fffbd9 0 8deg, #fff3a000 8deg 20deg); -webkit-mask: radial-gradient(closest-side, #000 30%, transparent 96%); mask: radial-gradient(closest-side, #000 30%, transparent 96%); opacity: .55; }
.hero-fly { position: absolute; z-index: 3; width: 20%; top: 26%; left: -24%; pointer-events: none; }
.chat {
  position: absolute; top: 6%; left: 90%; z-index: 4;
  border: 2.5px solid var(--ink);
  background: var(--cream);
  border-radius: 42% 44% 40% 38% / 47% 49% 42% 45%;
  padding: 10px 20px;
  rotate: 6deg;
  font: 600 clamp(15px, 1.35vw, 21px)/1.15 var(--hand);
  box-shadow: 3px 4px 0 var(--ink);
  white-space: nowrap;
}
.chat::after { content: ''; position: absolute; bottom: -10px; left: 14%; width: 16px; height: 17px; background: inherit; border: solid var(--ink); border-width: 0 0 2.5px 2.5px; transform: skew(-28deg, -28deg) rotate(-18deg); }
.chat.reacted { background: #ffe58f; }
.jump { animation: hop .62s cubic-bezier(.3,1.4,.5,1); }
@keyframes hop { 0%,100% { transform: none; } 18% { transform: scale(1.06,.9); } 48% { transform: translateY(-4%) scale(.97,1.06); } 76% { transform: scale(1.03,.97); } }

.bursts { position: absolute; left: 50%; top: 48%; pointer-events: none; z-index: 5; }
.burst i { position: absolute; width: 22px; height: 15px; border-radius: 55% 45% 50% 50% / 60% 60% 40% 40%; border: 2px solid var(--ink); background: var(--pink); animation: fling .95s cubic-bezier(.15,.7,.3,1) forwards; }
.burst i.p1 { background: var(--gold); }
.burst i.p2 { background: var(--grass); }
.burst i.p3 { background: var(--bean); }
.burst i.p4 { background: #fff; }
.burst i.p5 { background: #c79cff; }
.burst em { position: absolute; left: -16px; top: -60px; font: 900 34px/1 Rubik, sans-serif; font-style: normal; color: var(--gold); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; animation: plus 1s ease-out forwards; }
@keyframes fling { from { transform: translate(-50%, -50%) scale(.3); opacity: 1; } 70% { opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 60px)) rotate(var(--rot)) scale(1); opacity: 0; } }
@keyframes plus { from { transform: translateY(20px) scale(.6); opacity: 0; } 25% { opacity: 1; transform: translateY(0) scale(1.1); } to { transform: translateY(-50px) scale(1); opacity: 0; } }

/* draggable stickers: two, flanking the bean */
.stickers { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.drag { position: absolute; pointer-events: auto; touch-action: none; cursor: grab; user-select: none; translate: var(--dx, 0) var(--dy, 0); }
.drag.dragging { cursor: grabbing; z-index: 10; filter: drop-shadow(4px 8px 0 #092c4433); }
.st { padding: 9px 16px; border: var(--line); border-radius: 12px; background: var(--cream); box-shadow: 3px 4px 0 var(--ink); font: 600 17px/1 var(--hand); white-space: nowrap; }
.st-chart { top: 47%; left: 3%; rotate: -8deg; background: var(--gold); }
.st-gm { top: 40%; right: 5%; rotate: 8deg; border-radius: 50%; padding: 17px 14px; background: var(--pink); font-size: 20px; }
.drag-hint { position: absolute; top: calc(47% + 52px); left: 3.5%; margin: 0; font-size: 14px; rotate: -4deg; color: #0b4f73; transition: opacity .4s; }
.drag-hint.gone { opacity: 0; }

.hero-copy { position: relative; z-index: 3; width: 100%; display: grid; justify-items: center; }
.hero-card { width: min(100%, 1000px); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px clamp(20px, 3vw, 40px); padding: clamp(18px, 2vw, 24px) clamp(20px, 2.6vw, 32px); text-align: left; background: var(--cream); border: 3px solid var(--ink); border-radius: 24px; box-shadow: 6px 7px 0 var(--ink); }
.hero-tagline { margin: 0 0 6px; font-size: clamp(24px, 2.4vw, 36px); font-weight: 900; text-transform: uppercase; line-height: 1; letter-spacing: -.03em; }
.hero-tagline span { color: var(--bean-deep); }
.hero-text p { margin: 0; font-size: clamp(15px, 1.15vw, 17px); max-width: 36em; }
.hero-cta { display: grid; justify-items: center; gap: 10px; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; }
.boop-count { margin: 0; font-size: 15px; line-height: 1.2; color: #0b4f73; }

@media (max-width: 1020px) {
  .navwrap nav { gap: 18px; }
}
@media (max-width: 860px) {
  .hero-stage { --fs: 20.5vw; --bw: 58vw; min-height: 0; padding-top: 22px; }
  .chat { left: auto; right: -30%; top: 12%; font-size: 13px; padding: 6px 11px; rotate: 8deg; }
  .hero-sky { background-size: auto 100%; background-position: 50% bottom; }
  .hero-fly { left: -24%; width: 22%; }
  .stickers { display: none; }
  .hero-card { grid-template-columns: 1fr; text-align: center; }
  .hero-text p { margin-inline: auto; }
}
/* The nav links collapse into the menu button before they can run into the logo. */
@media (max-width: 1000px) {
  .tokenlink { margin-left: auto; }
  .menu { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; }
  .navwrap nav { display: none; }
  .navwrap nav.open {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); padding: 8px 6% 16px; border-bottom: var(--line);
    box-shadow: 0 10px 18px #092c4422; font-size: 18px;
  }
  .navwrap nav a::after { display: none; }
}
/* Short screens (phones turned sideways): a slimmer header. */
@media (max-height: 520px) {
  .navwrap { height: 52px; }
}
@media (max-width: 680px) {
  :root { font-size: 16px; }
  .navwrap { height: 58px; width: 92vw; gap: 8px; }
  .brand { font-size: 27px; gap: 6px; }
  .brand img { width: 33px; }
  .tokenlink { font-size: 13px; padding: 7px 12px; min-height: 40px; }
  .button { min-height: 50px; padding: 11px 18px; font-size: 15px; }
  .hero-tagline { font-size: clamp(24px, 7vw, 32px); }
  .hero-actions .button { flex: 1 1 100%; }
}
