/* Soul Beans landing — tokens from src/constants/theme.ts */

:root {
  --color-primary: #58cc02;
  --color-primary-dark: #46a302;
  --color-primary-light: #89e219;
  --color-primary-soft: #eaf8e0;
  --color-amber: #ff9600;
  --color-amber-soft: #fff1e0;
  --color-accent: #1cb0f6;
  --color-text: #1f2937;
  --color-text-secondary: #6b7280;
  --color-text-tertiary: #9ca3af;
  --color-background: #ffffff;
  --color-background-soft: #f7f7f7;
  --color-border: #e5e5e5;
  --font-display: 'Baloo 2', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;
  --max-width: 720px;
  --badge-height: 48px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-background);
}

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

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--color-primary-dark);
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 3rem 1.5rem 4rem;
  background:
    radial-gradient(ellipse 80% 60% at 70% 30%, rgba(255, 150, 0, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 20% 80%, rgba(88, 204, 2, 0.22) 0%, transparent 50%),
    linear-gradient(165deg, #eaf8e0 0%, #ffffff 45%, #fff1e0 100%);
}

.hero__atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero__bean {
  position: absolute;
  width: min(42vw, 280px);
  top: 8%;
  right: 4%;
  opacity: 0.9;
  animation: float-bean 7s ease-in-out infinite;
}

.hero__pet {
  position: absolute;
  width: min(36vw, 220px);
  bottom: 6%;
  left: 2%;
  opacity: 0.85;
  animation: float-pet 8s ease-in-out infinite;
}

@media (max-width: 640px) {
  .hero__bean {
    width: 28vw;
    top: 4%;
    right: 2%;
    opacity: 0.55;
  }

  .hero__pet {
    width: 26vw;
    bottom: 3%;
    left: 0;
    opacity: 0.5;
  }
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  width: 100%;
  text-align: center;
}

.hero__brand {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.75rem, 10vw, 4.5rem);
  line-height: 1.05;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  opacity: 0;
  animation: fade-up 0.8s ease forwards 0.1s;
}

.hero__subtitle {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 3.5vw, 1.5rem);
  color: var(--color-text);
  opacity: 0;
  animation: fade-up 0.8s ease forwards 0.25s;
}

.hero__support {
  margin: 0 auto 2rem;
  max-width: 34rem;
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  opacity: 0;
  animation: fade-up 0.8s ease forwards 0.4s;
}

/* —— Store badges —— */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
  opacity: 0;
  animation: fade-up 0.8s ease forwards 0.55s;
}

.store-badges--footer {
  opacity: 1;
  animation: none;
  margin: 2.5rem 0 0;
}

.store-badge {
  display: inline-flex;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.store-badge:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.store-badge img {
  height: var(--badge-height);
  width: auto;
}

/* Google Play badge has more padding in the PNG — match visual height */
.store-badge--play img {
  height: calc(var(--badge-height) + 18px);
  margin: -9px 0;
}

/* —— Features —— */
.features {
  padding: 3.5rem 1.5rem 2rem;
  background: var(--color-background);
}

.features__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.feature {
  padding: 2rem 0;
  border-bottom: 1px solid var(--color-border);
}

.feature:last-of-type {
  border-bottom: none;
}

.feature__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--color-text);
}

.feature__list {
  margin: 0;
  padding: 0 0 0 1.15rem;
  color: var(--color-text-secondary);
}

.feature__list li {
  margin-bottom: 0.45rem;
}

.feature__list li:last-child {
  margin-bottom: 0;
}

.feature__list--nested {
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

.cta-band {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 0 3rem;
  text-align: center;
}

.cta-band__label {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--color-text);
}

/* —— Footer —— */
.site-footer {
  padding: 2.5rem 1.5rem 3rem;
  background: var(--color-background-soft);
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin-bottom: 1.25rem;
}

.site-footer__links a {
  font-weight: 600;
  text-decoration: none;
}

.site-footer__links a:hover {
  text-decoration: underline;
}

.site-footer__wellness {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: var(--color-text-tertiary);
  line-height: 1.5;
}

.site-footer__meta {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.site-footer__meta a {
  color: inherit;
}

/* —— Install bar —— */
.install-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: var(--color-background);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -8px 24px rgba(31, 41, 55, 0.08);
  animation: slide-up 0.4s ease;
}

.install-bar[hidden] {
  display: none;
}

.install-bar__icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.install-bar__copy {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.install-bar__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--color-text);
}

.install-bar__sub {
  margin: 0.1rem 0 0;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

.install-bar__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.25rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: var(--color-primary);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  flex-shrink: 0;
}

.install-bar__cta:hover {
  background: var(--color-primary-dark);
  color: #ffffff;
}

.install-bar__close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--color-text-tertiary);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.25rem;
  cursor: pointer;
  flex-shrink: 0;
}

.install-bar__close:hover {
  color: var(--color-text);
}

body.has-install-bar .site-footer {
  padding-bottom: calc(3rem + 5.5rem + env(safe-area-inset-bottom, 0px));
}

/* —— Motion —— */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-bean {
  0%,
  100% {
    transform: translateY(0) rotate(-6deg);
  }
  50% {
    transform: translateY(-18px) rotate(4deg);
  }
}

@keyframes float-pet {
  0%,
  100% {
    transform: translateY(0) rotate(4deg);
  }
  50% {
    transform: translateY(-14px) rotate(-3deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__brand,
  .hero__subtitle,
  .hero__support,
  .store-badges {
    opacity: 1;
    animation: none;
  }

  .hero__bean,
  .hero__pet,
  .install-bar {
    animation: none;
  }

  .store-badge {
    transition: none;
  }
}
