/* ════════════════════════════════════════════════════════════
   BABY CORP — Design System & Base Styles
   Mobile-first responsive design
   ════════════════════════════════════════════════════════════ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* Colors */
  --color-primary: #2C4A92;
  --color-primary-dark: #1A2F6B;
  --color-primary-light: #3D5FB8;
  --color-sky: #7FC8FF;
  --color-sky-light: #B8E0FF;
  --color-white: #FFFFFF;
  --color-light: #F2F6FF;
  --color-light-alt: #EDF3FF;
  --color-gray: #F8FAFF;
  --color-gold: #F6C453;
  --color-gold-dark: #D4A43A;
  --color-seal: #E74C3C;
  --color-seal-dark: #C0392B;
  --color-dark: #1A2744;
  --color-dark-alt: #0F1A2E;
  --color-text: #23324D;
  --color-text-light: #6B7A99;
  --color-text-muted: #94A3C0;
  --color-success: #2ECC71;
  --color-border: rgba(44, 74, 146, 0.12);

  /* Gradients */
  --gradient-hero: linear-gradient(180deg, #2C4A92 0%, #4A6BC5 40%, #7FC8FF 100%);
  --gradient-sky: linear-gradient(180deg, #7FC8FF 0%, #B8E0FF 50%, #F2F6FF 100%);
  --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(242,246,255,0.9) 100%);
  --gradient-dark: linear-gradient(180deg, #1A2744 0%, #0F1A2E 100%);
  --gradient-gold: linear-gradient(135deg, #F6C453 0%, #E8B445 50%, #D4A43A 100%);
  --gradient-seal: linear-gradient(135deg, #E74C3C 0%, #C0392B 100%);

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-blur: blur(16px);
  --glass-bg-dark: rgba(26, 39, 68, 0.85);
  --glass-border-dark: rgba(127, 200, 255, 0.15);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(44, 74, 146, 0.06);
  --shadow-md: 0 8px 24px rgba(44, 74, 146, 0.10);
  --shadow-lg: 0 16px 48px rgba(44, 74, 146, 0.14);
  --shadow-xl: 0 24px 64px rgba(44, 74, 146, 0.18);
  --shadow-gold: 0 4px 16px rgba(246, 196, 83, 0.3);
  --shadow-seal: 0 4px 16px rgba(231, 76, 60, 0.3);
  --shadow-inset: inset 0 2px 4px rgba(44, 74, 146, 0.06);

  /* Typography */
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Courier New', monospace;

  /* Font Sizes (mobile-first) */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index scale */
  --z-base: 1;
  --z-dropdown: 10;
  --z-sticky: 20;
  --z-overlay: 30;
  --z-modal: 40;
  --z-loader: 50;
  --z-toast: 60;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  outline: none;
  -webkit-appearance: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  -webkit-appearance: none;
}

ul, ol {
  list-style: none;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-dark);
}

h1 { font-size: var(--text-3xl); font-weight: 900; }
h2 { font-size: var(--text-2xl); font-weight: 800; }
h3 { font-size: var(--text-xl); font-weight: 700; }
h4 { font-size: var(--text-lg); font-weight: 600; }

p {
  line-height: 1.7;
  color: var(--color-text);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-light {
  color: var(--color-text-light);
}

.text-accent {
  color: var(--color-gold);
}

.text-center {
  text-align: center;
}

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.label {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-primary);
}

.stamp-text {
  font-family: var(--font-heading);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--color-seal);
  border: 3px solid var(--color-seal);
  padding: var(--space-2) var(--space-4);
  transform: rotate(-8deg);
  display: inline-block;
  letter-spacing: 0.1em;
  opacity: 0.85;
}

/* ── Layout ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

section {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--space-12) var(--space-4);
  position: relative;
  overflow: hidden;
}

/* ── Card System ──────────────────────────────────────────── */
.card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-gold);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.card-dark {
  background: var(--glass-bg-dark);
  border-color: var(--glass-border-dark);
  color: var(--color-white);
}

.card-dark h1,
.card-dark h2,
.card-dark h3,
.card-dark h4,
.card-dark p {
  color: var(--color-white);
}

.card-plain {
  background: var(--color-white);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--color-border);
}

.card-plain::before {
  display: none;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-base);
  text-align: center;
  transition: all var(--transition-base);
  min-height: 48px;
  min-width: 48px;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:active::after {
  opacity: 1;
}

.btn-primary {
  background: var(--gradient-gold);
  color: var(--color-dark);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(246, 196, 83, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

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

.btn-secondary:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-danger {
  background: var(--gradient-seal);
  color: var(--color-white);
  box-shadow: var(--shadow-seal);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-light);
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: var(--space-2) var(--space-4);
}

.btn-ghost:hover {
  color: var(--color-primary);
}

.btn-lg {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-lg);
  border-radius: var(--radius-lg);
}

.btn-full {
  width: 100%;
}

.btn-icon {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: var(--radius-full);
}

/* ── Form Elements ────────────────────────────────────────── */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-input,
.form-select {
  width: 100%;
  padding: var(--space-4);
  background: var(--color-light);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  color: var(--color-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  min-height: 48px;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(44, 74, 146, 0.12);
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%236B7A99'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* ── Dividers ─────────────────────────────────────────────── */
.divider {
  width: 60px;
  height: 3px;
  background: var(--gradient-gold);
  border-radius: var(--radius-full);
  margin: var(--space-4) auto;
}

.divider-wide {
  width: 100%;
  height: 1px;
  background: var(--color-border);
  margin: var(--space-6) 0;
}

/* ── Badge ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  background: var(--color-light);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge-gold {
  background: rgba(246, 196, 83, 0.15);
  color: var(--color-gold-dark);
}

.badge-seal {
  background: rgba(231, 76, 60, 0.12);
  color: var(--color-seal);
}

/* ── Scroll Animations (base states) ─────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children */
.stagger > *:nth-child(1) { transition-delay: 0ms; }
.stagger > *:nth-child(2) { transition-delay: 100ms; }
.stagger > *:nth-child(3) { transition-delay: 200ms; }
.stagger > *:nth-child(4) { transition-delay: 300ms; }
.stagger > *:nth-child(5) { transition-delay: 400ms; }
.stagger > *:nth-child(6) { transition-delay: 500ms; }

/* ── Utility ──────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.no-select {
  user-select: none;
  -webkit-user-select: none;
}

.overflow-hidden {
  overflow: hidden;
}

/* ── Responsive ───────────────────────────────────────────── */

/* Tablet */
@media (min-width: 768px) {
  :root {
    --text-3xl: 2.5rem;
    --text-4xl: 3rem;
    --text-5xl: 3.5rem;
  }

  .container {
    max-width: 700px;
    padding: 0 var(--space-6);
  }

  section {
    padding: var(--space-16) var(--space-6);
  }

  .card {
    padding: var(--space-10);
  }
}

/* Desktop */
@media (min-width: 1024px) {
  :root {
    --text-3xl: 3rem;
    --text-4xl: 3.5rem;
    --text-5xl: 4rem;
  }

  .container {
    max-width: 900px;
    padding: 0 var(--space-8);
  }

  section {
    padding: var(--space-20) var(--space-8);
  }

  .card {
    padding: var(--space-12);
  }
}
