@font-face {
  font-family: "Capy Dive UI";
  src: url("/assets/fonts/capy-dive-ui.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --cream: #fff7ea;
  --paper: #fff1dc;
  --peach: #ffd7b0;
  --sunset: #ffb878;
  --pink: #f7a8c4;
  --teal: #19b5c0;
  --teal-light: #8fe3e3;
  --deep: #0d4f5c;
  --deeper: #083640;
  --wood: #a5622c;
  --wood-dark: #5b3417;
  --gold: #ffc93c;
  --gold-dark: #f39a1e;
  --ink: #3a2614;
  --muted: #7a5c43;
  --line: #ecd5b6;
  --display: "Capy Dive UI", "Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --body: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 22px;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1180px;
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); line-height: 1.6; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--deep); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 8px; }

.skip-link { position: absolute; left: 12px; top: 12px; z-index: 50; padding: 10px 16px; color: #fff; background: var(--deep); border-radius: 10px; transform: translateY(-200%); }
.skip-link:focus { transform: none; }

/* Buttons echo the in-game wooden and golden buttons. */
.btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-height: 56px; padding: 10px 26px; font-family: var(--display); font-size: 1.1rem; font-weight: 800; line-height: 1.15; text-align: center; text-decoration: none; color: var(--ink); border: 3px solid var(--wood-dark); border-radius: 18px; cursor: pointer; box-shadow: 0 5px 0 var(--wood-dark), 0 12px 24px rgba(91, 52, 23, .22); transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; -webkit-tap-highlight-color: transparent; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.04); box-shadow: 0 7px 0 var(--wood-dark), 0 16px 28px rgba(91, 52, 23, .26); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--wood-dark), 0 6px 12px rgba(91, 52, 23, .2); }
.btn--gold { background: linear-gradient(180deg, #ffe27a 0%, var(--gold) 45%, var(--gold-dark) 100%); }
.btn--wood { color: #fff6e3; background: linear-gradient(180deg, #c98446 0%, var(--wood) 55%, #7f4520 100%); text-shadow: 0 2px 0 rgba(60, 30, 10, .45); }
.btn--ghost { color: var(--wood-dark); background: rgba(255, 255, 255, .7); box-shadow: 0 5px 0 var(--wood-dark); }
.btn--small { min-height: 44px; padding: 8px 18px; font-size: 1rem; border-radius: 14px; }
.btn__kicker { font-family: var(--body); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.btn__label { font-size: 1.15rem; }

.eyebrow { margin: 0 0 10px; font-size: .8rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--wood); }
.hl { color: var(--teal); }
.section-head { max-width: 680px; margin: 0 auto clamp(28px, 5vw, 48px); text-align: center; }
.section-head h2 { font-size: clamp(2rem, 5.4vw, 3.4rem); }
.section-head p:last-child { color: var(--muted); font-size: 1.08rem; }
.section-head--light .eyebrow { color: var(--gold); }
.section-head--light h2 { color: #fff; }
.section-head--light p:last-child { color: #d3f3f1; }
.card { padding: 22px; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(165, 98, 44, .1); }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 10px var(--gutter); background: rgba(255, 241, 220, .82); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid rgba(236, 213, 182, .7); }
.topbar__brand img { width: 108px; }
.topbar__nav { display: none; margin-left: auto; gap: 26px; font-weight: 800; }
.topbar__nav a { color: var(--wood-dark); text-decoration: none; }
.topbar__nav a:hover { color: var(--teal); }
.topbar > .btn { margin-left: auto; }
@media (min-width: 860px) {
  .topbar__nav { display: flex; }
  .topbar > .btn { margin-left: 8px; }
}

/* Hero */
.hero { position: relative; display: grid; gap: 32px; padding: clamp(28px, 6vw, 72px) var(--gutter) clamp(90px, 12vw, 150px); overflow: hidden; background: radial-gradient(ellipse at 80% 0%, #fff2c9 0%, transparent 50%), linear-gradient(180deg, #ffd9b8 0%, #ffc3b4 40%, #ffd8c4 70%, var(--teal-light) 100%); isolation: isolate; }
.hero__copy { position: relative; z-index: 2; max-width: 600px; animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
.pill { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 6px 14px 6px 8px; font-size: .9rem; font-weight: 800; color: var(--wood-dark); background: rgba(255, 255, 255, .75); border: 2px solid #fff; border-radius: 999px; }
.pill img { width: 22px; }
.hero h1 { margin-bottom: 18px; font-size: clamp(3.2rem, 11vw, 6.4rem); color: var(--wood-dark); text-shadow: 0 4px 0 #fff3df; }
.hero h1 span { color: var(--teal); text-shadow: 0 4px 0 #fff3df, 0 0 30px rgba(255, 255, 255, .6); }
.hero__lede { max-width: 520px; font-size: clamp(1.05rem, 2.4vw, 1.25rem); color: #5c3a20; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 5px 12px; font-size: .85rem; font-weight: 800; color: var(--deep); background: rgba(255, 255, 255, .6); border-radius: 999px; }
.hero__stage { position: relative; z-index: 1; display: grid; place-items: center; min-height: 420px; }
.phone { width: min(270px, 66vw); padding: 10px; background: #2b1a0e; border-radius: 42px; box-shadow: 0 30px 60px rgba(91, 52, 23, .35), inset 0 0 0 2px #6b4325; transform: rotate(4deg); animation: bob 6s ease-in-out infinite; }
.phone img { border-radius: 32px; }
.hero__dada { position: absolute; left: max(0px, calc(50% - 250px)); bottom: 6%; width: min(210px, 44vw); filter: drop-shadow(0 14px 18px rgba(91, 52, 23, .28)); animation: hop 3.2s ease-in-out infinite; }
.hero__yuzu { position: absolute; width: 54px; filter: drop-shadow(0 8px 10px rgba(243, 154, 30, .35)); animation: spin-float 5s ease-in-out infinite; }
.hero__yuzu--a { top: 8%; right: max(0px, calc(50% - 200px)); }
.hero__yuzu--b { top: 46%; right: max(4px, calc(50% - 220px)); width: 38px; animation-delay: -2s; }
.hero__wave { position: absolute; left: 0; bottom: -1px; z-index: 3; width: 100%; height: 70px; fill: var(--deep); }
.hero__petals i { position: absolute; top: -20px; z-index: 0; width: 14px; height: 10px; background: #ffc4d6; border-radius: 10px 0; opacity: .85; animation: fall 12s linear infinite; }
.hero__petals i:nth-child(1) { left: 8%; animation-delay: 0s; }
.hero__petals i:nth-child(2) { left: 24%; animation-delay: -3s; animation-duration: 14s; }
.hero__petals i:nth-child(3) { left: 46%; animation-delay: -7s; }
.hero__petals i:nth-child(4) { left: 63%; animation-delay: -1.5s; animation-duration: 16s; }
.hero__petals i:nth-child(5) { left: 81%; animation-delay: -9s; }
.hero__petals i:nth-child(6) { left: 93%; animation-delay: -5s; animation-duration: 13s; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.05fr .95fr; align-items: center; max-width: none; padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2)); padding-right: max(var(--gutter), calc((100vw - var(--max)) / 2)); min-height: min(820px, 92svh); }
  .hero__stage { min-height: 560px; }
  .phone { width: 300px; }
}

/* Demo */
.demo { padding: clamp(48px, 8vw, 96px) var(--gutter); background: linear-gradient(180deg, var(--deep) 0%, #126a76 100%); color: #fff; }
.demo .section-head .eyebrow { color: var(--gold); }
.demo .section-head h2 { color: #fff; }
.demo .section-head p:last-child { color: #d3f3f1; }
.demo .hl { color: var(--gold); }
.demo__wrap { display: grid; gap: 24px; justify-items: center; max-width: 820px; margin: 0 auto; }
.demo__frame { position: relative; width: min(100%, 380px); aspect-ratio: 9 / 14; border: 4px solid var(--wood-dark); border-radius: 28px; overflow: hidden; background: #8fe3e3; box-shadow: 0 0 0 6px #c98446, 0 24px 50px rgba(0, 0, 0, .35); }
#demo-canvas { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: pointer; }
.demo__overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 24px; text-align: center; color: var(--ink); background: rgba(255, 247, 234, .55); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); pointer-events: none; transition: opacity .2s ease; }
.demo__overlay.is-hidden { opacity: 0; }
.demo__overlay img { width: 150px; margin-bottom: 6px; animation: bob 3s ease-in-out infinite; }
.demo__title { margin: 0; font-family: var(--display); font-size: 2rem; color: var(--wood-dark); }
.demo__sub { margin: 0 0 12px; font-weight: 800; color: var(--muted); }
.demo__buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; pointer-events: auto; }
.demo__buttons[hidden] { display: none; }
.demo__side { display: grid; gap: 16px; width: min(100%, 380px); text-align: center; }
.score-card { display: flex; align-items: baseline; justify-content: center; gap: 12px; padding: 12px 20px; font-family: var(--display); color: #fff6e3; background: linear-gradient(180deg, #c98446, #7f4520); border: 3px solid var(--wood-dark); border-radius: 16px; }
.score-card span { font-size: 1.1rem; }
.score-card strong { font-size: 2.2rem; }
.demo__tip { margin: 0; color: #d3f3f1; }
.demo__tip strong { color: var(--gold); }
.demo__toast { min-height: 1.6em; margin: 0; font-weight: 800; color: var(--gold); }
@media (min-width: 780px) {
  .demo__wrap { grid-template-columns: auto 280px; align-items: center; }
  .demo__side { text-align: left; }
  .score-card { justify-content: flex-start; }
}

/* How to play */
.how { padding: clamp(56px, 9vw, 110px) var(--gutter); background: var(--paper); }
.steps { display: grid; gap: 18px; max-width: var(--max); margin: 0 auto; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; text-align: center; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; top: -14px; left: 50%; display: grid; place-items: center; width: 36px; height: 36px; font-family: var(--display); color: var(--ink); background: var(--gold); border: 3px solid var(--wood-dark); border-radius: 50%; transform: translateX(-50%); }
.steps img { height: 120px; width: auto; margin: 12px auto 10px; object-fit: contain; }
.steps h3 { font-size: 1.5rem; color: var(--wood-dark); }
.steps p { margin: 0; color: var(--muted); }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* Events */
.events { padding: clamp(56px, 9vw, 110px) var(--gutter); color: #fff; background: radial-gradient(ellipse at 50% 0%, #1d8c97 0%, transparent 60%), linear-gradient(180deg, #0f5c69, var(--deeper)); }
.event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 18px; max-width: var(--max); margin: 0 auto; }
.event { padding: 18px 18px 20px; text-align: center; background: rgba(255, 255, 255, .07); border: 2px solid rgba(143, 227, 227, .25); border-radius: var(--radius); transition: transform .2s ease, background .2s ease; }
.event:hover { transform: translateY(-4px) rotate(-.5deg); background: rgba(255, 255, 255, .12); }
.event img { height: 150px; width: auto; margin: 0 auto 12px; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .3)); }
.event h3 { font-size: 1.45rem; color: var(--gold); }
.event p { margin: 0; color: #d3f3f1; }
.split { display: grid; gap: 24px; align-items: center; max-width: var(--max); margin: clamp(40px, 7vw, 80px) auto 0; }
.split__shot { margin: 0; justify-self: center; width: min(240px, 70vw); padding: 8px; background: #2b1a0e; border-radius: 34px; box-shadow: 0 24px 50px rgba(0, 0, 0, .35); }
.split__shot img { border-radius: 26px; }
.split__copy h3 { margin-top: 18px; font-size: 1.7rem; color: var(--gold); }
.split__copy p { color: #d3f3f1; font-size: 1.05rem; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1.2fr 1fr; }
  .split__shot:first-child { transform: rotate(-4deg); }
  .split__shot:last-child { transform: rotate(4deg); }
}

/* Worlds */
.worlds { padding: clamp(56px, 9vw, 110px) var(--gutter); background: linear-gradient(180deg, var(--cream), var(--paper)); }
.world-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 1fr); gap: 16px; max-width: var(--max); margin: 0 auto; padding: 6px 4px 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.world { position: relative; margin: 0; overflow: hidden; border: 3px solid var(--wood-dark); border-radius: var(--radius); scroll-snap-align: start; box-shadow: 0 12px 26px rgba(91, 52, 23, .2); }
.world img { aspect-ratio: 3 / 4.6; width: 100%; object-fit: cover; transition: transform .5s ease; }
.world:hover img { transform: scale(1.05); }
.world figcaption { position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 8px; font-family: var(--display); font-size: 1.1rem; text-align: center; color: #fff6e3; background: linear-gradient(180deg, #c98446, #7f4520); border: 2px solid var(--wood-dark); border-radius: 12px; }

/* Skins */
.skins { padding: clamp(56px, 9vw, 110px) var(--gutter); background: var(--paper); }
.skin-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 14px; max-width: var(--max); margin: 0 auto; padding: 0; list-style: none; }
.skin { display: grid; gap: 8px; justify-items: center; padding: 16px 12px 14px; text-align: center; background: radial-gradient(circle at 50% 35%, #fff 0%, #fff4e0 70%); border: 2px solid var(--line); border-radius: var(--radius); transition: transform .2s ease; }
.skin:hover { transform: translateY(-4px) rotate(1deg); }
.skin img { height: 110px; width: auto; object-fit: contain; }
.skin span { font-family: var(--display); color: var(--wood-dark); line-height: 1.2; }

/* Daily */
.daily { display: grid; gap: 32px; align-items: center; max-width: var(--max); margin: 0 auto; padding: clamp(56px, 9vw, 110px) var(--gutter); }
.daily h2 { font-size: clamp(2rem, 5vw, 3.2rem); color: var(--wood-dark); }
.daily__copy > p { color: var(--muted); font-size: 1.08rem; }
.ticks { margin: 0; padding: 0; list-style: none; }
.ticks li { position: relative; padding: 6px 0 6px 34px; font-weight: 700; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 6px; display: grid; place-items: center; width: 24px; height: 24px; font-size: .8rem; font-weight: 900; color: #fff; background: var(--teal); border-radius: 50%; }
.daily__shots { display: flex; justify-content: center; gap: 14px; }
.daily__shots img { width: min(44%, 220px); border: 6px solid #2b1a0e; border-radius: 28px; box-shadow: 0 20px 40px rgba(91, 52, 23, .25); }
.daily__shots img:last-child { margin-top: 40px; }
@media (min-width: 900px) { .daily { grid-template-columns: 1fr 1fr; } }

/* FAQ */
.faq { padding: clamp(56px, 9vw, 100px) var(--gutter); background: linear-gradient(180deg, var(--cream), #ffe6cf); }
.faq__list { display: grid; gap: 12px; max-width: 760px; margin: 0 auto; }
.faq__list details { background: #fff; border: 2px solid var(--line); border-radius: 18px; }
.faq__list summary { position: relative; padding: 18px 54px 18px 20px; font-family: var(--display); font-size: 1.12rem; color: var(--wood-dark); cursor: pointer; list-style: none; }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after { content: "+"; position: absolute; right: 18px; top: 50%; display: grid; place-items: center; width: 28px; height: 28px; font-size: 1.2rem; color: var(--ink); background: var(--gold); border-radius: 50%; transform: translateY(-50%); transition: transform .2s ease; }
.faq__list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq__list details p { margin: 0; padding: 0 20px 18px; color: var(--muted); }

/* Final CTA */
.final { position: relative; padding: clamp(60px, 9vw, 110px) var(--gutter); text-align: center; color: #fff; background: radial-gradient(ellipse at 50% 120%, #ffb878 0%, transparent 55%), linear-gradient(180deg, #126a76, var(--deeper)); overflow: hidden; }
.final__dada { width: 180px; margin: 0 auto 10px; animation: bob 4s ease-in-out infinite; }
.final h2 { font-size: clamp(2.1rem, 6vw, 3.8rem); }
.final > p { max-width: 560px; margin: 0 auto 26px; color: #d3f3f1; font-size: 1.1rem; }
.final__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.final__social { margin: 26px 0 0; color: #d3f3f1; }
.final__social a { color: var(--gold); font-weight: 800; }

/* Footer */
.footer { display: grid; gap: 14px; justify-items: center; padding: 34px var(--gutter) 40px; text-align: center; color: #d3f3f1; background: var(--deeper); }
.footer img { width: 56px; border-radius: 14px; }
.footer strong { display: block; font-family: var(--display); font-size: 1.2rem; color: #fff; }
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.footer a { color: #fff; font-weight: 700; }
.footer small { color: #8fbcc0; }
@media (min-width: 860px) {
  .footer { grid-template-columns: auto 1fr auto auto; justify-items: start; align-items: center; text-align: left; padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2)); padding-right: max(var(--gutter), calc((100vw - var(--max)) / 2)); }
}

/* Reveal on scroll (enabled by site.js only when motion is allowed). */
.js-reveal .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(4deg); } 50% { transform: translateY(-12px) rotate(3deg); } }
@keyframes hop { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-22px) rotate(4deg); } }
@keyframes spin-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-16px) rotate(18deg); } }
@keyframes fall { 0% { transform: translate3d(0, 0, 0) rotate(0); } 100% { transform: translate3d(-80px, 110vh, 0) rotate(540deg); } }
.demo__overlay img, .final__dada { animation-name: bob-flat; }
@keyframes bob-flat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero__petals { display: none; }
}

/* Legal / support pages */
.doc { max-width: 820px; margin: 0 auto; padding: clamp(28px, 6vw, 64px) var(--gutter) 80px; }
.doc__hero { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.doc__hero img { width: 120px; flex: none; }
.doc h1 { font-size: clamp(2.2rem, 7vw, 3.4rem); color: var(--wood-dark); margin: 0; }
.doc .updated { margin: 6px 0 0; color: var(--muted); font-weight: 700; }
.doc h2 { margin-top: 2em; font-size: 1.6rem; color: var(--wood-dark); }
.doc h3 { margin-top: 1.4em; font-size: 1.2rem; color: var(--deep); }
.doc p, .doc li { font-size: 1.05rem; }
.doc ul { padding-left: 22px; }
.doc li + li { margin-top: 6px; }
.callout { margin: 24px 0; padding: 18px 20px; background: #e6f8f6; border: 2px solid #b5ecea; border-radius: 18px; }
.callout p:last-child { margin-bottom: 0; }
.contact-card { display: grid; gap: 12px; margin: 26px 0; padding: 24px; text-align: center; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(165, 98, 44, .1); }
.contact-card .btn { justify-self: center; }
.contact-card a.email { font-weight: 800; word-break: break-all; }
.doc .faq__list { margin-top: 16px; }
.doc .faq__list details p { font-size: 1rem; }
.lost { min-height: 70svh; display: grid; place-items: center; text-align: center; padding: 40px var(--gutter); }
.lost img { width: 200px; margin: 0 auto 10px; }
.lost h1 { font-size: clamp(2.4rem, 8vw, 4rem); color: var(--wood-dark); }
