/* vjosa.org pages, in the colours of the river itself: pale limestone gravel for the page, deep river
   blue-green for text, header and footer, and the Vjosa's turquoise as the accent, with forest green
   and a little warm sand. Photographs everywhere. The homepage cover and 3D map keep the painting's
   sunset gold (see the .hero scope below). */
:root {
  --bg: #F3F1EA;           /* limestone gravel */
  --bg-solid: #FFFFFF;
  --bg-deep: #0B3440;      /* deep river */
  --ink: #17363E;
  --ink-soft: #4F6A71;
  --head: #0B2B33;
  --gold: #0A7072;         /* the accent: river teal, dark enough for small text on gravel */
  --river: #1FB0AC;        /* Vjosa turquoise, for lines and fills */
  --forest: #3E7A4A;
  --sand: #D8C7A0;
  --clay: #C46A3E;
  --rule: rgba(23, 54, 62, .14);
  --rule-strong: rgba(23, 54, 62, .3);
  --panel: rgba(11, 52, 64, .92);
  --chip: rgba(31, 176, 172, .1);
  --profile: rgba(31, 176, 172, .2);
  --plate-light: #E8D9B0;
  --plate-dark: #1F3B36;
  --plate-sea: #15506A;
  --cr: #B8402B;
  --en: #9A4F12;   /* status-tag colours: dark enough for small text on the paper background (≥ 4.5:1) */
  --nt: #6E5F12;
  --lc: #2F6A2E;
  --on-photo: #F7F5EF;

  /* Two voices: Fraunces, a warm soft serif, for titles, ledes and captions; Manrope, a clean
     open sans, for reading text, labels and numbers. The logo keeps its Montserrat, and the
     homepage tagline its Cinzel to match the painted VJOSA. */
  --f-title: "Fraunces", Georgia, "Times New Roman", serif;
  --f-head: "Fraunces", Georgia, "Times New Roman", serif;
  --f-text: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --f-logo: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --f-display: "Manrope", system-ui, sans-serif;
  --f-mono: "Manrope", system-ui, sans-serif;
  color-scheme: light;
}
/* Dark places (header, footer, photo heroes, map overlays) get light text and an aqua accent. */
.site-head, .site-foot, .photo-hero, .plate-frame, .hero, .deep, .section.is-deep {
  --ink: #F1EFE7; --ink-soft: #B3C9C7; --head: #FFFFFF; --gold: #7FDCD3;
  --rule: rgba(241, 239, 231, .14); --rule-strong: rgba(241, 239, 231, .32); --chip: rgba(127, 220, 211, .1);
  --bg-solid: #0E2D35; --bg: #0B3440;
  --cr: #FF8C76; --en: #F2A65E; --nt: #DCC765; --lc: #86D093;
}
/* The homepage 3D map keeps a warm gold for its tools and labels, set against the cool river. */
.hero { --gold: #E2B25C; --head: #FFF3DA; --chip: rgba(226, 178, 92, .12); --ink: #F3E9D2; --ink-soft: #C5B99D; }
/* One deliberate look for every visitor, whatever their system theme. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--bg-deep); }
body {
  margin: 0; color: var(--ink); font: 400 17.5px/1.62 var(--f-text); -webkit-font-smoothing: antialiased;
  background: var(--bg);
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg-deep); }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--gold); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.wrap {
  max-width: 1200px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Header, as in the concept: wave mark over VJOSA.ORG, classical capitals, a gold underline glow */
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9;
  background: rgba(9, 44, 54, .9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(31, 176, 172, .4);
}
.site-head .wrap { max-width: 1320px; display: flex; align-items: center; gap: 28px; padding-block: 10px; position: relative; }
.brand { display: flex; align-items: center; gap: .3em; flex: none; font-size: clamp(23px, 6.2vw, 30px); color: #fff; text-decoration: none; padding-right: 28px; border-right: 1px solid rgba(246, 241, 230, .35); }

/* The vjosa.org lockup: mountain-and-river mark, VJOSA.ORG, and the tagline, all sized from the parent's font-size. */
.vl-mark { height: 1.45em; width: auto; flex: none; overflow: visible; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .35)); }
.vl-text { display: grid; justify-items: start; }
.vl-text b { font: 800 1em/.86 var(--f-logo); letter-spacing: -.005em; white-space: nowrap; color: #fff; }
.vl-text i { font-style: normal; font-weight: 700; font-size: .78em; color: #7FD15A; }
.vl-text small { margin-top: .3em; font: 600 .29em/1 var(--f-logo); letter-spacing: .15em; white-space: nowrap; color: #F4F1EA; }
.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a {
  position: relative; text-decoration: none; padding: 10px 12px 9px;
  font: 600 12.5px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: #E3EFEC;
}
.site-nav a img, .site-nav a small { display: none; }
@media (min-width: 1001px) and (max-width: 1260px) { .site-head .site-nav a { padding-inline: 7px; font-size: 11.5px; letter-spacing: .05em; } }
.site-nav a b { font-weight: inherit; }
.site-nav a:hover { color: #9FEAE2; }
.site-nav a[aria-current="page"] { color: #FFFFFF; }
.site-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: #1FB0AC; }
.menu-btn {
  display: none; margin-left: auto; cursor: pointer; padding: 10px 14px 9px; border-radius: 999px; border: 1px solid var(--rule-strong); background: transparent; color: var(--ink);
  font: 600 12px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase;
}

/* Type */
.eyebrow { margin: 0; font: 600 12px/1.4 var(--f-display); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.display {
  margin: 0; font-family: var(--f-title); font-weight: 700;
  font-size: clamp(52px, 11vw, 164px); line-height: .95; letter-spacing: .02em;
  overflow-wrap: anywhere;
}
.display.is-long { font-size: clamp(34px, 8.6vw, 124px); }
.lede { margin: 0; max-width: 34ch; font: 500 clamp(22px, 2.4vw, 30px)/1.3 var(--f-head); text-wrap: pretty; }
h2 { margin: 0; font: 600 clamp(32px, 4.2vw, 54px)/1.02 var(--f-head); letter-spacing: -.005em; color: var(--head); text-wrap: balance; }
h3 { margin: 0; font: 700 23px/1.12 var(--f-head); color: var(--head); text-wrap: balance; }
p { margin: 0; }
.prose { display: grid; gap: 14px; max-width: 62ch; }
.sci { font-style: italic; color: var(--ink-soft); }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.rule-title { display: flex; align-items: center; gap: 14px; }
.rule-title::before, .rule-title::after { content: ""; height: 1px; width: 36px; background: currentColor; opacity: .7; }

/* Photo hero: a full-bleed photograph, parchment capitals and a turquoise swoosh, fading into the page */
.photo-hero { position: relative; isolation: isolate; color: var(--on-photo); min-height: min(82vh, 800px); display: grid; align-items: end; overflow: hidden; background: var(--bg-deep); }
.photo-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.photo-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(6, 26, 32, .5) 0%, rgba(6, 26, 32, 0) 24%, rgba(6, 30, 38, .25) 48%, rgba(8, 40, 48, .78) 88%, rgba(8, 40, 48, .9) 100%),
    radial-gradient(60% 50% at 20% 80%, rgba(6, 26, 32, .35), transparent 70%);
}
.photo-hero .wrap { width: 100%; padding-block: 150px 48px; display: grid; gap: 18px; }
.photo-hero .eyebrow { color: #A8F0E8; text-shadow: 0 1px 3px rgba(0, 0, 0, .85), 0 0 16px rgba(0, 0, 0, .65); }
.photo-hero .display { position: relative; justify-self: start; padding-bottom: .06em; color: #FFFFFF; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.photo-hero .lede { color: var(--on-photo); max-width: 38ch; text-shadow: 0 1px 18px rgba(0, 0, 0, .55); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; font: 500 14px/1.4 var(--f-mono); color: rgba(246, 238, 221, .9); text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.hero-meta b { color: #A8F0E8; font-weight: 700; }
.photo-credit { position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); bottom: 10px; font: 400 12px/1.3 var(--f-text); font-style: italic; color: rgba(246, 238, 221, .75); }

/* Photo figures */
.ph { margin: 0; position: relative; overflow: hidden; background: #DCE4E1; border-radius: 8px; box-shadow: 0 0 0 1px rgba(23, 54, 62, .1), 0 10px 26px rgba(11, 52, 64, .16); }
.ph img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.ph:hover img { transform: scale(1.03); }
.ph figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 8px;
  font: italic 400 13.5px/1.3 var(--f-text); color: var(--on-photo);
  background: linear-gradient(transparent, rgba(6, 14, 16, .72));
}
.ph-wide { aspect-ratio: 21 / 9; }
.ph-land { aspect-ratio: 3 / 2; }
.ph-card { aspect-ratio: 4 / 3; }
.band { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.band .ph { aspect-ratio: auto; min-height: 280px; }
.eco-band { margin-bottom: 28px; }
.eco-band .ph { min-height: 340px; }

/* Relief plate (Visit page only) */
.plate { margin: 0; display: grid; gap: 8px; }
.plate-frame { position: relative; border: 1px solid rgba(10, 112, 114, .45); border-radius: 8px; background: var(--plate-dark); aspect-ratio: 1527 / 970; max-width: 100%; overflow: hidden; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.plate-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.plate-pins { position: absolute; inset: 0; }
.plate-pin { position: absolute; display: flex; align-items: center; gap: 6px; transform: translate(-5px, -50%); text-decoration: none; color: var(--ink); white-space: nowrap; }
.plate-pin i { width: 10px; height: 10px; border-radius: 50%; flex: none; background: #FFFDF5; border: 2px solid var(--pin, var(--gold)); box-shadow: 0 0 8px rgba(127, 220, 211, .7); }
.plate-pin span { font: 600 11px/1 var(--f-display); letter-spacing: .04em; padding: 5px 7px 4px; border-radius: 3px; background: var(--panel); box-shadow: 0 0 0 1px rgba(127, 220, 211, .35); }
.plate-pin.is-left { flex-direction: row-reverse; transform: translate(calc(-100% + 5px), -50%); }
a.plate-pin:hover span { box-shadow: 0 0 0 1px var(--gold); color: #A8F0E8; }
.plate-loading { position: absolute; left: 12px; bottom: 10px; font: 500 12px/1 var(--f-mono); color: var(--ink-soft); }
.plate figcaption { font: italic 400 13px/1.5 var(--f-text); color: var(--ink-soft); }

/* Sections */
.section { padding-block: clamp(44px, 6vw, 84px); border-top: 1px solid var(--rule); display: grid; gap: 30px; }
.section:first-child { border-top: 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 16px 48px; align-items: start; }
.section-head .prose { padding-top: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  cursor: pointer; border: 1px solid var(--rule-strong); background: transparent; border-radius: 999px; padding: 9px 14px 8px;
  font: 600 11.5px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft);
}
.chips button:hover { color: var(--ink); border-color: var(--gold); }
.chips button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #FFFFFF; box-shadow: 0 4px 12px rgba(10, 112, 114, .28); }

/* River-km strip */
.kmbar { position: relative; height: 18px; margin-top: 4px; }
.kmbar::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 2px; background: var(--rule-strong); }
.kmbar .span { position: absolute; top: 5px; height: 8px; border-radius: 4px; background: var(--river); box-shadow: 0 0 8px rgba(63, 208, 196, .6); left: calc(var(--a) / 272 * 100%); width: max(8px, calc((var(--b) - var(--a)) / 272 * 100%)); }
.kmbar .border { position: absolute; top: 2px; height: 14px; left: calc(80 / 272 * 100%); border-left: 1px dashed var(--gold); }
.kmlabel { display: flex; justify-content: space-between; font: 500 12px/1.2 var(--f-mono); color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 7px 2px; border-radius: 3px;
  font: 600 11px/1.3 var(--f-mono); letter-spacing: .05em; text-transform: uppercase;
  color: var(--tc, var(--ink)); box-shadow: inset 0 0 0 1px var(--tc, var(--rule-strong));
}
.tag.cr { --tc: var(--cr); } .tag.en { --tc: var(--en); } .tag.nt { --tc: var(--nt); } .tag.lc { --tc: var(--lc); }

/* Footer */
.site-foot { border-top: 3px solid var(--river); padding-block: 44px 56px; margin-top: 24px; background: var(--bg-deep); color: var(--ink); }
.site-foot .wrap { display: grid; gap: 24px; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.foot-h { font: 600 12px/1.4 var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0; }
.sources { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px 24px; }
.sources li { font: 400 13.5px/1.45 var(--f-text); color: var(--ink-soft); }
.fine { font: 400 13px/1.5 var(--f-text); color: var(--ink-soft); }
/* Research figures: a big number, what it measures, and where it comes from. */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.figure-card { display: grid; gap: 8px; align-content: start; padding: 20px 20px 18px; border-radius: 12px; border: 1px solid var(--rule); border-top: 3px solid var(--river); background: #FFFFFF; box-shadow: 0 6px 18px rgba(11, 52, 64, .07); }
.figure-card b { font: 600 clamp(30px, 3.2vw, 42px)/1 var(--f-head); color: var(--gold); }
.figure-card p { margin: 0; font-size: 15.5px; line-height: 1.45; }
.figure-card cite { font: normal 500 12px/1.35 var(--f-mono); color: var(--ink-soft); }
.research-note { display: flex; gap: 12px; align-items: baseline; margin: 0; padding: 12px 16px; border-left: 3px solid var(--gold); background: var(--chip); font: italic 400 15px/1.45 var(--f-text); color: var(--ink-soft); }
.research-note b { font: 600 11.5px/1 var(--f-display); font-style: normal; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }

/* Practical rules: short cards with a coloured edge. */
.know { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.know li { display: grid; gap: 6px; padding: 18px 18px 16px; border-radius: 10px; background: var(--chip); border-top: 3px solid var(--river); }
.know li { background: #FFFFFF; box-shadow: 0 0 0 1px var(--rule); }
.know li.warn { border-top-color: #C9852E; }
.know h3 { font-size: 21px; }
.know p { margin: 0; font-size: 16px; line-height: 1.5; }

.next-link { display: inline-flex; align-items: baseline; gap: 12px; text-decoration: none; font: 600 clamp(26px, 3vw, 36px)/1 var(--f-head); color: var(--head); }
.next-link span { font: 600 11.5px/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.next-link:hover { color: var(--gold); }

@media (max-width: 1000px) {
  .site-head .wrap { gap: 16px; }
  .brand { padding-right: 0; border-right: 0; }
  .site-nav { display: none; }
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; }

  /* The menu opens as a full-screen sheet: each section with its photo and a line about it. */
  :is(.site-head, .head) .site-nav.is-open {
    display: flex; flex-direction: column; justify-content: center; gap: 0; position: fixed; inset: 0; z-index: 60; transform: none;
    padding: calc(86px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 28px max(20px, env(safe-area-inset-left, 0px));
    min-width: 0; overflow-y: auto; overscroll-behavior: contain; pointer-events: auto; border: 0; border-radius: 0;
    background: rgba(7, 36, 44, .98);
    animation: menu-in .25s ease both;
  }
  :is(.site-head, .head) .site-nav.is-open a {
    display: grid; grid-template-columns: 68px minmax(0, 1fr) 18px; align-items: center; gap: 16px; width: 100%; max-width: 560px; margin-inline: auto; white-space: normal;
    padding: 12px 0; border-radius: 0; border-bottom: 1px solid rgba(127, 220, 211, .2);
    font: 600 27px/1.05 var(--f-head); letter-spacing: 0; text-transform: none; color: #FFF3DA; text-shadow: none;
    animation: menu-item .4s ease both;
  }
  :is(.site-head, .head) .site-nav.is-open a:nth-child(2) { animation-delay: .04s; }
  :is(.site-head, .head) .site-nav.is-open a:nth-child(3) { animation-delay: .08s; }
  :is(.site-head, .head) .site-nav.is-open a:nth-child(4) { animation-delay: .12s; }
  :is(.site-head, .head) .site-nav.is-open a:nth-child(5) { animation-delay: .16s; }
  :is(.site-head, .head) .site-nav.is-open a:nth-child(6) { animation-delay: .2s; }
  :is(.site-head, .head) .site-nav.is-open a:last-child { border-bottom: 0; }
  :is(.site-head, .head) .site-nav.is-open a img { display: block; width: 68px; height: 68px; object-fit: cover; border-radius: 12px; box-shadow: 0 0 0 1px rgba(127, 220, 211, .4), 0 6px 16px rgba(0, 0, 0, .4); }
  :is(.site-head, .head) .site-nav.is-open a small { display: block; margin-top: 5px; font: italic 500 16px/1.25 var(--f-head); color: rgba(243, 233, 210, .72); }
  :is(.site-head, .head) .site-nav.is-open a::after,
  :is(.site-head, .head) .site-nav.is-open a[aria-current="page"]::after { content: "→"; position: static; width: auto; height: auto; background: none; box-shadow: none; font: 400 20px/1 var(--f-text); color: var(--gold); }
  :is(.site-head, .head) .site-nav.is-open a[aria-current="page"] b { color: var(--gold); }
  :is(.site-head, .head) .site-nav.is-open a[aria-current="page"] img { box-shadow: 0 0 0 2px var(--gold), 0 6px 16px rgba(0, 0, 0, .4); }
  :is(.site-head, .head) .site-nav.is-open a:active { background: rgba(127, 220, 211, .08); }
  /* Logo and the Close button stay on top of the open menu. */
  .brand, .menu-btn { position: relative; z-index: 61; }
  .head .logo, .head .menu-btn { z-index: 61; }
  html.menu-open { overflow: hidden; }
  html.menu-open .site-head { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(7, 36, 44, .97); }
}
@keyframes menu-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes menu-item { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .site-nav.is-open, .site-nav.is-open a { animation: none !important; } }
@media (max-width: 860px) {
  .section-head, .band { grid-template-columns: minmax(0, 1fr); }
  .photo-hero { min-height: 74vh; }
  .photo-hero .wrap { padding-block: 120px 40px; }
  .plate-pin span { font-size: 9px; padding: 3px 4px 2px; }
  .plate-pin i { width: 8px; height: 8px; }
  body { font-size: 16.5px; }
}
@media (max-width: 560px) { .plate-pin.is-minor span { display: none; } }
@media (prefers-reduced-motion: reduce) { .ph img { transition: none; } }

/* ==========================================================================
   Editorial layer: big condensed grotesque titles, mono data, mixed-size
   grids and a river-line timeline. Kept deliberately plain: flat colours, no
   glows or gradient text, no decorative motion. It restyles the components
   above; page <style> blocks come later, so overrides here use a little more
   specificity where a page sets the same property.
   ========================================================================== */
body { font: 400 17px/1.62 var(--f-text); letter-spacing: -.002em; }
.display {
  font: 600 clamp(72px, 15vw, 232px)/.9 var(--f-title); font-variation-settings: "opsz" 144, "SOFT" 50;
  letter-spacing: -.02em;
}
.display.is-long { font-size: clamp(64px, 11.4vw, 176px); }
h2 { font: 600 clamp(38px, 5.4vw, 80px)/1.02 var(--f-head); font-variation-settings: "opsz" 144, "SOFT" 50; letter-spacing: -.018em; }
h3 { font: 620 clamp(21px, 1.7vw, 25px)/1.12 var(--f-head); font-variation-settings: "wdth" 94, "opsz" 28; letter-spacing: -.018em; }
:is(h1, h2, h3, .lede, .next-link, .statement) em { font: inherit; font-style: italic; color: inherit; letter-spacing: inherit; }
.lede { font: 400 clamp(23px, 2.2vw, 31px)/1.2 var(--f-serif); letter-spacing: -.005em; }
.eyebrow { font: 500 12px/1.4 var(--f-mono); letter-spacing: .1em; }
.sci, .ph figcaption, .photo-credit, .research-note, .plate figcaption { font-family: var(--f-serif); }
.sci { font-size: 1.06em; }
.ph figcaption { font-size: 15px; }
.research-note { font-size: 17px; }
.ph { border-radius: 10px; }

/* Sections: more air, divided by a plain hairline */
.section { border-top: 1px solid var(--rule); padding-block: clamp(56px, 8vw, 120px); gap: clamp(28px, 3.4vw, 48px); }
.section-head { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px 56px; align-items: start; }
.section-head .prose { padding-top: 10px; }
.prose { font-size: 17.5px; }

/* Photo heroes: a giant condensed title, the lede and the key figures side by side under it */
.photo-hero { min-height: min(94vh, 920px); }
.photo-hero .wrap { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 56px; align-items: end; padding-block: 140px 46px; }
.photo-hero :is(.eyebrow, .display) { grid-column: 1 / -1; }
.photo-hero .display { margin-bottom: 6px; }
.photo-hero .lede { grid-column: 1; }
.photo-hero .hero-meta { grid-column: 2; display: grid; gap: 14px; align-self: end; padding-left: 22px; border-left: 1px solid rgba(255, 255, 255, .35); font: 400 12.5px/1.35 var(--f-mono); letter-spacing: .02em; }
.photo-hero .hero-meta span { display: grid; gap: 3px; }
.photo-hero .hero-meta b { font: 600 28px/1.05 var(--f-title); font-variation-settings: "opsz" 72, "SOFT" 50; letter-spacing: -.01em; color: #A8F0E8; }

/* Bento grid for the research figures: one big dark card, then mixed sizes */
.figures { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-flow: dense; gap: 14px; }
.figure-card { grid-column: span 2; padding: 22px 22px 20px; border-radius: 16px; }
.figure-card b { font: 600 clamp(34px, 3.4vw, 52px)/1 var(--f-title); font-variation-settings: "opsz" 144, "SOFT" 50; letter-spacing: -.015em; }
.figures .figure-card:nth-child(1) { grid-column: span 3; grid-row: span 2; align-content: end; min-height: 340px; border: 0; color: #E3F2EF; background: var(--bg-deep); }
.figures .figure-card:nth-child(1) b { font-size: clamp(72px, 9vw, 150px); color: #FFFFFF; }
.figures .figure-card:nth-child(1) p { font-size: 18px; max-width: 30ch; }
.figures .figure-card:nth-child(1) cite { color: #9FC9C4; }
.figures .figure-card:nth-child(2), .figures .figure-card:nth-child(3) { grid-column: span 3; }
.figures .figure-card:nth-child(4) { grid-column: span 4; }

/* Timelines: the river as a line, each date a stone on it */
.section .timeline li { position: relative; border-top: 0; }
.section .timeline li:last-child { border-bottom: 0; }
.section .timeline li::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(12rem + 15px); width: 2px; background: color-mix(in srgb, var(--river) 40%, transparent); }
.section .timeline li::after { content: ""; position: absolute; top: 28px; left: calc(12rem + 10px); width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--river); box-shadow: 0 0 0 4px var(--bg); }
.section .timeline li.is-key::after, .section .timeline li:first-child::after { background: var(--river); }
.section .timeline .when { font: 600 clamp(24px, 2.5vw, 36px)/1.05 var(--f-title); font-variation-settings: "opsz" 144, "SOFT" 50; letter-spacing: -.01em; color: var(--gold); }
.section .timeline .what { padding-left: 14px; }

/* Visit: chapter numerals as big outlines */
.chapters { counter-reset: chap; }
.chapters .chapter { counter-increment: chap; }
.ch-top .ch-num { font: 800 0/.8 var(--f-title); font-variation-settings: "wdth" 75, "opsz" 96; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1.5px var(--gold); }
.ch-top .ch-num::before { content: counter(chap, decimal-leading-zero); font-size: clamp(64px, 7vw, 112px); }   /* 01, 02 … (Roman numerals read as bars in this face) */

/* Footer: big next-step links */
.site-foot .next-link { font: 600 clamp(30px, 4vw, 58px)/1.05 var(--f-title); font-variation-settings: "opsz" 144, "SOFT" 50; letter-spacing: -.015em; }
.site-foot .next-link span { font: 500 11.5px/1 var(--f-mono); letter-spacing: .12em; }

/* Menu sheet: the new type */
:is(.site-head, .head) .site-nav.is-open a { font-family: var(--f-title); font-weight: 650; letter-spacing: -.02em; font-variation-settings: "wdth" 88; }
:is(.site-head, .head) .site-nav.is-open a small { font: italic 400 17px/1.25 var(--f-serif); letter-spacing: 0; }
.chips button { font: 500 11.5px/1 var(--f-mono); letter-spacing: .08em; }

/* Deep-river bands: one section per page runs edge to edge in the river's dark blue-green.
   The colour reaches the screen edges through a box-shadow, which adds no sideways scroll. */
.section.is-deep { position: relative; border-top: 0; color: var(--ink); background: var(--bg-deep); box-shadow: 0 0 0 100vmax var(--bg-deep); clip-path: inset(0 -100vmax); }
.section.is-deep + .section { border-top: 0; }

/* The inner-page header slides away while reading down (site.js) */
@media (prefers-reduced-motion: no-preference) {
  .site-head { transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
}
.site-head.is-tucked { transform: translateY(-100%); }

/* Keyboard users: a "Skip to content" link that appears on the first Tab press */
.skip-link { position: absolute; left: 12px; top: -64px; z-index: 200; padding: 12px 18px; border-radius: 10px; background: #0B3440; color: #FFFFFF; font: 600 15px/1 var(--f-text); text-decoration: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.skip-link:focus { top: 12px; outline: 2px solid #7FDCD3; outline-offset: 2px; }
#main:focus { outline: none; }

/* Link cards to other sites */
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.links a { display: grid; gap: 8px; align-content: start; height: 100%; padding: 18px 18px 16px; border-radius: 12px; background: #FFFFFF; box-shadow: 0 0 0 1px var(--rule); color: var(--ink); text-decoration: none; transition: box-shadow .2s ease; }
.links a:hover { box-shadow: 0 0 0 2px var(--river); }
.links b { font: 620 20px/1.15 var(--f-title); font-variation-settings: "wdth" 92; letter-spacing: -.015em; color: var(--head); }
.links span { font-size: 15.5px; line-height: 1.45; color: var(--ink-soft); }
.links i { font: normal 500 12px/1 var(--f-mono); letter-spacing: .04em; color: var(--gold); }
.links i::after { content: " ↗"; }

/* About: who makes the site, and how to reach them */
.about-links { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 400px)); }
.site-foot .about-line { margin-bottom: 4px; }
.site-foot .about-line a { color: var(--gold); text-underline-offset: 3px; }

/* Photo gallery: one tall photo and four around it */
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 260px 260px; gap: 12px; }
.gallery .ph:first-child { grid-row: span 2; }
@media (max-width: 860px) {
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 280px 180px 180px; }
  .gallery .ph:first-child { grid-column: span 2; grid-row: auto; }
}

/* Filmstrip: photographs in downstream order, dragged or scrolled sideways */
.film { display: flex; gap: 18px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-padding-inline: max(16px, calc((100vw - 1200px) / 2 + 16px)); padding: 6px max(16px, calc((100vw - 1200px) / 2 + 16px)) 26px; scrollbar-width: none; cursor: grab; overscroll-behavior-x: contain; }
.film::-webkit-scrollbar { display: none; }
.film.is-drag { cursor: grabbing; scroll-snap-type: none; }
.film:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.frame { flex: none; width: clamp(230px, 24vw, 360px); margin: 0; display: grid; gap: 12px; align-content: start; scroll-snap-align: start; }
.frame img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; box-shadow: 0 14px 30px rgba(11, 52, 64, .18); user-select: none; -webkit-user-drag: none; pointer-events: none; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.frame:nth-child(even) { padding-top: 54px; }
.frame:nth-child(even) img { aspect-ratio: 4 / 4.4; }
.frame:hover img { transform: translateY(-6px); }
.frame figcaption { display: grid; gap: 5px; font: 620 clamp(20px, 1.7vw, 24px)/1.1 var(--f-title); font-variation-settings: "wdth" 90; letter-spacing: -.02em; color: var(--head); }
.frame figcaption span { font: 500 11px/1.2 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.film-foot { display: flex; align-items: center; gap: 18px; }
.film-bar { flex: 1; position: relative; height: 2px; background: var(--rule); overflow: hidden; }
.film-bar i { position: absolute; inset: 0; background: var(--river); transform-origin: left; transform: scaleX(var(--p, .08)); }
.film-btn { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--rule-strong); background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; font: 400 20px/1 var(--f-text); transition: background .2s, border-color .2s; }
.film-btn:hover { background: var(--gold); border-color: var(--gold); color: #fff; }


@media (max-width: 860px) {
  .section-head { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .section-head .prose { padding-top: 0; }
  .eco-band .ph { min-height: 240px; }
  .photo-hero .wrap { grid-template-columns: minmax(0, 1fr); row-gap: 16px; padding-block: 120px 36px; }
  .frame { width: 68vw; }
  .frame:nth-child(even) { padding-top: 30px; }
  .film-btn { display: none; }
  .photo-hero .hero-meta { grid-column: 1; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); padding-left: 0; border-left: 0; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .3); }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures .figure-card:nth-child(n) { grid-column: span 1; grid-row: auto; min-height: 0; }
  .figures .figure-card:nth-child(1) { grid-column: span 2; min-height: 260px; }
  .section .timeline li { padding-left: 30px; }
  .section .timeline li::before { left: 5px; }
  .section .timeline li::after { left: 0; top: 24px; }
  .section .timeline .what { padding-left: 0; }
}
@media (max-width: 560px) {
  .figures { grid-template-columns: minmax(0, 1fr); }
  .figures .figure-card:nth-child(n) { grid-column: span 1; }
}
