:root {
  --ink: #181713;
  --yellow: #ffe34f;
  --yellow-strong: #ffd51f;
  --orange: #ff7a32;
  --cream: #fffaf0;
  --sky: #ccefff;
  --green: #58c83d;
  --red: #f34343;
  --line: rgba(24, 23, 19, 0.16);
  --shadow: 0 24px 70px rgba(47, 35, 0, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, a { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

.topbar {
  position: absolute;
  z-index: 20;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: -0.04em; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border: 2px solid var(--ink); border-radius: 13px; background: white; box-shadow: 3px 3px 0 var(--ink); }
.sound-button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.75); padding: 10px 14px; cursor: pointer; backdrop-filter: blur(10px); }

.hero {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr .92fr;
  align-items: center;
  gap: 72px;
  padding: 120px max(40px, calc((100vw - 1180px) / 2)) 80px;
  background:
    radial-gradient(circle at 14% 12%, rgba(255,255,255,.95) 0 4%, transparent 4.2%),
    radial-gradient(circle at 84% 20%, rgba(255,255,255,.58) 0 8%, transparent 8.2%),
    linear-gradient(135deg, #fff6ad, var(--yellow));
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -5% -100px;
  height: 190px;
  background: var(--cream);
  transform: rotate(-2deg);
}
.hero-copy, .video-stage { position: relative; z-index: 2; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 18px; text-transform: uppercase; letter-spacing: .13em; font-size: 13px; font-weight: 900; }
.eyebrow.dark { justify-content: center; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 7px rgba(243,67,67,.13); }
h1 { margin: 0; max-width: 680px; font-size: clamp(58px, 7vw, 104px); line-height: .93; letter-spacing: -.075em; font-weight: 950; }
h1 span { color: var(--orange); -webkit-text-stroke: 2px var(--ink); text-shadow: 5px 5px 0 var(--ink); }
.hero-lede { max-width: 540px; margin: 30px 0 0; font-size: clamp(18px, 2vw, 22px); line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.button { display: inline-flex; min-height: 56px; align-items: center; justify-content: center; gap: 14px; border: 2px solid var(--ink); border-radius: 16px; padding: 0 24px; font-weight: 900; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-3px); }
.button-primary { background: var(--orange); color: white; box-shadow: 6px 6px 0 var(--ink); }
.button-primary:hover { box-shadow: 9px 9px 0 var(--ink); }
.button-ghost { background: transparent; }
.button-dark { color: white; background: var(--ink); border-color: var(--ink); }
.button.small { min-height: 48px; padding: 0 20px; border-radius: 13px; }
.micro-proof { display: flex; flex-wrap: wrap; gap: 24px; list-style: none; margin: 32px 0 0; padding: 0; font-size: 14px; font-weight: 800; }
.micro-proof li::before { content: "✓"; margin-right: 7px; }

.video-stage { display: grid; place-items: center; min-height: 620px; }
.phone-shell { position: relative; z-index: 3; width: min(330px, 72vw); padding: 10px; border: 4px solid var(--ink); border-radius: 48px; background: var(--ink); box-shadow: 18px 22px 0 rgba(24,23,19,.17), var(--shadow); transform: rotate(3deg); }
.phone-shell video { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 35px; background: var(--sky); }
.speaker { position: absolute; z-index: 5; top: 19px; left: 50%; width: 74px; height: 18px; border-radius: 999px; background: var(--ink); transform: translateX(-50%); }
.swipe-hint { position: absolute; inset: auto 22px 22px; display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 13px; color: white; background: rgba(24,23,19,.82); font-size: 13px; font-weight: 800; backdrop-filter: blur(8px); }
.swipe-hint b { animation: bob .9s ease-in-out infinite alternate; }
.burst { position: absolute; z-index: 5; top: 105px; right: -20px; padding: 13px 19px; border: 3px solid var(--ink); border-radius: 12px; background: white; font-size: 18px; font-weight: 950; transform: rotate(9deg); box-shadow: 6px 6px 0 var(--ink); }
.bee { position: absolute; z-index: 4; font-size: 44px; filter: drop-shadow(3px 4px 0 rgba(24,23,19,.2)); animation: fly 2.5s ease-in-out infinite alternate; }
.bee-one { top: 170px; left: 5%; }
.bee-two { right: 2%; bottom: 95px; animation-delay: -.8s; }

.challenge-section { position: relative; z-index: 3; display: grid; grid-template-columns: .8fr 1fr; gap: 90px; align-items: center; width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 100px 0 120px; }
.section-copy .eyebrow { justify-content: flex-start; }
h2 { margin: 0; font-size: clamp(38px, 5vw, 68px); line-height: 1; letter-spacing: -.06em; }
.section-copy > p:not(.eyebrow) { max-width: 500px; margin: 24px 0 0; color: #5b584f; font-size: 18px; line-height: 1.7; }
.steps { display: grid; gap: 18px; list-style: none; margin: 36px 0 0; padding: 0; }
.steps li { display: flex; align-items: center; gap: 15px; font-weight: 850; }
.steps span { display: grid; place-items: center; width: 42px; height: 42px; border: 2px solid var(--ink); border-radius: 50%; background: var(--yellow); font-size: 12px; box-shadow: 3px 3px 0 var(--ink); }

.game-card { width: min(100%, 460px); justify-self: end; padding: 18px; border: 3px solid var(--ink); border-radius: 28px; background: white; box-shadow: 12px 14px 0 var(--ink); }
.game-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 14px; }
.status-chip { border-radius: 999px; background: var(--yellow); padding: 8px 12px; font-size: 12px; font-weight: 900; }
.timer { font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 950; }
.canvas-wrap { position: relative; overflow: hidden; border: 2px solid var(--ink); border-radius: 20px; background: var(--sky); touch-action: none; }
#gameCanvas { display: block; width: 100%; height: auto; aspect-ratio: 360 / 500; }
.game-overlay { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; padding: 32px; text-align: center; background: rgba(255,255,255,.84); backdrop-filter: blur(6px); transition: opacity .25s ease, visibility .25s ease; }
.game-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.result-icon { font-size: 54px; }
.game-overlay strong { margin-top: 10px; font-size: 24px; }
.game-overlay p { max-width: 270px; margin: 8px 0 20px; color: #666056; line-height: 1.5; }
.reset-button { width: 100%; margin-top: 12px; border: 0; background: transparent; padding: 8px; font-weight: 850; cursor: pointer; }

.final-cta { position: relative; overflow: hidden; display: grid; justify-items: center; padding: 100px 20px; text-align: center; background: var(--yellow); }
.final-cta::before, .final-cta::after { content: ""; position: absolute; width: 240px; height: 240px; border: 34px solid rgba(255,255,255,.34); border-radius: 50%; }
.final-cta::before { left: -100px; top: -90px; }
.final-cta::after { right: -100px; bottom: -100px; }
.final-cta > * { position: relative; z-index: 2; }
.final-dog { display: grid; place-items: center; width: 88px; height: 88px; margin-bottom: 22px; border: 3px solid var(--ink); border-radius: 50%; background: white; font-size: 46px; box-shadow: 6px 6px 0 var(--ink); }
.final-cta h2 { max-width: 760px; }
.final-cta p:not(.eyebrow) { margin: 22px 0 30px; font-size: 18px; }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px max(24px, calc((100vw - 1180px) / 2)); color: #d9d6cc; background: var(--ink); font-size: 13px; }
.mobile-cta { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@keyframes fly { from { transform: translate(-8px, -12px) rotate(-10deg); } to { transform: translate(14px, 18px) rotate(12deg); } }
@keyframes bob { to { transform: translateY(5px); } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 18px; padding-top: 132px; text-align: center; }
  .hero-copy { display: grid; justify-items: center; }
  .hero h1 { font-size: clamp(56px, 14vw, 86px); }
  .micro-proof { justify-content: center; }
  .video-stage { min-height: 660px; }
  .burst { right: 8%; }
  .challenge-section { grid-template-columns: 1fr; gap: 44px; }
  .section-copy { text-align: center; }
  .section-copy .eyebrow { justify-content: center; }
  .section-copy > p:not(.eyebrow) { margin-inline: auto; }
  .steps { width: min(100%, 420px); margin-inline: auto; text-align: left; }
  .game-card { justify-self: center; }
}

@media (max-width: 560px) {
  .topbar { width: calc(100% - 28px); padding-top: 16px; }
  .sound-button span:last-child { display: none; }
  .hero { min-height: auto; padding: 110px 18px 110px; }
  .hero-actions { width: 100%; }
  .hero-actions .button { flex: 1; min-width: 150px; }
  .hero-lede { font-size: 17px; }
  .micro-proof { gap: 12px 18px; }
  .video-stage { min-height: 585px; }
  .phone-shell { width: 286px; border-radius: 42px; }
  .phone-shell video { border-radius: 30px; }
  .burst { top: 85px; right: 0; font-size: 14px; }
  .bee { font-size: 36px; }
  .challenge-section { width: calc(100% - 28px); padding: 70px 0 92px; }
  .game-card { padding: 12px; border-radius: 22px; box-shadow: 7px 8px 0 var(--ink); }
  .canvas-wrap { border-radius: 15px; }
  .final-cta { padding-bottom: 122px; }
  footer { flex-direction: column; padding-bottom: 88px; }
  .mobile-cta { position: fixed; z-index: 30; display: flex; align-items: center; justify-content: space-between; inset: auto 14px max(14px, env(safe-area-inset-bottom)); min-height: 58px; padding: 0 22px; border: 2px solid var(--ink); border-radius: 16px; color: white; background: var(--orange); box-shadow: 5px 5px 0 var(--ink); font-weight: 950; }
}

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