/* ============================================================
   BASE — Global typography, body styles, and utility classes.
   No component or section-specific styles live here.
   ============================================================ */

/* ----------------------------------------------------------
   BODY
   ---------------------------------------------------------- */

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image: var(--texture-noise);
  background-repeat: repeat;
}

/* ----------------------------------------------------------
   SKIP LINK — keyboard navigation (accessibility)
   ---------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 9999;
  padding: var(--space-2) var(--space-4);
  background: var(--clay);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top var(--dur-fast) var(--ease-out-expo);
}

.skip-link:focus {
  top: var(--space-4);
}

/* ----------------------------------------------------------
   FOCUS VISIBLE — 2px clay outline, 4px offset (accessibility)
   ---------------------------------------------------------- */

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

/* ----------------------------------------------------------
   TYPOGRAPHY — Headings
   All headings use the display serif. Weight 400 by default;
   600 only when the design explicitly calls for it.
   ---------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ink);
}

h1 { font-size: var(--text-display);  line-height: 1.05; }
h2 { font-size: var(--text-h2);       line-height: 1.1;  }
h3 { font-size: var(--text-h3);       line-height: 1.2;  }

/* ----------------------------------------------------------
   TYPOGRAPHY — Body copy
   ---------------------------------------------------------- */

p {
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 65ch;
}

p + p {
  margin-top: var(--space-3);
}

/* ----------------------------------------------------------
   TYPOGRAPHY — Links
   Underline offset on all links; hover shifts to clay.
   Animated underline (scaleX) is handled per-component.
   ---------------------------------------------------------- */

a {
  color: var(--ink);
  text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease-out-expo);
}

a:hover {
  color: var(--clay);
}

/* ----------------------------------------------------------
   UTILITY — .italic-accent
   Applied to inline <em> or <span> inside any headline.
   The primary editorial signature of this design.
   ---------------------------------------------------------- */

.italic-accent {
  font-style: italic;
  color: var(--rose);
}

/* ----------------------------------------------------------
   UTILITY — .container
   Max-width wrapper. Use on every section's inner content.
   ---------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ----------------------------------------------------------
   UTILITY — .section
   Standard vertical padding for all page sections.
   ---------------------------------------------------------- */

.section {
  padding-block: var(--section-pad);
}

/* ----------------------------------------------------------
   UTILITY — .label
   Monospace uppercase micro-text. Used for eyebrows and
   metadata: "EST. 2015 · SHYMKENT", "08:30 / Morning circle"
   ---------------------------------------------------------- */

.label {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ----------------------------------------------------------
   UTILITY — .body-l
   Slightly larger body text for subtitles and pull quotes.
   ---------------------------------------------------------- */

.body-l {
  font-size: var(--text-body-l);
  line-height: 1.65;
}

/* ----------------------------------------------------------
   UTILITY — .visually-hidden
   Hides content visually while keeping it accessible to
   screen readers. Use for icon labels, sr-only headings, etc.
   ---------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----------------------------------------------------------
   UTILITY — .divider
   Thin horizontal line separator.
   ---------------------------------------------------------- */

.divider {
  height: 1px;
  background-color: var(--line);
  border: none;
  margin-block: var(--space-6);
}

/* ----------------------------------------------------------
   REDUCED MOTION — respect user preferences
   Collapses all durations to near-zero; disables scroll snap
   animation. Applied globally — no section-level overrides needed.
   ---------------------------------------------------------- */

@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;
  }
}
