/* ============================================================
   Kit Haggard's Appel Project — shared chrome for section pages
   (header box + knit band + section nav, sky backdrop, panels,
   footer, per-section layouts)

   The homepage (iceland.html) is self-contained and carries its
   own copy of the header/footer styles — keep the two in sync if
   the chrome ever changes.

   Pages serve at /iceland/<name>, so every URL in the pages and
   in this file must be ROOT-RELATIVE (/iceland-assets/…) —
   relative paths would resolve against /iceland/ and 404.
   ============================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #7f9cc0; }
body {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #95a6c0 0%, #94a4be 30%, #97a7bc 62%, #9caabe 85%, #9eadc0 100%);
  background-attachment: fixed;
  font-family: 'EB Garamond', Georgia, serif;
  color: #16304e;
}
a { color: #16304e; text-decoration: none; }
a:hover { color: #0d1f34; }
a:focus-visible { outline: 2px solid #16304e; outline-offset: 4px; }
.header-box a:focus-visible, .site-footer a:focus-visible { outline-color: #f2f6fa; }

/* visually hidden (for per-page h1 landmarks) */
.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; border: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ---- fixed header (same box as the homepage) ---- */
.header-wrap {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; justify-content: center;
  padding: clamp(14px, 2.4vw, 34px);
  pointer-events: none;
}
.header-box {
  pointer-events: auto;
  width: 100%; max-width: 1040px;
  background: #16304e;
  box-shadow: 0 18px 44px rgba(16,34,55,0.28);
  padding: clamp(16px, 2vw, 26px) clamp(18px, 3vw, 40px);
  display: flex; flex-direction: column; gap: clamp(12px, 1.6vw, 20px);
  align-items: center;
  text-align: center;
}
.knit {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; height: 14px; overflow: hidden;
}
.knit i { width: 10px; height: 10px; transform: rotate(45deg); flex: none; }
.knit i.f { background: #e8eef6; }
.knit i.o { border: 1.5px solid rgba(232,238,246,0.6); }
.site-title {
  width: 100%;
  margin: 0; font-weight: 400;
  font-size: clamp(26px, 4.4vw, 54px); line-height: 1.05;
  letter-spacing: 0.01em; text-wrap: pretty;
}
.site-title a { color: #f2f6fa; }
.site-title a:hover { color: #e8eef6; }

/* section nav sits where the homepage kicker sits: current section
   in bright caps, siblings dimmed alongside */
.section-nav {
  width: 100%;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px clamp(14px, 1.8vw, 26px);
  font-family: Karla, system-ui, sans-serif;
  font-size: clamp(11px, 1.1vw, 13px); letter-spacing: 0.22em;
  text-transform: uppercase;
}
.section-nav a { color: rgba(242,246,250,0.5); transition: color 180ms ease; }
.section-nav a:hover { color: rgba(242,246,250,0.85); }
.section-nav a[aria-current="page"] {
  color: #f2f6fa;
  border-bottom: 1.5px solid rgba(242,246,250,0.85);
  padding-bottom: 3px;
}
@media (max-width: 420px) {
  .knit i:nth-child(n+10) { display: none; } /* 13 diamonds -> 9, still ends filled */
}

/* clears the fixed header (fluid height ≈ header + breathing room) */
.header-spacer { height: clamp(180px, 22vw, 280px); }

/* ---- decorative static clouds (no parallax on section pages) ---- */
.backdrop-cloud {
  position: fixed; z-index: 0; pointer-events: none;
  filter: blur(1.5px); opacity: 0.5;
}
.backdrop-cloud img { width: 100%; height: 100%; object-fit: fill; display: block; }
.backdrop-cloud.flip img { transform: scaleX(-1); }

/* ---- content ---- */
main {
  position: relative; z-index: 1;
  width: 100%; max-width: 900px;
  margin: 0 auto;
  padding: 0 clamp(14px, 2.4vw, 34px) clamp(60px, 8vw, 110px);
  flex: 1;
}
/* light panel: hard rectangle, same shadow language as the header */
.panel {
  background: rgba(242,246,250,0.94);
  box-shadow: 0 18px 44px rgba(16,34,55,0.28);
  padding: clamp(22px, 3.4vw, 48px) clamp(20px, 3.6vw, 52px);
}
.panel + .panel { margin-top: clamp(18px, 2.6vw, 30px); }

.panel h2 {
  margin: 0 0 0.35em; font-weight: 400;
  font-size: clamp(24px, 3vw, 38px); line-height: 1.12;
}
.meta {
  font-family: Karla, system-ui, sans-serif;
  font-size: clamp(11px, 1.1vw, 13px);
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(22,48,78,0.6);
  margin: 0 0 1.1em;
}
.prose { font-size: clamp(17px, 1.35vw, 20px); line-height: 1.68; max-width: 64ch; }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }
.essay-panel .prose,
.acknowledgements-panel .prose {
  max-width: none;
}
.essay-panel .essay-break {
  margin: 1.8em 0;
  text-align: center;
  letter-spacing: 0.45em;
}
.essay-panel .pull-quote {
  margin: clamp(34px, 5vw, 58px) clamp(18px, 7vw, 64px);
  padding: clamp(4px, 0.7vw, 9px) 0 clamp(4px, 0.7vw, 9px) clamp(18px, 2.4vw, 28px);
  border-left: clamp(5px, 0.55vw, 7px) solid #16304e;
  color: #16304e;
}
.essay-panel .pull-quote p {
  margin: 0;
  font-family: Karla, system-ui, sans-serif;
  font-size: clamp(22px, 2.7vw, 34px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.015em;
}

/* dashed slot = placeholder for an asset that doesn't exist yet */
.slot {
  display: grid; place-items: center;
  border: 1.5px dashed rgba(22,48,78,0.4);
  background: rgba(22,48,78,0.06);
  color: rgba(22,48,78,0.55);
  font-family: Karla, system-ui, sans-serif;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  text-align: center; padding: 12px;
}

/* ---- songs layout: photo + text side by side, player across ---- */
.songs-main {
  max-width: 960px;
}
.song-panel {
  overflow: hidden;
}
.song-grid {
  display: grid;
  grid-template-columns: minmax(170px, 250px) 1fr;
  gap: clamp(18px, 2.6vw, 34px);
  align-items: start;
}
.song-photo { aspect-ratio: 1; }
.song-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  box-shadow: 0 12px 26px rgba(16,34,55,0.17);
}
.song-copy {
  align-self: stretch;
}
.song-player {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  background: rgba(22,48,78,0.08);
  box-shadow: inset 0 0 0 1.5px rgba(22,48,78,0.14);
}
.song-player .slot { min-height: 54px; }
.song-player audio { display: none; }
.song-play {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #16304e;
  color: #f2f6fa;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}
.song-play:hover,
.song-play:focus-visible {
  background: #0d1f34;
  transform: translateY(-2px);
}
.song-play:focus-visible {
  outline: 2px solid #16304e;
  outline-offset: 4px;
}
.play-symbol {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid #f2f6fa;
}
.song-player.is-playing .play-symbol {
  width: 13px;
  height: 15px;
  margin-left: 0;
  border: 0;
  border-left: 4px solid #f2f6fa;
  border-right: 4px solid #f2f6fa;
}
.song-progress-wrap {
  min-width: 0;
}
.song-progress {
  width: 100%;
  accent-color: #16304e;
}
.song-times {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
  font-family: Karla, system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(22,48,78,0.65);
}
.song-player--empty {
  display: block;
  font-family: Karla, system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(22,48,78,0.56);
}
@media (max-width: 560px) {
  .song-grid { grid-template-columns: 1fr; }
  .song-photo { max-width: 250px; }
  .song-player {
    grid-template-columns: 1fr;
    width: 100%;
  }
  .song-play {
    justify-self: center;
  }
}

/* ---- journals layout: date calendars + scan viewer ---- */
.journal-main {
  max-width: 1080px;
}
.journal-header-spacer {
  height: clamp(156px, 18vw, 232px);
}
.journal-cue {
  margin-bottom: clamp(10px, 1.5vw, 18px);
}
.journal-browser {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.journal-calendars {
  display: grid;
  gap: clamp(22px, 4vw, 42px);
}
.journal-calendar,
.journal-scan-panel {
  background: rgba(242,246,250,0.94);
  box-shadow: 0 18px 44px rgba(16,34,55,0.24);
}
.journal-calendar {
  padding: clamp(16px, 2.2vw, 24px);
}
.calendar-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  border-bottom: 1.5px solid rgba(22,48,78,0.28);
  padding-bottom: 10px;
  margin-bottom: 12px;
  font-family: Karla, system-ui, sans-serif;
  font-size: clamp(12px, 1.1vw, 14px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.calendar-weekday,
.journal-day {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
}
.calendar-weekday {
  height: 24px;
  aspect-ratio: auto;
  font-family: Karla, system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(22,48,78,0.55);
}
.journal-day {
  border: 0;
  background: transparent;
  color: rgba(22,48,78,0.62);
  font: inherit;
  font-size: clamp(15px, 1.4vw, 18px);
}
.journal-day.is-empty {
  visibility: hidden;
}
.journal-day.has-scan {
  background: rgba(22,48,78,0.16);
  color: #16304e;
  cursor: pointer;
  box-shadow: inset 0 0 0 1.5px rgba(22,48,78,0.2);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}
.journal-day.has-scan:hover,
.journal-day.has-scan:focus-visible,
.journal-day.has-scan.is-active {
  background: #16304e;
  color: #f2f6fa;
}
.journal-day.has-scan:hover {
  transform: translateY(-2px);
}
.journal-day.has-scan:focus-visible {
  outline: 2px solid #16304e;
  outline-offset: 4px;
}
.journal-scan-panel {
  margin: 0;
  padding: clamp(16px, 2.4vw, 30px);
}
.journal-scan-panel img {
  display: block;
  width: min(100%, 560px);
  height: auto;
  margin: 0 auto;
  box-shadow: 0 14px 32px rgba(16,34,55,0.22);
  background: #f7f4ef;
}
.journal-scan-panel figcaption {
  margin-top: 16px;
  font-family: Karla, system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
  color: rgba(22,48,78,0.62);
}
@media (max-width: 760px) {
  .journal-browser {
    grid-template-columns: 1fr;
  }
  .journal-calendars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .journal-calendars {
    grid-template-columns: 1fr;
  }
}

/* ---- interviews layout: four people, one revealed conversation ---- */
.interviews-main {
  max-width: 1040px;
}
.interview-header-spacer {
  height: clamp(156px, 18vw, 232px);
}
.interview-cue {
  margin: 0 0 clamp(10px, 1.5vw, 18px);
  font-size: clamp(17px, 1.45vw, 21px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
}
.interview-cue em {
  font-style: italic;
}
.interview-roster {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 26px);
  align-items: stretch;
}
.interview-card {
  background: rgba(242,246,250,0.9);
  box-shadow: 0 18px 44px rgba(16,34,55,0.2);
  padding: clamp(12px, 1.8vw, 20px);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.interview-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 0;
  padding: 0;
  background: rgba(22,48,78,0.08);
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(16,34,55,0.16);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}
.interview-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.interview-photo:hover,
.interview-photo:focus-visible {
  filter: brightness(1.04);
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(16,34,55,0.24);
  outline: none;
}
.interview-photo:focus-visible {
  outline: 2px solid #16304e;
  outline-offset: 5px;
}
.interview-photo[aria-expanded="true"] {
  box-shadow: 0 0 0 4px rgba(22,48,78,0.16), 0 18px 34px rgba(16,34,55,0.24);
}
.interview-card-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 8px;
  padding-top: clamp(14px, 1.8vw, 20px);
  text-align: center;
}
.interview-card-copy h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-height: 2.16em;
  font-weight: 400;
  font-size: clamp(22px, 2.3vw, 32px);
  line-height: 1.08;
}
.interview-card-copy p {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-height: 2.5em;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.25;
}
.spotify-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 8px 14px;
  border: 1.5px solid rgba(22,48,78,0.28);
  border-radius: 999px;
  font-family: Karla, system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.spotify-link:hover,
.spotify-link:focus-visible {
  background: rgba(22,48,78,0.08);
  border-color: rgba(22,48,78,0.48);
  transform: translateY(-2px);
}
.spotify-link svg {
  width: 22px;
  height: 22px;
  flex: none;
}
.spotify-link circle {
  fill: #1db954;
}
.spotify-link path {
  fill: none;
  stroke: #f2f6fa;
  stroke-width: 1.35;
  stroke-linecap: round;
}
.interview-details {
  margin-top: clamp(26px, 3.8vw, 44px);
}
.interview-detail {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease;
}
.interview-detail.is-open {
  opacity: 1;
  transform: translateY(0);
}
.interview-detail h2 {
  margin-bottom: 0.65em;
}
.interview-detail .prose {
  max-width: none;
}
.interview-detail .meta {
  margin-bottom: 0.45em;
}
.interview-section-label {
  margin-top: clamp(22px, 2.7vw, 34px);
}
.interview-transcript p {
  margin-bottom: 0.32em;
}
.interview-transcript p:has(> em):not(:first-child) {
  margin-top: clamp(16px, 1.8vw, 24px);
}
@media (max-width: 820px) {
  .interview-roster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 460px) {
  .interview-roster {
    grid-template-columns: 1fr;
  }
  .interview-card {
    max-width: 320px;
    width: 100%;
    margin: 0 auto;
  }
}

/* ---- photos layout: tidy masonry gallery + lightbox ---- */
.photo-panel {
  padding: clamp(14px, 2.4vw, 30px);
}
.gallery {
  column-count: 3;
  column-gap: clamp(10px, 1.4vw, 16px);
}
.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 clamp(10px, 1.4vw, 16px);
  min-width: 0;
  min-height: 0;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  outline: none;
}
.gallery-item::before,
.gallery-item::after {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
}
.gallery-item::before {
  content: "VIEW";
  right: 10px;
  bottom: 10px;
  background: rgba(22,48,78,0.92);
  color: #f2f6fa;
  padding: 7px 9px;
  font-family: Karla, system-ui, sans-serif;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.16em;
}
.gallery-item::after {
  content: "";
  inset: 0;
  box-shadow: inset 0 0 0 4px rgba(22,48,78,0.82);
}
.gallery-item:hover,
.gallery-item:focus-visible {
  outline: none;
}
.gallery-item:hover::before,
.gallery-item:hover::after,
.gallery-item:focus-visible::before,
.gallery-item:focus-visible::after {
  opacity: 1;
}
.gallery-item:focus-visible .tile {
  outline: 2px solid #16304e;
  outline-offset: 5px;
}
.gallery .tile {
  width: 100%;
  height: auto;
  box-shadow: 0 12px 26px rgba(16,34,55,0.17);
}
.gallery img.tile {
  display: block;
}
.gallery .slot.tile {
  aspect-ratio: 4 / 3;
}

.lightbox-open { overflow: hidden; }
.lightbox[hidden] { display: none; }
.lightbox img[hidden],
.lightbox-placeholder[hidden] { display: none !important; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 42px);
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13,31,52,0.72);
  backdrop-filter: blur(4px);
}
.lightbox-frame {
  position: relative;
  z-index: 1;
  width: min(100%, 980px);
  height: min(calc(100dvh - 64px), 900px);
  max-height: min(86vh, 900px);
  margin: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  background: rgba(242,246,250,0.98);
  box-shadow: 0 24px 70px rgba(13,31,52,0.48);
}
.lightbox-media {
  position: relative;
  min-height: 0;
  padding: clamp(18px, 2.5vw, 28px) clamp(70px, 8vw, 96px);
  display: grid;
  place-items: center;
  background: rgba(22,48,78,0.08);
}
.lightbox-media img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  display: block;
}
.lightbox-placeholder {
  width: min(76vw, 760px);
  height: min(58vh, 560px);
}
.lightbox-frame figcaption {
  padding: clamp(18px, 2.4vw, 30px);
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.5;
  color: #16304e;
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 2;
  border: 0;
  background: rgba(22,48,78,0.92);
  color: #f2f6fa;
  cursor: pointer;
  font-family: Karla, system-ui, sans-serif;
  transition: background 180ms ease, transform 180ms ease;
}
.lightbox-close:hover,
.lightbox-nav:hover {
  background: #0d1f34;
}
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  outline: 2px solid #f2f6fa;
  outline-offset: 3px;
}
.lightbox-close {
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  font-size: 30px;
  line-height: 1;
}
.lightbox-nav {
  top: 50%;
  width: clamp(40px, 5vw, 54px);
  height: clamp(52px, 7vw, 72px);
  transform: translateY(-50%);
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1;
}
.lightbox-nav:hover {
  transform: translateY(-50%) scale(1.04);
}
.lightbox-nav--prev { left: 12px; }
.lightbox-nav--next { right: 12px; }

@media (max-width: 720px) {
  .gallery {
    column-count: 2;
  }
  .lightbox {
    padding: 10px;
  }
  .lightbox-frame {
    height: calc(100dvh - 20px);
    max-height: 92vh;
  }
  .lightbox-media {
    padding: 12px;
  }
  .lightbox-nav {
    top: auto;
    bottom: 12px;
    transform: none;
  }
  .lightbox-nav:hover {
    transform: scale(1.04);
  }
}

@media (max-width: 460px) {
  .gallery {
    column-count: 1;
  }
}

/* visibly-provisional marker for stub content */
.stub-note {
  margin-top: clamp(26px, 4vw, 44px);
  padding: 14px 18px;
  border: 1.5px dashed rgba(22,48,78,0.4);
  font-family: Karla, system-ui, sans-serif;
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(22,48,78,0.6);
  background: rgba(242,246,250,0.6);
}

/* ---- footer (shared on every page) ---- */
.site-footer {
  position: relative; z-index: 1;
  background: #16304e;
  display: flex; justify-content: center; align-items: baseline; gap: 14px;
  padding: clamp(16px, 2.2vw, 26px) clamp(18px, 3vw, 40px);
  font-family: Karla, system-ui, sans-serif;
  font-size: clamp(11px, 1.1vw, 13px); letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242,246,250,0.75);
}
.site-footer p { margin: 0; }
.site-footer .sep { color: rgba(242,246,250,0.35); }
.site-footer a { color: #f2f6fa; }
.site-footer a:hover { color: #e8eef6; text-decoration: underline; text-underline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
