/* base.css — Wandering With Pride */
/* Modern CSS reset, typography, focus, and motion preferences */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Syne:wght@400;500;600;700;800&family=Source+Serif+4:ital,opsz,wght@0,8..60,300..600;1,8..60,300..600&family=JetBrains+Mono:wght@400;500&display=swap');

@layer base {

  /* ===========================
     CSS RESET — modern, minimal
     =========================== */

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

  html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
  }

  body {
    min-height: 100vh;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }

  img,
  video,
  svg {
    display: block;
    max-width: 100%;
  }

  input,
  button,
  textarea,
  select {
    font: inherit;
  }

  p,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    overflow-wrap: break-word;
  }

  /* ===========================
     TYPOGRAPHY BASE
     =========================== */

  body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.65;
    color: var(--ink);
    background-color: var(--cream);
  }

  /* DM Serif Display — editorial headers */
  h1 {
    font-family: var(--font-display);
    font-size: var(--text-5xl);
    line-height: 1.0;
    letter-spacing: -0.03em;
    font-weight: 400;
  }

  h2 {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-weight: 400;
  }

  /* Syne — UI headings, best at 700+ */
  h3 {
    font-family: var(--font-ui);
    font-size: var(--text-2xl);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.01em;
  }

  h4,
  h5,
  h6 {
    font-family: var(--font-ui);
    font-weight: 600;
    line-height: 1.3;
  }

  /* Source Serif 4 — generous line height for readability */
  p {
    line-height: 1.75;
    max-width: 66ch;
  }

  strong {
    font-weight: 600;
  }

  /* Source Serif 4 italic is excellent — use it */
  em,
  i {
    font-style: italic;
  }

  a {
    color: var(--saffron);
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  a:hover {
    color: var(--saffron-dark);
  }

  small {
    font-size: var(--text-sm);
    font-family: var(--font-ui);
  }

  /* JetBrains Mono */
  code,
  pre {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
  }

  /* Syne utility class — uppercase label / eyebrow text */
  .eyebrow {
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--text-secondary);
  }

  /* ===========================
     FOCUS STYLES — never remove
     =========================== */

  :focus-visible {
    outline: 2px solid var(--saffron);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
  }

  /* ===========================
     SELECTION
     =========================== */

  ::selection {
    background: var(--saffron);
    color: var(--ink);
  }

}

/* ===========================
   PREFERS-REDUCED-MOTION
   (outside @layer — must be
   respected at highest priority)
   =========================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
