/* ============================================
   Tiny Tastes — Landing Page
   Design: Warm nursery meets modern product
   ============================================ */

:root {
  --teal: hsl(185, 60%, 38%);
  --teal-light: hsl(185, 60%, 95%);
  --teal-mid: hsl(185, 40%, 88%);
  --teal-dark: hsl(185, 65%, 28%);
  --amber: hsl(35, 85%, 58%);
  --amber-light: hsl(35, 85%, 95%);
  --mint: hsl(155, 45%, 93%);
  --mint-mid: hsl(155, 35%, 86%);
  --bg: hsl(195, 25%, 97%);
  --fg: hsl(220, 15%, 18%);
  --fg-muted: hsl(220, 10%, 50%);
  --white: #ffffff;
  --border: hsl(195, 20%, 88%);
  --radius: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.75rem;
  --shadow-soft: 0 2px 16px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ---- Reset & Base ---- */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ---- Utilities ---- */

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); border: 0;
}

/* ---- Animated Background ---- */

.hero-bg {
  position: relative;
  overflow: hidden;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(ellipse 60% 50% at 20% 30%, hsla(185, 60%, 80%, 0.35), transparent),
    radial-gradient(ellipse 50% 60% at 75% 60%, hsla(35, 85%, 80%, 0.25), transparent),
    radial-gradient(ellipse 70% 50% at 50% 10%, hsla(155, 45%, 80%, 0.3), transparent);
  animation: drift 20s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}

@keyframes drift {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); }
  50% { transform: translate(2%, -3%) rotate(1deg) scale(1.02); }
  100% { transform: translate(-1%, 2%) rotate(-0.5deg) scale(1.01); }
}

/* ---- Grain Overlay ---- */

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Navigation ---- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  background: hsla(195, 25%, 97%, 0.8);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--fg);
}

.nav-logo svg {
  color: var(--teal);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-muted);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--fg); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--teal);
  color: var(--white);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
}

.nav-cta:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .nav-links { display: none; }
}

/* ---- Hero ---- */

.hero {
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: var(--teal-light);
  color: var(--teal);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid var(--teal-mid);
}

.hero-badge svg {
  width: 16px;
  height: 16px;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 em {
  font-style: normal;
  color: var(--teal);
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--fg-muted);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.store-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: var(--fg);
  color: var(--white);
  border-radius: var(--radius);
  transition: transform 0.15s, box-shadow 0.2s;
  min-width: 180px;
}

.store-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.store-btn svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.store-btn-text {
  text-align: left;
}

.store-btn-label {
  font-size: 0.625rem;
  font-weight: 500;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.store-btn-name {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
}

/* ---- Phone Mockup ---- */

.phone-mockup {
  max-width: 320px;
  margin: 3rem auto 0;
  position: relative;
}

.phone-frame {
  background: var(--fg);
  border-radius: 2.5rem;
  padding: 0.75rem;
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.15),
    0 8px 24px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.phone-screen {
  background: var(--white);
  border-radius: 2rem;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.phone-screen-content {
  text-align: center;
}

.phone-screen-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
}

.phone-screen h3 {
  font-size: 1.125rem;
  font-weight: 800;
  margin-bottom: 0.375rem;
}

.phone-screen p {
  font-size: 0.75rem;
  color: var(--fg-muted);
}

.phone-notch {
  width: 35%;
  height: 1.5rem;
  background: var(--fg);
  border-radius: 0 0 1rem 1rem;
  position: absolute;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

/* ---- Features ---- */

.features {
  padding: 5rem 0;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section-sub {
  font-size: 1.0625rem;
  color: var(--fg-muted);
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.fi-teal { background: hsla(185, 60%, 38%, 0.1); color: var(--teal); }
.fi-amber { background: hsla(35, 85%, 58%, 0.1); color: var(--amber); }
.fi-mint { background: hsla(155, 45%, 48%, 0.1); color: hsl(155, 45%, 38%); }
.fi-blue { background: hsla(210, 70%, 58%, 0.1); color: hsl(210, 70%, 48%); }
.fi-purple { background: hsla(270, 50%, 60%, 0.1); color: hsl(270, 50%, 50%); }
.fi-rose { background: hsla(350, 70%, 58%, 0.1); color: hsl(350, 70%, 48%); }

.feature-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ---- QR Section ---- */

.qr-section {
  padding: 4rem 0;
}

.qr-card {
  background: linear-gradient(135deg, var(--teal-light), var(--mint), var(--amber-light));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 3rem;
  display: flex;
  align-items: center;
  gap: 3rem;
  overflow: hidden;
  position: relative;
}

.qr-card::after {
  content: '';
  position: absolute;
  right: -5%;
  top: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: hsla(185, 60%, 38%, 0.06);
  pointer-events: none;
}

.qr-text {
  flex: 1;
  position: relative;
  z-index: 1;
}

.qr-text h2 {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.qr-text p {
  font-size: 1rem;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 400px;
}

.qr-code {
  width: 160px;
  height: 160px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.qr-code canvas,
.qr-code svg {
  width: 100% !important;
  height: 100% !important;
}

@media (max-width: 640px) {
  .qr-card {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
    gap: 2rem;
  }
  .qr-text p { margin: 0 auto; }
}

/* ---- Footer ---- */

.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
}

.footer-brand svg { color: var(--teal); }

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--fg-muted);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--fg); }

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ---- Animations ---- */

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* ---- Legal Pages ---- */

.legal {
  padding: 3rem 0 5rem;
  max-width: 720px;
  margin: 0 auto;
}

.legal h1 {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.legal .updated {
  font-size: 0.875rem;
  color: var(--fg-muted);
  margin-bottom: 2.5rem;
}

.legal h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal p, .legal li {
  font-size: 0.9375rem;
  color: var(--fg-muted);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.legal ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal li { margin-bottom: 0.375rem; }

.legal a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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