/* Moss & Milk palette, taken from game/themes/moss_and_milk_palette.tres */
@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/Fredoka.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("assets/fonts/Nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --bg: #e8eed6;
  --panel: #fff7df;
  --ink: #183e2c;
  --muted: #53634b;
  --accent: #ffda65;
  --border: #7b9261;
  --water: #9ecfc2;
  --pink: #f6c9c4;
  --mint: #cde8c5;
  --sky: #c9e2ec;
  --lilac: #dcd3ee;
  --peach: #f8d7b0;
  --radius: 22px;
  --shadow: 0 4px 0 rgba(24, 62, 44, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 1.06rem;
  line-height: 1.6;
}

h1, h2, .studio, .btn, .frog-row span {
  font-family: "Fredoka", "Nunito", system-ui, sans-serif;
}

a { color: inherit; }

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

/* ---- Top bar ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 16px;
}
.studio {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.25rem;
  text-decoration: none;
}
.studio img { width: 40px; height: 40px; }
.topbar nav { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar nav a {
  text-decoration: none;
  font-weight: 700;
  color: var(--muted);
}
.topbar nav a:hover { color: var(--ink); }
.topbar nav { align-items: center; }
.topbar nav a.nav-cta {
  background: var(--accent);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 4px 14px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: var(--panel);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { left: 16px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

a { text-underline-offset: 3px; }

main { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

section { margin: 56px 0; }

h2 { font-size: 1.9rem; font-weight: 600; margin: 0 0 18px; line-height: 1.2; }

/* ---- Hero ---- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  align-items: center;
  margin-top: 16px;
}
.app-icon {
  width: 112px;
  height: 112px;
  border-radius: 28px;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
}
h1 {
  font-size: clamp(2.8rem, 7vw, 4.4rem);
  font-weight: 700;
  line-height: 1;
  margin: 20px 0 8px;
}
.tagline {
  font-family: "Fredoka", sans-serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--border);
  line-height: 1.3;
  margin: 0 0 14px;
}
.cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }

.btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60px;
  padding: 8px 24px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.15;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(24, 62, 44, 0.14); }
.btn-play { background: var(--ink); color: var(--panel); }
.btn-kicker { font-size: 0.78rem; font-weight: 500; opacity: 0.85; }
.btn-main { font-size: 1.25rem; }
.btn-play[aria-disabled="true"] { cursor: default; }
.btn-play[aria-disabled="true"]:hover { transform: none; box-shadow: var(--shadow); }
.btn-ghost { background: var(--accent); color: var(--ink); font-size: 1.1rem; }

.hero-art {
  position: relative;
  border-radius: 32px;
  border: 3px solid var(--ink);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  background: var(--water);
}
.hero-art .pond {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}
.hero-frog {
  position: absolute;
  bottom: 6%;
  width: 28%;
  filter: drop-shadow(0 6px 4px rgba(24, 62, 44, 0.25));
  animation: bob 3.2s ease-in-out infinite;
}
.hero-frog.f1 { left: 8%; width: 32%; }
.hero-frog.f2 { left: 40%; bottom: 14%; width: 24%; animation-delay: -1.1s; }
.hero-frog.f3 { right: 6%; animation-delay: -2.2s; }

@keyframes bob {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(-4%) scaleY(1.02); }
}

/* ---- Feature cards ---- */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.card {
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 20px 20px 22px;
  box-shadow: var(--shadow);
  border-top-width: 14px;
}
.card h2 { font-size: 1.3rem; margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); }
.card.mint { border-top-color: #8fbf7e; }
.card.sky { border-top-color: #7fb5c9; }
.card.peach { border-top-color: #e8a96a; }
.card.lilac { border-top-color: #a998d4; }

/* ---- Screenshots ---- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; }
.shots {
  list-style: none;
  margin: 0;
  padding: 4px 4px 18px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(170px, 1fr);
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--border) transparent;
}
.shots li { scroll-snap-align: start; text-align: center; }
.shots button {
  display: block;
  width: 100%;
  padding: 0;
  border: 3px solid var(--ink);
  border-radius: 20px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
  cursor: zoom-in;
  transition: transform 0.15s ease;
}
.shots button:hover { transform: translateY(-4px); }
.shots img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; }
.shots span { display: block; margin-top: 10px; font-family: "Fredoka", sans-serif; font-weight: 500; }

.viewer {
  border: 3px solid var(--ink);
  border-radius: 24px;
  padding: 0;
  background: var(--panel);
  max-width: min(92vw, 480px);
  overflow: hidden;
}
.viewer::backdrop { background: rgba(24, 62, 44, 0.6); }
.viewer img { display: block; width: 100%; height: auto; max-height: 86vh; object-fit: contain; }
.viewer-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--accent);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

/* ---- Roster ---- */
.roster { text-align: center; }
.frog-row {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px 12px;
}
.frog-row li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.frog-row img {
  width: 100%;
  max-width: 150px;
  transition: transform 0.2s ease;
}
.frog-row li:hover img { transform: translateY(-6px) rotate(-3deg); }
.frog-row span { font-weight: 500; }

/* ---- Trailer ---- */
.trailer { text-align: center; }
.video-frame {
  max-width: 860px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  border: 3px solid var(--ink);
  overflow: hidden;
  background: var(--sky);
  box-shadow: var(--shadow);
}
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
}
.video-placeholder p { margin: 0; color: var(--muted); }
.video-placeholder strong { color: var(--ink); font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.2rem; }

/* ---- Sign-up ---- */
.signup {
  display: flex;
  gap: 28px;
  align-items: center;
  background: var(--mint);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}
.signup > div { flex: 1; min-width: 0; }
.signup h2 { margin-bottom: 6px; }
.signup .muted { margin: 0 0 16px; }
.signup-frog { flex: none; width: 120px; }
.signup-form { display: flex; gap: 10px; flex-wrap: wrap; }
.signup-form input[type="email"] {
  flex: 1 1 220px;
  min-height: 56px;
  padding: 0 20px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}
.signup-form input::placeholder { color: var(--muted); opacity: 0.7; }
.signup-form .btn { min-height: 56px; cursor: pointer; font: inherit; align-items: center; }
.signup-form .btn:disabled { opacity: 0.6; cursor: progress; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-note { min-height: 1.6em; margin: 10px 0 0; font-weight: 700; }
.fine { font-size: 0.88rem; color: var(--muted); margin: 4px 0 0; }

/* ---- About ---- */
.about {
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 28px 28px 20px;
  box-shadow: var(--shadow);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.muted { color: var(--muted); }

/* ---- Footer ---- */
.footer {
  text-align: center;
  padding: 24px 16px 40px;
  color: var(--muted);
  font-size: 0.95rem;
}
.footer img { margin: 0 auto 6px; }
.footer p { margin: 4px 0; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  section { margin: 40px 0; }
  .topbar nav { gap: 12px; font-size: 0.95rem; }
  .signup { flex-direction: column; text-align: center; padding: 22px 18px; }
  .signup-frog { width: 96px; }
  .signup-form .btn { flex: 1 1 100%; }
  .features { grid-template-columns: 1fr; }
  .frog-row { grid-template-columns: repeat(3, 1fr); }
  .app-icon { width: 88px; height: 88px; border-radius: 22px; }
  .btn { flex: 1 1 100%; align-items: center; text-align: center; }
  .about { padding: 22px 18px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-frog { animation: none; }
  .btn, .frog-row img, .shots button { transition: none; }
}

/* ---- Privacy / legal ---- */
.legal {
  max-width: 760px;
  margin: 16px auto 56px;
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 32px 32px 24px;
  box-shadow: var(--shadow);
}
.legal h1 { font-size: clamp(2.2rem, 6vw, 3rem); margin: 0 0 4px; }
.legal h2 { font-size: 1.45rem; margin: 32px 0 10px; }
.legal h3 { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.12rem; margin: 20px 0 6px; }
.legal ul { padding-left: 1.3em; }
.legal li { margin: 4px 0; }
@media (max-width: 560px) { .legal { padding: 22px 18px 14px; } }

/* ---- 404 ---- */
.not-found {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
}
.not-found img { margin-bottom: 12px; }
.not-found h1 { font-size: clamp(2rem, 6vw, 3rem); }
.not-found .muted { margin: 0 0 20px; }
