/* Mochi: Walk Buddy site — landing is one full-screen scene (Finch-style) */

:root {
  --ink: #2e2a24;
  --ink-teal: #1f4d3f;
  --sky-top: #b8e8f4;
  --sky-mid: #d4f0e8;
  --sky-bottom: #fff4e0;
  --hill-back: #7ec89a;
  --hill-mid: #63bd97;
  --hill-front: #4fa582;
  --sun: #ffe08a;
  --footer: #3d6b58;
  --footer-line: #8fd4b0;
  --font: "Nunito", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

html:has(body.landing) {
  background: var(--sky-top);
}

body {
  font-family: var(--font);
  color: var(--ink);
  overflow-x: hidden;
}

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

/* ── Landing: single scene ── */

body.landing {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
  touch-action: pan-y;
  overscroll-behavior-x: none;
}

.scene {
  position: relative;
  flex: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;

  /* day/night cycle — updated by daynight.js */
  --sun-x: 18%;
  --sun-y: 56%;
  --moon-x: 82%;
  --moon-y: 56%;
  --sun-opacity: 1;
  --moon-opacity: 0;
  --sun-glow: 0.55;
  --moon-glow: 0;
  --stars-opacity: 0;
  --daylight: 1;
  --night-depth: 0;
  --warmth: 0;
  --dusk: 0;
  --ambient: 1;
  --bg-bright: 1;
  --bg-sat: 1;
  --shadow-x: 8px;
  --shadow-y: 14px;
  --shadow-blur: 18px;
  --shadow-alpha: 0.22;
  --shadow-color: rgba(31, 77, 63, 0.22);
  --parallax-x: 0;
  --parallax-y: 0;
  --parallax-bx: 0;
  --parallax-by: 0;
}

.scene-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Tint on wrapper — filter on <img> leaves a 1px compositor seam */
  filter: brightness(var(--bg-bright)) saturate(var(--bg-sat));
}

.scene-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  image-rendering: auto;
  pointer-events: none;
}

/* sun/moon between full scene and land cutout */
.sky-cycle {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  isolation: isolate;
}

/* land (trees + hills + grass) — smooth silhouette, same crop as bg */
.scene-land {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  filter: brightness(var(--bg-bright)) saturate(var(--bg-sat));
}

.scene-land img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}

.stars {
  position: absolute;
  inset: 0;
  opacity: var(--stars-opacity);
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, 0.95), transparent),
    radial-gradient(1.5px 1.5px at 28% 12%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1px 1px at 44% 22%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1.2px 1.2px at 58% 10%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1px 1px at 72% 16%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1.4px 1.4px at 86% 24%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1px 1px at 18% 32%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 36% 28%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1.2px 1.2px at 52% 34%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1px 1px at 68% 30%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 82% 36%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1.3px 1.3px at 94% 14%, rgba(255, 255, 255, 0.8), transparent);
}

/* One streak when the moon hits mid-sky — stays in sky layer (behind UI) */
.shooting-star {
  position: absolute;
  top: 18%;
  left: 58%;
  width: 0;
  height: 2px;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.95) 55%,
    rgba(200, 230, 255, 0.35) 100%
  );
  box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.55);
  transform: rotate(-28deg);
  transform-origin: left center;
  z-index: 0;
}

.shooting-star.is-shooting {
  animation: shooting-star-fly 1.05s ease-out forwards;
}

@keyframes shooting-star-fly {
  0% {
    opacity: 0;
    width: 0;
    transform: rotate(-28deg) translate(0, 0);
  }
  8% {
    opacity: 1;
    width: 72px;
  }
  55% {
    opacity: 1;
    width: 110px;
  }
  100% {
    opacity: 0;
    width: 40px;
    transform: rotate(-28deg) translate(-36vw, 18vh);
  }
}

@media (max-width: 640px) {
  .shooting-star {
    top: 16%;
    left: 52%;
  }

  @keyframes shooting-star-fly {
    0% {
      opacity: 0;
      width: 0;
      transform: rotate(-30deg) translate(0, 0);
    }
    8% {
      opacity: 1;
      width: 56px;
    }
    55% {
      opacity: 1;
      width: 88px;
    }
    100% {
      opacity: 0;
      width: 28px;
      transform: rotate(-30deg) translate(-42vw, 14vh);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .shooting-star.is-shooting {
    animation: none;
    opacity: 0;
  }
}

/* Soft fireflies — only visible when night-depth rises */
.fireflies {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: calc(var(--night-depth) * 1.05);
  overflow: hidden;
}

.firefly {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #f2ffb0;
  box-shadow:
    0 0 4px 1px rgba(220, 255, 140, 0.85),
    0 0 10px 3px rgba(170, 230, 90, 0.4);
  will-change: transform, opacity;
}

.firefly--1 {
  left: 18%;
  top: 58%;
  animation: firefly-a 9.5s ease-in-out infinite;
}

.firefly--2 {
  left: 34%;
  top: 66%;
  width: 2.5px;
  height: 2.5px;
  animation: firefly-b 11s ease-in-out infinite 0.8s;
}

.firefly--3 {
  left: 52%;
  top: 60%;
  animation: firefly-a 10.5s ease-in-out infinite 1.4s;
}

.firefly--4 {
  left: 68%;
  top: 70%;
  width: 2.5px;
  height: 2.5px;
  animation: firefly-b 8.8s ease-in-out infinite 0.3s;
}

.firefly--5 {
  left: 78%;
  top: 56%;
  animation: firefly-a 12s ease-in-out infinite 2s;
}

.firefly--6 {
  left: 42%;
  top: 74%;
  width: 2px;
  height: 2px;
  animation: firefly-b 9.2s ease-in-out infinite 1.1s;
}

@keyframes firefly-a {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.35;
  }
  25% {
    transform: translate(10px, -14px) scale(1.15);
    opacity: 0.95;
  }
  50% {
    transform: translate(-6px, -22px) scale(0.9);
    opacity: 0.45;
  }
  75% {
    transform: translate(12px, -8px) scale(1.05);
    opacity: 0.85;
  }
}

@keyframes firefly-b {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }
  30% {
    transform: translate(-12px, -10px) scale(1.1);
    opacity: 0.9;
  }
  55% {
    transform: translate(8px, -18px) scale(0.85);
    opacity: 0.4;
  }
  80% {
    transform: translate(-4px, -6px) scale(1.2);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .firefly {
    animation: firefly-pulse 3.5s ease-in-out infinite;
  }

  @keyframes firefly-pulse {
    0%,
    100% {
      opacity: 0.4;
    }
    50% {
      opacity: 0.85;
    }
  }
}

.sun-glow,
.moon-glow {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.sun-glow {
  left: var(--sun-x);
  top: var(--sun-y);
  width: min(28vw, 200px);
  height: min(28vw, 200px);
  opacity: var(--sun-glow);
  background: radial-gradient(
    circle,
    rgba(255, 230, 140, 0.5) 0%,
    rgba(255, 200, 100, 0.16) 45%,
    transparent 70%
  );
}

.moon-glow {
  left: var(--moon-x);
  top: var(--moon-y);
  width: min(22vw, 160px);
  height: min(22vw, 160px);
  opacity: var(--moon-glow);
  background: radial-gradient(
    circle,
    rgba(210, 225, 255, 0.38) 0%,
    rgba(160, 180, 230, 0.1) 45%,
    transparent 70%
  );
}

.celestial {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
}

.sun {
  left: var(--sun-x);
  top: var(--sun-y);
  width: clamp(52px, 8vw, 72px);
  height: clamp(52px, 8vw, 72px);
  opacity: var(--sun-opacity);
  overflow: visible;
  background: radial-gradient(
    circle at 35% 32%,
    #fffef0 0%,
    #ffe566 42%,
    #ffb830 100%
  );
  box-shadow: 0 0 18px rgba(255, 210, 80, 0.55);
}

/* Inner ray ring — spins on its own so motion reads clearly */
.sun::before {
  content: "";
  position: absolute;
  inset: -38%;
  z-index: -1;
  border-radius: 50%;
  transform-origin: center center;
  animation: sun-rays-spin 14s linear infinite;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 245, 200, 0) 0deg 11deg,
    rgba(255, 244, 200, 0.55) 11deg 13deg,
    rgba(255, 238, 170, 0.35) 13deg 14deg,
    rgba(255, 245, 200, 0) 14deg 30deg
  );
  -webkit-mask: radial-gradient(
    circle,
    transparent 34%,
    #000 42%,
    #000 52%,
    transparent 58%
  );
  mask: radial-gradient(
    circle,
    transparent 34%,
    #000 42%,
    #000 52%,
    transparent 58%
  );
  opacity: calc(0.34 + var(--sun-glow) * 0.55);
}

/* Outer ray ring — offset so rays don't line up with inner */
.sun::after {
  content: "";
  position: absolute;
  inset: -52%;
  z-index: -1;
  border-radius: 50%;
  transform-origin: center center;
  animation: sun-rays-spin 20s linear infinite reverse;
  background: repeating-conic-gradient(
    from 18deg,
    rgba(255, 240, 180, 0) 0deg 8deg,
    rgba(255, 240, 175, 0.42) 8deg 9.5deg,
    rgba(255, 245, 195, 0.22) 9.5deg 10.5deg,
    rgba(255, 240, 180, 0) 10.5deg 22deg
  );
  -webkit-mask: radial-gradient(
    circle,
    transparent 38%,
    #000 48%,
    #000 62%,
    transparent 68%
  );
  mask: radial-gradient(
    circle,
    transparent 38%,
    #000 48%,
    #000 62%,
    transparent 68%
  );
  opacity: calc(0.28 + var(--sun-glow) * 0.46);
}

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

@media (prefers-reduced-motion: reduce) {
  .sun::before,
  .sun::after {
    animation: none;
  }
}

.moon {
  left: var(--moon-x);
  top: var(--moon-y);
  width: clamp(44px, 6.5vw, 58px);
  height: clamp(44px, 6.5vw, 58px);
  opacity: var(--moon-opacity);
  background: radial-gradient(
    circle at 38% 38%,
    #f8faff 0%,
    #dce6ff 55%,
    #b8c8e8 100%
  );
  box-shadow:
    0 0 16px rgba(200, 215, 255, 0.45),
    inset -6px -4px 0 rgba(180, 195, 230, 0.35);
}

/* Maria + craters — same palette, layered on top */
.moon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(145, 162, 198, 0.42) 0%, transparent 24%),
    radial-gradient(circle at 58% 36%, rgba(138, 155, 192, 0.38) 0%, transparent 20%),
    radial-gradient(circle at 46% 58%, rgba(142, 158, 195, 0.34) 0%, transparent 22%),
    radial-gradient(circle at 24% 55%, rgba(150, 166, 202, 0.28) 0%, transparent 14%),
    radial-gradient(circle at 70% 26%, rgba(168, 182, 215, 0.22) 0%, transparent 9%),
    radial-gradient(circle at 18% 38%, rgba(172, 186, 218, 0.2) 0%, transparent 7%),
    radial-gradient(circle at 52% 22%, rgba(165, 180, 212, 0.18) 0%, transparent 6%),
    radial-gradient(circle at 76% 52%, rgba(160, 175, 208, 0.2) 0%, transparent 7%),
    radial-gradient(circle at 38% 44%, rgba(178, 192, 222, 0.16) 0%, transparent 5%),
    radial-gradient(circle at 62% 68%, rgba(155, 170, 205, 0.24) 0%, transparent 8%),
    radial-gradient(circle at 44% 72%, rgba(170, 184, 216, 0.14) 0%, transparent 4%),
    radial-gradient(circle at 82% 38%, rgba(175, 188, 220, 0.15) 0%, transparent 4%),
    radial-gradient(circle at 28% 68%, rgba(168, 182, 214, 0.12) 0%, transparent 3%);
  pointer-events: none;
}

.moon::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 68% 42%,
    rgba(120, 140, 190, 0.22) 0%,
    transparent 55%
  );
}

/* lighting stays BEHIND hills so sun/moon never paint on mountains */
.light-wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: calc(var(--daylight) * 0.5 + var(--warmth) * 0.4);
  background:
    radial-gradient(
      ellipse 70% 50% at var(--sun-x) var(--sun-y),
      rgba(255, 240, 180, calc(0.22 + var(--warmth) * 0.18)) 0%,
      rgba(255, 220, 140, calc(0.06 + var(--warmth) * 0.1)) 40%,
      transparent 70%
    ),
    linear-gradient(
      180deg,
      rgba(255, 248, 220, calc(0.1 + var(--daylight) * 0.06)) 0%,
      transparent 42%
    );
  mix-blend-mode: soft-light;
}

.night-wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: calc(var(--night-depth) * 0.65 + var(--dusk) * 0.14);
  background: linear-gradient(
    180deg,
    rgba(25, 45, 95, calc(0.18 + var(--night-depth) * 0.24)) 0%,
    rgba(35, 55, 90, calc(0.05 + var(--night-depth) * 0.14)) 40%,
    rgba(20, 40, 55, calc(0.1 + var(--night-depth) * 0.28)) 100%
  );
}

/* ground shadows under buddies */
.buddy-shadow {
  position: absolute;
  bottom: 9.2%;
  width: clamp(90px, 14vw, 140px);
  height: clamp(18px, 3vw, 28px);
  border-radius: 50%;
  z-index: 6;
  pointer-events: none;
  background: var(--shadow-color);
  filter: blur(calc(var(--shadow-blur) * 0.35));
  transform: translate(
      calc(var(--shadow-x) + var(--parallax-bx) * 1px),
      calc(var(--parallax-by) * 1px)
    )
    scaleX(calc(0.85 + var(--shadow-y) / 40));
}

.buddy-shadow-left {
  left: clamp(4%, 8vw, 10%);
}

.buddy-shadow-right {
  right: clamp(3%, 7vw, 9%);
}

/* buddies */
.buddy {
  position: absolute;
  bottom: 10%;
  width: auto;
  height: clamp(150px, 24vw, 240px);
  object-fit: contain;
  filter: drop-shadow(var(--shadow-x) var(--shadow-y) var(--shadow-blur) var(--shadow-color));
  pointer-events: none;
  user-select: none;
  z-index: 7;
}

.buddy-left {
  left: clamp(1%, 5vw, 7%);
  animation: float 4s ease-in-out infinite;
}

.buddy-right {
  right: clamp(1%, 4vw, 6%);
  animation: float 4.6s ease-in-out infinite 0.8s;
}

/* Pets are painted into the meadow — hide any leftover overlay cutouts */
.buddy,
.buddy-shadow {
  display: none;
}

@keyframes float {
  0%,
  100% {
    transform: translate3d(
      calc(var(--parallax-bx) * 1px),
      calc(var(--parallax-by) * 1px),
      0
    );
  }
  50% {
    transform: translate3d(
      calc(var(--parallax-bx) * 1px),
      calc(var(--parallax-by) * 1px - 10px),
      0
    );
  }
}

/* hero text */
.site-brand {
  position: absolute;
  top: clamp(0.9rem, 2.5vw, 1.5rem);
  left: clamp(0.9rem, 2.5vw, 1.5rem);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  pointer-events: none;
  cursor: default;
  isolation: isolate;
}

.site-brand-icon {
  width: clamp(48px, 6.2vw, 60px);
  height: clamp(48px, 6.2vw, 60px);
  border-radius: 22%;
  object-fit: cover;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(20, 40, 55, calc(0.15 + var(--night-depth) * 0.2)));
}

.site-brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  min-width: 0;
}

.site-brand-name {
  font-size: clamp(1.4rem, 3.1vw, 1.65rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink-teal);
  white-space: nowrap;
  text-shadow:
    -2px -2px 0 rgba(255, 255, 255, calc(0.5 + var(--daylight) * 0.4)),
    2px -2px 0 rgba(255, 255, 255, calc(0.5 + var(--daylight) * 0.4)),
    -2px 2px 0 rgba(255, 255, 255, calc(0.5 + var(--daylight) * 0.4)),
    2px 2px 0 rgba(255, 255, 255, calc(0.5 + var(--daylight) * 0.4)),
    0 2px 10px rgba(20, 40, 60, calc(var(--night-depth) * 0.35));
}

.site-brand-greeting {
  font-size: clamp(0.72rem, 1.55vw, 0.84rem);
  font-weight: 800;
  letter-spacing: 0.045em;
  line-height: 1.2;
  color: #3a6554;
  white-space: nowrap;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75),
    0 1px 8px rgba(255, 255, 255, 0.35);
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease,
    color 0.45s ease,
    text-shadow 0.45s ease;
}

.site-brand-greeting.is-ready {
  opacity: 1;
  transform: translateY(0);
}

.site-brand-greeting[data-period="morning"] {
  color: #2f6b52;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8),
    0 1px 10px rgba(255, 250, 230, 0.45);
}

.site-brand-greeting[data-period="afternoon"] {
  color: #3a6554;
}

.site-brand-greeting[data-period="evening"] {
  color: #4a5e48;
  text-shadow:
    0 1px 0 rgba(255, 245, 230, 0.7),
    0 1px 8px rgba(255, 220, 180, 0.25);
}

.site-brand-greeting[data-period="night"] {
  color: rgba(232, 240, 255, 0.92);
  text-shadow:
    0 1px 0 rgba(20, 35, 60, 0.4),
    0 1px 10px rgba(30, 50, 90, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .site-brand-greeting {
    transition: color 0.2s ease, text-shadow 0.2s ease;
    transform: none;
  }

  .site-brand-greeting.is-ready {
    transform: none;
  }
}

.hero-copy {
  position: relative;
  z-index: 15;
  text-align: center;
  padding: 0 1.25rem;
  max-width: 640px;
  margin-top: -6vh;
  isolation: isolate;
}

.hero-copy h1 {
  font-size: clamp(2rem, 6.5vw, 3.35rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff;
  -webkit-text-stroke: 0.14em #2f4d5e;
  paint-order: stroke fill;
  text-shadow:
    0 0.14em 0 #243d4a,
    0 0.22em 0.4em rgba(20, 45, 60, 0.18);
  margin-bottom: 0.85rem;
  filter: brightness(calc(0.82 + var(--ambient) * 0.18));
}

.tagline {
  font-family: var(--font);
  font-size: clamp(1.05rem, 2.4vw, 1.14rem);
  font-weight: 700;
  color: #1a4252;
  line-height: 1.5;
  letter-spacing: 0;
  max-width: 24rem;
  margin: 0 auto 1.6rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.85rem;
}

/* Official badges — large, no hover animation */
.store-badge {
  display: block;
  line-height: 0;
  text-decoration: none;
}

a.store-badge:focus-visible {
  outline: 3px solid #2f6fed;
  outline-offset: 4px;
  border-radius: 10px;
}

.store-badge-img {
  display: block;
  height: 64px;
  width: auto;
  object-fit: contain;
}

/* Google PNG has transparent padding — match visual size to Apple */
.store-badge--google .store-badge-img {
  height: 96px;
  margin: -16px -11px;
}

.coming {
  font-size: 0.88rem;
  font-weight: 800;
  color: #3a6b58;
  opacity: 0.85;
}

.store-legal {
  max-width: 36rem;
  margin: 0.45rem auto 0;
  padding: 0 1.1rem 0.25rem;
  font-size: 0.45rem;
  font-weight: 600;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  text-shadow: 0 1px 2px rgba(20, 45, 30, 0.4);
  pointer-events: auto;
}

.meadow-footer--desktop .store-legal {
  margin-top: 0.65rem;
  padding-bottom: 0.55rem;
}

.store-legal--mobile {
  margin-top: 0.2rem;
  margin-bottom: 0;
  padding-bottom: 0;
  font-size: 0.42rem;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.75);
  flex-shrink: 0;
}

/* Meadow soundscape — off by default */
.soundscape-wrap {
  position: absolute;
  top: clamp(0.9rem, 2.5vw, 1.5rem);
  right: clamp(0.9rem, 2.5vw, 1.5rem);
  z-index: 20;
  width: 2.5rem;
  height: 2.5rem;
  isolation: isolate;
}

.soundscape-toggle {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink-teal);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55),
    0 4px 14px rgba(20, 45, 35, 0.12);
  backdrop-filter: blur(6px);
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

/* Float beside + below the speaker; never affects button layout */
.soundscape-tip {
  position: absolute;
  top: calc(100% + 0.2rem);
  right: 0;
  left: auto;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  width: max-content;
  max-width: min(8.6rem, calc(100vw - 3.5rem));
  margin: 0;
  padding: 0.28rem 0.38rem 0.28rem 0.45rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-teal);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.2;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55),
    0 3px 10px rgba(20, 45, 35, 0.12);
  backdrop-filter: blur(6px);
  pointer-events: none;
  opacity: 1;
  transform: translate(0, 0);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.soundscape-tip::after {
  content: "";
  position: absolute;
  top: -3px;
  right: 0.7rem;
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.78);
  transform: rotate(45deg);
}

.soundscape-tip-text {
  flex: 1;
  min-width: 0;
}

.soundscape-tip-count {
  flex-shrink: 0;
  width: 0.95rem;
  height: 0.95rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(31, 77, 63, 0.12);
  font-size: 0.58rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.soundscape-tip.is-leaving {
  opacity: 0;
  transform: translateY(4px);
}

.soundscape-tip.is-hidden {
  display: none;
}

.soundscape-toggle:hover,
.soundscape-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.62);
  outline: none;
}

.soundscape-toggle:focus-visible {
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.85),
    0 0 0 4px rgba(31, 77, 63, 0.45);
}

.soundscape-toggle[aria-pressed="true"] {
  color: #1f4d3f;
  background: rgba(255, 255, 255, 0.7);
}

.soundscape-icon {
  width: 1.15rem;
  height: 1.15rem;
  display: none;
}

.soundscape-toggle[aria-pressed="true"] .soundscape-icon--on,
.soundscape-toggle[aria-pressed="false"] .soundscape-icon--off {
  display: block;
}

.scene .soundscape-toggle {
  filter: brightness(calc(0.92 + var(--ambient) * 0.08));
}

/* footer */
.footer {
  background: var(--footer);
  color: #fff;
  border-top: 3px solid var(--footer-line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.footer a {
  color: #fff;
  opacity: 0.92;
}

.footer a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer .copy {
  opacity: 0.85;
}

.landing-footer {
  position: relative;
  z-index: 5;
}

/* ── Landing: flower path over meadow (desktop) ── */

.meadow-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  background: transparent;
  border: none;
  color: #fff;
  min-height: 0;
  padding: 0;
  overflow: visible;
  pointer-events: none;
}

.meadow-footer--mobile {
  display: none;
}

/* Mobile scroll-below footer (Finch-style) — hidden on desktop */
.mobile-scroll-footer {
  display: none;
}

.scroll-hint {
  display: none;
}

.meadow-ridge {
  display: none;
}

.meadow-path {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: center;
  gap: 0.35rem 1.85rem;
  padding: 1.6rem 1.25rem 0.85rem;
  pointer-events: none;
}

.meadow-copy,
.meadow-footer .flower-link {
  pointer-events: auto;
}

.meadow-copy {
  font-weight: 800;
  font-size: 0.8rem;
  line-height: 1;
  opacity: 0.92;
  align-self: flex-end;
  margin: 0 0.4rem 0 0;
  text-shadow:
    0 1px 2px rgba(31, 77, 63, 0.55),
    0 2px 8px rgba(31, 77, 63, 0.35);
  white-space: nowrap;
}

.meadow-footer .flower-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  line-height: 1;
  letter-spacing: 0.02em;
  /* Clean extruded 3D type */
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55),
    0 -1px 0 rgba(20, 50, 35, 0.2),
    1px 1px 0 rgba(25, 55, 40, 0.35),
    2px 2px 0 rgba(25, 55, 40, 0.28),
    3px 3px 0 rgba(25, 55, 40, 0.18),
    0 4px 10px rgba(20, 45, 30, 0.35);
  transition: transform 0.2s ease, text-shadow 0.2s ease;
}

.meadow-footer .flower-link:hover,
.meadow-footer .flower-link:focus-visible {
  transform: translateY(-3px);
  text-decoration: none;
  opacity: 1;
  outline: none;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65),
    0 -1px 0 rgba(20, 50, 35, 0.2),
    1px 2px 0 rgba(25, 55, 40, 0.35),
    2px 3px 0 rgba(25, 55, 40, 0.28),
    3px 4px 0 rgba(25, 55, 40, 0.18),
    0 6px 14px rgba(20, 45, 30, 0.4);
}

.flower-icon {
  width: 56px;
  height: 86px;
  display: block;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 2px 5px rgba(31, 77, 63, 0.28));
  animation: flower-wind 5.6s ease-in-out infinite;
  will-change: transform;
}

/* Stagger each bloom so wind feels natural, not synced */
.meadow-footer .flower-link:nth-of-type(1) .flower-icon {
  animation-duration: 5.4s;
  animation-delay: -0.6s;
}

.meadow-footer .flower-link:nth-of-type(2) .flower-icon {
  animation-duration: 6.2s;
  animation-delay: -2.4s;
}

.meadow-footer .flower-link:nth-of-type(3) .flower-icon {
  animation-duration: 5.8s;
  animation-delay: -1.3s;
}

.meadow-footer .flower-link:nth-of-type(4) .flower-icon {
  animation-duration: 6.6s;
  animation-delay: -3.5s;
}

/* Soft gusts — pivot from stem base, small angles only */
@keyframes flower-wind {
  0% {
    transform: rotate(0deg);
  }
  18% {
    transform: rotate(2.4deg);
  }
  36% {
    transform: rotate(-1.6deg);
  }
  52% {
    transform: rotate(3deg);
  }
  70% {
    transform: rotate(-2.2deg);
  }
  86% {
    transform: rotate(1.1deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .meadow-footer .flower-link {
    transition: none;
  }

  .flower-icon {
    animation: none;
  }
}

/* Mobile: ONE continuous meadow — sign + links overlay, pets pinned to first screen */
@media (max-width: 640px) {
  /* Sky blue on <html> was the strip you see when the page bounces past the end. */
  html:has(body.landing) {
    /* height:100% on html trapped the page in one screen. Let the document grow. */
    height: auto;
    min-height: 100%;
    overflow-x: clip;
    overflow-y: visible;
    background: #8ec96e;
    overscroll-behavior-y: none;
  }

  body.landing {
    /* JS sets this to the footer height so the painting ends with the links. */
    --meadow-extra: 420px;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: clip;
    overflow-y: visible;
    overscroll-behavior-y: none;
    background: #8ec96e;
  }

  .meadow-footer--desktop {
    display: none;
  }

  /* Same scene image continues below the fold.
     No lime fill on .scene — filter/compositor gaps were showing #b8d978 as a 1px edge.
     Extra height + bottom overscan so legal sits on meadow (no flat green bar on phones). */
  .scene {
    min-height: calc(100vh + var(--meadow-extra));
    min-height: calc(100dvh + var(--meadow-extra));
    background: transparent;
  }

  .scene-bg img,
  .scene-land img {
    /* mobile-fit.js pans this so the dragon's peek edge sits on the screen rim */
    object-position: 62% center;
  }

  /* Bottom overscan only — side inset was leaving a meadow gap beside the dragon */
  .scene-bg,
  .scene-land {
    inset: -1px 0 calc(-28px - env(safe-area-inset-bottom, 0px));
    transform: none;
    will-change: auto;
  }

  /* Transparent overlay — keep content short so it never spills past the meadow scene */
  .mobile-scroll-footer.meadow-footer--mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: 10;
    background: transparent;
    background-image: none;
    border: none;
    border-top: none;
    color: #fff;
    box-sizing: border-box;
    height: auto;
    margin-top: calc(-1 * var(--meadow-extra));
    padding: 0.55rem 1.25rem max(0.75rem, env(safe-area-inset-bottom, 0px));
    overflow: visible;
    pointer-events: auto;
  }

  .mobile-scroll-footer.meadow-footer--mobile::before {
    display: none;
  }

  .trail-sign-rig {
    position: relative;
    width: min(100%, 300px);
    margin: 0.85rem auto 0.35rem;
    overflow: visible;
  }

  .trail-sign-hanger {
    position: relative;
    z-index: 13;
    transform: perspective(420px) rotateX(2.5deg);
    transform-origin: center top;
    will-change: transform;
  }

  /* Ears peek above; paws overlap the rim a hair so no meadow gap shows */
  .trail-sign-cat {
    position: absolute;
    left: 50%;
    bottom: calc(100% - 5px);
    z-index: 15;
    width: clamp(84px, 28vw, 108px);
    height: auto;
    transform: translateX(-50%);
    pointer-events: none;
    user-select: none;
  }

  .trail-sign {
    position: relative;
    z-index: 14;
    width: 100%;
    margin: 0;
    padding: 1.2rem 1.2rem 1.1rem;
    border-radius: 16px 16px 14px 14px;
    /* Nudge plank + pegs up; cat stays put (sibling, not translated) */
    transform: translateY(-0.85rem);
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
    cursor: grab;
    /* Realistic plank: base wood + grain + soft top light */
    background:
      linear-gradient(
        105deg,
        rgba(255, 248, 230, 0.22) 0%,
        transparent 18%,
        transparent 72%,
        rgba(50, 30, 12, 0.12) 100%
      ),
      repeating-linear-gradient(
        92deg,
        transparent 0 5px,
        rgba(70, 42, 18, 0.07) 5px 6px,
        transparent 6px 11px,
        rgba(255, 235, 200, 0.06) 11px 12px
      ),
      repeating-linear-gradient(
        88deg,
        transparent 0 13px,
        rgba(55, 32, 12, 0.09) 13px 14px
      ),
      linear-gradient(
        165deg,
        #e2c08a 0%,
        #c9a06a 22%,
        #b88952 48%,
        #9a6a3c 72%,
        #7a522c 100%
      );
    border: 2.5px solid #5c3b1c;
    box-shadow:
      inset 0 2px 0 rgba(255, 245, 220, 0.45),
      inset 0 -3px 0 rgba(55, 32, 12, 0.28),
      inset 2px 0 0 rgba(255, 240, 210, 0.18),
      inset -3px 0 0 rgba(45, 25, 10, 0.22),
      inset 0 0 18px rgba(70, 40, 15, 0.12),
      3px 4px 0 #5a3a1c,
      5px 7px 0 #3f2814,
      0 12px 24px rgba(25, 40, 20, 0.28),
      0 4px 10px rgba(40, 25, 10, 0.2);
    text-align: center;
    overflow: visible;
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
  }

  .trail-sign.is-dragging {
    cursor: grabbing;
    transition: none;
  }

  /* Nail holes on the plank (pegs + ropes sit on top via JS) */
  .trail-sign::before,
  .trail-sign::after {
    content: "";
    position: absolute;
    top: 14px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(
      circle at 50% 55%,
      rgba(35, 20, 8, 0.55),
      rgba(35, 20, 8, 0.15) 55%,
      transparent 70%
    );
    pointer-events: none;
  }

  .trail-sign::before {
    left: 14px;
  }

  .trail-sign::after {
    right: 14px;
  }

  /* Ropes live in the rig (not fixed) so they scroll with the board */
  .trail-sign-ropes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
    z-index: 12;
  }

  .trail-sign-rope {
    fill: none;
    stroke: #6e4a28;
    stroke-width: 3.5;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
  }

  /* Pegs are on the plank — scroll/pull with the board, no JS on scroll */
  .trail-sign-peg {
    position: absolute;
    top: 14px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background:
      radial-gradient(circle at 32% 28%, #f0dfb0 0 18%, transparent 19%),
      radial-gradient(circle at 50% 50%, #3a2410 0 22%, transparent 23%),
      radial-gradient(circle at 38% 32%, #d4b07a, #8a6038 55%, #5a3c1e 100%);
    box-shadow:
      inset 0 1px 1px rgba(255, 245, 220, 0.45),
      inset 0 -1px 1px rgba(40, 25, 10, 0.35),
      0 2px 3px rgba(40, 25, 10, 0.35),
      1px 2px 0 rgba(60, 35, 15, 0.4);
    z-index: 5;
    pointer-events: none;
  }

  .trail-sign-peg--left {
    left: 14px;
  }

  .trail-sign-peg--right {
    right: 14px;
  }

  .trail-sign-kicker {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(62, 40, 18, 0.7);
    margin-bottom: 0.4rem;
  }

  .trail-sign-title {
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1.3;
    color: #3e2812;
    margin-bottom: 0.55rem;
    text-shadow: 0 1px 0 rgba(255, 240, 210, 0.35);
  }

  .trail-sign-arrow {
    display: flex;
    justify-content: center;
    margin: 0.15rem auto 0.05rem;
    filter: drop-shadow(0 3px 5px rgba(40, 25, 10, 0.32));
    animation: trail-arrow-bob 1.8s ease-in-out infinite;
  }

  .trail-sign-arrow svg {
    display: block;
  }

  @keyframes trail-arrow-bob {
    0%,
    100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(4px);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .trail-sign-arrow {
      animation: none;
    }
  }

  .mobile-scroll-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    padding-bottom: 0;
  }

  .mobile-scroll-nav a {
    color: #fff;
    font-weight: 800;
    font-size: 1.02rem;
    letter-spacing: 0.02em;
    opacity: 0.98;
    line-height: 1.15;
    text-shadow: 0 1px 2px rgba(20, 50, 30, 0.55);
    transition: transform 0.2s ease;
  }

  .mobile-scroll-nav a:hover,
  .mobile-scroll-nav a:focus-visible {
    opacity: 1;
    text-decoration: none;
    outline: none;
    transform: translateY(-1px);
    text-shadow: 0 2px 4px rgba(20, 50, 30, 0.6);
  }

  .mobile-scroll-copy {
    margin-top: 0.35rem;
    margin-bottom: 0;
    padding-bottom: 0;
    text-align: center;
    font-weight: 700;
    font-size: 0.82rem;
    color: #fff;
    opacity: 0.92;
    position: relative;
    z-index: 3;
    text-shadow:
      0 1px 2px rgba(31, 77, 63, 0.55),
      0 2px 8px rgba(31, 77, 63, 0.3);
  }

  /* Finch-like: copy + stores in upper sky, pets on grass below */
  .hero-copy {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 15;
    margin: 0;
    padding: 10rem 1.1rem 0;
    max-width: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-self: stretch;
    align-self: start;
  }

  .hero-copy h1 {
    order: 1;
    font-size: 2.45rem;
    line-height: 1.06;
    margin-bottom: 1.2rem;
    max-width: 21rem;
    -webkit-text-stroke-width: 0.13em;
  }

  .store-row {
    order: 2;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.15rem;
    margin-bottom: 0.85rem;
    width: 100%;
    max-width: 24rem;
  }

  .store-badge-img {
    height: 66px;
  }

  .store-badge--google .store-badge-img {
    /* PNG has even transparent padding — collapse it without covering the Apple badge */
    height: 92px;
    margin: -14px 0;
  }

  .tagline {
    order: 3;
    font-size: 1.02rem;
    line-height: 1.48;
    font-weight: 700;
    color: #1a4252;
    margin: 0 auto 0.75rem;
    max-width: 20rem;
  }

  .coming {
    order: 4;
    font-size: 0.92rem;
    opacity: 0.85;
    margin: 0;
  }

  /* Soft cue toward meadow footer below the fold */
  .scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    position: fixed;
    left: 0;
    right: 0;
    bottom: max(1.1rem, env(safe-area-inset-bottom, 0px));
    z-index: 9;
    margin: 0;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.35s ease;
  }

  .scroll-hint.is-hidden {
    opacity: 0;
  }

  .scroll-hint-label {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    text-shadow:
      0 1px 2px rgba(20, 45, 30, 0.55),
      0 2px 8px rgba(20, 45, 30, 0.35);
  }

  .scroll-hint-chevron {
    width: 10px;
    height: 10px;
    border-right: 2.5px solid #fff;
    border-bottom: 2.5px solid #fff;
    transform: rotate(45deg);
    opacity: 0.9;
    filter: drop-shadow(0 1px 2px rgba(20, 45, 30, 0.45));
    animation: scroll-hint-bob 1.7s ease-in-out infinite;
  }

  @keyframes scroll-hint-bob {
    0%,
    100% {
      transform: rotate(45deg) translate(0, 0);
    }
    50% {
      transform: rotate(45deg) translate(3px, 3px);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .scroll-hint-chevron {
      animation: none;
    }
  }

  /* Pets are baked into the meadow plate (same day/night as desktop) */
  .buddy,
  .buddy-shadow {
    display: none;
  }
}

/* ── Legal / FAQ subpages ── */

body:not(.landing) {
  background: #fff8f0;
  min-height: 100vh;
}

.wrap {
  width: min(100% - 2rem, 720px);
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--ink);
}

.logo {
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 800;
  font-size: 0.92rem;
}

.nav-links a {
  color: #4fa582;
}

.btn {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.88rem;
}

.btn-primary {
  background: var(--hill-mid);
  color: #fff;
}

.legal {
  padding-bottom: 3rem;
}

.legal-page {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(143, 212, 176, 0.28), transparent),
    #f7f3ea;
}

/* Back-to-home fade: block flash before JS runs on index */
html.is-page-entering::before {
  content: "";
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 2147483646;
  pointer-events: none;
}

.page-transition-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 2147483647;
  opacity: 0;
  /* Never capture clicks — a stuck veil used to freeze the whole landing page */
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.page-transition-overlay.is-visible {
  opacity: 1;
}

.page-transition-overlay.is-leaving {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .page-transition-overlay {
    transition: none;
  }
}

.legal-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  margin: 1.15rem 0 0.95rem;
  color: #fff;
  background: var(--hill-front);
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(31, 77, 63, 0.22);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.legal-back:hover,
.legal-back:focus-visible {
  background: var(--hill-mid);
  outline: none;
  transform: translateX(-2px);
  box-shadow: 0 4px 14px rgba(31, 77, 63, 0.28);
}

.legal-back:active,
.contact-mail-btn:active {
  transform: scale(0.94);
}

.legal-back.is-popping,
.contact-mail-btn.is-popping {
  animation: legal-back-pop 0.28s ease;
  pointer-events: none;
}

.legal-back svg {
  display: block;
  width: 18px;
  height: 18px;
  margin-right: 1px;
}

@keyframes legal-back-pop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(0.86);
  }
  70% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-back.is-popping,
  .contact-mail-btn.is-popping {
    animation: none;
  }

  .legal-back:active,
  .contact-mail-btn:active {
    transform: scale(0.94);
  }
}

.legal-card {
  background: #fff;
  border-radius: 18px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 8px 24px rgba(46, 42, 36, 0.06);
}

@media (max-width: 640px) {
  .legal-page .wrap {
    width: min(100% - 1.5rem, 720px);
  }

  .legal-back {
    width: 2.45rem;
    height: 2.45rem;
    margin: 0.9rem 0 0.75rem;
  }

  .legal-card {
    padding: 1.4rem 1.15rem;
    border-radius: 16px;
  }

  .legal-card h1 {
    font-size: 1.7rem;
  }
}

.legal-card h1 {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}

.legal-card .meta {
  color: #746d63;
  font-weight: 700;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.legal-card h2 {
  font-size: 1.05rem;
  font-weight: 900;
  margin: 1.35rem 0 0.4rem;
}

.legal-card h3 {
  font-size: 0.98rem;
  font-weight: 900;
  margin: 1rem 0 0.35rem;
  color: #3e2812;
}

.legal-card ol.legal-ol {
  padding-left: 1.25rem;
  margin-bottom: 0.6rem;
}

.legal-card .legal-table-wrap {
  overflow-x: auto;
  margin: 0.5rem 0 0.75rem;
}

.legal-card .legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.legal-card .legal-table th,
.legal-card .legal-table td {
  border: 1px solid rgba(62, 40, 18, 0.12);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
  color: #746d63;
  font-weight: 650;
  line-height: 1.45;
}

.legal-card .legal-table th {
  background: rgba(143, 212, 176, 0.18);
  font-weight: 900;
  color: #3e2812;
}

.legal-card p,
.legal-card li {
  color: #746d63;
  font-weight: 650;
  font-size: 0.98rem;
  line-height: 1.55;
  margin-bottom: 0.6rem;
}

.legal-card ul {
  padding-left: 1.15rem;
  margin-bottom: 0.6rem;
}

.legal-card a {
  color: #4fa582;
  font-weight: 800;
}

.contact-mail-btn {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  background: var(--hill-front);
  color: #fff !important;
  font-weight: 900;
  font-size: 0.95rem;
  box-shadow: 0 3px 10px rgba(31, 77, 63, 0.2);
  transition: background 0.15s ease, transform 0.15s ease;
}

.contact-mail-btn:hover,
.contact-mail-btn:focus-visible {
  background: var(--hill-mid);
  outline: none;
  transform: translateY(-1px);
}

.footer-inner.wrap {
  max-width: 720px;
}

@media (min-width: 641px) and (max-width: 720px) {
  .scene-bg img {
    object-position: center 42%;
  }

  .scene-land img {
    object-position: center 42%;
  }

  .hero-copy {
    margin-top: -4vh;
  }
}

@media (max-width: 480px) {
  .hero-copy {
    padding-top: 8.5rem;
  }

  .hero-copy h1 {
    font-size: 2.25rem;
  }

  .tagline {
    font-size: 0.98rem;
    line-height: 1.46;
    max-width: 18.5rem;
  }

}

/* ── Boot splash: slime buddy + footprints (mobile + desktop) ── */
html.is-boot-splash {
  background: #f3f5f2;
}

html.is-boot-splash body.landing {
  overflow: hidden;
}

.boot-splash {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147483645;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  background: #f3f5f2;
  opacity: 0;
  transition: opacity 0.45s ease;
}

html.is-boot-splash .boot-splash {
  display: flex !important;
  opacity: 1;
}

.boot-splash.is-visible {
  display: flex;
  opacity: 1;
}

.boot-splash.is-leaving {
  opacity: 0;
  pointer-events: none;
}

/*
 * Clear entrance: meadow stays fully visible under the splash.
 * Only brand + hero are held, then rise once splash is fading.
 */
html.is-boot-splash:not(.is-landing-enter) .site-brand,
html.is-boot-splash:not(.is-landing-enter) .hero-copy {
  opacity: 0;
  transform: translateY(24px);
}

html.is-landing-enter .site-brand {
  animation: landing-ui-in 0.58s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

html.is-landing-enter .hero-copy {
  animation: landing-ui-in 0.58s cubic-bezier(0.22, 1, 0.36, 1) 0.14s forwards;
}

@keyframes landing-ui-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.boot-splash-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  transform: translateY(-6%);
}

.boot-face {
  position: relative;
  width: min(34vw, 128px);
  aspect-ratio: 311 / 301;
  overflow: visible;
}

.boot-slime-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
  /* Soft bob — drips ride with the buddy */
  transform: rotate(-2deg) translateY(0);
  transform-origin: 50% 85%;
  animation: boot-slime-bob 1.55s ease-in-out infinite;
}

.boot-slime {
  display: block;
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 10px 16px rgba(40, 70, 55, 0.16));
}

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

/* Jelly drips hang BELOW the feet (buddy PNG untouched) */
.boot-drips {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}

.boot-drip {
  position: absolute;
  top: 86%;
  width: 0.72rem;
  height: 2.8rem;
  transform-origin: 50% 0%;
}

.boot-drip--1 {
  left: 32%;
  width: 0.78rem;
  height: 3rem;
}

.boot-drip--2 {
  left: 56%;
  width: 0.55rem;
  height: 2.4rem;
}

.boot-drip-stem {
  position: absolute;
  top: 0;
  left: 50%;
  width: 42%;
  height: 55%;
  margin-left: -21%;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    #9aebc4 0%,
    #63bd97 55%,
    #4fa582 100%
  );
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.45);
  opacity: 0;
  transform: scaleY(0.2);
  transform-origin: 50% 0%;
  will-change: transform, opacity;
}

.boot-drip-blob {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100%;
  aspect-ratio: 0.85;
  margin-left: -50%;
  border-radius: 50% 50% 48% 48% / 42% 42% 58% 58%;
  background:
    radial-gradient(
      circle at 30% 26%,
      rgba(255, 255, 255, 0.85) 0%,
      rgba(200, 247, 220, 0.5) 28%,
      transparent 52%
    ),
    radial-gradient(circle at 50% 58%, #9aebc4 0%, #63bd97 48%, #3d9a72 100%);
  box-shadow:
    inset -1px -2px 3px rgba(45, 110, 85, 0.28),
    0 2px 4px rgba(40, 80, 60, 0.18);
  opacity: 0;
  transform: translateY(0) scale(0.35);
  transform-origin: 50% 0%;
  will-change: transform, opacity;
}

html.is-boot-splash .boot-drip--1 .boot-drip-stem,
.boot-splash.is-visible .boot-drip--1 .boot-drip-stem {
  animation: boot-drip-stem 1.35s ease-in-out infinite;
}

html.is-boot-splash .boot-drip--1 .boot-drip-blob,
.boot-splash.is-visible .boot-drip--1 .boot-drip-blob {
  animation: boot-drip-blob 1.35s ease-in-out infinite;
}

html.is-boot-splash .boot-drip--2 .boot-drip-stem,
.boot-splash.is-visible .boot-drip--2 .boot-drip-stem {
  animation: boot-drip-stem 1.5s ease-in-out 0.55s infinite;
}

html.is-boot-splash .boot-drip--2 .boot-drip-blob,
.boot-splash.is-visible .boot-drip--2 .boot-drip-blob {
  animation: boot-drip-blob 1.5s ease-in-out 0.55s infinite;
}

@keyframes boot-drip-stem {
  0%,
  4% {
    opacity: 0;
    transform: scaleY(0.15);
  }
  14% {
    opacity: 1;
    transform: scaleY(0.9);
  }
  28% {
    opacity: 1;
    transform: scaleY(1.3);
  }
  40% {
    opacity: 0.65;
    transform: scaleY(0.4);
  }
  52%,
  100% {
    opacity: 0;
    transform: scaleY(0.12);
  }
}

@keyframes boot-drip-blob {
  0%,
  6% {
    opacity: 0;
    transform: translateY(0) scale(0.3);
  }
  16% {
    opacity: 1;
    transform: translateY(0.3rem) scale(0.9);
  }
  28% {
    opacity: 1;
    transform: translateY(0.65rem) scale(1.08);
  }
  36% {
    opacity: 1;
    transform: translateY(0.9rem) scale(0.92, 1.14);
  }
  62% {
    opacity: 0.8;
    transform: translateY(2.15rem) scale(0.75);
  }
  82%,
  100% {
    opacity: 0;
    transform: translateY(2.9rem) scale(0.4);
  }
}

.boot-prints {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1.35rem;
  min-height: 2.85rem;
}

.boot-print {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 2.25rem;
  transform-origin: 50% 100%;
}

.boot-print svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 1.5px 2px rgba(31, 77, 63, 0.14));
}

/* Dual-tone ink: darker pad, lighter toes */
.boot-print-pad {
  fill: #a8cfc0;
}

.boot-print-toe {
  fill: #c5ebd8;
}

.boot-print--1 {
  transform: rotate(-14deg);
}

.boot-print--2 {
  transform: rotate(2deg) translateY(4px);
}

.boot-print--3 {
  transform: rotate(16deg);
}

.boot-splash.is-visible .boot-print--1 svg {
  animation: boot-print-hop 0.95s cubic-bezier(0.34, 1.15, 0.64, 1) infinite;
}

.boot-splash.is-visible .boot-print--2 svg {
  animation: boot-print-hop 0.95s cubic-bezier(0.34, 1.15, 0.64, 1) 0.2s
    infinite;
}

.boot-splash.is-visible .boot-print--3 svg {
  animation: boot-print-hop 0.95s cubic-bezier(0.34, 1.15, 0.64, 1) 0.4s
    infinite;
}

.boot-splash.is-visible .boot-print--1 .boot-print-pad {
  animation: boot-print-pad-ink 0.95s cubic-bezier(0.34, 1.15, 0.64, 1)
    infinite;
}

.boot-splash.is-visible .boot-print--1 .boot-print-toe {
  animation: boot-print-toe-ink 0.95s cubic-bezier(0.34, 1.15, 0.64, 1)
    infinite;
}

.boot-splash.is-visible .boot-print--2 .boot-print-pad {
  animation: boot-print-pad-ink 0.95s cubic-bezier(0.34, 1.15, 0.64, 1) 0.2s
    infinite;
}

.boot-splash.is-visible .boot-print--2 .boot-print-toe {
  animation: boot-print-toe-ink 0.95s cubic-bezier(0.34, 1.15, 0.64, 1) 0.2s
    infinite;
}

.boot-splash.is-visible .boot-print--3 .boot-print-pad {
  animation: boot-print-pad-ink 0.95s cubic-bezier(0.34, 1.15, 0.64, 1) 0.4s
    infinite;
}

.boot-splash.is-visible .boot-print--3 .boot-print-toe {
  animation: boot-print-toe-ink 0.95s cubic-bezier(0.34, 1.15, 0.64, 1) 0.4s
    infinite;
}

@keyframes boot-print-hop {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  32% {
    transform: translateY(-12px) scale(1.08);
  }
  52% {
    transform: translateY(0) scale(0.96);
  }
  68% {
    transform: translateY(-2px) scale(1.02);
  }
}

/* Pad: desaturated idle → deep meadow peak */
@keyframes boot-print-pad-ink {
  0%,
  100% {
    fill: #a8cfc0;
  }
  32% {
    fill: #3d9a72;
  }
  52% {
    fill: #4fa582;
  }
}

/* Toes: soft mint idle → brighter meadow peak */
@keyframes boot-print-toe-ink {
  0%,
  100% {
    fill: #c5ebd8;
  }
  32% {
    fill: #63bd97;
  }
  52% {
    fill: #8fd4b0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.is-boot-splash:not(.is-landing-enter) .site-brand,
  html.is-boot-splash:not(.is-landing-enter) .hero-copy,
  html.is-landing-enter .site-brand,
  html.is-landing-enter .hero-copy {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .boot-splash {
    transition: opacity 0.2s ease;
  }

  .boot-slime-wrap {
    animation: none;
  }

  .boot-drips {
    display: none;
  }

  .boot-splash.is-visible .boot-print--1 svg,
  .boot-splash.is-visible .boot-print--2 svg,
  .boot-splash.is-visible .boot-print--3 svg,
  .boot-splash.is-visible .boot-print-pad,
  .boot-splash.is-visible .boot-print-toe {
    animation: none;
  }

  .boot-splash.is-visible .boot-print-pad {
    fill: #4fa582;
  }

  .boot-splash.is-visible .boot-print-toe {
    fill: #63bd97;
  }
}
