/* =========================================================
   PHOTO GALLERY: "One day on safari"
   The sky behind every part of the day changes colour like the real day; a sticky sun-and-clock bar follows the scroll.
   Source: gallery.css (copied into css/ by group5e.py). Needs the tokens of home-new.css.
   ========================================================= */
.gal { position: relative; }
.gal [hidden] { display: none !important; }

/* ---------- intro + filters ---------- */
.gal-intro { background: var(--brown-deep); color: #fff; padding: 8px var(--gutter) 52px; text-align: center; }
.gal-lead { margin: 0 auto 26px; max-width: 720px; font-size: clamp(15px, 1.4vw, 18px); line-height: 1.7; color: rgba(255, 255, 255, .86); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; cursor: pointer;
  font: 600 14px/1.2 var(--font-body); color: #fff; background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(232, 208, 128, .5); border-radius: 999px;
  transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease);
}
.chip span { font-weight: 500; font-size: 12px; opacity: .7; }
.chip:hover { background: rgba(232, 208, 128, .2); transform: translateY(-2px); }
.chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--brown-ink); }
.chip:focus-visible, .sunbar a:focus-visible, .shot a:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }

/* ---------- sticky sun + clock ---------- */
.sunbar {
  --s1: #2d1e00; --s2: #e8a36f; --sun: #ffd27a;
  position: sticky; top: var(--header-h); z-index: 30; color: #fff;
  background: rgba(26, 14, 0, .88); -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3);
}
.sunbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--s1), var(--s2), var(--s1)); opacity: .95; }
.sunbar[data-tod="dawn"] { --s1: #4b3a6b; --s2: #f0a574; --sun: #ffc98a; }
.sunbar[data-tod="morning"] { --s1: #f0a574; --s2: #bfe3f2; --sun: #ffe08a; }
.sunbar[data-tod="midday"] { --s1: #8fd0f0; --s2: #d9eef7; --sun: #fff0a8; }
.sunbar[data-tod="afternoon"] { --s1: #a9dcf3; --s2: #f3cf8a; --sun: #ffd25f; }
.sunbar[data-tod="golden"] { --s1: #ee8f45; --s2: #c2562b; --sun: #ff9a3c; }
.sunbar[data-tod="night"] { --s1: #24172f; --s2: #3d4a8a; --sun: #e8e4ff; }
.sunbar-in { display: flex; align-items: center; justify-content: center; gap: clamp(12px, 3vw, 40px); max-width: 1200px; margin: 0 auto; padding: 4px var(--gutter) 7px; }
.sunbar-sky { display: flex; align-items: flex-end; gap: 10px; flex: none; }
.sunbar-sky svg { display: block; overflow: visible; }
.arc-track { fill: none; stroke: rgba(255, 255, 255, .22); stroke-width: 1.6; stroke-dasharray: 3 5; }
.arc-lit { fill: none; stroke: var(--sun); stroke-width: 2.2; stroke-linecap: round; }
.horizon { stroke: rgba(255, 255, 255, .3); stroke-width: 1; }
.sun-core { fill: var(--sun); }
.sun-glow { fill: var(--sun); opacity: .28; }
.sun-rays line { stroke: var(--sun); stroke-width: 2; stroke-linecap: round; }
.moon { fill: var(--sun); opacity: 0; }
.sunbar[data-tod="night"] .moon { opacity: 1; }
.sunbar[data-tod="night"] .sun-core, .sunbar[data-tod="night"] .sun-rays { opacity: 0; }
.sunbar[data-tod="night"] .sun-glow { opacity: .15; }
.clock { font: 600 clamp(26px, 3vw, 34px)/1 var(--font-display); letter-spacing: .04em; color: var(--sun); min-width: 3.3em; text-align: left; font-variant-numeric: tabular-nums; }
.stops { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.stops a {
  display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 5px 12px; border-radius: 12px;
  color: rgba(255, 255, 255, .78); text-decoration: none; transition: background .25s, color .25s;
}
.stops a .ic { grid-row: 1 / 3; width: 22px; height: 22px; }
.stops a b { font: 600 13px/1.1 var(--font-body); font-variant-numeric: tabular-nums; }
.stops a span { font-size: 11px; line-height: 1.2; opacity: .8; white-space: nowrap; }
.stops a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.stops a[aria-current="true"] { background: rgba(255, 255, 255, .14); color: var(--sun); }

/* ---------- a part of the day ---------- */
.tod {
  --a: #2d1e00; --m: var(--a); --b: #e8a36f; --fg: #fff; --fg-soft: rgba(255, 255, 255, .8);
  position: relative; overflow: hidden; color: var(--fg);
  padding: clamp(56px, 8vw, 104px) var(--gutter) clamp(64px, 9vw, 120px);
  scroll-margin-top: calc(var(--header-h) + 66px);
  background: linear-gradient(180deg, var(--a) 0%, var(--m) 38%, var(--b) 100%);
}
.tod-dawn { --a: #2d1e00; --m: #4b3a6b; --b: #f0a574; }
.tod-morning { --a: #f0a574; --m: #f6d9ad; --b: #bfe3f2; --fg: var(--ink); --fg-soft: rgba(42, 29, 8, .75); }
.tod-midday { --a: #bfe3f2; --m: #98d3f1; --b: #a9dcf3; --fg: var(--ink); --fg-soft: rgba(42, 29, 8, .75); }
.tod-afternoon { --a: #a9dcf3; --m: #e9e2c0; --b: #f3cf8a; --fg: var(--ink); --fg-soft: rgba(42, 29, 8, .75); }
.tod-golden { --a: #f3cf8a; --m: #ee8f45; --b: #c2562b; --fg: var(--ink); --fg-soft: rgba(42, 29, 8, .78); padding-bottom: clamp(130px, 14vw, 190px); }
.tod-night { --a: #24172f; --m: #141a3a; --b: #0a0f26; }
.tod-wrap { position: relative; max-width: 1240px; margin: 0 auto; }

.tod-head { position: relative; display: flex; align-items: center; gap: clamp(18px, 4vw, 56px); margin: 0 0 clamp(28px, 4vw, 48px); }
.tod-time {
  margin: 0; flex: none; font-family: var(--font-display); font-weight: 700; line-height: .8; letter-spacing: .02em; font-size: clamp(82px, 16vw, 210px);
  color: transparent; -webkit-text-stroke: 2px var(--fg); opacity: .55; font-variant-numeric: lining-nums tabular-nums;
}
.tod-text { min-width: 0; }
.tod-range { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .14em; color: var(--fg-soft); font-variant-numeric: tabular-nums; }
.tod h2 { margin: 0 0 8px; font-size: clamp(32px, 4.6vw, 58px); line-height: 1.04; color: var(--fg); text-wrap: balance; }
.tod-line { margin: 0; max-width: 46ch; font-size: clamp(15px, 1.3vw, 17px); line-height: 1.6; color: var(--fg-soft); }
.tod-icon { margin-left: auto; align-self: flex-start; flex: none; color: var(--fg); opacity: .7; }
.tod-icon .ic { width: clamp(34px, 4vw, 52px); height: auto; }

/* stars over the night, and a glow behind the golden hour */
.tod-night::before, .tod-night::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 4%, #000 36%); mask-image: linear-gradient(180deg, transparent 4%, #000 36%);
}
.tod-night::before {
  background:
    radial-gradient(2.2px 2.2px at 8% 22%, #fff 50%, transparent 52%), radial-gradient(1.7px 1.7px at 17% 41%, #fff 50%, transparent 52%), radial-gradient(2.6px 2.6px at 29% 18%, #fff 50%, transparent 52%),
    radial-gradient(1.7px 1.7px at 38% 52%, #fff 50%, transparent 52%), radial-gradient(2.2px 2.2px at 47% 14%, #fff 50%, transparent 52%), radial-gradient(1.7px 1.7px at 58% 36%, #fff 50%, transparent 52%),
    radial-gradient(2.6px 2.6px at 67% 63%, #fff 50%, transparent 52%), radial-gradient(1.7px 1.7px at 76% 24%, #fff 50%, transparent 52%), radial-gradient(2.2px 2.2px at 86% 47%, #fff 50%, transparent 52%),
    radial-gradient(1.7px 1.7px at 93% 16%, #fff 50%, transparent 52%), radial-gradient(1.7px 1.7px at 12% 71%, #fff 50%, transparent 52%), radial-gradient(2.2px 2.2px at 52% 78%, #fff 50%, transparent 52%),
    radial-gradient(1.7px 1.7px at 81% 82%, #fff 50%, transparent 52%), radial-gradient(1.7px 1.7px at 24% 88%, #fff 50%, transparent 52%);
  animation: gal-twinkle 5s ease-in-out infinite alternate;
}
.tod-night::after {
  background:
    radial-gradient(2px 2px at 5% 34%, #cfe0ff 50%, transparent 52%), radial-gradient(2.6px 2.6px at 21% 12%, #fff 50%, transparent 52%), radial-gradient(1.7px 1.7px at 33% 68%, #cfe0ff 50%, transparent 52%),
    radial-gradient(2px 2px at 43% 30%, #fff 50%, transparent 52%), radial-gradient(2.6px 2.6px at 62% 11%, #cfe0ff 50%, transparent 52%), radial-gradient(1.7px 1.7px at 72% 54%, #fff 50%, transparent 52%),
    radial-gradient(2px 2px at 89% 31%, #fff 50%, transparent 52%), radial-gradient(1.7px 1.7px at 97% 70%, #cfe0ff 50%, transparent 52%), radial-gradient(2.6px 2.6px at 15% 58%, #fff 50%, transparent 52%),
    radial-gradient(1.7px 1.7px at 56% 90%, #cfe0ff 50%, transparent 52%), radial-gradient(2px 2px at 78% 76%, #fff 50%, transparent 52%);
  animation: gal-twinkle 7s ease-in-out -3s infinite alternate;
}
@keyframes gal-twinkle { from { opacity: .25; } to { opacity: 1; } }
.tod-dawn::before, .tod-golden::before {
  content: ""; position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 214, 140, .42), rgba(255, 170, 90, .16) 38%, transparent 66%);
}
.tod-dawn::before { right: -22vmax; top: 32%; }
.tod-golden::before { left: -26vmax; top: 18%; background: radial-gradient(circle, rgba(255, 236, 170, .55), rgba(255, 150, 70, .2) 40%, transparent 68%); }
.sil { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(90px, 13vw, 170px); display: block; pointer-events: none; }

/* ---------- the photos: rows of equal height, as wide as each photo needs ---------- */
.reel { --rh: clamp(190px, 21vw, 290px); position: relative; display: flex; flex-wrap: wrap; gap: 10px; }
.reel::after { content: ""; flex-grow: 10; }
.shot {
  position: relative; flex: var(--r) 1 calc(var(--r) * var(--rh)); height: var(--rh); min-width: 0; margin: 0;
  border-radius: 16px; overflow: hidden; background: rgba(26, 14, 0, .25); box-shadow: 0 14px 30px -18px rgba(10, 6, 0, .75);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), opacity .8s var(--ease), translate .8s var(--ease);
}
.shot a { display: block; width: 100%; height: 100%; }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), filter .5s; }
.shot:hover { box-shadow: 0 26px 44px -20px rgba(10, 6, 0, .85); z-index: 2; }
.shot:hover img { transform: scale(1.07); }
.shot figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 38px 14px 12px; pointer-events: none;
  font-size: 13px; line-height: 1.4; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .55);
  background: linear-gradient(180deg, transparent, rgba(20, 10, 0, .8));
  opacity: 0; transform: translateY(12px); transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.shot:hover figcaption, .shot:focus-within figcaption { opacity: 1; transform: none; }
.shot-time {
  position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px 4px 8px; border-radius: 999px;
  font: 600 11.5px/1 var(--font-body); letter-spacing: .04em; color: #fff; background: rgba(20, 10, 0, .5);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-variant-numeric: tabular-nums;
}
.gal.is-js .shot:not(.is-in) { opacity: 0; translate: 0 28px; }

/* video clips: poster with a play button; the lightbox plays the clip */
.shot-play {
  position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; pointer-events: none;
  color: #fff; background: rgba(20, 10, 0, .55); border: 1.5px solid rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: transform .35s var(--ease), background .35s;
}
.shot-play::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .55); animation: gal-ping 2.6s ease-out infinite; }
.shot-play svg { width: 24px; height: 24px; margin-left: 3px; fill: currentColor; }
.shot-video:hover .shot-play { transform: scale(1.12); background: rgba(195, 169, 83, .9); color: var(--brown-ink); }
.shot-dur {
  position: absolute; left: 10px; top: 10px; padding: 4px 9px; border-radius: 999px; font: 600 11.5px/1 var(--font-body); letter-spacing: .04em; color: #fff;
  background: rgba(20, 10, 0, .5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-variant-numeric: tabular-nums;
}
@keyframes gal-ping { 0% { transform: scale(.85); opacity: .9; } 70%, 100% { transform: scale(1.45); opacity: 0; } }
.lb-fig video { display: block; max-width: 100%; max-height: calc(100vh - 196px); max-height: calc(100dvh - 196px); width: auto; height: auto; border-radius: 12px; background: #000; box-shadow: 0 30px 80px -30px #000; }

/* ---------- lightbox ---------- */
html.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 56px 64px 96px; background: rgba(12, 6, 0, .94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lb[hidden] { display: none; }
.lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; }
.lb-fig img { display: block; max-width: 100%; max-height: calc(100vh - 196px); max-height: calc(100dvh - 196px); width: auto; height: auto; border-radius: 12px; box-shadow: 0 30px 80px -30px #000; transition: opacity .3s; }
.lb-fig img.is-loading { opacity: .25; }
.lb-fig figcaption { margin-top: 14px; text-align: center; color: #fff; font-size: 15px; line-height: 1.5; }
.lb-meta { display: block; margin-top: 2px; font-size: 12.5px; letter-spacing: .06em; color: var(--gold-light); }
.lb button, .lb-cta {
  position: absolute; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%;
  color: #fff; background: rgba(255, 255, 255, .08); cursor: pointer; transition: background .2s, border-color .2s;
}
.lb button:hover { background: rgba(232, 208, 128, .25); border-color: var(--gold-light); }
.lb button:focus-visible, .lb-cta:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.lb button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 12px; top: 50%; margin-top: -23px; }
.lb-next { right: 12px; top: 50%; margin-top: -23px; }
.lb-count { position: absolute; left: 20px; top: 24px; font-size: 13px; letter-spacing: .12em; color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; }
.lb-cta { position: absolute; left: 50%; bottom: 16px; width: auto; height: auto; padding: 10px 20px; border-radius: 999px; transform: translateX(-50%); font-size: 14px; font-weight: 600; text-decoration: none; color: var(--brown-ink); background: var(--gold); border-color: var(--gold); }
.lb-cta:hover { background: var(--gold-light); }

/* ---------- smaller screens ---------- */
@media (max-width: 1199px) {
  .sunbar-sky svg { width: 118px; height: auto; }
  .stops a { padding: 5px 8px; }
  .stops a span { display: none; }
  .stops a { grid-template-rows: auto; }
  .stops a .ic { grid-row: auto; }
}
@media (max-width: 900px) {
  .tod-head { flex-wrap: wrap; row-gap: 6px; }
  .tod-icon { display: none; }
}
@media (max-width: 640px) {
  .sunbar-sky { display: none; }
  .sunbar-in { padding: 4px 8px 7px; }
  .stops { width: 100%; justify-content: space-between; gap: 0; }
  .stops a { grid-template-columns: auto; justify-items: center; row-gap: 1px; padding: 4px 3px; }
  .stops a .ic { width: 20px; height: 20px; }
  .stops a b { font-size: 11px; }
  .reel { --rh: 150px; gap: 7px; }
  .shot { border-radius: 12px; }
  .shot figcaption { opacity: 1; transform: none; padding-top: 22px; font-size: 11.5px; }
  .tod-time { font-size: clamp(70px, 24vw, 110px); }
  .lb { padding: 56px 8px 96px; }
  .lb-prev { left: 4px; } .lb-next { right: 4px; }
  .lb-prev, .lb-next { top: auto; bottom: 14px; margin-top: 0; }
}
@media (hover: none) {
  .shot figcaption { opacity: 1; transform: none; padding-top: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .gal.is-js .shot:not(.is-in) { opacity: 1; translate: none; }
  .shot, .shot img, .shot figcaption, .chip, .lb-fig img { transition: none; }
  .tod-night::before, .tod-night::after, .shot-play::after { animation: none; }
  .shot:hover img { transform: none; }
}
