/* What Kids Can Do: An Archive — site styles */
:root {
  --paper: #fbf8f3;
  --paper-2: #f2ece2;
  --ink: #1d1b18;
  --ink-2: #4a453e;
  --ink-3: #6f685e;
  --rule: #ddd4c6;
  --accent: #b3361d;      /* warm brick red, echoes the book covers */
  --accent-ink: #8f2a16;
  --black: #111;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --wrap: 1120px;
  --narrow: 740px;        /* .wrap--narrow box, incl. 24px gutters */
  --measure: 692px;       /* text column inside .wrap--narrow */
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-wrap: break-word;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.65 var(--serif);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: var(--narrow); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 10; }

/* Masthead */
.masthead { background: var(--black); color: #fff; position: sticky; top: 0; z-index: 5; }
.masthead__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 64px; }
.brand { color: #fff; text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; padding: 10px 0; }
.brand:hover { color: #fff; }
.brand__mark { font-family: var(--sans); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 1.05rem; }
.brand__years { font-family: var(--sans); font-size: .75rem; letter-spacing: .06em; color: #bdb6aa; text-transform: uppercase; margin-top: 3px; }
.nav ul { list-style: none; margin: 0 -12px 0 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { display: block; padding: 8px 12px; color: #e9e4dc; text-decoration: none; font-family: var(--sans); font-size: .9rem; letter-spacing: .02em; border-bottom: 2px solid transparent; }
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--accent); }
.nav-toggle { display: none; background: none; border: 1px solid #555; color: #fff; font: 600 .85rem var(--sans); padding: 6px 12px; border-radius: var(--radius); cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--black); border-top: 1px solid #333; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; margin: 0; padding: 8px 16px 16px; }
  .nav a { padding: 10px 8px; }
}

/* Home
   Note: these sections also carry .wrap, so set vertical padding only;
   a `padding: X 0` shorthand would wipe out the 24px side gutters. */
.home-hero { background: var(--black); color: #fff; }
.home-hero__img { width: 100%; max-height: 560px; object-fit: cover; }
.home-title { padding-top: 48px; padding-bottom: 8px; text-align: center; }
.home-title h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: .2em; }
.home-title .tagline { font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--ink-2); font-style: italic; }
.epigraph { max-width: var(--narrow); margin: 28px auto 8px; padding: 0 24px; text-align: center; }
.epigraph blockquote { margin: 0; font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.5; }
.epigraph cite { display: block; margin-top: 10px; font-style: normal; font-family: var(--sans); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.intro { padding-top: 32px; padding-bottom: 16px; }
.intro p:first-child::first-letter { float: left; font-size: 3.4em; line-height: .9; padding: 6px 8px 0 0; color: var(--accent); font-weight: 600; }

.sections { padding-top: 24px; padding-bottom: 64px; display: grid; gap: 56px; }
.section-card { display: grid; gap: 20px; }
.section-card__img { width: 100%; border-radius: var(--radius); }
.section-card__body { width: 100%; max-width: var(--measure); margin: 0 auto; } /* aligns with the intro column */
.section-card h2 a { color: inherit; text-decoration: none; }
.section-card h2 a:hover { color: var(--accent); }
.eyebrow { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }

.btn { display: inline-block; font-family: var(--sans); font-size: .9rem; font-weight: 600; letter-spacing: .02em; padding: 10px 18px; border-radius: var(--radius); background: var(--ink); color: #fff; text-decoration: none; }
.btn:hover { background: var(--accent); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* Interior pages */
.banner { margin: 0; background: var(--black); }
.banner img { width: 100%; max-height: 340px; object-fit: cover; }
.page__header { padding-top: 48px; padding-bottom: 8px; }
.kicker { font-family: var(--sans); font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.kicker a { color: inherit; text-decoration: none; }
.lede { font-size: 1.2rem; color: var(--ink-2); }
.page__body { padding-bottom: 72px; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose blockquote { margin: 1.5em 0; padding: 0 0 0 20px; border-left: 3px solid var(--accent); color: var(--ink-2); font-style: italic; }
.prose ul { padding-left: 1.2em; }
.prose ul.links { padding-left: 0; }
.prose li { margin-bottom: .4em; }
.prose figure { margin: 2em 0; }
.prose figure img { border-radius: var(--radius); }
.prose .actions { margin: 1.5em 0; }
.prose figcaption { font-family: var(--sans); font-size: .85rem; color: var(--ink-3); margin-top: 8px; }
.wide { max-width: var(--wrap); }

.note { background: var(--paper-2); border-left: 3px solid var(--rule); padding: 14px 18px; font-size: .95rem; color: var(--ink-2); border-radius: var(--radius); }
.sidebar { background: #fff; border: 1px solid var(--rule); padding: 22px 26px; border-radius: var(--radius); margin: 2em 0; }
.sidebar h3 { margin-top: 0; }

/* Lists of items (stories, books, collaborations) */
.items { list-style: none; padding: 0; margin: 32px 0; display: grid; gap: 0; }
.item { display: grid; grid-template-columns: 180px 1fr; gap: 28px; padding: 32px 0; border-top: 1px solid var(--rule); }
.item:last-child { border-bottom: 1px solid var(--rule); }
.item__media img { width: 100%; border-radius: var(--radius); }
.item__media--square img { aspect-ratio: 1; object-fit: cover; }
.item__media--cover img { box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.item__media--doc { background: var(--paper-2); border-radius: var(--radius); padding: 10px; }
.item__media--doc img { aspect-ratio: 3 / 4; object-fit: contain; }
.item h2, .item h3 { font-size: 1.35rem; margin-bottom: .3em; }
.item h2 a, .item h3 a { color: inherit; text-decoration: none; }
.item h2 a:hover, .item h3 a:hover { color: var(--accent); }
.meta { font-family: var(--sans); font-size: .82rem; letter-spacing: .03em; color: var(--ink-3); margin-bottom: .8em; }
.item p { font-size: 1rem; }
.item blockquote { margin: 0 0 1em; font-style: italic; color: var(--ink-2); font-size: 1rem; }
.links { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 0; list-style: none; font-family: var(--sans); font-size: .9rem; font-weight: 600; }
.links a { text-decoration: none; }
.links a:hover { text-decoration: underline; }
.pdf::after { content: " PDF"; font-size: .7em; letter-spacing: .06em; font-weight: 700; color: #fff; background: var(--accent); padding: 1px 5px; border-radius: 3px; margin-left: 6px; vertical-align: 2px; }
a[href^="http"]:not(.btn)::after { content: "↗"; font-size: .8em; margin-left: 2px; }
.brand::after, .nav a::after { content: none !important; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .item { grid-template-columns: 1fr; gap: 16px; }
  .item__media { max-width: 220px; }
}

/* Collaboration blocks */
.collab { padding: 40px 0; border-top: 1px solid var(--rule); }
.collab:first-of-type { border-top: 0; padding-top: 8px; }
.collab__img { width: 100%; border-radius: var(--radius); margin-bottom: 24px; }
.collab h2 { margin-top: 0; }

.pub-grid { list-style: none; padding: 0; margin: 32px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 32px 24px; }
.pub-grid li { display: flex; flex-direction: column; }
.pub-grid a.pub-cover { display: block; background: var(--paper-2); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; }
.pub-grid a.pub-cover img { aspect-ratio: 3 / 4; object-fit: contain; width: 100%; box-shadow: 0 1px 6px rgba(0,0,0,.12); background: #fff; }
.pub-grid h3 { font-size: 1.02rem; line-height: 1.35; margin-bottom: .3em; }
.pub-grid h3 a { color: inherit; text-decoration: none; }
.pub-grid h3 a:hover { color: var(--accent); }

.subnav { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 0; font-family: var(--sans); font-size: .9rem; }
.subnav a { padding: 6px 14px; border: 1px solid var(--rule); border-radius: 999px; text-decoration: none; color: var(--ink-2); background: #fff; }
.subnav a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.strip-list { display: grid; gap: 40px; margin: 32px 0; }
.strip-list img { width: 100%; border-radius: var(--radius); margin-bottom: 14px; }

/* Footer */
.footer { background: var(--black); color: #bdb6aa; font-family: var(--sans); font-size: .9rem; padding: 40px 0; }
.footer a { color: #e9e4dc; }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; }
.footer__brand { color: #fff; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.footer__brand span { font-weight: 400; color: #bdb6aa; }
.footer__nav { list-style: none; padding: 0; margin: 0; columns: 2; }
.footer__nav li { margin-bottom: 6px; }
.footer__nav a { text-decoration: none; }
.footer__nav a::after { content: none; }
@media (max-width: 700px) { .footer__inner { grid-template-columns: 1fr; } }

@media print {
  .masthead, .footer, .nav-toggle { display: none; }
  body { background: #fff; }
}
