/* Doolittle Day — Willows, California
   Palette is taken from the valley: Stearman-yellow, rice green, flooded-field blue,
   fallow gold, air-tanker red, runway asphalt, and ink-navy. */

:root {
  --paper: #E9EFEC;
  --ink: #13283E;
  --muted: #46586B;
  --yellow: #F2B705;
  --rice: #3F5E34;
  --water: #8FB0BD;
  --fallow: #D8B25A;
  --tanker: #B8412B;
  --asphalt: #3A3F45;
  --bark: #7A5A3C;

  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --text: "Source Serif 4", Georgia, "Times New Roman", serif;

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 60ch;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 4px solid var(--ink);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
}

p {
  margin: 0 0 1em;
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.6rem 1rem;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 800;
  z-index: 10;
}

.skip:focus {
  top: 1rem;
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  max-width: 1180px;
  margin-inline: auto;
  padding: 1rem var(--gutter);
}

.wordmark {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.9rem;
  line-height: 1;
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
}

.nav a:hover {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 5px;
  text-underline-offset: 6px;
}

/* ---------- Welcome page hero ---------- */

.field-art {
  display: block;
  width: 100%;
  height: clamp(200px, 30vw, 360px);
}

.flight {
  animation: glide 2.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes glide {
  from {
    transform: translateX(-560px);
  }
  to {
    transform: translateX(0);
  }
}

.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: end;
  gap: 2rem;
  margin-top: -3.5rem;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem) 0;
  background: var(--paper);
}

.hero-title {
  font-size: clamp(3.6rem, 12vw, 8.5rem);
  line-height: 0.88;
  letter-spacing: -0.01em;
}

.lede {
  max-width: 34ch;
  margin: 1.25rem 0 0;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  line-height: 1.4;
}

/* Taxiway-sign date block: black on yellow, double-bordered */
.sign {
  justify-self: end;
  width: 100%;
  max-width: 24rem;
  padding: 1.5rem 1.75rem;
  background: var(--yellow);
  box-shadow: inset 0 0 0 5px var(--yellow), inset 0 0 0 8px var(--ink);
  border-radius: 6px;
}

.sign p {
  margin: 0;
}

.sign-kicker {
  font-style: italic;
  line-height: 1.3;
}

.sign-date {
  margin: 0.25rem 0 0.35rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1;
}

.sign-place {
  line-height: 1.3;
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(2.5rem, 7vw, 5rem) 0;
}

.welcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 1.5rem 4rem;
}

.section-title {
  font-weight: 800;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1;
}

.prose p {
  max-width: var(--measure);
}

/* ---------- Chapter plat map ---------- */

.chapters-head {
  margin-bottom: 1.5rem;
}

.chapters-head p {
  margin: 0.5rem 0 0;
  max-width: var(--measure);
}

.plat {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 11rem;
  padding: 1.25rem 1.5rem 1.4rem;
  text-decoration: none;
}

.tile-name {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  line-height: 0.95;
}

.tile-text {
  max-width: 34ch;
  font-size: 1.05rem;
  line-height: 1.4;
}

.tile:hover .tile-name {
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-underline-offset: 6px;
}

/* Parcel colors, shared by tiles and chapter-page bands */
.t-farmers {
  background: var(--fallow);
  color: var(--ink);
}

.t-raiders {
  background: var(--ink);
  color: #fff;
}

.t-firefighters {
  background: var(--tanker);
  color: #fff;
}

.t-students {
  background: var(--water);
  color: var(--ink);
}

.t-flyin {
  background: var(--yellow);
  color: var(--ink);
}

.t-archives {
  background: var(--rice);
  color: #fff;
}

.t-airport {
  background: var(--asphalt);
  color: #fff;
}

.t-partners {
  background: var(--bark);
  color: #fff;
}

@media (min-width: 721px) {
  .plat {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .t-students {
    grid-column: span 7;
    min-height: 15rem;
  }

  .t-airport {
    grid-column: span 5;
    min-height: 15rem;
  }

  .t-farmers,
  .t-raiders,
  .t-firefighters {
    grid-column: span 4;
  }

  .t-flyin {
    grid-column: span 5;
  }

  .t-partners {
    grid-column: span 7;
  }

  .t-archives {
    grid-column: span 12;
    min-height: 9rem;
  }
}

/* ---------- Chapter pages ---------- */

.chapter-band {
  padding: clamp(2.5rem, 8vw, 5.5rem) 0;
}

.chapter-title {
  font-size: clamp(3.5rem, 11vw, 7.5rem);
  line-height: 0.9;
}

.chapter-blurb {
  max-width: 30ch;
  margin: 1.25rem 0 0;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.35;
}

.intro {
  max-width: var(--measure);
  font-size: 1.3rem;
  line-height: 1.5;
}

.notice {
  max-width: var(--measure);
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 8px solid var(--yellow);
}

.notice p {
  margin: 0;
}

.contribute {
  margin-top: 2.5rem;
}

.contribute p {
  max-width: var(--measure);
}

.button {
  display: inline-block;
  padding: 0.85rem 1.3rem;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
  text-decoration: none;
  border-radius: 4px;
  box-shadow: inset 0 0 0 3px var(--ink);
}

.button:hover {
  background: var(--ink);
  color: var(--yellow);
  box-shadow: none;
}

.chapter-body .sign {
  justify-self: start;
  margin: 2rem 0;
}

.archive-list {
  max-width: var(--measure);
  margin: 2rem 0 0;
}

.archive-list dt {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 2px solid rgba(19, 40, 62, 0.2);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1;
}

.archive-list dd {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.chapter-body p {
  max-width: var(--measure);
}

.chapter-body ul {
  max-width: var(--measure);
  margin: 0 0 1em;
  padding-left: 1.25rem;
}

.chapter-body li {
  margin-bottom: 0.4rem;
}

.sub-title {
  margin: 2.75rem 0 1rem;
  font-weight: 800;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  line-height: 1;
}

.note {
  font-style: italic;
}

.rows {
  max-width: 48rem;
  margin: 1.25rem 0 0;
}

.rows-wide {
  max-width: 56rem;
}

.sources {
  margin-top: 2rem;
  font-size: 1rem;
  color: var(--muted);
}

.rows dt {
  padding-top: 1rem;
  border-top: 2px solid rgba(19, 40, 62, 0.2);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.1;
}

.rows dd {
  margin: 0.35rem 0 1rem;
}

@media (min-width: 721px) {
  .rows {
    display: grid;
    grid-template-columns: 11rem minmax(0, 1fr);
    column-gap: 1.5rem;
  }

  .rows-wide {
    grid-template-columns: 15rem minmax(0, 1fr);
  }

  .rows dt {
    padding-bottom: 1rem;
  }

  .rows dd {
    margin: 0;
    padding: 1rem 0;
    border-top: 2px solid rgba(19, 40, 62, 0.2);
  }
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid rgba(19, 40, 62, 0.2);
}

.pager a {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
}

.nb {
  white-space: nowrap;
}

/* ---------- Footer: runway centerline ---------- */

.site-footer {
  padding: 1rem 0 3rem;
  color: var(--muted);
  font-size: 1rem;
}

.site-footer::before {
  content: "";
  display: block;
  height: 4px;
  margin-bottom: 1.5rem;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 28px,
    transparent 28px 52px
  );
  opacity: 0.45;
}

.site-footer p {
  margin: 0;
}

/* ---------- Small screens ---------- */

@media (max-width: 720px) {
  .hero-panel,
  .welcome {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    margin-top: -2.5rem;
  }

  .sign {
    justify-self: start;
  }

  .site-header {
    padding-top: 0.75rem;
  }

  .nav a {
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flight {
    animation: none;
  }
}

/* ---------- Archives ---------- */

.meta {
  color: var(--muted);
  font-size: 1rem;
}

.video {
  position: relative;
  max-width: 48rem;
  aspect-ratio: 16 / 9;
  margin: 1rem 0;
  background: var(--ink);
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.rows + p {
  margin-top: 1.5rem;
}

/* ---------- Raider roster ---------- */

.willows-list {
  columns: 2;
}

.crew {
  max-width: 48rem;
  margin: 1.25rem 0;
  padding: 0.25rem 1.25rem 0.75rem;
  border-top: 2px solid rgba(19, 40, 62, 0.2);
}

.crew h3 {
  margin-top: 0.9rem;
  font-size: 1.6rem;
  line-height: 1.1;
}

.crew p {
  margin-bottom: 0.5rem;
}

.crew .meta {
  margin-bottom: 0.25rem;
}

.crew.willows {
  background: rgba(242, 183, 5, 0.22);
  border-top: 0;
  border-left: 8px solid var(--yellow);
}

.badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.15rem 0.55rem;
  background: var(--yellow);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.3;
  vertical-align: middle;
  border-radius: 3px;
}

.men {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.chapter-body .men {
  padding-left: 0;
}

.men li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6rem;
  gap: 0 1rem;
  margin: 0;
  padding: 0.4rem 0;
  border-top: 1px solid rgba(19, 40, 62, 0.15);
}

.men .role {
  color: var(--muted);
  font-size: 1rem;
  grid-column: 1;
}

.men .yrs {
  grid-column: 2;
  grid-row: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.men .fate {
  grid-column: 1 / -1;
  font-style: italic;
  font-size: 1rem;
}

@media (max-width: 720px) {
  .willows-list {
    columns: 1;
  }
}

.rows dd p {
  max-width: 40rem;
  margin: 0 0 0.75rem;
}

.rows dd p:last-child {
  margin-bottom: 0;
}

.tier-title {
  margin: 1.75rem 0 0.25rem;
  font-size: 1.5rem;
  line-height: 1.1;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: none;
}

.chapter-body .actions {
  max-width: none;
}

/* ---------- Timeline ---------- */

.timeline {
  max-width: 52rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.tl-item {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 0 1.5rem;
}

.tl-date {
  padding-top: 0.2rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.4rem;
  line-height: 1.15;
  text-align: right;
}

.tl-body {
  position: relative;
  padding: 0 0 1.75rem 1.75rem;
  border-left: 4px solid var(--ink);
}

.tl-body::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 0.35rem;
  width: 18px;
  height: 18px;
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 50%;
}

.tl-body.c-airport::before { background: var(--asphalt); }
.tl-body.c-farmers::before { background: var(--fallow); }
.tl-body.c-raiders::before { background: var(--ink); }
.tl-body.c-firefighters::before { background: var(--tanker); }
.tl-body.c-students::before { background: var(--water); }
.tl-body.c-fly-in::before { background: var(--yellow); }
.tl-body.c-archives::before { background: var(--rice); }

.tl-item:last-child .tl-body {
  border-left-color: transparent;
}

.tl-body p {
  margin: 0.35rem 0 0;
  max-width: 38rem;
}

.chip {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.4;
  text-decoration: none;
  border-radius: 3px;
}

.chip:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .tl-item {
    grid-template-columns: 1fr;
  }

  .tl-date {
    padding: 0 0 0.25rem 1.75rem;
    text-align: left;
  }

  .tl-body {
    margin-left: 0;
    padding-top: 0;
  }

  .tl-body::before {
    top: -1.7rem;
  }
}

.chip.chip,
.chip[class] {
  min-height: 0;
  grid-column: auto;
}

@media (max-width: 720px) {
  .chip {
    padding: 0.4rem 0.75rem;
  }

  .nav a {
    display: inline-block;
    padding: 0.2rem 0;
  }
}

/* ---------- Sign-up forms ---------- */

.signup {
  max-width: 32rem;
  margin: 2rem 0;
  padding: 0.25rem 1.25rem 1rem;
  border-left: 8px solid var(--yellow);
}

.signup p {
  margin: 0 0 0.9rem;
}

.signup label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.signup input,
.signup select,
.signup textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0.65rem 0.75rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
  border: 2px solid var(--ink);
  border-radius: 4px;
}

.signup input:focus-visible,
.signup select:focus-visible,
.signup textarea:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 2px;
}

.signup button.button {
  border: 0;
  cursor: pointer;
}

.hp {
  position: absolute;
  left: -9999px;
}

/* ---------- Wide screens: use the full page width ---------- */
@media (min-width: 900px) {
  :root { --measure: 86ch; }
  html { font-size: 106.25%; }
  .chapter-blurb { max-width: 48ch; }
  .rows, .rows-wide, .crew, .archive-list, .video { max-width: 100%; }
  .rows { max-width: 64rem; }
  .rows-wide { max-width: 100%; }
  .video { max-width: 56rem; }
}
@media (min-width: 1200px) {
  .willows-list { columns: 3; }
}
