:root {
  --bg: #fff8f1;
  --bg-deep: #ffe8d6;
  --ink: #2b1d14;
  --muted: #6b5344;
  --card: rgba(255, 255, 255, 0.78);
  --stroke: rgba(43, 29, 20, 0.08);
  --orange: #ff7a3d;
  --coral: #ff5d8f;
  --sky: #5ec8ff;
  --sun: #ffc857;
  --mint: #6fd6a3;
  --shadow: 0 18px 50px rgba(90, 45, 20, 0.12);
  --radius: 24px;
  --font: "Nunito", system-ui, sans-serif;
  --display: "Fredoka", "Nunito", system-ui, sans-serif;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #ffe0c2 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #d9f3ff 0%, transparent 50%),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.55;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Background blobs */
.bg-blobs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.45;
  animation: drift 18s ease-in-out infinite alternate;
}

.b1 {
  width: 420px;
  height: 420px;
  background: #ffc9a3;
  top: 8%;
  left: -8%;
}

.b2 {
  width: 360px;
  height: 360px;
  background: #b8e8ff;
  top: 40%;
  right: -6%;
  animation-delay: -6s;
}

.b3 {
  width: 300px;
  height: 300px;
  background: #ffd6e7;
  bottom: 5%;
  left: 30%;
  animation-delay: -12s;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(40px, -30px) scale(1.08); }
}

#paw-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(255, 248, 241, 0.78);
  border-bottom: 1px solid var(--stroke);
}

.nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.logo .accent {
  color: var(--orange);
}

.logo-paw {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sun), var(--orange));
  box-shadow: 0 8px 18px rgba(255, 122, 61, 0.28);
  animation: wiggle 3.5s ease-in-out infinite;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem 1.15rem;
}

.nav-links a {
  font-weight: 700;
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: 0.25s ease;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.4rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.92rem;
  background: linear-gradient(135deg, var(--orange), var(--coral));
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(255, 93, 143, 0.28);
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange), var(--coral));
  color: #fff;
  box-shadow: 0 14px 30px rgba(255, 122, 61, 0.32);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

/* Hero */
.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 2rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem 3rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--stroke);
  color: var(--muted);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--display);
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
}

.gradient-text {
  background: linear-gradient(120deg, var(--orange), var(--coral) 45%, #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 36ch;
  margin: 0 0 1.5rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.hero-stats div {
  min-width: 88px;
}

.hero-stats strong {
  display: block;
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--ink);
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
}

.dog-orbit {
  position: relative;
  width: min(340px, 80vw);
  height: min(340px, 80vw);
  display: grid;
  place-items: center;
}

.orbit-ring {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 2px dashed rgba(255, 122, 61, 0.28);
  animation: spin 24s linear infinite;
}

.hero-dog {
  font-size: clamp(7rem, 18vw, 9.5rem);
  filter: drop-shadow(0 24px 30px rgba(90, 45, 20, 0.18));
  z-index: 2;
  user-select: none;
}

.float-item {
  position: absolute;
  font-size: 1.8rem;
  animation: floaty 4s ease-in-out infinite;
  z-index: 3;
}

.f1 { top: 12%; left: 10%; animation-delay: 0s; }
.f2 { top: 18%; right: 8%; animation-delay: 0.6s; font-size: 2rem; }
.f3 { bottom: 18%; left: 14%; animation-delay: 1.1s; }
.f4 { bottom: 14%; right: 12%; animation-delay: 1.7s; }

.speech-bubble {
  position: absolute;
  top: 8%;
  right: 0;
  background: #fff;
  border: 1px solid var(--stroke);
  padding: 0.65rem 0.95rem;
  border-radius: 18px 18px 18px 6px;
  font-weight: 800;
  box-shadow: var(--shadow);
  font-size: 0.95rem;
}

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

@keyframes bounce-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.bounce-soft {
  animation: bounce-soft 2.8s ease-in-out infinite;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}

.wiggle {
  animation: wiggle 2.4s ease-in-out infinite;
}

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

/* Marquee */
.marquee-wrap {
  overflow: hidden;
  border-block: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.45);
  margin: 1rem 0 0.5rem;
}

.marquee {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  padding: 0.9rem 0;
  font-weight: 800;
  color: var(--muted);
  animation: scroll-x 28s linear infinite;
}

@keyframes scroll-x {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Sections */
.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 4.5rem 1.25rem 1rem;
}

.section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 2.25rem;
}

.section-head p:last-child {
  color: var(--muted);
  margin: 0.4rem 0 0;
}

.breed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.breed-card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem 1.25rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation-delay: var(--delay);
}

.breed-card:hover {
  transform: translateY(-8px) rotate(-0.5deg);
  box-shadow: 0 24px 50px rgba(90, 45, 20, 0.16);
}

.breed-emoji {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  border-radius: 22px;
  background: linear-gradient(145deg, #fff7e8, #ffe0c8);
  margin-bottom: 0.9rem;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.breed-card:hover .breed-emoji,
.breed-emoji.is-pop {
  transform: scale(1.18) rotate(-8deg);
}

.breed-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

.breed-card p {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
}

.tags li {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 122, 61, 0.12);
  color: #c24e1a;
}

/* Facts */
.facts-section {
  padding-top: 3.5rem;
}

.facts-panel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  max-width: 720px;
  margin: 0 auto;
}

.fact-card {
  background: linear-gradient(160deg, #fff, #fff4ea);
  border: 1px solid var(--stroke);
  border-radius: 28px;
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.fact-card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 87, 0.35), transparent 70%);
  top: -60px;
  right: -40px;
  pointer-events: none;
}

.fact-icon {
  font-size: 2.4rem;
  margin-bottom: 0.75rem;
  transition: transform 0.35s ease;
}

.fact-text {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  max-width: 36ch;
  position: relative;
  z-index: 1;
}

.fact-card.is-swap .fact-icon {
  transform: scale(1.2) rotate(-10deg);
}

.fact-card.is-swap .fact-text {
  animation: fade-up 0.35s ease;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fact-dots {
  display: flex;
  gap: 0.4rem;
  margin-top: 1.25rem;
}

.fact-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(43, 29, 20, 0.15);
  transition: 0.2s ease;
}

.fact-dots span.active {
  width: 22px;
  border-radius: 999px;
  background: var(--orange);
}

.fact-nav {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  transition: transform 0.15s ease, background 0.15s ease;
}

.fact-nav:hover {
  transform: scale(1.08);
  background: #fff7ef;
}

/* Game */
.game-board {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 32px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.pet-zone {
  appearance: none;
  border: 0;
  cursor: pointer;
  min-height: 280px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 40%, #fff8e8, #ffe0c2 55%, #ffc9a8);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease;
}

.pet-zone:hover {
  transform: scale(1.01);
}

.pet-zone:active {
  transform: scale(0.99);
}

.pet-dog {
  font-size: clamp(5.5rem, 14vw, 7.5rem);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 16px 20px rgba(90, 45, 20, 0.18));
  user-select: none;
}

.pet-dog.is-happy {
  transform: scale(1.15) rotate(-8deg);
}

.pet-hint {
  position: absolute;
  bottom: 1rem;
  font-weight: 800;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.75);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}

.game-stats {
  padding: 0.5rem 0.75rem;
}

.stat-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.stat-pill span {
  color: var(--muted);
}

.stat-pill strong {
  font-family: var(--display);
  font-size: 1.25rem;
}

.game-note {
  color: var(--muted);
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
}

/* CTA */
.cta-section {
  padding-bottom: 4rem;
}

.cta-card {
  text-align: center;
  background: linear-gradient(145deg, #2b1d14, #4a2c1a 55%, #7a3e1d);
  color: #fff8f1;
  border-radius: 36px;
  padding: 3rem 1.5rem;
  box-shadow: 0 30px 60px rgba(43, 29, 20, 0.28);
  position: relative;
  overflow: hidden;
}

.cta-card::after {
  content: "🐾";
  position: absolute;
  font-size: 12rem;
  opacity: 0.07;
  right: -1rem;
  bottom: -2rem;
  transform: rotate(-15deg);
  pointer-events: none;
}

.cta-emoji {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.cta-card h2 {
  color: #fff;
}

.cta-card > p {
  color: rgba(255, 248, 241, 0.82);
  max-width: 42ch;
  margin: 0 auto 1.5rem;
}

.join-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.join-form input {
  flex: 1 1 220px;
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1.15rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 0 0 1px transparent;
}

.join-form input:focus {
  box-shadow: inset 0 0 0 2px var(--sun);
}

.form-msg {
  min-height: 1.4em;
  margin: 1rem 0 0;
  font-weight: 700;
  color: var(--mint);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.4);
  padding: 2rem 1.25rem 2.5rem;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
}

.footer-inner .logo {
  justify-content: center;
  margin-bottom: 0.5rem;
}

.footer-inner p {
  margin: 0.25rem 0;
  color: var(--muted);
}

.tiny {
  font-size: 0.85rem;
  opacity: 0.85;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--delay, 0s);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Burst particles from JS use .burst-bit */
.burst-bit {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  font-size: 1rem;
  animation: burst-fly 0.85s ease-out forwards;
}

@keyframes burst-fly {
  0% { opacity: 1; transform: translate(0, 0) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0.4) rotate(var(--rot)); }
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 2rem;
    text-align: center;
  }

  .lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta,
  .hero-stats {
    justify-content: center;
  }

  .speech-bubble {
    right: 8%;
  }

  .breed-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .game-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    inset: var(--header-h) 1rem auto;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--stroke);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: 0.28s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
  }

  .nav-links a:hover {
    background: #fff4ea;
  }

  .nav-links .btn-sm {
    text-align: center;
  }

  .body-menu-open {
    overflow: hidden;
  }
}

@media (max-width: 560px) {
  .breed-grid {
    grid-template-columns: 1fr;
  }

  .facts-panel {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .fact-nav {
    order: 2;
  }

  .fact-card {
    order: 1;
    width: 100%;
  }

  .facts-panel {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-stage {
    min-height: 300px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob,
  .marquee,
  .orbit-ring,
  .float-item,
  .bounce-soft,
  .wiggle,
  .logo-paw {
    animation: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
