/* ---------- Tokens ---------- */
:root {
  --cream: #fbf3e2;
  --cream-dot: #f0e3c4;
  --ink: #2b2013;
  --cheese: #f5b942;
  --cheese-deep: #d98e2b;
  --mouse: #a79c8e;
  --mouse-dark: #7c7365;
  --blush: #e2857a;
  --paper: #fffdf8;
  --max-w: 1080px;
  --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Work Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  /* subtle global polka dot texture */
  background-image: radial-gradient(var(--cream-dot) 2.2px, transparent 2.2px);
  background-size: 26px 26px;
}

h1, h2, h3 {
  font-family: "Baloo 2", "Work Sans", sans-serif;
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 0.4em;
  letter-spacing: 0.2px;
}

p { margin: 0 0 1em; }

a { color: inherit; }

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

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

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

/* ---------- Nav ---------- */
.site-nav {
  position: relative;
  z-index: 20;
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 26px;
  padding-bottom: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  text-decoration: none;
  color: var(--ink);
}

.brand svg { width: 34px; height: 34px; flex-shrink: 0; }

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 100px;
  transition: background-color 0.15s ease;
}

.nav-links a:hover { background: var(--paper); }

.nav-links a[aria-current="page"] {
  background: var(--ink);
  color: var(--cream);
}

.nav-divider {
  height: 6px;
  background-image: radial-gradient(var(--cheese-deep) 2.6px, transparent 2.6px);
  background-size: 18px 18px;
  opacity: 0.55;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 20px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: center;
  position: relative;
}

.hero-copy { position: relative; z-index: 3; }

.eyebrow-dots {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 18px;
}
.eyebrow-dots span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--cheese-deep);
}
.eyebrow-dots span:nth-child(2) { background: var(--blush); }
.eyebrow-dots span:nth-child(3) { background: var(--mouse-dark); }

.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 3.9rem);
  max-width: 11ch;
}

.hero .lede {
  max-width: 46ch;
  font-size: 1.15rem;
  color: var(--mouse-dark);
}

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  font-family: "Baloo 2", sans-serif;
  padding: 14px 26px;
  border-radius: 100px;
  border: 2px solid var(--ink);
  transition: transform 0.15s ease;
}

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

.btn-primary { background: var(--cheese); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }

/* Hero mascot stage */
.hero-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  z-index: 2;
}

.hero-dotcluster {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background-image: radial-gradient(var(--cheese-deep) 3px, transparent 3px);
  background-size: 22px 22px;
  opacity: 0.35;
}

.mascot {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Flying cheese wedges */
.cheese-fly {
  position: absolute;
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 6px 10px rgba(43, 32, 19, 0.18));
  animation: float-cheese 6s ease-in-out infinite;
}
.c1 { top: 6%;  left: -2%;  width: 46px; animation-delay: 0s; }
.c2 { top: 62%; left: 92%;  width: 62px; animation-delay: 1.1s; animation-duration: 7s; }
.c3 { top: 4%;  left: 86%;  width: 38px; animation-delay: 2.2s; animation-duration: 5.5s; }
.c4 { top: 82%; left: 6%;   width: 44px; animation-delay: 0.6s; animation-duration: 6.5s; }

@keyframes float-cheese {
  0%, 100% { transform: translate(0, 0) rotate(-6deg); }
  50% { transform: translate(-6px, -22px) rotate(8deg); }
}

@media (prefers-reduced-motion: reduce) {
  .cheese-fly { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Facts row ---------- */
.facts {
  padding: 70px 0 90px;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 34px;
}

.fact-card {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 26px 24px;
}

.fact-card svg { width: 40px; height: 40px; margin-bottom: 14px; }

.fact-card h3 { font-size: 1.15rem; margin-bottom: 6px; }

.fact-card p { color: var(--mouse-dark); margin-bottom: 0; font-size: 0.98rem; }

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.section-heading h2 { font-size: clamp(1.8rem, 3.6vw, 2.4rem); }

.section-heading p { color: var(--mouse-dark); max-width: 40ch; margin-bottom: 0; }

/* ---------- Gallery page ---------- */
.gallery-hero {
  padding: 50px 0 10px;
}

.gallery-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3rem); max-width: 14ch; }
.gallery-hero .lede { color: var(--mouse-dark); max-width: 52ch; }

.gallery-grid {
  padding: 40px 0 100px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.gallery-item {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
}

.gallery-item figure { margin: 0; }

.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--cream); }

.gallery-item figcaption {
  padding: 16px 20px 20px;
}

.gallery-item figcaption h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.gallery-item figcaption p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--mouse-dark);
}

.video-block {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
}

.video-stage {
  position: relative;
  background: var(--cheese);
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-stage svg { width: 78%; height: 78%; }

.video-caption {
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.video-caption h3 { font-size: 1.25rem; margin-bottom: 8px; }
.video-caption p { color: var(--mouse-dark); margin-bottom: 20px; }

.play-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--cream);
  border: none;
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 12px 22px;
  border-radius: 100px;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.play-btn:hover { transform: translateY(-2px); }
.play-btn .icon-pause { display: none; }
.play-btn[data-playing="true"] .icon-play { display: none; }
.play-btn[data-playing="true"] .icon-pause { display: inline; }

/* running-mouse animation, toggled via body/button state */
.wheel-group { transform-origin: 130px 140px; }
.video-stage[data-playing="true"] .wheel-group {
  animation: spin-wheel 1.6s linear infinite;
}
.leg-a, .leg-b {
  transform-origin: center;
}
.video-stage[data-playing="true"] .leg-a {
  animation: pump-a 0.42s ease-in-out infinite;
}
.video-stage[data-playing="true"] .leg-b {
  animation: pump-b 0.42s ease-in-out infinite;
}
.video-stage[data-playing="true"] .tail-swish {
  animation: swish 0.9s ease-in-out infinite;
}

@keyframes spin-wheel { to { transform: rotate(360deg); } }
@keyframes pump-a { 0%,100% { transform: rotate(-18deg); } 50% { transform: rotate(22deg); } }
@keyframes pump-b { 0%,100% { transform: rotate(22deg); } 50% { transform: rotate(-18deg); } }
@keyframes swish { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(10deg); } }

@media (prefers-reduced-motion: reduce) {
  .video-stage[data-playing="true"] .wheel-group,
  .video-stage[data-playing="true"] .leg-a,
  .video-stage[data-playing="true"] .leg-b,
  .video-stage[data-playing="true"] .tail-swish {
    animation: none;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 2px dashed var(--mouse);
  padding: 30px 0 46px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.site-footer p { margin: 0; color: var(--mouse-dark); font-size: 0.92rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-stage { max-width: 380px; margin: 20px auto 0; }
  .facts-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .video-block { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .nav-links { gap: 2px; }
  .nav-links a { padding: 8px 12px; font-size: 0.92rem; }
  .facts-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}
