/* ============================================================
   UTILITIES.CSS — Chedders AI
   Section spacing · Grids · Flex · Text helpers · Icon box ·
   Section header · Status badges · Fade animations
   ============================================================ */

/* ---- Section padding ---- */
.section-padding     { padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
.section-padding-sm  { padding-top: var(--space-xl);  padding-bottom: var(--space-xl);  }
.section-padding-lg  { padding-top: 112px;            padding-bottom: 112px;            }

/* ---- Content widths ---- */
.content-width {
  max-width: 1320px;
  width: 100%;
  padding-left: 24px;
  padding-right: 24px;
  overflow: hidden;
}

.content-narrow { max-width: 680px; margin-left: auto; margin-right: auto; }
.content-medium { max-width: 860px; margin-left: auto; margin-right: auto; }

/* ---- Flex helpers ---- */
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-start   { display: flex; align-items: center; justify-content: flex-start; }

/* ---- Responsive grids ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ---- Backgrounds ---- */
.bg-surface   { background-color: var(--surface);   }
.bg-surface-2 { background-color: var(--surface-2); }

/* ---- Section label (V3: 11px, tracking 0.12em) ---- */
.section-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

/* ---- Section header block ---- */
.section-header          { margin-bottom: 56px; }
.section-header--center  { text-align: center; }

.section-title {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.2;
}

.section-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 520px;
}

.section-header--center .section-desc {
  margin-left: auto;
  margin-right: auto;
}

/* ---- Icon box (V3 §7.6) ---- */
.icon-box {
  width: 44px;
  height: 44px;
  background-color: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 18px;
  flex-shrink: 0;
  margin-bottom: var(--space-md);
}

/* ---- Status dot ---- */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background-color: var(--live);
  flex-shrink: 0;
}

.status-dot--pulse {
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1;   transform: scale(1);   }
  50%       { opacity: 0.5; transform: scale(0.85); }
}

/* ---- Pill eyebrow ---- */
.pill-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* ---- Accent badge ---- */
.accent-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

/* ---- Accessibility ---- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- Fade animation (V3 §9 — 0.4s, stagger-group class) ---- */
.fade-in-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

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

/* Stagger delays — 75ms increments (V3 §9) */
.stagger-group .fade-in-up:nth-child(1) { transition-delay:   0ms; }
.stagger-group .fade-in-up:nth-child(2) { transition-delay:  75ms; }
.stagger-group .fade-in-up:nth-child(3) { transition-delay: 150ms; }
.stagger-group .fade-in-up:nth-child(4) { transition-delay: 225ms; }
.stagger-group .fade-in-up:nth-child(5) { transition-delay: 300ms; }
.stagger-group .fade-in-up:nth-child(6) { transition-delay: 375ms; }

/* Hero entrance */
.hero-entrance {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.hero-entrance.is-visible {
  opacity: 1;
  transform: translateY(0);
}
