/* ---------- Tokens ---------- */
:root {
  --bg: #fbfaf7;
  --text: #1a1a18;
  --text-2: #55534e;
  --text-3: #86837c;
  --rule: #e2dfd8;

  --serif: "Literata", "PT Serif", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", "PT Sans", "Helvetica Neue", Arial, sans-serif;

  --measure: 700px;   /* text column */
  --wide: 1040px;     /* headline + photo */
  --gutter: 24px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

::selection { background: #e9e4d6; }

/* ---------- Site header ---------- */
.site-header {
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.masthead {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 24px;
  font-family: var(--sans);
  font-size: 14px;
}

.site-nav a {
  color: var(--text-2);
  text-decoration: none;
}

.site-nav a:hover { color: var(--text); }

/* ---------- Article header ---------- */
.article-header {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 72px var(--gutter) 0;
}

.kicker {
  margin: 0 0 20px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}

.headline {
  margin: 0;
  max-width: 20ch;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(38px, 6.2vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 72;
  text-wrap: balance;
}

.lead {
  margin: 28px 0 0;
  max-width: 36em;
  font-size: 21px;
  line-height: 1.5;
  color: var(--text-2);
}

.byline {
  margin: 28px 0 0;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-3);
}

.byline span:first-child { color: var(--text); }
.byline .sep { margin: 0 6px; }

/* ---------- Photo ---------- */
.article-photo {
  max-width: calc(860px + var(--gutter) * 2);
  margin: 48px auto 0;
  padding: 0 var(--gutter);
}

.article-photo img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  object-position: 50% 22%;
  background: #e8e5de;
}

.article-photo figcaption {
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-3);
}

/* ---------- Body ---------- */
.article-body {
  max-width: calc(var(--measure) + var(--gutter) * 2);
  margin: 64px auto 0;
  padding: 0 var(--gutter);
  hyphens: auto;
  -webkit-hyphens: auto;
}

.article-body p {
  margin: 0 0 1.35em;
}

.article-body .first::first-letter {
  float: left;
  margin: 0.08em 0.1em 0 0;
  font-size: 3.6em;
  line-height: 0.82;
  font-weight: 500;
}

.article-body h2 {
  margin: 2.4em 0 0.8em;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* Pull quote */
.pullquote {
  margin: 2.2em 0 2.2em;
  padding: 28px 0;
  border-top: 1px solid var(--text);
  border-bottom: 1px solid var(--rule);
}

.pullquote p {
  margin: 0;
  font-size: 30px;
  line-height: 1.3;
  font-style: italic;
  letter-spacing: -0.01em;
  hyphens: manual;
  -webkit-hyphens: manual;
}

/* Section break */
.section-break {
  width: 64px;
  margin: 3em auto;
  border: 0;
  border-top: 1px solid var(--text-3);
}

.section-break + h2 { margin-top: 0; }

/* End of article */
.article-end {
  max-width: calc(var(--measure) + var(--gutter) * 2);
  margin: 48px auto 0;
  padding: 0 var(--gutter);
}

.article-end p {
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-3);
}

.article-end a { color: var(--text-2); }

/* ---------- Site footer ---------- */
.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--rule);
}

.site-footer__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-3);
}

.site-footer p { margin: 0; }

.site-footer nav { display: flex; gap: 24px; }

.site-footer a {
  color: var(--text-2);
  text-decoration: none;
}

.site-footer a:hover,
.article-end a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  .article-header { padding-top: 56px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  :root { --gutter: 20px; }

  body { font-size: 18px; line-height: 1.68; }

  .site-header__inner { padding-top: 14px; padding-bottom: 14px; }
  .masthead { font-size: 18px; }
  .site-nav { gap: 18px; font-size: 13px; }

  .article-header { padding-top: 40px; }
  .kicker { margin-bottom: 14px; font-size: 12px; }
  .headline { font-size: 36px; line-height: 1.1; }
  .lead { margin-top: 20px; font-size: 19px; }
  .byline { margin-top: 20px; font-size: 13px; }

  /* photo runs edge to edge; caption keeps the gutter */
  .article-photo { margin-top: 32px; padding: 0; }
  .article-photo img { aspect-ratio: 4 / 5; object-position: 50% 20%; }
  .article-photo figcaption { padding: 0 var(--gutter); }

  .article-body { margin-top: 40px; }
  .article-body h2 { font-size: 23px; }
  .pullquote p { font-size: 24px; }
  .site-footer { margin-top: 72px; }
}
