/* ============================================================
   LUSTRE JOURNAL — Base Typography & Design System
   Editorial publication. Vogue-coded.
   ============================================================ */

:root {
  /* Color palette — cream + ink + burnished copper */
  --cream: #F5F1EA;
  --cream-deep: #EFE9DD;
  --ink: #0F0F0F;
  --ink-soft: #2B2B2B;
  --ink-muted: #57514A;        /* darkened from #6B645C for AA contrast on cream */
  --ink-faint: #ADA597;
  --rule: #D9D2C5;
  --copper: #94552A;            /* slightly deeper than #A0683C for AA contrast */
  --copper-deep: #6E3F1C;
  --burgundy: #5C1F2B;
  --highlight: #FFF8EC;

  /* Typography */
  --serif-display: 'GFS Didot', 'Didot', 'Bodoni Moda', 'Playfair Display', Georgia, serif;
  --serif-body: 'Source Serif 4', 'Source Serif Pro', 'Tiempos Text', 'Charter', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', 'Helvetica Neue', system-ui, -apple-system, sans-serif;

  /* Spacing scale */
  --gutter: 1.5rem;
  --measure: 38rem;       /* article body width */
  --measure-wide: 56rem;  /* hero/wide content */
  --measure-full: 78rem;  /* page max */

  /* Vertical rhythm */
  --leading: 1.75;
  --leading-tight: 1.2;
  --leading-display: 1.05;
}

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

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

@media (max-width: 720px) {
  html { font-size: 17px; }
}

body {
  font-family: var(--serif-body);
  font-size: 1.125rem;
  line-height: var(--leading);
  color: var(--ink);
  background: var(--cream);
  font-feature-settings: "lnum", "kern", "liga";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ============== HEADINGS ============== */

h1, h2, h3, h4, h5 {
  font-family: var(--serif-display);
  font-weight: 400;
  line-height: var(--leading-display);
  color: var(--ink);
  letter-spacing: -0.005em;
}

h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); margin: 0 0 1.2rem; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin: 3.5rem 0 1.2rem; line-height: 1.15; }
h3 { font-size: 1.45rem; margin: 2.4rem 0 0.8rem; line-height: 1.25; }
h4 { font-size: 1.15rem; margin: 1.8rem 0 0.6rem; }

/* ============== BODY TEXT ============== */

p {
  margin: 0 0 1.4rem;
  font-size: 1.125rem;
  line-height: var(--leading);
  color: var(--ink-soft);
}

article p {
  font-size: 1.18rem;
  line-height: 1.78;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--copper);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
  color: var(--copper);
  text-decoration-color: var(--copper-deep);
  text-decoration-thickness: 2px;
}

strong, b { font-weight: 600; color: var(--ink); }
em, i { font-style: italic; }

/* Highlighter: tasteful, multi-line-safe.
   Looks like a copper marker passed under the lower 40% of the text. */
mark {
  background-color: transparent;
  background-image: linear-gradient(180deg, transparent 58%, rgba(148, 85, 42, 0.18) 58%, rgba(148, 85, 42, 0.18) 92%, transparent 92%);
  color: var(--ink);
  padding: 0 0.04em;
  font-weight: inherit;
}

mark strong, mark b { font-weight: 700; }

/* ============== UTILITY ============== */

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper);
  display: inline-block;
}

.byline {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.dropcap::first-letter {
  font-family: var(--serif-display);
  font-size: 5.4em;
  line-height: 0.86;
  float: left;
  margin: 0.08em 0.12em -0.05em 0;
  color: var(--ink);
  font-weight: 400;
}

.measure {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--gutter);
}

.measure-wide {
  max-width: var(--measure-wide);
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--gutter);
}

.measure-full {
  max-width: var(--measure-full);
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--gutter);
}

hr.rule {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 3rem 0;
}

hr.rule-thick {
  border: 0;
  height: 2px;
  background: var(--ink);
  margin: 2rem 0;
  max-width: 60px;
}

/* ============== IMAGES ============== */

/* Belt-and-suspenders: clamp any horizontal overflow at the body level */
html, body { overflow-x: clip; max-width: 100vw; }

img { max-width: 100%; height: auto; display: block; }

figure {
  margin: 2.5rem 0;
}

figure.figure-wide {
  margin-left: calc(-1 * (var(--measure-wide) - var(--measure)) / 2);
  margin-right: calc(-1 * (var(--measure-wide) - var(--measure)) / 2);
  max-width: var(--measure-wide);
}

/* Below ~56rem viewport, figure-wide negative margins overflow.
   Reset across all sub-1024px viewports. */
@media (max-width: 1024px) {
  figure.figure-wide {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }
}

figure img {
  width: 100%;
}

figcaption {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-top: 0.65rem;
  line-height: 1.5;
  font-style: italic;
  letter-spacing: 0.01em;
}

figcaption strong {
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: var(--ink);
  margin-right: 0.4em;
  font-weight: 600;
}

/* ============== PULL QUOTES ============== */

blockquote.pullquote {
  font-family: var(--serif-display);
  font-size: clamp(1.4rem, 2.8vw, 2.05rem);
  line-height: 1.32;
  color: var(--ink);
  text-align: center;
  margin: 3.5rem auto;
  max-width: 30rem;
  padding: 2rem 1rem;
  position: relative;
}

blockquote.pullquote::before,
blockquote.pullquote::after {
  content: '';
  display: block;
  width: 36px;
  height: 1px;
  background: var(--copper);
  margin: 0 auto;
}

blockquote.pullquote::before { margin-bottom: 1.6rem; }
blockquote.pullquote::after { margin-top: 1.6rem; }

blockquote.pullquote cite {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-style: normal;
  display: block;
  margin-top: 1.2rem;
}

/* ============== BUTTONS / CTAS ============== */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.95rem 1.75rem;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn:hover {
  background: var(--copper-deep);
  border-color: var(--copper-deep);
  color: var(--cream);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--cream);
}

/* Inline editorial link → underlined, not button */
.inline-cta {
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--copper);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

.inline-cta:hover {
  color: var(--copper-deep);
}

/* ============== LISTS ============== */

ul, ol {
  margin: 0 0 1.4rem 1.5rem;
  padding: 0;
}

li {
  margin-bottom: 0.7rem;
  line-height: 1.7;
}

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

/* ============== TABLES ============== */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-family: var(--sans);
  font-size: 0.92rem;
}

th, td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

th {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
}

/* ============== ACCESSIBILITY ============== */

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

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}
