/**
 * assets/css/typography.css
 * Global typography rules for 9A Productions.
 * Relies on variables defined in variables.css.
 */

/* ── Base reset & global ───────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--type-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Headings ──────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
  letter-spacing: var(--tracking-tight);
}

/* Display / Hero headings use Bebas Neue */
.display,
.hero-headline,
h1.display {
  font-family: var(--font-display);
  font-size: var(--type-display);
  font-weight: var(--weight-regular); /* Bebas Neue has only one weight */
  letter-spacing: var(--tracking-normal);
  line-height: var(--leading-tight);
  text-transform: uppercase;
}

h1 { font-size: var(--type-h1); }
h2 { font-size: var(--type-h2); }
h3 { font-size: var(--type-h3); }
h4 { font-size: var(--type-h4); }
h5 { font-size: var(--type-body-lg); }
h6 { font-size: var(--type-body); }

/* ── Section headline with gold accent word ─────────────────────────────────── */
.headline-accent {
  font-family: var(--font-display);
  font-size: var(--type-h1);
  text-transform: uppercase;
  line-height: var(--leading-tight);
}

.headline-accent .accent {
  color: var(--color-accent-gold);
}

/* ── Body text ─────────────────────────────────────────────────────────────── */
p {
  font-size: var(--type-body);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

p.lead {
  font-size: var(--type-body-lg);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

p.small {
  font-size: var(--type-body-sm);
  color: var(--color-text-muted);
}

/* ── Section Label (eyebrow) ───────────────────────────────────────────────── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--type-label);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-accent-gold);
  margin-bottom: var(--space-4);
}

.section-label__bar {
  display: inline-block;
  width: 24px;
  height: 2px;
  background-color: var(--color-accent-gold);
  flex-shrink: 0;
}

/* ── Links ─────────────────────────────────────────────────────────────────── */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-normal) var(--ease-out);
}

a:hover {
  color: var(--color-accent-gold);
}

a:focus-visible {
  outline: 2px solid var(--color-accent-gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Lists ─────────────────────────────────────────────────────────────────── */
ul, ol {
  padding-left: 1.5em;
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

ul.unstyled,
ol.unstyled {
  list-style: none;
  padding: 0;
}

/* ── Blockquote ────────────────────────────────────────────────────────────── */
blockquote {
  border-left: 3px solid var(--color-accent-gold);
  padding-left: var(--space-6);
  margin: var(--space-8) 0;
  font-size: var(--type-body-lg);
  font-style: italic;
  color: var(--color-text-secondary);
}

/* ── Code ──────────────────────────────────────────────────────────────────── */
code, pre {
  font-family: 'Courier New', Courier, monospace;
  background: var(--color-bg-elevated);
  color: var(--color-accent-gold);
  border-radius: var(--radius-sm);
  padding: 0.2em 0.4em;
  font-size: 0.875em;
}

pre {
  padding: var(--space-6);
  overflow-x: auto;
}

/* ── HR ────────────────────────────────────────────────────────────────────── */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-12) 0;
}

/* ── Utility text classes ──────────────────────────────────────────────────── */
.text-gold    { color: var(--color-accent-gold); }
.text-muted   { color: var(--color-text-muted); }
.text-white   { color: var(--color-text-primary); }
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }
.text-upper   { text-transform: uppercase; letter-spacing: var(--tracking-wider); }
.text-nowrap  { white-space: nowrap; }

/* ── Entry content (Wysiwyg / post body) ───────────────────────────────────── */
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
}

.entry-content p {
  margin-bottom: var(--space-6);
  max-width: none;
}

.entry-content ul,
.entry-content ol {
  margin-bottom: var(--space-6);
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}
