/* Maze Mutts / Keirebu85. Colours follow the game's UI (scripts/ui/ui_style.gd). */

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

:root {
  --gold: #ffcc45;
  --sunny: #ffd45c;
  --ink: #2b1710;
  --brown: #59331f;
  --cream: #fff1d6;
  --cream-hi: #fff8ea;
  --panel: #3d2620;
  --panel-edge: #e8b87a;
  --go: #a8e07a;
  --go-hi: #ccf594;
  --text: #fff6e8;
  --body: #fdf3df;
  --sky: #4a7fd8;
  --night: #2a2560;
  --radius: 18px;
  --shadow: 0 6px 0 rgba(43, 23, 16, 0.55);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--body);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brown); }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--cream); padding: 8px 14px; border-radius: 10px;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 4px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ---------- Top bar ---------- */

.topbar {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
}
.studio {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 650; font-size: 1.15rem;
  text-shadow: 0 2px 0 rgba(43, 23, 16, 0.45);
}
.studio img { image-rendering: pixelated; }
.topbar nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.topbar nav a {
  color: var(--text); text-decoration: none; font-weight: 550;
  padding: 6px 12px; border-radius: 999px;
  text-shadow: 0 2px 0 rgba(43, 23, 16, 0.45);
}
.topbar nav a:hover { background: rgba(255, 255, 255, 0.18); }

/* ---------- Skies (the game's own painted skies, upscaled with hard pixels) ---------- */

.sky-day, .sky-dream {
  position: relative;
  background-repeat: repeat-x;
  background-size: auto 100%;
  image-rendering: pixelated;
  overflow: hidden;
}
.sky-day { background-color: var(--sky); background-image: url("img/sky_yard.png"); background-position: 38% 0; }
.sky-dream { background-color: var(--night); background-image: url("img/sky_dream.png"); background-position: 12% 0; color: var(--text); }

.clouds {
  position: absolute; inset: 0;
  background: url("img/clouds_yard.png") repeat-x 0 100% / auto 100%;
  image-rendering: pixelated;
  animation: drift 240s linear infinite;
  pointer-events: none;
}
.clouds-dream { background-image: url("img/clouds_dream.png"); animation-duration: 400s; opacity: 0.8; }

@keyframes drift { to { background-position-x: -400vh; } }

/* ---------- Hero ---------- */

.hero {
  min-height: min(100vh, 900px);
  display: flex; flex-direction: column;
  padding-top: 72px;
}
.hero-inner {
  position: relative; flex: 1;
  width: min(1200px, 100%); margin: 0 auto;
  padding: clamp(24px, 6vh, 64px) clamp(16px, 4vw, 40px) 120px;
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(24px, 4vw, 56px);
}

.logo {
  margin: 0;
  font-size: clamp(3.2rem, 9vw, 6.4rem);
  line-height: 0.95;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--gold);
  -webkit-text-stroke: 0.22em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 0.09em 0 rgba(26, 13, 8, 0.6);
}
.tagline {
  margin: 14px 0 0;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-weight: 550;
  color: var(--text);
  -webkit-text-stroke: 0.2em var(--ink);
  paint-order: stroke fill;
}
.lede {
  margin: 18px 0 0; max-width: 34em;
  background: rgba(255, 248, 234, 0.92);
  border: 3px solid var(--brown); border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
}

.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 10px 26px;
  font: inherit; font-weight: 650; font-size: 1.2rem;
  color: var(--ink); text-decoration: none;
  background: var(--cream);
  border: 3px solid var(--brown); border-radius: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-2px) scale(1.03); background: var(--cream-hi); }
.btn:active { transform: translateY(3px) scale(0.98); box-shadow: 0 2px 0 rgba(43, 23, 16, 0.55); }
.btn-go { background: var(--go); }
.btn-go:hover { background: var(--go-hi); }
.btn-soon {
  background: rgba(255, 241, 214, 0.75); color: var(--brown);
  font-weight: 550; font-size: 1.05rem; cursor: default;
}
.btn-soon:hover { transform: none; background: rgba(255, 241, 214, 0.75); }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 20px 0 0; }
.chips li {
  background: var(--panel); color: var(--text);
  border: 2px solid var(--panel-edge); border-radius: 999px;
  padding: 3px 14px; font-size: 0.95rem; font-weight: 550;
}

.polaroid {
  margin: 0; background: #fffdf6;
  padding: 12px 12px 0; border-radius: 6px;
  box-shadow: 0 10px 0 rgba(43, 23, 16, 0.35), 0 18px 40px rgba(20, 30, 70, 0.3);
}
.polaroid img { border-radius: 2px; image-rendering: pixelated; }
.polaroid figcaption {
  text-align: center; font-weight: 550; color: var(--brown);
  padding: 10px 6px 14px; font-size: 1rem;
}
.hero-photo { transform: rotate(2.5deg); }

.float-toy {
  position: absolute; width: clamp(56px, 7vw, 96px);
  filter: drop-shadow(0 6px 0 rgba(43, 23, 16, 0.3));
  animation: bob 4s ease-in-out infinite;
  pointer-events: none;
}
.t1 { right: 2%; top: 4%; }
.t2 { right: 41%; bottom: 13%; animation-delay: -1.3s; }
.t3 { right: 6%; bottom: 8%; animation-delay: -2.6s; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-12px) rotate(6deg); }
}

/* A strip of the Backyard's hedge, like the top of a maze wall. */
.hedge {
  position: relative; z-index: 2;
  height: 96px; margin-top: -96px;
  background: url("img/hedge.png") repeat-x 0 0 / 192px 192px;
  image-rendering: pixelated;
  border-top: 6px solid #5b7d3a;
  box-shadow: inset 0 10px 0 rgba(255, 255, 255, 0.12), inset 0 -24px 30px rgba(0, 0, 0, 0.25);
}

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 9vw, 96px) 0; }
.section-paving {
  background:
    linear-gradient(rgba(253, 243, 223, 0.86), rgba(253, 243, 223, 0.86)),
    url("img/paving.png") 0 0 / 256px 256px;
  image-rendering: pixelated;
}
.wrap { width: min(1160px, 100%); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.narrow { width: min(820px, 100%); }

.heading {
  margin: 0 0 32px;
  font-size: clamp(2rem, 5vw, 3rem); font-weight: 650; line-height: 1.1;
  color: var(--gold);
  -webkit-text-stroke: 0.2em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 0.08em 0 rgba(26, 13, 8, 0.45);
  text-align: center;
}
.heading-sm { font-size: clamp(1.7rem, 4vw, 2.3rem); margin-bottom: 18px; }

h3 { margin: 0 0 6px; font-size: 1.35rem; font-weight: 650; line-height: 1.2; }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }

.card {
  background: var(--cream-hi);
  border: 3px solid var(--brown); border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  counter-reset: step;
}
.steps li { position: relative; text-align: center; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); border: 3px solid var(--ink);
  font-weight: 650; font-size: 1.15rem;
}
.steps img { margin: 8px auto 6px; width: 96px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.panel {
  background: var(--panel); color: var(--text);
  border: 3px solid var(--panel-edge); border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 20px;
}
.panel h3 { color: var(--gold); }

/* ---------- Gardens ---------- */

.gardens { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.garden {
  margin: 0; position: relative; overflow: hidden;
  border: 3px solid var(--brown); border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--cream-hi);
}
.garden-sky {
  height: 18px;
  background-size: auto 512%; background-position: 0 92%;
  image-rendering: pixelated;
  border-bottom: 3px solid var(--brown);
}
.garden img { image-rendering: pixelated; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.garden figcaption { padding: 14px 18px 16px; }
.garden figcaption strong { display: block; font-size: 1.3rem; font-weight: 650; }

/* ---------- Dream ---------- */

.dream { padding: clamp(64px, 10vw, 120px) 0; }
.dream-inner { position: relative; display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.dream-text {
  text-shadow: 0 2px 0 rgba(20, 12, 50, 0.6); font-size: 1.2rem;
  background: rgba(36, 26, 77, 0.62);
  border: 3px solid rgba(243, 230, 255, 0.35); border-radius: var(--radius);
  padding: 24px 26px;
}
.dream .heading { text-align: left; margin-bottom: 18px; color: #f3e6ff; -webkit-text-stroke-color: #241a4d; }
.whisper { font-weight: 600; color: #ffe9a8; font-size: 1.4rem; margin-bottom: 4px; }
.dream-photo { transform: rotate(-2deg); }

/* ---------- Gallery ---------- */

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery button {
  padding: 0; border: 3px solid var(--brown); border-radius: 12px; overflow: hidden;
  background: var(--brown); cursor: zoom-in;
  box-shadow: 0 4px 0 rgba(43, 23, 16, 0.5);
  transition: transform 0.12s ease;
}
.gallery button:hover { transform: translateY(-3px) rotate(-0.6deg); }
.gallery img { image-rendering: pixelated; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }

.lightbox {
  padding: 0; border: 0; background: transparent; max-width: min(1280px, 96vw);
}
.lightbox::backdrop { background: rgba(26, 13, 8, 0.85); }
.lightbox img {
  image-rendering: pixelated; max-height: 88vh; width: auto; margin: 0 auto;
  border: 4px solid var(--cream); border-radius: 8px;
}
.lightbox-close {
  position: absolute; top: 8px; right: 8px; z-index: 1;
  width: 48px; height: 48px; border-radius: 50%;
  font: inherit; font-size: 2rem; line-height: 1; font-weight: 650;
  color: var(--ink); background: var(--cream); border: 3px solid var(--brown); cursor: pointer;
}

/* ---------- Family + studio ---------- */

.family .heading { text-align: left; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 38px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.1em;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--go) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%232b1710' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}

.studio-card { text-align: center; }
.contact { margin-top: 20px; font-weight: 550; }
.contact a { font-size: 1.3rem; font-weight: 650; }

/* ---------- Footer ---------- */

.footer { position: relative; background: var(--panel); color: var(--text); margin-top: 96px; }
.hedge-top { margin-top: -96px; }
.footer-inner { width: min(1160px, 100%); margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 36px; font-size: 0.95rem; opacity: 0.9; }

/* ---------- Small screens ---------- */

@media (max-width: 900px) {
  .hero-inner, .dream-inner { grid-template-columns: 1fr; }
  .hero-photo { max-width: 560px; justify-self: center; }
  .t2 { display: none; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .dream .heading { text-align: center; }
  .dream-text { text-align: center; }
}

@media (max-width: 640px) {
  .topbar nav a:not(:first-child) { display: none; }
  .steps, .features, .gardens { grid-template-columns: 1fr; }
  .steps { gap: 32px; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
  .actions .btn { flex: 1 1 100%; }
  .float-toy { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .clouds, .float-toy { animation: none; }
  .btn, .gallery button { transition: none; }
}

/* ---------- Trailer ---------- */

.watch { display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 6vw, 72px); align-items: center; justify-content: center; }
.phone {
  width: min(320px, 78vw); justify-self: center;
  padding: 12px; border-radius: 34px;
  background: var(--panel); border: 3px solid var(--panel-edge);
  box-shadow: var(--shadow);
}
.phone video { display: block; width: 100%; height: auto; border-radius: 22px; background: #1a1240; }
.watch-text { max-width: 30em; font-size: 1.2rem; }
.watch-text .heading { text-align: left; margin-bottom: 16px; }
.small { font-size: 0.9rem; opacity: 0.8; }

@media (max-width: 760px) {
  .watch { grid-template-columns: 1fr; text-align: center; }
  .watch-text { justify-self: center; }
  .watch-text .heading { text-align: center; }
}
