/* ═══════════════════════════════════════════════════════════════
   WONDER PLAY TOY STORE — Tech SaaS Modern
   Variables → Reset → Base → Layout → Components → Responsive
   ═══════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────────── */
:root {
  color-scheme: light;

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: rgba(79, 70, 229, 0.12);
  --button-bg: #4f46e5;
  --button-bg-hover: #4338ca;
  --tag-text: #4338ca;
  --secondary: #059669;
  --accent: #f59e0b;

  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --hero-grad: linear-gradient(180deg, #eef2ff 0%, var(--bg-primary) 100%);
  --tint: #eef2ff;

  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;

  --border-color: #e5e7eb;
  --border-color-hover: #d1d5db;

  --shadow-color: rgba(17, 24, 39, 0.08);
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.05);
  --shadow-md: 0 4px 12px var(--shadow-color);
  --shadow-lg: 0 10px 24px rgba(17, 24, 39, 0.12);

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 24px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;

  --primary: #818cf8;
  --primary-hover: #6366f1;
  --primary-soft: rgba(129, 140, 248, 0.16);
  --button-bg: #4f46e5;
  --button-bg-hover: #4338ca;
  --tag-text: #a5b4fc;

  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --bg-tertiary: #263244;
  --hero-grad: linear-gradient(180deg, #1f2937 0%, #111827 100%);
  --tint: rgba(99, 102, 241, 0.18);

  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-tertiary: #9ca3af;

  --border-color: #374151;
  --border-color-hover: #4b5563;

  --shadow-color: rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.5);
}

/* ── Reset & base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

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

ul { list-style: none; }
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; }

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 600; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 600; }
h3 { font-size: clamp(1.125rem, 2vw, 1.375rem); font-weight: 600; }

p { color: var(--text-secondary); font-size: clamp(1rem, 1.5vw, 1.125rem); }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -64px;
  z-index: 200;
  background: var(--primary);
  color: #ffffff;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: var(--space-1); }

/* ── Layout ────────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.section { padding: var(--space-8) 0; }
.section-alt { background: var(--bg-secondary); }
.section-alt p { color: var(--text-secondary); }

.section-head {
  max-width: 640px;
  margin: 0 auto var(--space-6);
  text-align: center;
}
.section-head h2 { margin-bottom: var(--space-2); }
.section-intro { font-size: clamp(1rem, 1.5vw, 1.125rem); }

.eyebrow {
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

/* ── Header & navigation ───────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border-color);
  box-shadow: var(--shadow-md);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: var(--space-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #ffffff;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-1) var(--space-1);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s var(--ease);
  position: relative;
}
.nav-link:hover { color: var(--text-primary); }
.nav-link.active { color: var(--primary); font-weight: 600; }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: var(--space-1);
  right: var(--space-1);
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

.mobile-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.mobile-nav-toggle .icon-close { display: none; }
.nav.is-open .mobile-nav-toggle .icon-close { display: block; }
.nav.is-open .mobile-nav-toggle .icon-open { display: none; }

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
  background: var(--hero-grad);
  padding: var(--space-8) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-6);
  align-items: center;
}

.hero-copy h1 { margin-bottom: var(--space-3); }
.hero-sub { font-size: clamp(1.0625rem, 1.8vw, 1.25rem); max-width: 34rem; margin-bottom: var(--space-4); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.hero-stats span { color: var(--text-secondary); font-size: 0.9375rem; }

.hero-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}
.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ── Buttons, chips, tags ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}

.btn-primary {
  background: var(--button-bg);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--button-bg-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-secondary:hover {
  background: var(--primary-soft);
  transform: translateY(-2px);
}

.chip {
  min-height: 44px;
  padding: 8px 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.chip:hover { border-color: var(--border-color-hover); color: var(--text-primary); }
.chip.is-active {
  background: var(--button-bg);
  border-color: var(--button-bg);
  color: #ffffff;
  font-weight: 600;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: var(--tint);
  color: var(--tag-text);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* ── Cards & grids ─────────────────────────────────────────────── */
.card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-color-hover);
}

.category-grid, .gift-grid, .value-grid, .blog-grid, .contact-grid { margin-bottom: 0; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.category-card { padding: var(--space-3); text-align: left; }
.cat-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--tint);
  font-size: 1.5rem;
  margin-bottom: var(--space-2);
}
.category-card h3, .category-card p { margin-bottom: 0; }
.category-card h3 { margin-bottom: var(--space-1); font-size: 1.0625rem; }
.category-card p { font-size: 0.9375rem; }

.gift-finder {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.gift-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
.gift-card { padding: var(--space-3); }
.gift-card h3 { font-size: 1.0625rem; margin-bottom: var(--space-1); }
.gift-card p { font-size: 0.9375rem; margin-bottom: var(--space-2); }
.gift-card[hidden] { display: none; }
.gift-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: var(--space-4);
  font-style: italic;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
.value-card, .contact-card { padding: var(--space-3); text-align: center; }
.value-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-2);
  border-radius: 50%;
  background: var(--tint);
  font-size: 1.75rem;
}
.value-card h3, .contact-card h3 { font-size: 1.0625rem; margin-bottom: var(--space-1); }
.value-card p, .contact-card p { font-size: 0.9375rem; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.blog-card { overflow: hidden; display: flex; flex-direction: column; }
.blog-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.blog-body { padding: var(--space-3); }
.blog-body-full {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-2);
}
.blog-body-full .tag { margin-top: auto; }
.blog-body h3 { font-size: 1.125rem; margin-bottom: var(--space-1); }
.blog-body p { font-size: 0.9375rem; margin-bottom: var(--space-2); }

/* ── About ─────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: center;
}
.about-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}
.about-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.contact-banner { margin-bottom: var(--space-6); }
.contact-banner img { aspect-ratio: 21 / 9; }
.about-copy h2 { margin-bottom: var(--space-3); }
.about-copy p { margin-bottom: var(--space-3); }
.value-list { margin: 0 0 var(--space-4); display: grid; gap: var(--space-2); }
.value-list li {
  color: var(--text-secondary);
  padding-left: var(--space-3);
  position: relative;
}
.value-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--secondary);
  font-weight: 700;
}

/* ── FAQ ───────────────────────────────────────────────────────── */
.container-narrow { max-width: 780px; }
.faq-list { display: grid; gap: var(--space-2); }
.faq-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.faq-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  width: 100%;
  min-height: 56px;
  padding: var(--space-2) var(--space-3);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  font-family: inherit;
}
.faq-chevron { flex-shrink: 0; color: var(--primary); transition: transform 0.25s var(--ease); }
.faq-toggle[aria-expanded="true"] .faq-chevron { transform: rotate(180deg); }
.faq-a { padding: 0 var(--space-3); }
.faq-a p { padding-bottom: var(--space-3); font-size: 0.9375rem; }

/* ── Footer ────────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-6) 0 var(--space-3);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: flex-start;
}
.footer-brand .brand { margin-bottom: var(--space-2); }
.footer-brand p { font-size: 0.9375rem; }
.footer-nav ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: var(--space-2) var(--space-6);
}
.footer-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  transition: color 0.2s var(--ease);
}
.footer-nav a:hover { color: var(--primary); }
.footer-bottom {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-color);
}
.footer-bottom p { font-size: 0.875rem; color: var(--text-secondary); }

/* ── Theme toggle ──────────────────────────────────────────────── */
.theme-toggle {
  position: fixed;
  right: var(--space-3);
  bottom: var(--space-3);
  z-index: 150;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.theme-toggle:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ── Reveal on scroll ──────────────────────────────────────────── */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ── Responsive: ≤1024px ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .hero-media img { aspect-ratio: 16 / 9; }

  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .gift-grid { grid-template-columns: repeat(2, 1fr); }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid .contact-card:last-child { grid-column: 1 / -1; }

  .about-grid { grid-template-columns: 1fr; gap: var(--space-4); }
}

/* ── Responsive: ≤768px ────────────────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 var(--space-2); }
  .section { padding: var(--space-6) 0; }
  .hero { padding: var(--space-6) 0; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-stats { gap: var(--space-4); }
  .contact-banner img { aspect-ratio: 16 / 9; }

  .mobile-nav-toggle { display: inline-flex; }

  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 90;
    height: 100dvh;
    width: min(78vw, 320px);
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
    padding: 96px var(--space-3) var(--space-3);
    background: var(--bg-primary);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform 0.3s var(--ease);
    overflow-y: auto;
  }
  .nav-menu.is-open { transform: translateX(0); }
  .nav-link {
    min-height: 48px;
    padding: var(--space-1) var(--space-2);
    font-size: 1rem;
    border-radius: var(--radius-md);
  }
  .nav-link.active::after { display: none; }
  .nav-link.active { background: var(--tint); }
  .nav-link:hover { background: var(--bg-secondary); }
  body.nav-open { overflow: hidden; }

  .category-grid { grid-template-columns: 1fr; }
  .gift-grid { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-grid .contact-card:last-child { grid-column: auto; }

  .footer-grid { flex-direction: column; }
  .footer-nav ul { grid-template-columns: repeat(2, 1fr); }
}

/* ── Reduced motion ────────────────────────────────────────────── */
@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;
  }
  .js .reveal { opacity: 1; transform: none; }
  .nav-menu { transition: none; }
}


/* Header nav spacing floor (normalizer): keep the brand and the
   menu separated when the flex container runs out of width. */
header nav, header nav > div { gap: 1rem; flex-wrap: wrap; }
@media (max-width: 1280px) { header nav ul { gap: 1rem; } }
