/* ===== Second2Mom Design System — Warm Heritage ===== */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

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

:root {
  /* Core Palette — pulled from the Second2Mom logo */
  --ivory: #FDF7F5;           /* softest blush-white background */
  --cream: #F5E3DC;           /* warm cream with pink undertone */
  --blush: #EDD0C8;           /* true soft blush pink */
  --gold: #C07840;            /* warm amber — logo outfit tones */
  --gold-hover: #A56030;
  --gold-light: rgba(192,120,64,0.12);
  --gold-border: rgba(192,120,64,0.25);
  --navy: #5C2E22;            /* warm espresso brown — replaces cold navy */
  --navy-mid: #7A4035;        /* medium warm brown */
  --forest: #8B6E5A;          /* warm caramel-brown — replaces forest green */
  --text: #2C1A14;            /* very dark warm brown */
  --muted: #9A7060;           /* warm muted brown-rose */
  --white: #ffffff;
  --border: rgba(92,46,34,0.08);
  --border-warm: rgba(192,120,64,0.18);

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(92,46,34,0.06);
  --shadow-md: 0 4px 16px rgba(92,46,34,0.09);
  --shadow-lg: 0 12px 40px rgba(92,46,34,0.12);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 100px;

  /* Legacy aliases — keeps pages that use old variable names working */
  --warm: var(--ivory);
  --peach: var(--gold);
  --coral: var(--gold);
  --deep: var(--navy);
  --teal: var(--forest);
  --sage: var(--blush);
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--ivory);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Typography helpers */
.serif { font-family: 'Cormorant Garamond', serif; }
/* Legacy alias */
.syne { font-family: 'Cormorant Garamond', serif; }

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 24px;
  background: rgba(253,247,245,0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-warm);
  transition: all 0.3s ease;
}

.nav.scrolled {
  box-shadow: var(--shadow-sm);
  background: rgba(253,247,245,0.97);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 28%;
  flex-shrink: 0;
  max-width: none;
  background: var(--cream);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

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

.nav-cta {
  background: var(--navy) !important;
  color: white !important;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  transition: all 0.2s ease !important;
  letter-spacing: 0.01em !important;
}

.nav-cta:hover {
  background: var(--navy-mid) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm) !important;
}

/* ===== Page Layout ===== */
.page-content {
  padding-top: 80px;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-header {
  padding: 60px 0 40px;
  text-align: center;
}

.page-header .section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.page-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin-bottom: 16px;
}

.page-header p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Section Label ===== */
.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  letter-spacing: 0.01em;
}

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

.btn-primary:hover {
  background: var(--navy-mid);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid rgba(92,46,34,0.25);
}

.btn-secondary:hover {
  border-color: var(--navy);
  background: rgba(92,46,34,0.04);
}

.btn-gold {
  background: var(--gold);
  color: white;
}

.btn-gold:hover {
  background: var(--gold-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Legacy alias */
.btn-teal {
  background: var(--forest);
  color: white;
}

.btn-teal:hover {
  background: #7A5E4A;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 9px 20px;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 16px 40px;
  font-size: 0.95rem;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== Cards ===== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.25s ease;
}

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

.card-body {
  padding: 28px;
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.form-label .optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.78rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid rgba(92,46,34,0.14);
  border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.93rem;
  color: var(--text);
  background: var(--white);
  transition: all 0.2s ease;
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(192,120,64,0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(122,115,130,0.55);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  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 fill='%239A7060' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  accent-color: var(--navy);
  cursor: pointer;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 6px;
}

.form-error {
  font-size: 0.78rem;
  color: #c0392b;
  margin-top: 6px;
}

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.badge-teal {
  background: rgba(139,110,90,0.12);
  color: var(--forest);
}

.badge-peach {
  background: var(--gold-light);
  color: var(--gold-hover);
}

.badge-coral {
  background: var(--gold-light);
  color: var(--gold);
}

.badge-sage {
  background: var(--blush);
  color: var(--navy);
}

.badge-verified {
  background: rgba(139,110,90,0.12);
  color: var(--forest);
}

.badge-verified::before {
  content: '\2713';
  font-weight: 800;
}

/* ===== Tags ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--cream);
  color: var(--navy);
  border: 1px solid var(--border-warm);
}

/* ===== Alerts ===== */
.alert {
  padding: 16px 24px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 24px;
}

.alert-success {
  background: rgba(139,110,90,0.08);
  color: #7A5040;
  border: 1px solid rgba(139,110,90,0.2);
}

.alert-error {
  background: rgba(192,57,43,0.07);
  color: #a0321f;
  border: 1px solid rgba(192,57,43,0.18);
}

.alert-info {
  background: rgba(92,46,34,0.05);
  color: var(--navy);
  border: 1px solid var(--border);
}

/* ===== Empty States ===== */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}

.empty-state .icon {
  font-size: 2.8rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.93rem;
  color: var(--muted);
  max-width: 400px;
  margin: 0 auto;
}

/* ===== Loading ===== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 2.5px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Footer ===== */
.site-footer {
  padding: 56px 24px;
  background: var(--navy);
  text-align: center;
  margin-top: 80px;
}

.footer-brand {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: white;
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.01em;
}

.footer-links a:hover {
  color: rgba(255,255,255,0.85);
}

.site-footer p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
}

/* Gold rule divider */
.footer-rule {
  width: 40px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 24px;
  opacity: 0.5;
}

/* ===== Milestone Timeline ===== */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: var(--gold-border);
}

.timeline-item {
  position: relative;
  padding-bottom: 32px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -32px;
  top: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ivory);
  border: 2.5px solid var(--gold);
  z-index: 1;
}

.timeline-dot.physical { border-color: #C0392B; }
.timeline-dot.cognitive { border-color: var(--forest); }
.timeline-dot.social { border-color: var(--gold); }
.timeline-dot.language { border-color: var(--navy); }

.timeline-date {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}

.timeline-title {
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ===== Grid Layouts ===== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ===== Stats ===== */
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  text-align: center;
}

.stat-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .nav-links {
    gap: 16px;
  }
  .nav-links a:not(.nav-cta) {
    display: none;
  }
  .page-header {
    padding: 40px 0 24px;
  }
}

@media (max-width: 480px) {
  .nav {
    padding: 14px 16px;
  }
  .container {
    padding: 0 16px;
  }
  .card-body {
    padding: 20px;
  }
}

/* ===== Transitions ===== */
.fade-in {
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Toast Notifications ===== */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
  max-width: 400px;
}

.toast-success {
  background: var(--navy);
  color: white;
}

.toast-error {
  background: #c0392b;
  color: white;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===== Dashboard Sidebar ===== */
.dashboard-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  padding: 32px 0;
}

.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 16px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--cream);
  color: var(--navy);
}

.main-content {
  min-width: 0;
}

@media (max-width: 900px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
}

/* ===== Category Colors ===== */
.cat-physical { color: #C0392B; }
.cat-cognitive { color: var(--forest); }
.cat-social { color: var(--gold); }
.cat-language { color: var(--navy); }

.cat-bg-physical { background: rgba(192,57,43,0.08); }
.cat-bg-cognitive { background: rgba(139,110,90,0.08); }
.cat-bg-social { background: var(--gold-light); }
.cat-bg-language { background: rgba(92,46,34,0.06); }

/* ===== Ornamental divider ===== */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 48px 0;
  opacity: 0.4;
}

.ornament::before,
.ornament::after {
  content: '';
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: var(--gold);
}

.ornament-symbol {
  font-size: 1.1rem;
  color: var(--gold);
}
