:root {
  --cream: #FFF8EC;
  --peach: #FFD6B8;
  --deep-peach: #FFB088;
  --mint: #C7E9D2;
  --deep-mint: #7FC8A0;
  --lavender: #D6CFFF;
  --rose: #F9C5D0;
  --brown: #8B6F47;
  --deep-brown: #5C4533;
  --soft-brown: #A89072;
  --yellow: #FFE49C;
  --coral: #FF8B73;
  --sky: #C5E4F4;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(180deg, var(--sky) 0%, var(--cream) 45%, var(--peach) 100%);
  color: var(--deep-brown);
  min-height: 100%;
}

body { min-height: 100vh; }

.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 24px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

/* Sky stars - scattered sparkles in the upper viewport */
.sky-stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60%;
  z-index: 0;
  pointer-events: none;
}

.sky-stars .twinkle-a,
.sky-stars .twinkle-b {
  transform-origin: center;
  animation: star-twinkle 3s ease-in-out infinite;
}
.sky-stars .twinkle-b { animation-delay: 1.5s; }

@keyframes star-twinkle {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 1; }
}


.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 520px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-icon {
  margin: 0 0 18px;
  width: clamp(180px, 38vw, 240px);
  height: clamp(180px, 38vw, 240px);
  border: 4px solid var(--brown);
  border-radius: 28%; /* iOS-style squircle */
  box-shadow: 5px 5px 0 var(--brown);
  overflow: hidden;
  background: var(--cream);
  animation: icon-bob 3.4s ease-in-out infinite;
}

.hero-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes icon-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Scattered sky clouds - dispersed across the upper half */
.scene-cloud {
  position: fixed;
  height: auto;
  z-index: 0;
  pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(139, 111, 71, 0.1));
  animation: cloud-drift 9s ease-in-out infinite;
}

.scene-cloud-1 { top: 6%;  left: 22%; width: clamp(160px, 22vw, 280px); animation-delay: 0s; }
.scene-cloud-2 { top: 14%; right: 8%; width: clamp(180px, 24vw, 320px); animation-delay: 1.2s; animation-duration: 11s; }
.scene-cloud-3 { top: 28%; left: 6%;  width: clamp(140px, 18vw, 240px); animation-delay: 2.4s; animation-duration: 10s; }
.scene-cloud-4 { top: 3%;  left: 52%; width: clamp(110px, 14vw, 180px); animation-delay: 0.6s; animation-duration: 12s; }
.scene-cloud-5 { top: 36%; right: 26%; width: clamp(130px, 16vw, 220px); animation-delay: 3s; animation-duration: 9.5s; }
.scene-cloud-6 { top: 22%; left: 38%; width: clamp(100px, 12vw, 160px); animation-delay: 1.8s; animation-duration: 13s; }

@keyframes cloud-drift {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(10px); }
}

/* Land / rolling hills behind bottom corners */
.scene-land {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: clamp(220px, 28vw, 380px);
  z-index: 0;
  pointer-events: none;
}

/* Corner characters — positioned in the four corners of the viewport */
.corner {
  position: fixed;
  width: clamp(200px, 32vw, 420px);
  height: auto;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(2px 4px 6px rgba(139, 111, 71, 0.25));
  animation: corner-float 4s ease-in-out infinite;
}

.corner-tl { top: 0;    left: 0; }
.corner-tr { top: 0;    right: 0; animation-delay: 0.6s; }
.corner-bl { bottom: 0; left: 0; animation-delay: 1.2s; }
.corner-br { bottom: 0; right: 0; animation-delay: 1.8s; }

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

@media (max-width: 640px) {
  .corner { width: clamp(120px, 36vw, 200px); }
}

.hero-title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 800;
  font-size: clamp(40px, 8vw, 64px);
  color: var(--deep-brown);
  margin: 8px 0 4px;
  line-height: 1;
  text-shadow: 3px 3px 0 #FFF;
  letter-spacing: -0.5px;
}

.hero-tagline {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(16px, 2.4vw, 20px);
  color: var(--coral);
  margin: 0 0 22px;
  letter-spacing: 0.5px;
}

.hero-pitch {
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: clamp(15px, 2vw, 18px);
  color: var(--brown);
  line-height: 1.5;
  max-width: 440px;
  margin: 0 0 32px;
}

.store-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 36px;
}

.store-btn {
  display: inline-block;
  transition: transform 0.15s ease, filter 0.15s ease;
  border-radius: 12px;
}

.store-btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.store-btn:active { transform: translateY(0); }

.store-btn img {
  height: 56px;
  width: auto;
  display: block;
}

.footer {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--brown);
  opacity: 0.8;
  position: relative;
  z-index: 2;
}

.footer a {
  color: var(--brown);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.15s;
}
.footer a:hover { border-bottom-color: var(--brown); }
.footer .dot { margin: 0 8px; opacity: 0.5; }

@media (max-width: 480px) {
  /* Only lock the landing page (which has .hero) — legal pages must scroll */
  body:has(.hero) {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }
  .hero {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    padding: 0 18px;
    justify-content: center;
  }
  .hero-icon {
    width: clamp(120px, 32vw, 180px);
    height: clamp(120px, 32vw, 180px);
    margin: 0 0 10px;
  }
  .hero-title { font-size: clamp(32px, 8vw, 44px); }
  .hero-tagline { margin-bottom: 12px; }
  .hero-pitch { margin-bottom: 18px; font-size: 14px; }
  .store-row { margin-bottom: 14px; gap: 10px; }
  .store-btn img { height: 44px; }
}

/* ============ LEGAL PAGES (privacy.html, terms.html) ============ */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  font-family: 'Nunito', sans-serif;
  color: var(--brown);
  position: relative;
  z-index: 2;
}

.legal-back {
  display: inline-block;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--deep-brown);
  background: #FFF;
  border: 2.5px solid var(--brown);
  border-radius: 999px;
  padding: 7px 14px;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--brown);
  margin-bottom: 28px;
  transition: transform 0.1s, box-shadow 0.1s;
}
.legal-back:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--brown); }
.legal-back:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--brown); }

.legal-header {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px dashed var(--soft-brown);
}

.legal-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 10px;
}

.legal-title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 5vw, 40px);
  color: var(--deep-brown);
  margin: 0 0 6px;
  line-height: 1.1;
  text-shadow: 2px 2px 0 #FFF;
}

.legal-effective {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--coral);
  margin: 0;
  letter-spacing: 0.5px;
}

.legal-section {
  background: rgba(255, 255, 255, 0.6);
  border: 2.5px solid var(--brown);
  border-radius: 16px;
  padding: 16px 18px;
  margin: 16px 0;
  box-shadow: 3px 3px 0 var(--brown);
}

.legal-h2 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 800;
  font-size: 12px;
  color: var(--deep-brown);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0 0 10px;
}

.legal-p {
  font-family: 'Nunito', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.6;
  color: var(--brown);
  margin: 0 0 10px;
}
.legal-p:last-child { margin-bottom: 0; }
.legal-p strong { color: var(--deep-brown); font-weight: 800; }
.legal-p a {
  color: var(--coral);
  text-decoration: none;
  border-bottom: 1px dashed var(--coral);
}
.legal-p a:hover { border-bottom-style: solid; }

.legal-footer {
  margin-top: 36px;
  padding-top: 20px;
  text-align: center;
  border-top: 2px dashed var(--soft-brown);
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--brown);
  opacity: 0.85;
}
.legal-footer a {
  color: var(--brown);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.15s;
}
.legal-footer a:hover { border-bottom-color: var(--brown); }
.legal-footer .dot { margin: 0 8px; opacity: 0.5; }

@media (max-width: 480px) {
  .legal { padding: 20px 16px 48px; }
  .legal-section { padding: 14px 14px; }
}
