@layer reset, base, layout, components;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body, h1, h2, h3, p, ol { margin: 0; }
  img { max-width: 100%; display: block; }
}

@layer base {
  :root {
    --paper: #ece8de;
    --paper-deep: #dfd8ca;
    --ink: #181916;
    --muted: #626359;
    --rule: #aaa99d;
    --accent: #2f5a46;
    --display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    --sans: "Aptos", "Segoe UI", Arial, sans-serif;
    --max: 76rem;
  }

  html { background: var(--paper); color: var(--ink); }
  body {
    min-height: 100vh;
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
  }
  a { color: inherit; text-underline-offset: .18em; }
  a:focus-visible { outline: .18rem solid var(--accent); outline-offset: .25rem; }
  ::selection { background: var(--accent); color: var(--paper); }
}

@layer layout {
  .site-header, main, .site-footer {
    width: min(calc(100% - 2rem), var(--max));
    margin-inline: auto;
  }

  .site-header {
    min-height: 6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--ink);
  }

  main > section { padding-block: clamp(4rem, 9vw, 8rem); }

  .masthead {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(17rem, .8fr);
    gap: 2rem;
    align-items: end;
    min-height: 38rem;
    border-bottom: 1px solid var(--ink);
  }

  .latest {
    display: grid;
    grid-template-columns: minmax(10rem, .65fr) minmax(0, 2.35fr);
    gap: clamp(2rem, 6vw, 7rem);
    border-bottom: 1px solid var(--ink);
  }

  .recent, .sections { border-bottom: 1px solid var(--ink); }
  .recent, .sections {
    display: grid;
    grid-template-columns: minmax(10rem, .65fr) minmax(0, 2.35fr);
    gap: clamp(2rem, 6vw, 7rem);
  }

  .section-grid { display: grid; grid-template-columns: repeat(3, 1fr); }

  .site-footer {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    padding-block: 2rem 4rem;
    font-size: .85rem;
  }

  @media (max-width: 48rem) {
    .site-header { align-items: stretch; flex-direction: column; justify-content: center; gap: .7rem; padding-block: 1rem; }
    .site-header nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; width: 100%; }
    .site-header nav a { min-width: 0; min-height: 2.75rem; display: grid; place-items: center; border-top: 1px solid var(--rule); }
    .masthead, .latest, .recent, .sections { grid-template-columns: minmax(0, 1fr); }
    .masthead { min-height: 31rem; align-content: end; }
    .latest-mark { width: 100%; display: grid; grid-template-columns: auto auto; }
    .latest-mark span:last-child { justify-self: end; }
    .section-grid { grid-template-columns: 1fr; }
    .site-footer { display: grid; }
  }
}

@layer components {
  .skip-link {
    position: fixed;
    left: 1rem;
    top: 1rem;
    z-index: 10;
    padding: .7rem 1rem;
    transform: translateY(-200%);
    background: var(--ink);
    color: var(--paper);
  }
  .skip-link:focus { transform: none; }

  .wordmark { font-weight: 800; letter-spacing: -.055em; text-decoration: none; font-size: 1.15rem; }
  .wordmark i { color: var(--accent); font-style: normal; }

  .site-header nav { display: flex; gap: clamp(1rem, 3vw, 2.4rem); font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; }
  .site-header nav a { text-decoration: none; }
  .site-header nav a:hover { color: var(--accent); }

  .eyebrow, .section-heading p, .post-kicker, .article-meta, .section-state {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .14em;
  }

  .masthead h1 {
    grid-column: 1;
    font-family: var(--display);
    font-size: clamp(3.8rem, 9vw, 8.4rem);
    line-height: .84;
    letter-spacing: -.065em;
    font-weight: 400;
    max-width: 11ch;
  }
  .masthead h1 em { color: var(--accent); font-weight: 400; }
  .masthead .eyebrow { grid-column: 1 / -1; align-self: start; }
  .dek { grid-column: 2; font-family: var(--display); font-size: clamp(1.2rem, 2vw, 1.55rem); line-height: 1.35; max-width: 28ch; }

  .latest-mark { display: flex; flex-direction: column; justify-content: space-between; min-height: 16rem; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; }
  .latest-mark span:first-child { font-family: var(--display); font-size: 4rem; color: var(--accent); letter-spacing: -.06em; }
  .article-meta { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; color: var(--muted); }
  .latest h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2.8rem, 6.3vw, 6.2rem); line-height: .97; letter-spacing: -.045em; margin-block: 1.3rem 1.7rem; }
  .latest h2 a { text-decoration: none; }
  .latest h2 a:hover { color: var(--accent); }
  .latest article > p { max-width: 55ch; font-size: 1.08rem; }
  .read-link { display: inline-block; margin-top: 2rem; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--ink); }
  .read-link:hover { color: var(--accent); border-color: var(--accent); }

  .section-heading h2 { font-family: var(--display); font-size: clamp(2.8rem, 5vw, 5rem); font-weight: 400; letter-spacing: -.045em; }
  .section-heading p { color: var(--muted); }

  .post-list { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
  .post-list li { border-bottom: 1px solid var(--rule); }
  .post-list article { display: grid; grid-template-columns: 8rem 1fr auto; gap: 2rem; padding-block: 2rem; align-items: start; }
  .post-list time { font-family: var(--display); font-size: .9rem; }
  .post-list h3 { font-family: var(--display); font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 400; line-height: 1.08; margin-block: .25rem .75rem; }
  .post-list h3 a { text-decoration: none; }
  .post-list h3 a:hover { color: var(--accent); }
  .post-list p:last-child { color: var(--muted); max-width: 55ch; }
  .post-arrow { font-size: 1.5rem; color: var(--accent); }

  .section-grid article { min-height: 20rem; padding: 1.5rem; border-top: 1px solid var(--ink); border-right: 1px solid var(--rule); display: flex; flex-direction: column; }
  .section-grid article:last-child { border-right: 0; }
  .section-number { color: var(--accent); font-family: var(--display); font-size: 2rem; }
  .section-grid h3 { font-family: var(--display); font-size: 2rem; font-weight: 400; margin-block: 2.5rem .75rem; }
  .section-grid p { color: var(--muted); }
  .section-state { margin-top: auto; padding-top: 2rem; color: var(--muted); }
  .site-footer a { color: var(--accent); }

  @media (max-width: 48rem) {
    .masthead .eyebrow, .masthead h1, .dek { grid-column: 1; }
    .latest-mark { min-height: auto; flex-direction: row; }
    .post-list article { grid-template-columns: 1fr auto; gap: 1rem; }
    .post-list time { grid-column: 1 / -1; }
    .section-grid article { border-right: 0; min-height: 16rem; }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.prose {
  width: min(100%, 50rem);
  margin-inline: auto;
  padding-block: clamp(5rem, 11vw, 10rem);
}
.prose h1 {
  font-family: var(--display);
  font-size: clamp(3.5rem, 8vw, 7rem);
  line-height: .93;
  letter-spacing: -.055em;
  font-weight: 400;
  margin-block: 1.2rem 3rem;
}
.prose .lede { font-family: var(--display); font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.35; }
.prose h2 { font-family: var(--display); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; font-weight: 400; margin-block: 3.5rem 1rem; }
.prose > p:not(.eyebrow):not(.lede) { max-width: 42rem; margin-top: 1.4rem; font-size: 1.08rem; }
.prose blockquote { margin: 3.5rem 0; padding: 2rem 0; border-block: 1px solid var(--ink); font-family: var(--display); font-size: clamp(1.6rem, 4vw, 2.5rem); line-height: 1.2; color: var(--accent); }
