:root {
  --parchment: #F4EFE6;
  --parchment-light: #FFFCF6;
  --sage: #D4E0CF;
  --sage-deep: #B8C9B0;
  --primary: #5B7B98;
  --primary-dark: #4A6A87;
  --accent: #C5934A;
  --accent-dark: #A87A36;
  --ink: #2C3E37;
  --muted: #6B7A72;
  --hairline: rgba(44, 62, 55, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--parchment);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Paper-grain texture, subtle multiply overlay matching the iOS app's parchment.
   Inline SVG noise at low opacity — performant, no asset request. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.17 0 0 0 0 0.24 0 0 0 0 0.21 0 0 0 0.18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  mix-blend-mode: multiply;
  opacity: 0.55;
}

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  position: relative;
  z-index: 1;
}

/* Wordmark — drop icon + Puddle, matching iOS top bar */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4rem;
  letter-spacing: -0.025em;
}

.logo-drop {
  width: 1.1rem;
  height: 1.1rem;
  fill: var(--primary);
  flex-shrink: 0;
}

/* Hero — staggered entrance */
.hero {
  margin-bottom: 7rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
}

@media (min-width: 760px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.5rem;
  }
}

.hero-shot {
  display: flex;
  justify-content: center;
  position: relative;
}

/* Soft sage radial glow behind the phone shot */
.hero-shot::before {
  content: '';
  position: absolute;
  inset: -10% -10%;
  background: radial-gradient(circle at center, var(--sage) 0%, transparent 65%);
  filter: blur(40px);
  opacity: 0.7;
  z-index: 0;
  pointer-events: none;
}

.hero-shot img {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 2.5rem;
  box-shadow:
    0 30px 80px -20px rgba(44, 62, 55, 0.28),
    0 12px 32px -8px rgba(44, 62, 55, 0.18),
    0 0 0 1px rgba(44, 62, 55, 0.04);
  position: relative;
  z-index: 1;
  transform: rotate(-1.5deg);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.hero-shot img:hover {
  transform: rotate(0deg) translateY(-4px);
}

@media (min-width: 760px) {
  .hero-shot img {
    max-width: 100%;
  }
}

h1 {
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.tagline {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 540px;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.tagline strong {
  color: var(--ink);
  font-weight: 600;
}

.cta {
  margin-top: 2rem;
}

.app-store-link,
.coming-soon {
  display: inline-block;
  padding: 1rem 1.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  font-family: 'Nunito', system-ui, sans-serif;
  letter-spacing: -0.01em;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.3, 1),
              background 0.18s ease,
              box-shadow 0.18s ease;
}

.app-store-link {
  background: var(--primary);
  color: var(--parchment-light);
  box-shadow: 0 4px 16px -4px rgba(74, 106, 135, 0.4);
}

.app-store-link:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -6px rgba(74, 106, 135, 0.45);
}

.coming-soon {
  background: var(--sage);
  color: var(--ink);
  box-shadow: 0 4px 16px -4px rgba(44, 62, 55, 0.15);
  white-space: nowrap;
}

.coming-soon:hover {
  background: var(--sage-deep);
  transform: translateY(-2px);
}

/* Section divider — single small pawprint motif */
.section-divider {
  display: flex;
  justify-content: center;
  margin: 0 auto 4rem;
  opacity: 0.35;
}

.section-divider svg {
  width: 26px;
  height: 26px;
  fill: var(--sage-deep);
}

/* Features */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 6rem;
}

@media (min-width: 640px) {
  .features {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem 2.5rem;
  }

  .pricing-feature {
    grid-column: 1 / -1;
    padding: 2.5rem;
    background: var(--parchment-light);
    border: 1px solid var(--hairline);
    border-radius: 1.75rem;
    text-align: center;
    box-shadow: 0 1px 0 rgba(255, 252, 246, 0.7), 0 1px 2px rgba(44, 62, 55, 0.04);
  }
}

.feature h2 {
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.022em;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
}

.feature p {
  color: var(--muted);
  font-size: 1rem;
}

.pricing-feature h2 {
  font-size: 2rem;
  color: var(--ink);
}

.pricing-feature p {
  font-size: 1.15rem;
  max-width: 480px;
  margin: 0 auto;
}

.pricing-feature strong {
  color: var(--accent-dark);
  font-weight: 700;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 6rem;
}

@media (min-width: 640px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.gallery figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.gallery img {
  width: 100%;
  max-width: 260px;
  height: auto;
  border-radius: 1.75rem;
  box-shadow:
    0 16px 48px -12px rgba(44, 62, 55, 0.22),
    0 4px 16px -4px rgba(44, 62, 55, 0.12),
    0 0 0 1px rgba(44, 62, 55, 0.04);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.gallery figure:hover img {
  transform: translateY(-6px);
}

.gallery figcaption {
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 1.05rem;
  color: var(--primary-dark);
  font-weight: 700;
  letter-spacing: -0.015em;
  text-align: center;
}

/* Footer */
footer {
  border-top: 1px solid var(--hairline);
  padding-top: 2rem;
  text-align: center;
  color: var(--muted);
}

footer nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

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

.copyright {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Legal pages */
.legal-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  position: relative;
  z-index: 1;
}

.legal-page h1 {
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 0.5rem;
}

.legal-page .updated {
  color: var(--muted);
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
  font-style: italic;
}

.legal-page h2 {
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.022em;
  color: var(--primary-dark);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.legal-page p, .legal-page ul {
  color: var(--ink);
  margin-bottom: 1rem;
}

.legal-page ul {
  padding-left: 1.5rem;
}

.legal-page li {
  margin-bottom: 0.5rem;
}

.legal-page a {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.legal-page a:hover {
  color: var(--accent-dark);
}

.legal-page .back {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.legal-page .back:hover {
  color: var(--primary-dark);
}

/* Entrance animation — staggered fade-up on hero load */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fade-up 0.7s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.fade-up.delay-1 { animation-delay: 0.1s; }
.fade-up.delay-2 { animation-delay: 0.2s; }
.fade-up.delay-3 { animation-delay: 0.3s; }
.fade-up.delay-4 { animation-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .fade-up,
  .hero-shot img,
  .gallery figure:hover img,
  .app-store-link:hover,
  .coming-soon:hover {
    animation: none;
    transform: none;
    transition: none;
  }
}
