@font-face { font-family: Fredoka; src: url(/assets/fonts/fredoka.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --ground: #0b1210; --card: #13201c; --alt: #101a17; --join: #12302a; --frame: #1e2e29;
  --text: #e8f3ee; --text-2: #cfe3da; --text-3: #a9c2b7; --fine: #8fa89d;
  --mint: #3dffb0; --mint-ink: #04231a; --link: #7dffcf; --warm: #ffcf7a; --bad: #ff8a8a;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--text); font: 400 17px/1.5 Fredoka, system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: var(--link); }
a:hover { color: #b8ffe4; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: clamp(30px, 6vw, 40px); font-weight: 700; color: #fff; line-height: 1.1; }
h3 { font-size: 22px; color: #fff; }
.sub { margin: 12px 0 32px; font-size: 19px; color: var(--text-3); max-width: 640px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }
.section { padding: 72px 16px; }
@media (min-width: 720px) { .section { padding: 88px 24px; } }
.narrow { max-width: 640px; }
.px, .spr { image-rendering: pixelated; }

/* Beta or launch: the Worker sets data-mode on <html>. */
html[data-mode="beta"] [data-only="launch"], html[data-mode="launch"] [data-only="beta"] { display: none !important; }

/* Sprites: each sheet is 4 frames wide, one row per state; show the first frame of a row. */
.spr { width: 120px; height: 120px; background-size: 400% auto; background-repeat: no-repeat; background-position: 0 0; flex: none; }
.m-slime { background-image: url(/assets/sprites/tide-slime.png); }
.m-crab { background-image: url(/assets/sprites/shell-crab.png); }
.m-shroom { background-image: url(/assets/sprites/bombschroom.png); }
.m-bat { background-image: url(/assets/sprites/rock-bat.png); }
.m-harpy { background-image: url(/assets/sprites/gull-harpy.png); }
.m-guardian { background-image: url(/assets/sprites/tide-guardian.png); }
.m-slime.f-front { background-position: 0 13.333%; } /* row 2 of 16 */
.m-slime.f-low { background-position: 0 66.667%; }   /* row 10 of 16 */

/* Hero */
.hero {
  background-image: linear-gradient(180deg, rgba(11,18,16,.55), rgba(11,18,16,.82) 55%, var(--ground)), url(/assets/panels/guardian.png);
  background-size: cover; background-position: center; image-rendering: pixelated;
}
@media (min-width: 900px) {
  .hero { background-image: linear-gradient(90deg, var(--ground) 30%, rgba(11,18,16,.55) 70%, rgba(11,18,16,.2)), url(/assets/panels/guardian.png); background-position: center right; }
}
.hero .wrap { padding-top: 20px; padding-bottom: 64px; }
.nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.wordmark { font-weight: 700; font-size: 20px; letter-spacing: 2px; }
.nav-cta { font-weight: 600; font-size: 15px; text-decoration: none; border: 1.5px solid var(--mint); border-radius: 10px; padding: 10px 14px; }
.hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; margin-top: 48px; }
@media (min-width: 900px) { .hero-row { margin-top: 72px; gap: 40px; } }
.hero-text { flex: 1 1 440px; max-width: 560px; }
.hero h1 { font-size: clamp(42px, 9vw, 64px); line-height: 1; font-weight: 700; color: #fff; }
.lede { margin: 20px 0 28px; font-size: clamp(18px, 2.5vw, 20px); line-height: 1.45; color: var(--text-2); }
.hero-monsters { flex: 1 1 320px; display: flex; justify-content: center; align-items: flex-end; gap: 4px; min-height: 160px; }
.hero-monsters .spr { width: 104px; height: 104px; }
.hero-monsters .spr.big { width: 124px; height: 124px; }
@media (min-width: 900px) {
  .hero-monsters { min-height: 260px; }
  .hero-monsters .spr { width: 150px; height: 150px; }
  .hero-monsters .spr.big { width: 170px; height: 170px; }
}

.spark-line {
  display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 0 0 14px; padding: 6px 10px 6px 8px; min-height: 44px;
  font: inherit; font-size: 17px; font-weight: 500; letter-spacing: .5px; color: var(--warm);
  background: rgba(255, 207, 122, .08); border: 1px solid rgba(255, 207, 122, .25); border-radius: 10px; cursor: pointer; text-align: left;
}
.spark-line:hover { background: rgba(255, 207, 122, .14); }
.speaker { width: 18px; height: 18px; align-self: center; }
.spark-who { color: var(--text-3); font-weight: 400; font-size: 15px; }

/* Sign-up */
.signup { display: flex; flex-direction: column; gap: 10px; max-width: 480px; text-align: left; }
.signup label { font-size: 14px; color: var(--text-3); }
.signup input[type="email"] { font: inherit; font-size: 17px; padding: 14px 16px; border-radius: 12px; border: 0; background: #fff; color: var(--ground); }
.signup .row { display: flex; flex-wrap: wrap; gap: 10px; }
.seg { flex: 1 1 220px; display: flex; margin: 0; padding: 0; min-width: 0; border: 1.5px solid #ffffff40; border-radius: 12px; overflow: hidden; }
.seg label { flex: 1; display: flex; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { flex: 1; text-align: center; font-size: 16px; padding: 13px 0; cursor: pointer; color: var(--text); }
.seg input:checked + span { background: var(--text); color: var(--ground); font-weight: 600; }
.seg input:focus-visible + span { outline: 3px solid var(--link); outline-offset: -3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.go { flex: 1 1 180px; font: inherit; font-size: 17px; font-weight: 700; padding: 14px 20px; border: 0; border-radius: 12px; background: var(--mint); color: var(--mint-ink); cursor: pointer; }
.go:disabled { opacity: .6; cursor: progress; }
.err { color: var(--bad); font-size: 15px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fine { margin-top: 12px; font-size: 13px; color: var(--fine); max-width: 480px; }
.done { max-width: 480px; background: var(--card); border: 1.5px solid var(--mint); border-radius: 14px; padding: 20px 22px; text-align: left; }
.done-title { font-size: 22px; font-weight: 600; color: #fff; margin-bottom: 8px; }
.done p:not(.done-title) { font-size: 16px; color: var(--text-2); }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store { display: inline-block; font-weight: 700; text-decoration: none; padding: 14px 20px; border-radius: 12px; background: var(--mint); color: var(--mint-ink); }

/* Battle cards and clips */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card { background: var(--card); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.card p { font-size: 16px; color: var(--text-3); }
.phone { width: 100%; max-width: 320px; margin: 40px auto 0; border: 8px solid var(--frame); border-radius: 36px; background: #050908; overflow: hidden; }
.phone video { display: block; width: 100%; aspect-ratio: 9 / 16; }

/* Story */
.alt { background: var(--alt); }
.story { color: var(--text-2); max-width: 720px; }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.panels figure { margin: 0; }
.panels img { width: 100%; height: auto; border-radius: 12px; display: block; }
.panels figcaption { margin-top: 10px; font-size: 16px; color: var(--text-3); }
.explore { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 40px; margin-top: 56px; }
.explore .phone { flex: 0 1 320px; margin: 0 auto; }
.explore > div:last-child { flex: 1 1 320px; }
.explore h3 { font-size: 28px; }
.explore p { margin-top: 12px; font-size: 18px; color: var(--text-2); }

/* Roster, facts, FAQ */
.roster { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; text-align: center; color: var(--text-2); }
.roster .spr { margin: 0 auto 8px; width: 120px; height: 120px; }
.roster .boss { color: var(--warm); }
.facts-wrap { padding-bottom: 72px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.facts > div { background: var(--card); border-radius: 16px; padding: 22px; }
.facts .big { font-size: 26px; font-weight: 700; color: #fff; }
.facts p:not(.big) { margin-top: 6px; font-size: 16px; color: var(--text-3); }
.faq { max-width: 820px; padding-bottom: 88px; }
.faq h2 { margin-bottom: 12px; }
.faq details { border-bottom: 1px solid #ffffff1f; padding: 18px 0; }
.faq summary { font-size: 19px; font-weight: 600; color: #fff; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--link); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; font-size: 16px; color: var(--text-3); }

/* Join */
.join { background: var(--join); text-align: center; }
.join .wrap { padding-top: 80px; padding-bottom: 80px; }
.join .spr { width: 160px; height: 160px; margin: 0 auto 8px; }
.join .sub { margin: 12px auto 28px; color: var(--text-2); }
.join .signup, .join .done { margin: 0 auto; }
.join .stores { justify-content: center; margin-top: 24px; }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; padding-bottom: 32px; font-size: 14px; color: var(--fine); }
.footer .links { display: flex; gap: 20px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
