/* Woddlepop: base styles */

:root {
  /* Surfaces */
  --bg: #fffaf3;
  --surface: #ffffff;
  --surface-soft: #fff3e4;
  --border: #f1e4d3;

  /* Ink */
  --ink: #2b2748;
  --ink-muted: #5d5878;

  /* Brand */
  --grape: #5b3fd1;
  --grape-dark: #4630a8;
  --grape-tint: #ece7ff;
  --sun: #ffcf4a;
  --sun-tint: #fff4cc;
  --bubblegum: #ff7aa8;
  --bubblegum-tint: #ffe4ee;
  --mint: #4fd1a5;
  --mint-tint: #ddf8ee;
  --sky: #5cb8ff;
  --sky-tint: #e0f1ff;
  --tangerine: #ff9f45;
  --tangerine-tint: #ffead6;

  /* Shape */
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 32px;
  --shadow-sm: 0 2px 6px rgba(43, 39, 72, 0.06);
  --shadow: 0 10px 30px rgba(43, 39, 72, 0.08);
  --shadow-lg: 0 20px 50px rgba(43, 39, 72, 0.12);

  /* Type */
  --font-display: "Fredoka", "Baloo 2", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1160px;
  --gutter: 20px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }

a { color: var(--grape); }

:focus-visible {
  outline: 3px solid var(--grape);
  outline-offset: 3px;
  border-radius: 8px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 14px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--grape);
  color: #fff;
  box-shadow: 0 6px 0 var(--grape-dark);
}
.btn-primary:hover { background: var(--grape-dark); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--grape-dark); }
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--grape); }
.btn-small {
  font-size: 0.95rem;
  padding: 10px 16px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 250, 243, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
}
.logo svg { width: 38px; height: 38px; }
.logo span em { font-style: normal; color: var(--bubblegum); }

.nav-list {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}
.nav-list a:hover { background: var(--grape-tint); color: var(--grape-dark); }

.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--grape); }
.icon-btn svg { width: 22px; height: 22px; }
.cart-count {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--bubblegum);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.menu-toggle { display: none; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 80px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 48px;
}
.eyebrow {
  display: inline-block;
  background: var(--sun-tint);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
}
.hero h1 .pop { color: var(--grape); }
.hero-sub {
  font-size: 1.2rem;
  color: var(--ink-muted);
  max-width: 34ch;
  margin-bottom: 28px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-art { position: relative; }
.hero-art svg { width: 100%; height: auto; }
.hero-blob {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(2px);
}
.hero-blob.one { width: 340px; height: 340px; background: var(--bubblegum-tint); top: -80px; right: -100px; }
.hero-blob.two { width: 240px; height: 240px; background: var(--mint-tint); bottom: -60px; left: -80px; }

.float { animation: float 5s ease-in-out infinite; transform-origin: center; }
.float-slow { animation: float 7s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Sections */
.section { padding: 72px 0; }
.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 40px;
}
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.section-head p { color: var(--ink-muted); margin: 0; }

/* Categories */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.category-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  height: 100%;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.category-card h3 { font-size: 1.3rem; margin: 6px 0 0; }
.category-card p { color: var(--ink-muted); font-size: 0.97rem; margin: 0; }
.category-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
}
.category-icon svg { width: 38px; height: 38px; }
.tint-grape { background: var(--grape-tint); }
.tint-sun { background: var(--sun-tint); }
.tint-pink { background: var(--bubblegum-tint); }
.tint-mint { background: var(--mint-tint); }
.tint-sky { background: var(--sky-tint); }
.tint-tangerine { background: var(--tangerine-tint); }

/* Products */
.products { background: var(--surface-soft); border-radius: var(--radius-lg); margin: 0 12px; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-cover {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  padding: 18px;
}
.product-cover svg { width: 100%; height: 100%; }
.product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  padding: 18px 20px 20px;
}
.product-body h3 { font-size: 1.2rem; margin: 0; }
.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
}
.tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--grape-tint);
  color: var(--grape-dark);
}
.tag.alt { background: var(--mint-tint); color: #1d6b51; }
.product-foot {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
}
.section-cta { text-align: center; margin-top: 40px; }

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.step {
  position: relative;
  text-align: center;
  padding: 32px 24px 28px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.step-num {
  position: absolute;
  top: -18px; left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--sun);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: var(--shadow-sm);
}
.step svg { width: 96px; height: 96px; margin: 8px auto 14px; }
.step h3 { font-size: 1.35rem; }
.step p { color: var(--ink-muted); margin: 0; }

/* Trust strip */
.trust {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 36px 28px;
}
.trust-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.trust-item { display: flex; align-items: flex-start; gap: 14px; }
.trust-item svg { flex: none; width: 44px; height: 44px; }
.trust-item h3 { font-size: 1.1rem; margin: 0 0 2px; }
.trust-item p { margin: 0; font-size: 0.95rem; color: #d9d6ee; }

/* Newsletter */
.newsletter-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 32px;
  padding: 48px;
  border-radius: var(--radius-lg);
  background: var(--grape-tint);
}
.newsletter-card h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.newsletter-card p { color: var(--ink-muted); }
.newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.newsletter-form label { font-weight: 800; }
.input-row { display: flex; gap: 10px; }
.input-row input {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 14px 18px;
  border-radius: 999px;
  border: 2px solid #cfc6f5;
  background: var(--surface);
  color: var(--ink);
}
.input-row input::placeholder { color: #75708f; }
.input-row input:focus-visible { border-color: var(--grape); outline-offset: 2px; }
.form-note { font-size: 0.85rem; color: var(--ink-muted); margin: 0; }
.form-status { font-weight: 700; color: #1d6b51; min-height: 1.5em; margin: 0; }

/* Footer */
.site-footer {
  margin-top: 72px;
  padding: 56px 0 28px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}
.footer-brand p { color: var(--ink-muted); max-width: 30ch; margin-top: 12px; }
.footer-col h2 { font-size: 1.05rem; margin-bottom: 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-col a { color: var(--ink-muted); text-decoration: none; }
.footer-col a:hover { color: var(--grape); text-decoration: underline; }
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.footer-bottom p { margin: 0; }

/* Responsive */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-art { max-width: 420px; margin: 0 auto; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-list { grid-template-columns: repeat(2, 1fr); }
  .newsletter-card { grid-template-columns: 1fr; padding: 36px 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .menu-toggle { display: inline-grid; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 12px var(--gutter) 18px;
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; }
  .nav-list a { padding: 12px 14px; }
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .section { padding: 56px 0; }
  .hero { padding: 40px 0 56px; }
  .products { margin: 0; border-radius: 0; }
}

@media (max-width: 520px) {
  .logo { font-size: 1.4rem; }
  .category-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .category-card { padding: 18px; }
  .category-card p { display: none; }
  .product-grid { grid-template-columns: 1fr; }
  .trust-list { grid-template-columns: 1fr; }
  .input-row { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-ctas .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn:hover,
  .category-card:hover,
  .product-card:hover { transform: none; }
}
