:root {
  color-scheme: light;
  --bg: #f7f4ef;
  --ink: #1f2522;
  --muted: #6d746e;
  --paper: #fffdf8;
  --line: #ded6ca;
  --green: #2f6651;
  --rose: #b75f5a;
  --gold: #d5a33d;
  --shadow: 0 18px 60px rgba(31, 37, 34, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(247, 244, 239, 0.88);
  border-bottom: 1px solid rgba(222, 214, 202, 0.8);
  backdrop-filter: blur(18px);
}

.site-header > *,
main,
section,
.hero-copy,
.profile-card,
.media-card {
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fffdf8;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

nav a {
  text-decoration: none;
}

nav a:hover {
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 0.82fr);
  min-height: calc(100vh - 64px);
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.hero-media {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  background: #d8d0c4;
}

.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 64px);
  object-fit: contain;
  object-position: center;
  display: block;
  background: #d8d0c4;
}

.empty-photo {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(47, 102, 81, 0.65), rgba(183, 95, 90, 0.45)),
    linear-gradient(45deg, #c8b8a6, #eee8dc 50%, #aebeb1);
}

.empty-photo::after {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(255, 253, 248, 0.6);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: clamp(38px, 8vw, 92px);
  background: var(--paper);
}

.eyebrow {
  margin: 0;
  color: var(--rose);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.9rem, 4.8vw, 5.5rem);
  line-height: 1.04;
  letter-spacing: 0;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 4vw, 4.4rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.hero-copy p:not(.eyebrow) {
  max-width: 44ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
}

section {
  padding: clamp(72px, 9vw, 132px) clamp(22px, 5vw, 76px);
}

.section-heading {
  display: grid;
  gap: 10px;
  max-width: 1280px;
  margin: 0 auto 42px;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 1360px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
}

.story-grid article {
  min-height: 270px;
  padding: clamp(28px, 3vw, 42px);
  background: var(--paper);
}

.story-grid p,
.profile-card p,
.timeline p,
.gallery-empty p {
  color: var(--muted);
}

.profiles-section {
  background: #fffdf8;
}

.pages-section {
  background: #ece7dd;
}

.profiles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  max-width: 1480px;
  margin: 0 auto;
}

.profile-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f4ef;
}

.archive-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(47, 102, 81, 0.92);
  color: white;
  font-size: 0.78rem;
  font-weight: 850;
}

.profile-image {
  aspect-ratio: 16 / 10;
  background: #d8d0c4;
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-content {
  padding: clamp(24px, 3vw, 38px);
}

.profile-place {
  margin-bottom: 6px;
  color: var(--green) !important;
  font-weight: 850;
}

.profile-content ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 16px;
  padding: 0;
  list-style: none;
}

.profile-content li {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.9rem;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.profile-content a,
.profile-links a {
  color: var(--green);
  font-weight: 800;
}

.pages-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1480px;
  margin: 0 auto;
}

.page-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.page-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.page-card div {
  padding: 22px;
}

.page-card p:not(.eyebrow),
.story-page-hero p:not(.eyebrow),
.story-page-content p {
  color: var(--muted);
}

.page-card a {
  color: var(--green);
  font-weight: 850;
}

.story-page-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 0.7fr);
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
  min-height: 72vh;
  background: var(--paper);
}

.story-page-hero img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  display: block;
  background: #d8d0c4;
}

.story-page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(54px, 8vw, 100px) clamp(22px, 5vw, 76px);
  font-size: 1.08rem;
}

.story-page-gallery {
  background: #fffdf8;
}

.story-links-section {
  background: #ece7dd;
}

.story-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto;
}

.story-links a {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}

.story-links strong {
  color: var(--green);
}

.story-links span {
  color: var(--muted);
}

.archive-frame-wrap {
  max-width: 100%;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: #efe8dc;
}

.archive-frame-wrap iframe {
  width: 100%;
  max-width: 100%;
  height: min(720px, 62vh);
  border: 0;
  display: block;
  background: white;
}

.timeline-section {
  background: #ece7dd;
}

.timeline {
  display: grid;
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 34px;
  padding: clamp(24px, 3vw, 36px);
  background: var(--paper);
  border: 1px solid var(--line);
}

.timeline time {
  color: var(--green);
  font-weight: 800;
}

.timeline h3,
.timeline p {
  margin-bottom: 0;
}

.gallery-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1480px;
  margin: 0 auto 28px;
}

.filter-button {
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
}

.filter-button.active,
.filter-button:hover {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
  max-width: 1480px;
  margin: 0 auto;
}

.media-card {
  grid-column: span 4;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 28px rgba(31, 37, 34, 0.08);
}

.media-card:nth-child(5n + 1) {
  grid-column: span 7;
}

.media-card:nth-child(5n + 2) {
  grid-column: span 5;
}

.media-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.media-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #d8d0c4;
}

.media-card:nth-child(5n + 1) .media-frame {
  aspect-ratio: 16 / 10;
}

.media-frame img,
.media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: rgba(31, 37, 34, 0.78);
  color: white;
  font-weight: 800;
}

.media-caption {
  padding: 18px 20px 20px;
}

.media-caption h3 {
  margin-bottom: 4px;
}

.media-caption p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.gallery-empty {
  grid-column: 1 / -1;
  padding: 34px;
  border: 1px dashed #b9afa1;
  background: rgba(255, 253, 248, 0.7);
}

.gallery-empty h3 {
  margin-bottom: 8px;
}

.gallery-empty code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #ece7dd;
}

.lightbox {
  width: min(1040px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #111511;
  color: white;
  box-shadow: var(--shadow);
}

.lightbox::backdrop {
  background: rgba(10, 12, 11, 0.72);
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.46);
  color: white;
  cursor: pointer;
}

#lightboxContent img,
#lightboxContent video {
  width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  display: block;
  background: #111511;
}

#lightboxCaption {
  margin: 0;
  padding: 14px 18px 18px;
  color: #eee8dc;
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-media,
  .hero-media img,
  .hero-media video {
    min-height: 46vh;
  }

  .hero-copy {
    padding: 34px 22px 48px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.55rem, 10vw, 3.85rem);
    line-height: 1;
  }

  .story-grid {
    grid-template-columns: 1fr;
  }

  .profiles-grid {
    grid-template-columns: 1fr;
  }

  .pages-grid,
  .story-page-hero,
  .story-links {
    grid-template-columns: 1fr;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .media-card,
  .media-card:nth-child(5n + 1),
  .media-card:nth-child(5n + 2) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1180px) {
  .profiles-grid {
    grid-template-columns: 1fr;
  }

  .profile-card {
    display: grid;
    grid-template-columns: minmax(320px, 0.42fr) minmax(420px, 0.58fr);
    align-items: stretch;
  }

  .profile-image {
    aspect-ratio: auto;
    min-height: 100%;
  }

  .profile-content {
    align-self: center;
  }

  .archive-frame-wrap {
    grid-column: 1 / -1;
  }

  .archive-frame-wrap iframe {
    height: 760px;
  }
}
