/* --------------------------------------------------------------------------
   Colour palette and global defaults
   -------------------------------------------------------------------------- */

:root {
  --paper: #f7f4ed;
  --ink: #232323;
  --accent: #315d70;
  --muted: #6b6861;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #e9e7e1;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.68;
}

.page {
  max-width: 940px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 30px #0002;
}

/* --------------------------------------------------------------------------
   Cover image and article title
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
}

.hero img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: cover;
  object-position: center 42%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(transparent, #000b);
}

.hero-text {
  position: absolute;
  z-index: 1;
  right: 6%;
  bottom: 5%;
  left: 6%;
  color: white;
  text-shadow: 0 2px 12px #000;
}

.hero h1 {
  margin: 0.2rem 0;
  font-size: clamp(2.2rem, 7vw, 5rem);
  line-height: 0.95;
}

.hero p {
  margin: 0.5rem 0;
  font: 1.1rem system-ui, sans-serif;
}

/* --------------------------------------------------------------------------
   Article text and inline photograph links
   -------------------------------------------------------------------------- */

article {
  max-width: 720px;
  margin: auto;
  padding: 3rem 2rem;
}

article > p:first-of-type::first-letter {
  float: left;
  padding: 0.15rem 0.5rem 0 0;
  color: var(--accent);
  font-size: 4rem;
  line-height: 0.78;
}

p {
  margin: 0 0 1.2rem;
}

.photo-link {
  color: inherit;
  text-decoration: underline dotted 2px var(--accent);
  text-underline-offset: 3px;
  cursor: zoom-in;
}

.photo-link span {
  color: var(--accent);
  font-family: system-ui;
  font-size: 0.85em;
}

/* --------------------------------------------------------------------------
   Photographs embedded directly in the article
   -------------------------------------------------------------------------- */

figure {
  margin: 2.5rem -8%;
  padding: 0.7rem;
  background: white;
  box-shadow: 0 8px 28px #0002;
}

figure img {
  display: block;
  width: 100%;
  max-height: 650px;
  object-fit: contain;
}

figcaption {
  padding: 0.55rem 0.25rem 0.1rem;
  color: var(--muted);
  font: italic 0.94rem system-ui, sans-serif;
}

/* --------------------------------------------------------------------------
   Photograph preview shown beside the mouse pointer
   -------------------------------------------------------------------------- */

.hover-card {
  position: fixed;
  z-index: 20;
  display: none;
  max-width: min(430px, 42vw);
  padding: 0.5rem;
  background: white;
  border-radius: 4px;
  box-shadow: 0 12px 40px #0006;
  pointer-events: none;
}

.hover-card img {
  display: block;
  max-width: 100%;
  max-height: 58vh;
}

.hover-card strong,
.hover-card small {
  display: block;
  font-family: system-ui, sans-serif;
}

.hover-card strong {
  padding: 0.45rem 0.3rem 0;
}

.hover-card small {
  padding: 0.15rem 0.3rem 0.35rem;
  color: #555;
}

/* --------------------------------------------------------------------------
   Additional photographs and original-page galleries
   -------------------------------------------------------------------------- */

.gallery {
  padding: 0 2rem 4rem;
}

.gallery h2,
.notes h2 {
  font-family: system-ui, sans-serif;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.gallery-item {
  color: inherit;
  text-decoration: none;
  background: white;
  box-shadow: 0 3px 14px #0002;
}

.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-item span {
  display: block;
  padding: 0.55rem;
  font: 600 0.85rem system-ui, sans-serif;
}

/* --------------------------------------------------------------------------
   Introductory notes
   -------------------------------------------------------------------------- */

.notes {
  margin: 0 2rem 3rem;
  padding: 1.2rem 1.4rem;
  background: #fff8d9;
  border-left: 4px solid #c59c25;
  font: 0.95rem system-ui, sans-serif;
}

.notes p {
  margin: 0.5rem 0;
}

/* --------------------------------------------------------------------------
   Full-size photograph dialog
   -------------------------------------------------------------------------- */

.dialog {
  max-width: min(94vw, 1100px);
  padding: 0;
  color: white;
  background: #111;
  border: 0;
  box-shadow: 0 20px 80px #000b;
}

.dialog::backdrop {
  background: #000c;
}

.dialog img {
  display: block;
  max-width: 94vw;
  max-height: 80vh;
  margin: auto;
}

.dialog-info {
  padding: 1rem 1.2rem;
  font-family: system-ui, sans-serif;
}

.dialog button {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  width: 2.4rem;
  height: 2.4rem;
  color: #111;
  background: #fff;
  border: 0;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Small-screen adjustments
   -------------------------------------------------------------------------- */

@media (max-width: 700px) {
  article {
    padding: 2rem 1.2rem;
  }

  figure {
    margin: 2rem 0;
  }

  .hover-card {
    display: none !important;
  }

  .hero img {
    height: 75vh;
  }

  .gallery {
    padding-inline: 1.2rem;
  }
}

/* --------------------------------------------------------------------------
   Print layout
   -------------------------------------------------------------------------- */

@media print {
  body {
    background: white;
  }

  .page {
    box-shadow: none;
  }

  .hover-card,
  .gallery,
  .notes {
    display: none;
  }

  .hero img {
    max-height: 400px;
  }

  .photo-link {
    text-decoration: none;
  }
}
