:root {
  --pine: #173d3a;
  --pine-deep: #0c2927;
  --ocean: #326b82;
  --fog: #e8eef0;
  --cranberry: #9f2f45;
  --gold: #c99a4b;
  --ink: #17201f;
  --muted: #65706f;
  --paper: #f7f8f5;
  --white: #ffffff;
  --line: rgba(23, 61, 58, 0.18);
  --header-height: 72px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

body:has(.lightbox[open]) { overflow: hidden; }

a { color: inherit; }
button { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--header-height);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(150px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 10px max(24px, calc((100vw - 1280px) / 2));
  background: rgba(247, 248, 245, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.album-mark,
.kelvin-link,
.primary-nav a,
.site-footer a,
.chapter-band a {
  text-decoration: none;
}

.album-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
}

.mark-crest {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--pine);
  border-radius: 50%;
  color: var(--pine);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
}

.mark-place,
.kelvin-link,
.primary-nav {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.primary-nav {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.primary-nav a,
.kelvin-link {
  padding: 10px 0;
  border-bottom: 2px solid transparent;
}

.primary-nav a:hover,
.primary-nav a:focus-visible,
.kelvin-link:hover,
.kelvin-link:focus-visible {
  color: var(--cranberry);
  border-bottom-color: currentColor;
}

.kelvin-link { justify-self: end; }

.hero {
  position: relative;
  min-height: calc(88svh - var(--header-height));
  max-height: 900px;
  overflow: hidden;
  color: var(--white);
  background: var(--pine-deep);
}

.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 28, 27, 0.05) 25%, rgba(8, 28, 27, 0.78) 100%);
}

.hero-copy {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2));
  right: max(24px, calc((100vw - 1280px) / 2));
  bottom: 54px;
  z-index: 2;
}

.hero-place,
.eyebrow {
  margin: 0 0 12px;
  color: var(--cranberry);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero-place { color: #f7e3bb; }

.hero h1 {
  max-width: 980px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 88px;
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0;
}

.hero h1 span {
  color: #f4c66c;
  font-style: italic;
}

.hero-note {
  margin: 18px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-style: italic;
}

.hero-down {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2));
  bottom: 54px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  color: var(--white);
  text-decoration: none;
  font-size: 24px;
}

.hero-down:hover,
.hero-down:focus-visible {
  color: var(--pine-deep);
  background: var(--white);
}

.story {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 80px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 104px 24px 96px;
}

.story h2,
.gallery-head h2 {
  margin: 0;
  max-width: 700px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 54px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0;
}

.story-copy {
  align-self: end;
  max-width: 590px;
  color: #3e4a49;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.7;
}

.story-copy p { margin: 0; }

.story-count {
  margin-top: 26px !important;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--pine);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

.story-count strong {
  margin-right: 7px;
  color: var(--cranberry);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 400;
}

.chapter-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--pine);
  color: var(--white);
}

.chapter-band a {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 24px 34px;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
}

.chapter-band a:last-child { border-right: 0; }

.chapter-band span {
  color: #e2bd70;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 800;
}

.chapter-band a:hover,
.chapter-band a:focus-visible {
  background: var(--cranberry);
}

.gallery-section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 96px 24px 120px;
}

.gallery-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  max-width: 1280px;
  margin: 0 auto 38px;
}

.gallery-status {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.gallery-controls {
  position: sticky;
  top: calc(var(--header-height) + 12px);
  z-index: 10;
  width: fit-content;
  max-width: 100%;
  display: flex;
  gap: 4px;
  margin: 0 auto 32px;
  padding: 5px;
  overflow-x: auto;
  background: rgba(232, 238, 240, 0.96);
  border: 1px solid rgba(50, 107, 130, 0.2);
  border-radius: 6px;
  backdrop-filter: blur(12px);
}

.filter-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 4px;
  color: var(--pine-deep);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.filter-button:hover,
.filter-button:focus-visible { background: rgba(255, 255, 255, 0.7); }

.filter-button.is-active {
  color: var(--white);
  background: var(--pine);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  grid-auto-rows: 220px;
  gap: 10px;
}

.photo-tile {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #dfe6e5;
  cursor: zoom-in;
}

.photo-tile.is-featured {
  grid-column: span 2;
  grid-row: span 2;
}

.photo-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease, filter 300ms ease;
}

.photo-tile::after {
  content: "View";
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  color: var(--white);
  background: rgba(12, 41, 39, 0.78);
  border-radius: 3px;
  opacity: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  transition: opacity 180ms ease;
}

.photo-tile:hover img,
.photo-tile:focus-visible img { transform: scale(1.025); filter: saturate(1.04); }
.photo-tile:hover::after,
.photo-tile:focus-visible::after { opacity: 1; }

.photo-tile:focus-visible,
.filter-button:focus-visible,
.lightbox button:focus-visible,
.hero-down:focus-visible,
.site-header a:focus-visible,
.chapter-band a:focus-visible,
.site-footer a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.noscript {
  padding: 30px;
  color: var(--cranberry);
  text-align: center;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: end;
  gap: 44px;
  padding: 54px max(24px, calc((100vw - 1280px) / 2));
  color: var(--white);
  background: var(--pine-deep);
}

.site-footer p { margin: 0; }

.site-footer p:not(.footer-names) {
  color: #aebdbb;
  font-size: 13px;
}

.footer-names {
  margin-bottom: 4px !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
}

.site-footer a {
  color: #dce7e5;
  font-size: 13px;
}

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--white);
  background: rgba(5, 18, 18, 0.97);
}

.lightbox::backdrop { background: rgba(5, 18, 18, 0.92); }

.lightbox-frame {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  align-items: center;
  padding: 58px 20px 20px;
}

.lightbox figure {
  min-width: 0;
  max-width: 1500px;
  max-height: calc(100dvh - 78px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  margin: 0;
}

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 120px);
  object-fit: contain;
}

.lightbox figcaption {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 10px;
  color: #b9c7c5;
  font-size: 12px;
  text-transform: uppercase;
}

.lightbox button {
  border: 0;
  color: var(--white);
  background: transparent;
  cursor: pointer;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 18px;
  width: 44px;
  height: 44px;
  font-size: 34px;
  line-height: 1;
}

.lightbox-nav {
  width: 52px;
  height: 52px;
  justify-self: center;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  border-radius: 50% !important;
  font-size: 24px !important;
}

.lightbox-nav:hover { color: var(--pine-deep); background: var(--white); }

@media (max-width: 960px) {
  :root { --header-height: 64px; }
  .site-header { grid-template-columns: 1fr auto; }
  .primary-nav { display: none; }
  .hero h1 { font-size: 68px; }
  .story { gap: 44px; }
  .story h2, .gallery-head h2 { font-size: 44px; }
  .chapter-band { grid-template-columns: repeat(2, 1fr); }
  .chapter-band a:nth-child(2) { border-right: 0; }
  .chapter-band a:nth-child(-n+2) { border-bottom: 1px solid rgba(255, 255, 255, 0.18); }
  .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 190px; }
}

@media (max-width: 640px) {
  .site-header { padding: 8px 16px; }
  .mark-place { display: none; }
  .mark-crest { width: 40px; height: 40px; }
  .kelvin-link { font-size: 11px; }
  .hero { min-height: calc(80svh - var(--header-height)); }
  .hero > img { object-position: 57% center; }
  .hero-copy { left: 20px; right: 20px; bottom: 34px; }
  .hero h1 { max-width: 350px; font-size: 48px; line-height: 1; }
  .hero-note { max-width: 260px; font-size: 18px; }
  .hero-down { right: 20px; bottom: 30px; width: 44px; height: 44px; }
  .story { grid-template-columns: 1fr; gap: 30px; padding: 72px 20px 66px; }
  .story h2, .gallery-head h2 { font-size: 38px; }
  .story-copy { font-size: 18px; }
  .chapter-band a { min-height: 94px; padding: 18px 20px; font-size: 18px; }
  .gallery-section { padding: 72px 12px 88px; }
  .gallery-head { align-items: end; margin: 0 8px 28px; }
  .gallery-status { white-space: nowrap; }
  .gallery-controls {
    top: calc(var(--header-height) + 8px);
    width: 100%;
    flex-wrap: wrap;
    overflow: visible;
    margin-bottom: 18px;
  }
  .filter-button {
    flex: 1 1 calc(33.333% - 4px);
    min-height: 38px;
    padding: 0 10px;
    font-size: 12px;
  }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 168px; gap: 7px; }
  .photo-tile.is-featured { grid-column: span 2; grid-row: span 2; }
  .photo-tile::after { display: none; }
  .site-footer { grid-template-columns: 1fr; align-items: start; gap: 20px; padding: 44px 22px; }
  .lightbox-frame { grid-template-columns: 44px minmax(0, 1fr) 44px; padding: 54px 4px 12px; }
  .lightbox-nav { width: 40px; height: 40px; font-size: 20px !important; }
  .lightbox figcaption { padding: 10px 4px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .photo-tile img { transition: none; }
}
