/* Wobblebee Studios: a meadow seen the way bees see it (violet sky, pollen yellow, clover green). */

@font-face { font-family: "Grandstander"; src: url("/assets/fonts/grandstander-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Grandstander"; src: url("/assets/fonts/grandstander-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/assets/fonts/figtree-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/assets/fonts/figtree-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/assets/fonts/figtree-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --sky: #EDE8FF;
  --sky-deep: #DCD3FF;
  --ink: #2A2156;
  --ink-soft: #5B4FA0;
  --pollen: #FFC93C;
  --clover: #2E9E6F;
  --petal: #FF8FB1;
  --paper: #FFFFFF;
  --hill: #C6EBCF;
  --display: "Grandstander", "Trebuchet MS", system-ui, sans-serif;
  --text: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration-color: var(--clover); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--clover); }
:focus-visible { outline: 3px solid var(--clover); outline-offset: 3px; border-radius: 6px; }
h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.1; margin: 0; }
h2 { font-size: clamp(2rem, 5vw, 3rem); }
h3 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
.small { font-size: .95rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font: 700 1.15rem var(--display); }
.brand:hover { color: var(--ink); }
.top nav { display: flex; gap: clamp(.75rem, 3vw, 1.75rem); }
.top nav a { font-weight: 600; text-decoration: none; }
.top nav a:hover { text-decoration: underline; }

/* Hero: the bee is the memorable thing; everything else stays still. */
.hero {
  position: relative; overflow: hidden;
  min-height: min(100svh, 920px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 7rem 1rem 9rem;
  text-align: center;
  touch-action: pan-y;
}
.trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wordmark { margin: 0; position: relative; z-index: 1; line-height: .9; }
.word {
  display: block;
  font: 800 clamp(3.2rem, 15vw, 13.5rem) var(--display);
  letter-spacing: -.01em;
  color: var(--ink);
}
.word .ch { display: inline-block; transform-origin: 50% 90%; will-change: transform; }
.studios {
  display: block; margin-top: .15em;
  font: 700 clamp(1.5rem, 4.2vw, 3.2rem) var(--display);
  color: var(--ink-soft);
}
.lede { position: relative; z-index: 1; max-width: 34ch; margin: 1.5rem auto 0; font-size: clamp(1.15rem, 2.2vw, 1.4rem); }
.hint { position: relative; z-index: 1; margin: .75rem 0 0; color: var(--ink-soft); font-size: 1rem; }

.bee {
  position: absolute; left: 0; top: 0; z-index: 3;
  width: clamp(96px, 11vw, 150px); aspect-ratio: 240 / 200;
  padding: 0; border: 0; background: none; cursor: pointer;
  transform: translate(-200px, -200px);
  -webkit-tap-highlight-color: transparent;
}
.bee svg { width: 100%; height: 100%; overflow: visible; display: block; }
.bee.flip svg { scale: -1 1; }
.wing { transform-box: fill-box; transform-origin: 50% 100%; animation: flap .09s ease-in-out infinite alternate; }
.w2 { animation-delay: -.045s; }
@keyframes flap { from { scale: 1 1; } to { scale: 1 .55; } }
.bee.rest .wing { animation-duration: .5s; }
.bee.spin svg { animation: loop .7s cubic-bezier(.4,.1,.3,1); }
@keyframes loop { from { transform: rotate(0); } to { transform: rotate(-360deg); } }
.bubble {
  position: absolute; left: 50%; bottom: 100%; translate: -50% -6px;
  padding: .2rem .7rem; border: 3px solid var(--ink); border-radius: 999px;
  background: var(--paper); font: 700 1rem var(--display); white-space: nowrap;
  opacity: 0; scale: .6; transition: opacity .15s, scale .15s;
  pointer-events: none;
}
.bubble.show { opacity: 1; scale: 1; }

.meadow { position: absolute; inset: auto 0 0 0; height: 9rem; pointer-events: none; }
.meadow::before {
  content: ""; position: absolute; inset: 35% -10% -40% -10%;
  background: var(--hill); border-radius: 50% 50% 0 0 / 60% 60% 0 0;
}
.flower { position: absolute; bottom: 0; width: 44px; transform-origin: 50% 100%; }
.flower.bounce { animation: nod .9s ease-out; }
@keyframes nod { 0% { rotate: 0deg; } 25% { rotate: -9deg; } 55% { rotate: 6deg; } 80% { rotate: -2deg; } 100% { rotate: 0deg; } }

/* Games: a paper sheet rising out of the meadow. */
.games {
  position: relative; z-index: 2;
  background: var(--paper);
  border-radius: 48px 48px 0 0;
  margin-top: -2.5rem;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem);
}
.games > h2 { max-width: 1100px; margin: 0 auto 2.5rem; }
.game {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: center;
}
.game-text { max-width: 36rem; }
.game-text p { margin: 1rem 0 0; }
.game-icon { width: 112px; height: 112px; border-radius: 26px; border: 4px solid var(--ink); margin-bottom: 1.25rem; }
.game-tag { margin-top: .35rem !important; font: 700 1.3rem var(--display); color: var(--clover); }
.status { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.dot { width: .8rem; height: .8rem; border-radius: 50%; background: var(--clover); box-shadow: 0 0 0 4px #D3F0E2; flex: none; }

.phones { position: relative; height: clamp(380px, 62vw, 560px); }
.phone {
  position: absolute; top: 50%; left: 50%; margin: 0;
  width: clamp(120px, 30vw, 230px);
  border: 6px solid var(--ink); border-radius: 30px; overflow: hidden;
  background: var(--ink);
  transition: transform .3s cubic-bezier(.3,1.4,.5,1), z-index 0s;
  cursor: zoom-in;
}
.phone img { width: 100%; height: auto; }
.p1 { transform: translate(-115%, -50%) rotate(-9deg); z-index: 1; }
.p2 { transform: translate(-50%, -54%); z-index: 2; }
.p3 { transform: translate(15%, -50%) rotate(9deg); z-index: 1; }
.phone:hover, .phone:focus-visible { z-index: 3; }
.p1:hover, .p1:focus-visible { transform: translate(-112%, -56%) rotate(-4deg) scale(1.06); }
.p2:hover, .p2:focus-visible { transform: translate(-50%, -58%) scale(1.06); }
.p3:hover, .p3:focus-visible { transform: translate(12%, -56%) rotate(4deg) scale(1.06); }

.next {
  max-width: 1100px; margin: clamp(3rem, 7vw, 5rem) auto 0;
  display: flex; align-items: center; gap: 1.5rem;
  padding-top: 2.5rem; border-top: 3px dashed var(--sky-deep);
}
.next h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
.next-text { margin: .4rem 0 0; }
.cell { flex: none; width: 112px; padding: 0; border: 0; background: none; cursor: pointer; }
.cell svg { width: 100%; display: block; overflow: visible; }
.hex { fill: var(--pollen); stroke: var(--ink); stroke-width: 5; stroke-linejoin: round; }
.wax { fill: #FFE08A; stroke: #E8A91E; stroke-width: 3; stroke-linejoin: round; }
.crack { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; transition: stroke-dashoffset .4s; }
.cell.peeked .crack { stroke-dashoffset: 0; }
.cell.peeked svg { animation: nod .9s ease-out; transform-origin: 50% 100%; }

/* About and footer */
.about { background: var(--paper); padding: 0 clamp(1rem, 5vw, 4rem) clamp(4rem, 8vw, 6rem); }
.about-inner { max-width: 1100px; margin: 0 auto; padding-top: clamp(3rem, 6vw, 4.5rem); border-top: 3px dashed var(--sky-deep); }
.about p { max-width: 40rem; margin: 1.1rem 0 0; }
.foot { padding: 2.5rem clamp(1rem, 5vw, 4rem) 3rem; text-align: center; }
.foot p { margin: .4rem 0; }

@media (min-width: 900px) {
  .game { grid-template-columns: 1fr 1.1fr; }
}
@media (max-width: 520px) {
  .top nav { display: none; }
  .games { border-radius: 32px 32px 0 0; }
  .next { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wing, .flower.bounce, .bee.spin svg, .cell.peeked svg { animation: none; }
  .phone, .crack { transition: none; }
}

/* Privacy and other text pages */
.page { max-width: 44rem; margin: 0 auto; padding: 7rem 1.25rem 3rem; }
.page h1 { font: 800 clamp(2.2rem, 6vw, 3.4rem)/1.05 var(--display); margin: 0 0 .5rem; }
.page h2 { font-size: 1.6rem; margin-top: 2.25rem; }
.page p, .page li { max-width: 68ch; }
.page .updated { color: var(--ink-soft); margin-top: 0; }
