/* Floofy Bottoms / A Maize in Mazes — shared stylesheet
   Fonts are self-hosted (no Google request): Chewy + Nunito, both SIL Open Font License. */

@font-face { font-family: "Chewy"; src: url("../fonts/chewy.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/nunito.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --butter: #ffd23f;
  --butter-deep: #f2b705;
  --butter-pale: #fff1b8;
  --leaf: #3e9a47;
  --leaf-deep: #1f5e2e;
  --cream: #fff6dc;
  --sky: #8fdbf5;
  --sky-deep: #4cbfe6;
  --glass: rgba(190, 240, 255, 0.55);
  --tomato: #ff6b4a;
  --ink: #1e3a23;
  --ink-soft: #46604a;
  --white: #ffffff;
  --radius: 22px;
  --wrap: 1120px;
  --shadow: 0 6px 0 rgba(30, 58, 35, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video, iframe { max-width: 100%; display: block; }
a { color: var(--leaf-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--leaf); }
h1, h2, h3, .chewy { font-family: "Chewy", "Nunito", sans-serif; font-weight: 400; line-height: 1.05; letter-spacing: 0.01em; margin: 0 0 0.4em; }
h2 { font-size: clamp(2.1rem, 5vw, 3.2rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--white); padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 4px solid var(--tomato); outline-offset: 3px; border-radius: 8px; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--butter); --fg: var(--ink); --edge: var(--butter-deep);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-family: "Chewy", sans-serif; font-size: 1.35rem; letter-spacing: 0.02em;
  padding: 0.6em 1.25em 0.55em; border-radius: 999px;
  background: var(--bg); color: var(--fg); text-decoration: none;
  border: 3px solid var(--ink);
  box-shadow: 0 6px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { color: var(--fg); transform: translateY(-2px) rotate(-1deg); box-shadow: 0 8px 0 var(--ink); }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn-green { --bg: var(--leaf); --fg: var(--white); }
.btn-white { --bg: var(--white); }
.btn-small { font-size: 1.05rem; padding: 0.45em 1em 0.4em; box-shadow: 0 4px 0 var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px 14px; align-items: center; }

/* ---------- Top nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 246, 220, 0.92); backdrop-filter: blur(8px); border-bottom: 3px solid var(--ink); }
.nav .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: "Chewy", sans-serif; font-size: 1.45rem; }
.brand img, .brand svg { width: 38px; height: 38px; }
.nav-links { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.nav-links a { font-weight: 800; text-decoration: none; color: var(--ink); }
.nav-links a:hover { color: var(--leaf); }
@media (max-width: 760px) {
  .nav-links a:not(.btn) { display: none; }
  .brand span { font-size: 1.2rem; }
}

/* ---------- Game page hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(circle at 85% 15%, rgba(255,255,255,0.7) 0 60px, transparent 61px),
    linear-gradient(180deg, var(--sky) 0%, #d4f3ff 100%);
  border-bottom: 3px solid var(--ink);
  overflow: hidden;
}
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 56'%3E%3Cpath d='M0 22Q15 6 30 22T60 22T90 22T120 22V56H0Z' fill='%233e9a47'/%3E%3Cpath d='M0 22Q15 6 30 22T60 22T90 22T120 22' fill='none' stroke='%231e3a23' stroke-width='3'/%3E%3C/svg%3E") repeat-x bottom / 120px 56px; pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 24px; align-items: center; padding-top: 40px; padding-bottom: 76px; }
.hero-title { font-size: clamp(3.2rem, 9vw, 6.2rem); color: var(--butter); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 6px 0 var(--ink); margin-bottom: 0.25em; transform: rotate(-2deg); transform-origin: left; }
.hero-title small { display: block; font-size: 0.5em; margin: 0.05em 0 0.08em 0.2em; color: var(--white); -webkit-text-stroke: 2px var(--ink); text-shadow: 0 4px 0 var(--ink); }
.hero-hook { font-size: 1.25rem; font-weight: 700; max-width: 34ch; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.hero-meta li { background: var(--white); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 12px; font-weight: 800; font-size: 0.9rem; }
.cta-note { font-size: 0.95rem; font-weight: 700; color: var(--ink-soft); margin-top: 14px; }

/* glass maze diorama */
.diorama { position: relative; aspect-ratio: 1 / 0.9; width: 100%; max-width: 520px; justify-self: center; }
.maze-stage { position: absolute; inset: 8% 6% 14%; perspective: 1100px; }
.maze-tilt { position: absolute; inset: 0; transform: rotateX(58deg) rotateZ(-38deg); transform-style: preserve-3d; }
.maze-floor { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, #ffe58a 0 18px, #ffdf6e 18px 36px); border: 4px solid var(--ink); border-radius: 10px; box-shadow: 0 0 0 10px #ffe9a3; }
.maze-layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.maze-layer path { fill: none; stroke-linecap: round; }
.diorama .butter { position: absolute; left: 50%; top: 38%; width: 22%; transform: translate(-50%, -50%); filter: drop-shadow(0 6px 0 rgba(30,58,35,0.25)); animation: bob 2.4s ease-in-out infinite; }
.diorama .mascot { position: absolute; left: -2%; bottom: -2%; width: 40%; animation: hop 1.8s ease-in-out infinite; transform-origin: bottom center; }
.sparkle { position: absolute; font-family: "Chewy"; color: var(--white); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; font-size: 1.4rem; }
.speech { position: absolute; right: 2%; top: 4%; background: var(--white); border: 3px solid var(--ink); border-radius: 18px; padding: 6px 14px; font-family: "Chewy"; font-size: 1.25rem; transform: rotate(4deg); box-shadow: var(--shadow); }
.speech::after { content: ""; position: absolute; left: 18px; bottom: -14px; border: 8px solid transparent; border-top-color: var(--ink); }
@keyframes bob { 50% { transform: translate(-50%, -62%); } }
@keyframes hop { 0%, 100% { transform: translateY(0) rotate(-3deg); } 40% { transform: translateY(-12px) rotate(3deg); } }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 32px; }
  .diorama { max-width: 420px; order: -1; margin-bottom: -10px; }
  .hero-title { transform: rotate(-1.5deg); }
  .hero .wrap { padding-bottom: 64px; }
  .maze-stage { inset: 10% 12% 14% 10%; }
}

/* ---------- Sections ---------- */
section { padding: 80px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head p { font-size: 1.15rem; color: var(--ink-soft); font-weight: 600; }
.kicker { display: inline-block; font-family: "Chewy"; font-size: 1.1rem; background: var(--tomato); color: var(--white); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 14px; transform: rotate(-3deg); margin-bottom: 12px; }

.band-green { background: var(--leaf); color: var(--white); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.band-green h2 { color: var(--butter); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink); }
.band-green .section-head p { color: #eaf7ea; }
.band-sky { background: linear-gradient(180deg, #d9f5ff, var(--sky)); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.band-butter { background: var(--butter); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }

/* trailer */
.video-frame { position: relative; aspect-ratio: 16 / 9; border: 4px solid var(--ink); border-radius: var(--radius); overflow: hidden; background: var(--ink); box-shadow: 0 10px 0 var(--ink); max-width: 960px; margin: 0 auto; }
.video-frame iframe, .video-frame img, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video-badge { position: absolute; left: 14px; bottom: 14px; background: var(--butter); border: 3px solid var(--ink); border-radius: 999px; padding: 2px 14px; font-family: "Chewy"; font-size: 1.1rem; z-index: 2; }

/* features */
.features { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; }
.feature { grid-column: span 2; background: var(--white); color: var(--ink); border: 3px solid var(--ink); border-radius: var(--radius); padding: 26px 24px 20px; box-shadow: 0 8px 0 var(--ink); position: relative; }
.feature:nth-child(1), .feature:nth-child(2) { grid-column: span 3; }
.feature:nth-child(odd) { transform: rotate(-0.6deg); }
.feature:nth-child(even) { transform: rotate(0.6deg); }
.feature .icon { width: 64px; height: 64px; border-radius: 18px; border: 3px solid var(--ink); display: grid; place-items: center; margin-bottom: 14px; background: var(--butter); }
.feature .icon svg { width: 38px; height: 38px; }
.feature h3 { margin-bottom: 0.3em; }
.feature p { margin: 0; color: var(--ink-soft); font-weight: 600; }
.feature .pun { display: inline-block; margin-top: 12px; font-family: "Chewy"; color: var(--tomato); font-size: 1.1rem; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } .feature, .feature:nth-child(1), .feature:nth-child(2) { grid-column: span 1; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } .feature { transform: none !important; } }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery button { padding: 0; border: 3px solid var(--ink); border-radius: 16px; overflow: hidden; cursor: zoom-in; background: var(--ink); box-shadow: 0 6px 0 var(--ink); transition: transform 0.15s; }
.gallery button:hover { transform: translateY(-3px) rotate(-0.8deg); }
.gallery img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr 1fr; } }
.lightbox { position: fixed; inset: 0; background: rgba(20, 35, 22, 0.88); display: none; place-items: center; z-index: 200; padding: 20px; }
.lightbox.open { display: grid; }
.lightbox img { max-height: 86vh; border: 4px solid var(--white); border-radius: 14px; }
.lightbox button { position: absolute; top: 16px; right: 16px; }

/* playtest / steam block */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 24px; }
.steps li { counter-increment: s; position: relative; padding-left: 52px; margin-bottom: 14px; font-weight: 700; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 38px; height: 38px; border-radius: 50%; background: var(--white); border: 3px solid var(--ink); display: grid; place-items: center; font-family: "Chewy"; font-size: 1.2rem; }
.steam-widget { border: 3px solid var(--ink); border-radius: 16px; overflow: hidden; background: #1b2838; box-shadow: 0 8px 0 var(--ink); }
.steam-widget iframe { width: 100%; height: 190px; border: 0; }

/* community */
.cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 760px) { .cards-2 { grid-template-columns: 1fr; } }
.card { background: var(--white); border: 3px solid var(--ink); border-radius: var(--radius); padding: 28px; box-shadow: 0 8px 0 var(--ink); }

/* final CTA */
.final { text-align: center; }
.final h2 { font-size: clamp(2.4rem, 6vw, 4rem); }
.final .btn-row { justify-content: center; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #dfeadf; padding: 44px 0 36px; font-size: 0.95rem; }
.footer a { color: var(--butter); }
.footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.footer h4 { font-family: "Chewy"; font-weight: 400; font-size: 1.3rem; color: var(--white); margin: 0 0 8px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 4px; }
.footer .legal { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 18px; font-size: 0.85rem; color: #a9bfaa; }
@media (max-width: 760px) { .footer .wrap { grid-template-columns: 1fr; } }

/* ---------- Studio home ---------- */
.studio-hero { background: radial-gradient(circle at 20% 20%, #fff 0 2px, transparent 3px) 0 0 / 34px 34px, linear-gradient(160deg, #ffe7ef, var(--cream) 55%, #e8f6ff); border-bottom: 3px solid var(--ink); text-align: center; padding: 70px 0 60px; }
.studio-hero .poms { width: 150px; margin: 0 auto 16px; }
.wordmark { font-size: clamp(3.2rem, 11vw, 6.6rem); color: #ffd6e4; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; text-shadow: 0 7px 0 var(--ink); transform: rotate(-2deg); margin-bottom: 0.2em; }
.studio-hero p { font-size: 1.25rem; font-weight: 700; max-width: 36ch; margin: 0 auto; }
.game-feature { display: grid; grid-template-columns: 1.15fr 1fr; background: var(--white); border: 3px solid var(--ink); border-radius: 28px; overflow: hidden; box-shadow: 0 10px 0 var(--ink); }
.game-feature .art { background: var(--sky); border-right: 3px solid var(--ink); min-height: 280px; }
.game-feature .art img { width: 100%; height: 100%; object-fit: cover; }
.game-feature .body { padding: 34px 32px; }
.game-feature h2 { color: var(--butter); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink); font-size: clamp(2.2rem, 5vw, 3rem); }
@media (max-width: 800px) { .game-feature { grid-template-columns: 1fr; } .game-feature .art { border-right: 0; border-bottom: 3px solid var(--ink); min-height: 0; } }
.teaser { margin-top: 26px; display: flex; gap: 18px; align-items: center; background: repeating-linear-gradient(45deg, #f1ebdb 0 14px, #ece4cf 14px 28px); border: 3px dashed var(--ink); border-radius: 22px; padding: 22px 26px; }
.teaser .q { font-family: "Chewy"; font-size: 3rem; line-height: 1; flex: none; width: 64px; height: 64px; border-radius: 50%; background: var(--white); border: 3px solid var(--ink); display: grid; place-items: center; }
.teaser p { margin: 0; font-weight: 700; }

/* ---------- Text pages (press, legal) ---------- */
.page-head { background: var(--butter); border-bottom: 3px solid var(--ink); padding: 56px 0 40px; }
.page-head h1 { font-size: clamp(2.6rem, 7vw, 4.2rem); }
.page-head p { font-weight: 700; font-size: 1.15rem; max-width: 60ch; margin: 0; }
.prose { max-width: 760px; }
.prose h2 { font-size: 2.1rem; margin-top: 1.4em; }
.notice { background: var(--white); border: 3px solid var(--ink); border-left-width: 12px; border-left-color: var(--tomato); border-radius: 14px; padding: 18px 22px; margin: 0 0 28px; font-weight: 700; }
.factsheet { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--white); border: 3px solid var(--ink); border-radius: 16px; overflow: hidden; }
.factsheet th, .factsheet td { text-align: left; padding: 12px 16px; border-bottom: 2px solid #efe6cc; vertical-align: top; }
.factsheet tr:last-child th, .factsheet tr:last-child td { border-bottom: 0; }
.factsheet th { width: 34%; font-family: "Chewy"; font-weight: 400; font-size: 1.15rem; background: var(--butter-pale); }
.press-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.asset { background: var(--white); border: 3px solid var(--ink); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: 0 5px 0 var(--ink); }
.asset img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--sky); border-bottom: 3px solid var(--ink); }
.asset .mascot-thumb { aspect-ratio: 16/10; display: grid; place-items: center; background: var(--sky); border-bottom: 3px solid var(--ink); }
.asset .mascot-thumb img { width: auto; height: 80%; aspect-ratio: auto; border: 0; background: none; object-fit: contain; }
.asset span { display: block; padding: 8px 12px; font-weight: 800; font-size: 0.95rem; }
.asset:hover { color: var(--leaf-deep); transform: translateY(-2px); }
.copy-block { background: var(--white); border: 3px solid var(--ink); border-radius: 16px; padding: 20px 22px; }

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

/* ---------- Launch switch (controlled by SITE.mode in site.js) ---------- */
html.launched .only-pre { display: none !important; }
html:not(.launched) .only-post { display: none !important; }

/* glass maze layers + billboard butter */
.maze-layer.z1 { transform: translateZ(7px); } .maze-layer.z2 { transform: translateZ(14px); }
.maze-layer.z3 { transform: translateZ(21px); } .maze-layer.z4 { transform: translateZ(28px); }
.butter-bb { position: absolute; left: 50%; top: 50%; width: 30%; transform-origin: 50% 100%; transform: translate(-50%, -100%) rotateZ(38deg) rotateX(-58deg) translateZ(30px); }
.butter-bb img { width: 100%; animation: bob2 2.4s ease-in-out infinite; filter: drop-shadow(0 5px 0 rgba(30,58,35,0.25)); }
@keyframes bob2 { 50% { transform: translateY(-14%); } }
.smudge { position: absolute; width: 34px; height: 26px; border-radius: 50%; background: radial-gradient(ellipse, rgba(255,255,255,0.85), rgba(255,255,255,0) 70%); pointer-events: none; }

/* layered mascot: body PNG + moving pupils + fixed plastic shine */
.diorama .mascot { width: 46%; left: -6%; bottom: -8%; }
.mascot img, .mascot .mascot-eyes { width: 100%; height: auto; }
.mascot .mascot-eyes { position: absolute; inset: 0; height: 100%; overflow: visible; }
.mascot img { filter: drop-shadow(0 8px 0 rgba(30, 58, 35, 0.18)); }
