/* Basic styles */
:root {
  --green: #123f31;
  --blue: #174cca;
  --yellow: #ffdd36;
  --ink: #20382e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-offset, 145px); scrollbar-gutter: stable; }
body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  line-height: 1.75;
}
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.15; }
a { color: inherit; text-underline-offset: 5px; }
a:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; }
img { display: block; width: 100%; object-fit: cover; }
.reading-width { width: min(740px, 88%); margin: auto; }
.skip-link { position: fixed; left: 20px; top: -100px; padding: 8px; background: white; z-index: 30; }
.skip-link:focus { top: 10px; }

/* Navigation */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 5%;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--yellow);
}
.site-name { display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: bold; text-decoration: none; }
.flag { flex-shrink: 0; width: 20px; height: 15px; background: linear-gradient(#ffdd36 50%, #174cca 50%, #174cca 75%, #d93841 75%); }
nav { display: flex; gap: 28px; }
nav a { font-size: 15px; font-weight: bold; text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
nav a[aria-current="page"] { border-bottom: 2px solid var(--green); }
nav a:hover { color: var(--blue); }

/* Main photo */
.hero { position: relative; isolation: isolate; min-height: 570px; color: white; background: var(--green); }
.hero > img { position: absolute; height: 100%; inset: 0; z-index: -2; object-position: center 52%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #0b332d9c, transparent 80%); }
.hero-text { width: min(1280px, 90%); margin: auto; padding: 65px 0 85px; }
.hero-text > p { font-size: 14px; margin-bottom: 25px; }
h1 { font-size: clamp(76px, 9vw, 128px); letter-spacing: -.06em; line-height: .95; font-weight: 750; }
.hero h1 { margin-bottom: 35px; }
.button { display: inline-block; padding: 12px 22px; background: var(--yellow); color: var(--green); text-decoration: none; font-weight: bold; border-radius: 4px; font-size: 16px; transition: background .2s, transform .2s; }
.button:hover { background: #ffe86b; transform: translateY(-2px); }
.hero-caption { position: absolute; bottom: 22px; right: 5%; font-size: 13px; background: #123f31c9; padding: 3px 10px; }

/* Project introduction */
.about { padding-top: 65px; padding-bottom: 65px; }
h2 { font-size: 35px; letter-spacing: -.035em; margin-bottom: 25px; }
.welcome-copy p { margin-bottom: 22px; }
.guiding-question { margin-top: 35px; padding: 25px 28px; background: #eff6ff; border-left: 4px solid var(--blue); }
.guiding-question h3 { color: var(--blue); font-size: 15px; margin-bottom: 10px; }
.guiding-question p { font-size: 23px; line-height: 1.5; }
.town-photo { margin: 0 5% 45px; }
.town-photo img { height: 320px; object-position: center 48%; }
.town-photo figcaption { font-size: 13px; padding-top: 10px; }

/* Bibliography */
.research-heading { padding-top: 48px; padding-bottom: 30px; border-bottom: 1px solid #d5ddd7; }
.research-heading h1 { font-size: 48px; letter-spacing: -.045em; line-height: 1.05; margin-bottom: 20px; }
.research-heading > p { font-size: 17px; margin-bottom: 12px; }
.research-heading .source-count { font-size: 14px; color: #54665c; }
.source { padding: 35px 0; border-bottom: 1px solid #d5ddd7; scroll-margin-top: 15px; }
.source-info { font-size: 14px; color: #526658; margin-bottom: 12px; }
.source h2 { font-size: 25px; line-height: 1.3; margin-bottom: 20px; }
.citation { font-size: 15px; line-height: 1.75; padding-left: 24px; text-indent: -24px; overflow-wrap: anywhere; margin-bottom: 24px; }
.citation a { color: var(--blue); }
.annotation h3 { font-size: 16px; margin: 21px 0 7px; }
.annotation p { font-size: 17px; line-height: 1.8; }
.source-links { margin-top: 22px; }
.source-links a { font-size: 15px; color: var(--blue); }
.source-note { font-size: 13px; color: #526658; margin-top: 12px; }

/* Footer */
.site-footer { margin: 0 5%; padding: 25px 0; border-top: 1px solid #d5ddd7; }
.footer-top { display: flex; justify-content: space-between; gap: 20px; font-size: 13px; }
.photo-credits { font-size: 12px; line-height: 1.8; margin-top: 15px; color: #526658; }
.bibliography-page .site-footer { margin-top: 35px; }

/* Phone layout */
@media (max-width: 650px) {
  body { font-size: 17px; }
  .site-header { padding: 12px 5%; gap: 12px; flex-wrap: wrap; }
  .site-name { font-size: 17px; }
  nav { gap: 20px; }
  nav a { font-size: 14px; }
  .hero { min-height: 460px; }
  .hero-text { padding-top: 55px; }
  h1 { font-size: clamp(61px, 14vw, 90px); }
  .hero-text > p { font-size: 13px; }
  .hero-caption { font-size: 12px; }
  .about { padding-top: 38px; padding-bottom: 40px; }
  h2 { font-size: 29px; }
  .guiding-question { padding: 20px; }
  .guiding-question p { font-size: 21px; }
  .town-photo { margin-bottom: 25px; }
  .town-photo img { height: 230px; }
  .research-heading { padding-top: 35px; }
  .research-heading h1 { font-size: clamp(34px, 9vw, 48px); }
  .source h2 { font-size: 23px; }
  .citation { font-size: 14px; }
  .annotation p { font-size: 16px; }
  .footer-top { flex-direction: column; gap: 10px; }
}

/* Page fade */
@media (prefers-reduced-motion: no-preference) {
  main { animation: fade-in .3s ease; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* Printing */
@media print {
  .site-header, .skip-link, .source-links { display: none; }
  .reading-width { width: 100%; }
  .source { break-inside: avoid; }
}

/* Keep all page links visible */
@media (max-width: 800px) {
  .site-header { flex-wrap: wrap; }
  nav { flex-wrap: wrap; gap: 10px 20px; }
}

/* Room for all five pages */
@media (min-width: 651px) and (max-width: 1050px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}
