/* ============================================================
   base.css — typography, colors, resets
   Shared across all templates.
   ============================================================ */

/* Fonts: Source Serif 4, Poppins (loaded per-template HTML to avoid blocking) */

:root {
  --crimson: #FF0E4D;
  --crimson-dark: #E20B44;
  --ink: #1A1A1A;
  --ink-soft: #4A4A4A;
  --ink-faint: #8A8A8A;
  --line: rgba(26, 26, 26, 0.08);
  --cream: #FFFBF4;        /* warm off-white page background */
  --paper: #FFFCF8;         /* off-white card background */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.06);
  --max-article: 680px;
  --max-wide: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Kill blue tap highlight on iOS/Android */
a, button, [role="button"], input, textarea, select {
  -webkit-tap-highlight-color: transparent;
}

img, video {
  max-width: 100%;
  height: auto;
}

a { color: var(--crimson); }
a.unstyled { color: inherit; text-decoration: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Source Serif 4', Georgia, serif;
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }

button {
  font-family: inherit;
  cursor: pointer;
}

/* ----- Loading state visibility ----- */
[data-field]:empty::before {
  content: attr(data-field-fallback-text);
  color: transparent;
}

/* While variant is loading, hide the body to avoid placeholder flash */
body:not(.variant-loaded):not(.variant-load-failed) [data-field-hide-until-loaded] {
  visibility: hidden;
}
body.variant-loaded [data-field-hide-until-loaded] {
  visibility: visible;
}

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

/* ----- Brand kicker (italic Source Serif uppercase) ----- */
.kicker {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
