/* Leo — landing page
   Colors and fonts follow the app's Theme.swift (Palette, Fredoka + Nunito). */

:root {
  --ink: #2B1A12;
  --body-muted: #6E5C4C;
  --orange: #F57C1F;
  --orange-dark: #C85A0C;
  --blue: #3B82E0;
  --teal: #7FD3C9;
  --cream: #F6F2EC;
  --cream-warm: #FFF6E5;
  --sky-top: #CDEEE0;
  --sky-bottom: #EAF7F0;
  --hill-back: #AEDD93;
  --hill-front: #98D17F;
  --hairline: #E3D6C6;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
img { max-width: 100%; }
body {
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  font-weight: 600;
  background: var(--cream);
  color: var(--ink);
}
a { text-decoration: none; color: inherit; }

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header / logo */
.site-header {
  padding: 22px 24px;
  display: flex;
  justify-content: center;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  height: 48px; width: 48px;
  border-radius: 12px;
  display: block;
}
.brand-word {
  font-family: 'Fredoka', sans-serif;
  font-size: 32px;
  font-weight: 600;
}

/* Main panel */
.main-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 40px 56px;
}

/* Hero: copy beside Leo on desktop, stacked below ~900px. */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  width: 100%;
  max-width: 1140px;
}
.hero-copy { flex: 0 1 500px; min-width: 0; }
.hero-title {
  margin: 0;
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(36px, 4.2vw, 56px);
  line-height: 1.08;
  font-weight: 600;
  text-wrap: balance;
}
.hero-accent { color: var(--orange); }
.hero-sub {
  margin: 18px 0 0;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--body-muted);
  max-width: 44ch;
}

/* Three tilted tiles, like "Here's how it works" in onboarding */
.tiles {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.tile {
  font-family: 'Fredoka', sans-serif;
  font-size: 17px;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 16px;
  border: 2.5px solid var(--ink);
  box-shadow: 0 3px 0 var(--ink);
}
.tile-orange { background: var(--orange); transform: rotate(-2deg); }
.tile-teal   { background: var(--teal);   transform: rotate(1.5deg); }
.tile-blue   { background: var(--blue);   color: #fff; transform: rotate(-1deg); }

.hero-cta {
  margin-top: 34px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.store-badge img { display: block; height: 60px; width: auto; }
.store-badge.is-soon { opacity: 0.45; filter: grayscale(1); }
.soon-note {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-dark);
}

/* Leo on his hill */
.scene {
  position: relative;
  flex: 0 0 auto;
  width: 420px;
  aspect-ratio: 4 / 5;
  border-radius: 36px;
  overflow: hidden;
  background: linear-gradient(var(--sky-top), var(--sky-bottom));
  border: 3px solid var(--ink);
  box-shadow: 0 6px 0 var(--ink);
}
.hill {
  position: absolute;
  left: -20%;
  width: 140%;
  border-radius: 50% 50% 0 0;
}
.hill-back  { bottom: 0; height: 34%; background: var(--hill-back); left: -40%; }
.hill-front { bottom: -6%; height: 26%; background: var(--hill-front); }
.leo {
  position: absolute;
  left: 50%;
  bottom: 9%;
  height: 78%;
  width: auto;
  max-width: none;
  transform: translateX(-50%);
  transform-origin: bottom center;
  animation: hop 2.4s ease-in-out infinite;
}
@keyframes hop {
  0%, 70%, 100% { transform: translateX(-50%) translateY(0); }
  80% { transform: translateX(-50%) translateY(-6%); }
  90% { transform: translateX(-50%) translateY(0) scaleY(0.97); }
}
@media (prefers-reduced-motion: reduce) {
  .leo { animation: none; }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--body-muted);
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--orange-dark); }

/* Stacked layout */
@media (max-width: 900px) {
  .main-panel { padding: 16px 16px 40px; }
  .hero { flex-direction: column-reverse; gap: 32px; text-align: center; }
  .hero-copy { flex-basis: auto; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .tiles, .hero-cta { justify-content: center; }
  .scene { width: min(340px, 100%); }
  .site-footer { justify-content: center; text-align: center; }
}
