/* ══════════════════════════════════════════
   base.css — Reset, utilities & helpers
   ══════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border-color: var(--border); }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--background); color: var(--foreground); line-height: 1.6; min-height: 100vh; }
body.mobile-menu-open { overflow: hidden; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); line-height: 1.3; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
ul { list-style: none; }

/* ── Layout utilities ── */
.container { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }
.container-narrow { max-width: 64rem; margin: 0 auto; }
.section-padding { padding: 4rem 1rem; }
@media (min-width: 640px) { .section-padding { padding: 5rem 1.5rem; } }
@media (min-width: 1024px) { .section-padding { padding: 6rem 2rem; } }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.hidden { display: none !important; }
.relative { position: relative; }
.absolute { position: absolute; }
.w-full { width: 100%; }
.min-h-screen { min-height: 100vh; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }

/* ── Grid ── */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
.grid-5 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ── Typography ── */
.font-heading { font-family: var(--font-heading); }
.font-mono { font-family: monospace; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-4xl { font-size: 2.25rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.025em; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.75; }
.line-through { text-decoration: line-through; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-pre-line { white-space: pre-line; }

/* ── Color utilities ── */
.text-gold { color: var(--gold); }
.text-gold-light { color: var(--gold-light); }
.text-muted { color: var(--muted-foreground); }
.text-primary-fg { color: var(--primary-foreground); }
.text-destructive { color: var(--destructive); }
.bg-background { background: var(--background); }
.bg-card { background: var(--card); }
.bg-navy { background: var(--navy); }
.bg-navy-light { background: var(--navy-light); }
.bg-cream { background: var(--cream); }
.bg-cream-dark { background: var(--cream-dark); }
.bg-secondary { background: var(--secondary); }

/* ── Spacing ── */
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-auto { margin-left: auto; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* ── SVG Icons (Lucide-compatible) ── */
.icon-svg { width: 1.25rem; height: 1.25rem; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; fill: none; flex-shrink: 0; }
.icon-sm { width: 1rem; height: 1rem; }
.icon-lg { width: 2rem; height: 2rem; }
.icon-xl { width: 2.5rem; height: 2.5rem; }
.icon-3xl { width: 3rem; height: 3rem; }

/* ── Max widths ── */
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-5xl { max-width: 64rem; }

/* ── Misc utilities ── */
.shrink-0 { flex-shrink: 0; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.aspect-video { aspect-ratio: 16/9; }
.cursor-pointer { cursor: pointer; }
.transition-colors { transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
.transition-all { transition: all 0.3s; }
.opacity-0 { opacity: 0; }
.divide-y > * + * { border-top: 1px solid var(--border); }

/* ── Mobile overrides ── */
@media (max-width: 767px) {
  .container { padding: 0 1rem; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .fade-in-delay-1,
  .fade-in-delay-2,
  .fade-in-delay-3 {
    animation: none;
    opacity: 1;
  }
  .mobile-toggle,
  .btn,
  .card,
  .editorial-card {
    transition: none;
  }
}
