/* ==========================================================================
   Strait Media Group — Base
   Font-face, reset, paper background, focus, a11y helpers, utilities.
   ========================================================================== */

/* ---------- Self-hosted fonts (latin subset, Google Fonts v2) ----------- */

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/inter-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/newsreader-400-700-ital.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/newsreader-400-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Reset ------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* ---------- Document defaults ------------------------------------------ */

html, body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle warm paper texture — layered radial gradients, no image file */
body {
  background-color: var(--color-bg);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(20,20,20,0.018) 0.5px, transparent 1px),
    radial-gradient(circle at 70% 60%, rgba(20,20,20,0.014) 0.5px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(20,20,20,0.012) 0.5px, transparent 1px);
  background-size: 37px 37px, 53px 53px, 71px 71px;
  min-height: 100vh;
}

/* ---------- Focus treatment (from design system) ----------------------- */

:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-accent);
  border-radius: 2px;
}
button:focus { outline: none; }

/* ---------- Accessibility: skip link ----------------------------------- */

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-text);
  color: var(--color-bg);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  z-index: 100;
  transform: translateY(-200%);
  transition: transform var(--motion-fast) var(--ease-editorial);
}
.skip-link:focus-visible { transform: translateY(0); }

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

/* ---------- Reduced motion --------------------------------------------- */

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

/* ---------- Font utilities (from design system) ------------------------ */

.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }
.font-mono    { font-family: var(--font-mono); }

/* ---------- Minimal layout utilities (replaces Tailwind) --------------- */

.flex { display: flex; }
.grid { display: grid; }
.inline-flex { display: inline-flex; }
.block { display: block; }
.hidden { display: none; }

.items-baseline { align-items: baseline; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.gap-7 { gap: var(--space-7); }
.gap-8 { gap: var(--space-8); }

.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-7 { margin-top: var(--space-7); }
.mt-8 { margin-top: var(--space-8); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-7 { margin-bottom: var(--space-7); }
.mb-8 { margin-bottom: var(--space-8); }

.text-muted { color: var(--color-text-muted); }

/* ---------- Hairline rules (from design system) ------------------------ */

.hairline   { border-top: 1px solid var(--color-border); }
.hairline-b { border-bottom: 1px solid var(--color-border); }

/* ---------- Section & container ---------------------------------------- */

.smg-section {
  padding-top: var(--space-9);
  padding-bottom: var(--space-9);
}
.smg-container {
  max-width: 1440px;
  margin: 0 auto;
  padding-inline: var(--space-6);
}

/* ---------- Responsive breakpoints (375 / 768 / 1280 / 1440) ---------- */

@media (min-width: 768px) {
  .smg-container { padding-inline: var(--space-7); }
  .md\:inline { display: inline; }
  .md\:flex { display: flex; }
  .md\:block { display: block; }
  .md\:hidden { display: none; }
}
@media (max-width: 767.98px) {
  .smg-section {
    padding-top: var(--space-7);
    padding-bottom: var(--space-7);
  }
}

/* ---------- Eyebrow / kicker / section-num (shared labels) ------------ */

.eyebrow,
.kicker,
.section-num {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ---------- Section divider (double rule with monospace label) -------- */

.section-divider {
  border-top: 1px solid var(--color-text);
  position: relative;
}
.section-divider::before {
  content: "";
  display: block;
  height: 4px;
  border-bottom: 1px solid var(--color-text);
  margin-top: 2px;
}
.section-divider-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  padding-top: var(--space-4);
  padding-bottom: var(--space-5);
  flex-wrap: wrap;
}
