/* Fonts are self-hosted (latin subset, SIL OFL; see assets/fonts) so the page
   loads nothing from other sites. Nunito is a variable font: one file covers
   both weights. */
@font-face {
  font-family: "Lilita One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/lilita-one-latin.woff2) format("woff2");
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url(assets/fonts/nunito-latin.woff2) format("woff2");
}

:root {
  --sky: #2f7de1;
  --sky-deep: #1b4fa8;
  --navy: #142a5c;
  --sun: #ffc93c;
  --sun-deep: #ff9f1c;
  --red: #ef3b3b;
  --cream: #fff8ec;
  --card: #ffffff;
  --text: #1e2a44;
  --muted: #5b6785;
  --radius: 28px;
  --shadow: 0 10px 0 rgba(20, 42, 92, 0.12), 0 20px 40px rgba(20, 42, 92, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  font-weight: 600;
  color: var(--text);
  background: var(--cream);
  line-height: 1.5;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: "Lilita One", "Nunito", sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 0;
}

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

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 48px 16px 120px;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(20, 42, 92, 0.15), rgba(20, 42, 92, 0.65) 75%),
    linear-gradient(180deg, rgba(27, 79, 168, 0.35), rgba(20, 42, 92, 0.55)),
    url(assets/hero.jpg) center 35% / cover no-repeat;
  transform: scale(1.04);
}

.balls {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-content {
  max-width: 640px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  pointer-events: none;
}

.hero-content > * { pointer-events: auto; }

.app-icon {
  width: 132px;
  height: 132px;
  border-radius: 30px;
  border: 5px solid #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  animation: bob 3.2s ease-in-out infinite;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.95;
}

.logo-main {
  font-size: clamp(3.6rem, 14vw, 7.5rem);
  color: var(--sun);
  -webkit-text-stroke: 3px var(--navy);
  paint-order: stroke fill;
  text-shadow:
    0 6px 0 var(--navy),
    0 14px 24px rgba(0, 0, 0, 0.35);
  transform: rotate(-3deg);
}

.logo-sub {
  margin-top: 10px;
  font-size: clamp(1.5rem, 5.5vw, 2.4rem);
  color: #fff;
  background: var(--red);
  padding: 4px 22px 8px;
  border-radius: 999px;
  border: 3px solid var(--navy);
  box-shadow: 0 5px 0 var(--navy);
  transform: rotate(2deg);
}

.pitch {
  margin: 6px 0 0;
  font-size: clamp(1.05rem, 3.4vw, 1.3rem);
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.badge {
  margin: 4px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 6px 0 rgba(20, 42, 92, 0.35);
}

.badge-dark {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #35c759;
  box-shadow: 0 0 0 0 rgba(53, 199, 89, 0.7);
  animation: pulse 1.8s infinite;
}

.hint {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.85;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 80px;
  color: var(--cream);
  z-index: 1;
}

/* Bouncing balls in the hero (spawned by main.js) */

.ball {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}

.ball img {
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.3));
}

.burst {
  position: absolute;
  pointer-events: none;
  font-family: "Lilita One", sans-serif;
  font-size: 1.6rem;
  color: var(--sun);
  -webkit-text-stroke: 2px var(--navy);
  paint-order: stroke fill;
  animation: burst 0.7s ease-out forwards;
}

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

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 72px 16px;
  text-align: center;
}

.section h2,
.cta h2 {
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  color: var(--navy);
}

.lead {
  margin: 8px auto 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 1.15rem;
}

.steps,
.dogs {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.step,
.dog {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 24px 30px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s ease;
}

.step:hover,
.dog:hover { transform: translateY(-6px) rotate(-1deg); }

.step img {
  height: 110px;
  width: auto;
  object-fit: contain;
}

.step h3,
.dog h3 {
  font-size: 1.9rem;
  color: var(--sky-deep);
}

.step p,
.dog p {
  margin: 0;
  color: var(--muted);
}

.spin { animation: spin 6s linear infinite; }

/* Meet the pack */

.pack {
  max-width: none;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.18) 0 120px, transparent 121px),
    radial-gradient(circle at 85% 80%, rgba(255, 255, 255, 0.12) 0 180px, transparent 181px),
    linear-gradient(180deg, var(--sky), var(--sky-deep));
}

.pack h2 { color: #fff; }
.pack .lead { color: rgba(255, 255, 255, 0.85); }

.dogs {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.dog-art {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--tint);
  border: 5px solid #fff;
  box-shadow: 0 0 0 4px var(--ring);
  margin-bottom: 6px;
}

.dog-art img {
  width: 150px;
  height: auto;
  transition: transform 0.25s ease;
}

.dog:hover .dog-art img { transform: translateY(-10px) scale(1.05); }

.dog-thor  { --tint: #e3edff; --ring: #7fa8f0; }
.dog-freya { --tint: #fff1d6; --ring: var(--sun); }
.dog-loki  { --tint: #e6f7e6; --ring: #6ccf7a; }

/* Worlds */

.world-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.world {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg) center 40% / cover no-repeat;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  color: #fff;
  transition: transform 0.2s ease;
}

.world-backyard { --bg: url(assets/world-backyard.jpg); }
.world-kitchen { --bg: url(assets/world-kitchen.jpg); }
.world-gym { --bg: url(assets/world-gym.jpg); }

.world::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(20, 42, 92, 0.85));
}

.world:hover { transform: translateY(-6px) rotate(1deg); }

.world h3 {
  position: relative;
  z-index: 1;
  font-size: 2.2rem;
  text-shadow: 0 3px 0 var(--navy);
}

.world-balls {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.world-balls img {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
  animation: hop 1.6s ease-in-out infinite;
}

.world-balls img:nth-child(2) { animation-delay: 0.2s; }
.world-balls img:nth-child(3) { animation-delay: 0.4s; }

.more {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

/* CTA */

.cta {
  position: relative;
  margin: 0 16px 48px;
  padding: 64px 24px 56px;
  border-radius: 40px;
  text-align: center;
  background: linear-gradient(135deg, var(--sun), var(--sun-deep));
  box-shadow: var(--shadow);
  overflow: hidden;
}

@media (min-width: 1132px) {
  .cta { max-width: 1100px; margin: 0 auto 64px; }
}

.cta p {
  margin: 12px auto 22px;
  max-width: 520px;
  font-size: 1.15rem;
  color: var(--navy);
}

.cta .badge { margin: 0; color: #fff; }

.cta-dog {
  position: absolute;
  width: 120px;
  height: auto;
  opacity: 0.95;
  animation: bob 2.6s ease-in-out infinite;
}

.cta-dog-left { left: 3%; bottom: 14px; }
.cta-dog-right { right: 3%; top: 14px; animation-delay: 1.3s; }

@media (max-width: 720px) {
  .cta-dog { width: 80px; }
  .cta-dog-left { left: 8px; bottom: 6px; }
  .cta-dog-right { right: 8px; top: 6px; }
  .cta { padding-top: 84px; padding-bottom: 84px; }
}

.footer {
  text-align: center;
  padding: 0 16px 40px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer p { margin: 0; }

.footer-links { padding-top: 6px; }

.footer a {
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer a:hover,
.footer a:focus-visible { color: var(--sky-deep); }

/* ---------- Animations ---------- */

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

@keyframes hop {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(53, 199, 89, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 199, 89, 0); }
}

@keyframes burst {
  from { opacity: 1; transform: translate(-50%, -50%) scale(0.6); }
  to { opacity: 0; transform: translate(-50%, -150%) scale(1.3); }
}

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