/* prestongrisham.com: shared design system.
   Two families: Newsreader (serif, display and reading) and IBM Plex Sans
   (interface, metadata, short body). Garnet is the only accent. */

:root {
  --bg:        #FBF9F5;
  --fg:        #1C1A17;
  --muted:     #66615A;   /* 5.6:1 on --bg */
  --faint:     #8F897F;   /* large/decorative text only */
  --rule:      #DED8CE;
  --accent:    #73000A;   /* garnet */
  --accent-hi: #9A1220;

  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans:  'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter:  clamp(1.25rem, 5vw, 4rem);
  --wide:    1280px;   /* editorial width */
  --reading: 40rem;    /* ~66 characters of serif body */

  --s1: .5rem; --s2: 1rem; --s3: 1.5rem; --s4: 2.5rem; --s5: 4rem; --s6: clamp(4.5rem, 10vw, 8rem);

  --t-small: .8125rem;
  --t-body:  1rem;
  --t-lead:  clamp(1.25rem, 1.1rem + .7vw, 1.65rem);
  --t-h2:    clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  --t-display: clamp(3.1rem, 1.2rem + 8.2vw, 8.25rem);

  --radius: 2px;
  --ease: .2s ease;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--fg);
  font: 400 var(--t-body)/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: .22em; text-decoration-thickness: 1px; transition: color var(--ease), text-decoration-color var(--ease); }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--fg); color: var(--bg); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; letter-spacing: -.012em; }

.wrap { max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }

/* ── Header ─────────────────────────────────────────────── */
.site-header { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); flex-wrap: wrap; padding-block: 1.5rem; }
.wordmark { font-family: var(--serif); font-size: 1.25rem; text-decoration: none; letter-spacing: -.005em; }
.site-nav { display: flex; gap: 1.75rem; font-size: .9rem; }
.site-nav a { text-decoration: none; padding-block: .5rem; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current] { border-bottom-color: var(--accent); color: var(--fg); }
.site-nav a[hidden] { display: none; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { margin-top: var(--s6); border-top: 1px solid var(--rule); padding-block: var(--s4) var(--s5); font-size: .9rem; color: var(--muted); }
.site-footer .wrap { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s3) 1.5rem; }
.foot-id { grid-column: 1 / span 5; }
.foot-id strong { display: block; font: 400 1.25rem/1.3 var(--serif); color: var(--fg); }
.foot-links { grid-column: 7 / span 3; display: flex; flex-direction: column; gap: .25rem; }
.foot-sig { grid-column: 10 / -1; font: italic 400 1.1rem/1.4 var(--serif); color: var(--fg); align-self: end; }
@media (max-width: 760px) {
  .foot-id, .foot-links, .foot-sig { grid-column: 1 / -1; }
}

/* ── Page heading (inner pages) ─────────────────────────── */
.page-head { padding-block: var(--s5) var(--s4); }
.page-head h1 { font-size: clamp(2.75rem, 1.5rem + 5vw, 5.5rem); letter-spacing: -.025em; }
.page-head p { margin-top: var(--s2); max-width: 32rem; font: 400 var(--t-lead)/1.45 var(--serif); color: var(--muted); }

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
