/* =========================================================
   Ceylon Bird Track: styles
   To change the colours of the whole site, edit the values
   in :root below.
   ========================================================= */

:root {
  --forest:  #183d32;   /* main brand green */
  --deep:    #102b25;   /* darkest green: footer */
  --moss:    #72864f;   /* olive accent for italic words */
  --lime:    #d2e875;   /* bright accent: buttons, highlights */
  --cream:   #f3f1e9;   /* warm off-white page background */
  --paper:   #f8f7f1;   /* card background */
  --sage:    #e9eadf;   /* tinted sections */
  --line:    #d7dbd0;   /* thin divider lines */
  --ink:     #18352e;   /* main text */
  --muted:   #5f6e64;   /* secondary text */

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans:  "DM Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --header-h: 78px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
p { margin: 0 0 1em; }

h1, h2, h3 { font-family: var(--serif); color: var(--forest); margin: 0; font-weight: 600; }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--moss); }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 32px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }

/* Small uppercase label above headings */
.kicker {
  display: flex; align-items: center; gap: 12px;
  font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: #6b7d52;
  margin: 0 0 14px;
}
.kicker-light { color: #d8e5b0; }
.kicker-line { width: 28px; height: 1px; background: currentColor; }

/* Small label on cards */
.tag {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: #7a8a56;
  margin: 0 0 8px;
}

/* ---------- Buttons & links ---------- */
.button {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 24px;
  border-radius: 3px;
  font-size: .9rem; font-weight: 700;
  transition: transform .2s, background-color .2s;
}
.button:hover { transform: translateY(-2px); }
.button-lime { background: var(--lime); color: var(--deep); }
.button-lime:hover { background: #ddf08a; }
.button-large { padding: 18px 30px; font-size: 1rem; }

.text-link { font-size: .9rem; font-weight: 600; color: #fff; border-bottom: 1px solid rgba(255,255,255,.4); padding-bottom: 4px; }
.text-link:hover { border-color: var(--lime); }

.underlink {
  display: inline-block;
  font-size: .9rem; font-weight: 700;
  border-bottom: 1px solid #8c9b73; padding-bottom: 6px;
}
.underlink span { margin-left: 14px; }
.underlink:hover { border-color: var(--forest); }

/* ---------- Header & navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  padding: 0 6%;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(243, 241, 233, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(24, 61, 50, .08);
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--forest); }
.brand-mark { font-size: 30px; line-height: 1; color: #81994b; }
/* Logo: Blue Magpie on a tea sprig */
.brand-logo { width: auto; height: 46px; flex: none; }
.brand-name {
  display: flex; flex-direction: column;
  font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; line-height: 1.25;
}
.brand-name b { font-size: .82rem; letter-spacing: .14em; }

.site-nav { display: flex; align-items: center; gap: 34px; font-size: .9rem; font-weight: 600; }
.site-nav > a:not(.nav-book):hover { opacity: .6; }
.nav-book {
  padding: 12px 18px;
  background: var(--forest); color: #fff;
  border-radius: 3px;
  transition: background-color .2s;
}
.nav-book:hover { background: #24543f; }
.nav-book span { margin-left: 8px; }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 0; background: transparent; cursor: pointer;
}
.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  display: block; position: relative;
  width: 24px; height: 2px; margin: 0 auto;
  background: var(--forest); border-radius: 2px;
  transition: transform .25s, background-color .25s;
}
.menu-toggle-bars::before,
.menu-toggle-bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle-bars::before { top: -7px; }
.menu-toggle-bars::after  { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after  { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Header over the hero photo ----------
   At the very top of the page the header is see-through with white text and
   the light logo. Once you scroll (or open the phone menu) it turns cream again. */
.site-header { transition: background-color .3s, border-color .3s, box-shadow .3s; }
.site-header:not(.is-scrolled):not(:has(.site-nav.is-open)) {
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
}
.site-header:not(.is-scrolled):not(:has(.site-nav.is-open)) .brand,
.site-header:not(.is-scrolled):not(:has(.site-nav.is-open)) .site-nav > a:not(.nav-book) { color: #fff; }
.site-header:not(.is-scrolled):not(:has(.site-nav.is-open)) .menu-toggle-bars,
.site-header:not(.is-scrolled):not(:has(.site-nav.is-open)) .menu-toggle-bars::before,
.site-header:not(.is-scrolled):not(:has(.site-nav.is-open)) .menu-toggle-bars::after { background: #fff; }
.site-header:not(.is-scrolled):not(:has(.site-nav.is-open)) .nav-book { background: var(--lime); color: var(--deep); }
.logo-on-photo { display: none; }
.site-header:not(.is-scrolled):not(:has(.site-nav.is-open)) .logo-on-photo { display: block; }
.site-header:not(.is-scrolled):not(:has(.site-nav.is-open)) .logo-on-cream { display: none; }

/* ---------- Hero ----------
   A full-width photo fills the whole top section. The header floats over it
   (see "Header over the hero photo" above). A dark green shade on the left
   keeps the text easy to read on any photo. */
.hero {
  position: relative;
  overflow: hidden;
  margin-top: calc(-1 * var(--header-h));          /* slide up under the see-through header */
  min-height: min(860px, 100vh);
  padding: calc(var(--header-h) + 70px) 8% 110px;
  display: flex; align-items: center;
  color: #f5f3e9;
  background: var(--deep);                           /* shows while the photo loads */
}
.hero-photo { position: absolute; inset: 0; margin: 0; z-index: 0; }
.hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 0% 50%;      /* first number moves the photo left/right, second up/down */
  /* Hero photo position: zoom the photo in from its left edge so the nest moves
     to the right, clear of the text. Bigger "scale" = further right and closer. */
  transform: scale(1.5);
  transform-origin: 0% 58%;
}
@media (max-width: 1200px) {    /* medium screens: push the photo a little further right */
  .hero-photo img { transform: scale(1.68); transform-origin: 0% 60%; }
}
.hero-photo::after {           /* the shade that keeps the text readable */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 43, 37, .88) 0%, rgba(16, 43, 37, .62) 35%, rgba(16, 43, 37, .12) 65%, transparent 80%),
    linear-gradient(180deg, rgba(16, 43, 37, .45) 0%, transparent 22%);
}
.hero-photo figcaption {
  position: absolute; right: 6%; bottom: 24px; z-index: 1;
  font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: #fff;
  background: rgba(16, 43, 37, .55);
  padding: 6px 12px; border-radius: 999px;
}

.hero-content { position: relative; z-index: 2; max-width: 600px; }
.hero h1 {
  color: #f5f3e9;
  font-size: clamp(4.5rem, 10vw, 8.5rem);
  line-height: .88;
  letter-spacing: -.055em;
  margin: 28px 0 28px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .25);
}
.hero h1 em { color: var(--lime); }
.hero-copy { max-width: 460px; font-size: 1.1rem; line-height: 1.8; color: rgba(245, 243, 233, .9); }
.hero-actions { margin-top: 34px; display: flex; align-items: center; flex-wrap: wrap; gap: 28px; }

.hero-bottom {
  position: absolute; left: 8%; bottom: 28px; z-index: 1;
  font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(245, 243, 233, .7);
}
.hero-bottom span:last-child { display: none; }

/* ---------- Intro ---------- */
.intro { padding-top: 110px; padding-bottom: 100px; }
.intro-body {
  display: grid; grid-template-columns: 1fr .65fr; gap: 70px; align-items: end;
  margin-top: 8px;
}
.intro h2, .section-heading h2 {
  font-size: clamp(2.4rem, 5vw, 3.9rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.035em;
}
.intro-body p { color: var(--muted); font-size: 1.02rem; }

.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  margin-top: 70px; padding-top: 28px;
  border-top: 1px solid var(--line);
}
.stats div { display: flex; align-items: center; gap: 16px; }
.stats strong { font: 500 2.6rem/1 var(--serif); color: var(--moss); }
.stats span { font-size: .9rem; line-height: 1.5; color: var(--muted); max-width: 170px; }
.footnote { margin: 18px 0 0; font-size: .8rem; color: #8a9286; }

/* ---------- Sections ---------- */
.section { padding: 96px 0 104px; }
.section-tint { background: var(--sage); }

.section-heading {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 50px;
  margin-bottom: 44px;
}
.section-heading > p { max-width: 380px; margin: 0 0 6px; color: var(--muted); font-size: 1rem; }

/* ---------- Photo areas ----------
   Each photo spot has a soft colour "tone". When your real photo
   is in the images folder it covers the tone completely. */
.photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #50684f;
}
.photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
/* Dark fade at the bottom so captions are readable on any photo */
.photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(10, 30, 24, .55));
  pointer-events: none;
}
.photo figcaption {
  position: absolute; left: 18px; right: 18px; bottom: 14px; z-index: 2;
  font: italic 500 1.15rem/1.3 var(--serif);
  color: #fff;
}

.tone-blue   { background: radial-gradient(ellipse at 55% 45%, #718ca0, #45695e 48%, #294d42); }
.tone-copper { background: radial-gradient(ellipse at 52% 45%, #bf8755, #70533b 48%, #304b3c); }
.tone-mist   { background: radial-gradient(ellipse at 52% 45%, #9caa9e, #6b8170 50%, #354f43); }
.tone-green  { background: radial-gradient(ellipse at 52% 45%, #97a169, #59754f 48%, #294a3c); }
.tone-sand   { background: radial-gradient(ellipse at 52% 45%, #b7a77c, #7b7a59 48%, #3b5345); }
.tone-leaf   { background: radial-gradient(ellipse at 52% 45%, #a7b86f, #5f7f4b 48%, #2c4c3b); }

/* Placeholder (added automatically when a photo file is missing) */
.photo.is-empty img { display: none; }
.photo.is-empty::before {
  content: "✳";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 64px; color: rgba(231, 239, 196, .45);
}
.placeholder-label {
  position: absolute; top: 14px; left: 16px; right: 16px; z-index: 2;
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
  line-height: 1.5;
}
.placeholder-label code {
  display: inline-block; margin-top: 4px;
  padding: 1px 6px;
  font-size: .72rem; letter-spacing: 0; text-transform: none;
  background: rgba(0, 0, 0, .22); border-radius: 3px;
  word-break: break-all;
}

/* ---------- Bird cards ---------- */
.bird-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.bird-card { background: var(--paper); display: flex; flex-direction: column; }
.bird-card .photo { aspect-ratio: 4 / 3.3; }
.bird-info { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.bird-info h3 { font-size: 1.45rem; margin-bottom: 10px; }
.bird-info > p:not(.tag):not(.where) { font-size: .95rem; color: var(--muted); }

.where {
  margin: auto 0 0;
  padding-top: 14px;
  border-top: 1px solid #e1e4d8;
  font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #8b9586;
}
.where b {
  display: block; margin-top: 4px;
  font-size: .92rem; letter-spacing: 0; text-transform: none;
  color: #3e5a46;
}

/* ---------- Wild places: scroll-along map ----------
   The big map is "sticky": it stays in the centre of the screen while the
   place cards scroll past on either side of it. script.js watches which description is
   in the middle of the screen and tells the map which place to zoom to. */
.places .section-heading { margin-bottom: 20px; }

.scrolly { position: relative; --card-w: clamp(360px, 32vw, 440px); }   /* --card-w = width of the place cards */

.scrolly-map {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0;
  z-index: 0;
}

.map-frame {
  position: relative;
  /* As big as the screen height allows. The cards are see-through,
     so the map still shows underneath when a card passes over it. */
  width: min(calc((100vh - var(--header-h) - 24px) * 940 / 1570), 100%, 720px);
  aspect-ratio: 940 / 1570;
  /* No frame: when the map zooms in, it simply grows across the page (nothing is cut off) */
  overflow: visible;
}
/* Only the page edges limit the zoomed map, so no sideways scrollbar appears */
.places { overflow-x: clip; }

/* The map + labels + pins move together. --zoom, --fx and --fy are set by script.js */
.map-stage {
  --zoom: 1; --fx: 50%; --fy: 50%;
  position: absolute; inset: 6%;   /* a little room around the island for the soft edges */
  transform: scale(var(--zoom)) translate(calc(50% - var(--fx)), calc(50% - var(--fy)));
  transition: transform 1.1s cubic-bezier(.65, 0, .35, 1);
}
.map-outline { display: block; width: 100%; height: 100%; overflow: visible; }
.sl-coast { fill: none; stroke: #d3dec0; stroke-width: 30; stroke-linejoin: round; }   /* soft halo along the coast */
.sl-land  { fill: #dfe8cc; stroke: #3d5e3a; stroke-width: 8; stroke-linejoin: round; }    /* island colour and coastline */

/* Labels and pins stay the same size while the map zooms */
.map-label, .map-pin {
  position: absolute;
  left: var(--x); top: var(--y);
  transform: translate(-50%, -50%) scale(calc(1 / var(--zoom)));
  transition: transform 1.1s cubic-bezier(.65, 0, .35, 1), opacity .4s;
}
.map-label {
  white-space: nowrap;
  font-size: .72rem; font-weight: 600;
  pointer-events: none;
}
.map-label.town { color: #2f3d35; text-shadow: 0 0 3px #fff, 0 0 6px rgba(255,255,255,.9); }
/* Town dots sit exactly on the town; the name is to the right (or left for east-coast towns) */
.map-label.town {
  transform: translate(-3px, -50%) scale(calc(1 / var(--zoom)));
  transform-origin: 3px 50%;
}
.map-label.town.east {
  transform: translate(calc(-100% + 3px), -50%) scale(calc(1 / var(--zoom)));
  transform-origin: calc(100% - 3px) 50%;
}
.map-label.town.east::before { display: none; }
.map-label.town.east::after {
  content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 5px;
  border-radius: 50%; background: #2f3d35; vertical-align: 2px;
}
.map-label.town::before {
  content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 5px;
  border-radius: 50%; background: #2f3d35; vertical-align: 2px;
}
.map-label.park {
  font: italic 600 .72rem var(--serif);
  color: #fff;
  background: rgba(64, 104, 58, .78);
  padding: 1px 7px; border-radius: 999px;
}

.map-pin {
  width: 36px; height: 36px;
  padding: 0; border: 0; background: none; cursor: pointer;
  z-index: 3;
}
.pin-dot {
  position: absolute; inset: 0; margin: auto;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--forest);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(16, 43, 37, .45);
  transition: transform .3s, background-color .3s;
}
.pin-name {
  position: absolute; left: 32px; top: 50%; transform: translateY(-50%);
  white-space: nowrap;
  font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--forest);
  background: rgba(255, 255, 255, .94);
  padding: 3px 8px; border-radius: 3px;
  box-shadow: 0 2px 6px rgba(16, 43, 37, .15);
  transition: background-color .3s, color .3s;
}
.pin-name.pin-left { left: auto; right: 32px; }
.map-pin:hover .pin-dot { transform: scale(1.2); }
.map-pin.is-active { z-index: 4; }
.map-pin.is-active .pin-dot { transform: scale(1.5); background: var(--lime); border-color: var(--forest); }
.map-pin.is-active .pin-dot::after {
  content: ""; position: absolute; inset: -10px;
  border-radius: 50%; border: 2px solid var(--lime);
  animation: pin-pulse 1.8s ease-out infinite;
}
.map-pin.is-active .pin-name { background: var(--forest); color: #fff; }
@keyframes pin-pulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }

/* While zoomed in on a place, fade the town/park labels a little */
.map-stage.is-zoomed .map-label { opacity: .55; }

.map-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px var(--forest); }
.map-credit { text-align: center; }

/* The cards: they scroll up over the page, beside the centred map.
   Odd cards sit on the right, even cards on the left. */
.scrolly-steps {
  position: relative; z-index: 2;
  margin-top: calc(var(--header-h) - 100vh);   /* start on top of the sticky map */
  padding: 0 0 35vh;
  pointer-events: none;                        /* so the map pins stay clickable */
}
.scrolly-intro, .place-panel { pointer-events: auto; }

/* Cards are slightly see-through ("frosted glass") so the map outline shows underneath */
.scrolly-intro, .place-panel {
  background: rgba(248, 247, 241, .8);
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(16, 43, 37, .14);
}
.scrolly-intro {
  width: var(--card-w);
  margin: calc((100vh - var(--header-h)) / 2 - 140px) 0 35vh;   /* starts in the middle of the screen */
  padding: 28px 26px;
}
.facts-note { font-size: .82rem !important; color: #8a9286 !important; margin: 4px 0 14px; }
.scrolly-intro p:not(.kicker) { color: var(--muted); font-size: 1.1rem; line-height: 1.7; }
.scroll-cue {
  margin-top: 10px;
  font-size: .8rem !important; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--forest) !important;
}
.scroll-cue span { display: inline-block; margin-left: 6px; animation: cue-bob 1.6s ease-in-out infinite; }
@keyframes cue-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

.place-panel {
  width: var(--card-w);
  margin: 0 0 45vh;
  padding: 16px 16px 24px;
  opacity: .75;   /* cards waiting their turn are slightly faded */
  transform: translateY(20px) scale(.97);
  transition: opacity .5s, transform .6s ease;
}
.place-panel:nth-of-type(odd) { margin-left: auto; }   /* right-hand side */
.place-panel.is-active { opacity: 1; transform: none; }
.place-panel .photo { aspect-ratio: 2 / 1; border-radius: 6px; }
.place-copy { padding: 20px 8px 0; }
.place-number { font: italic 1rem var(--serif); color: #82915f; letter-spacing: 0; margin-right: 8px; }
.place-copy h3 { font-size: clamp(1.9rem, 2.6vw, 2.4rem); margin-bottom: 12px; }
.place-copy > p:not(.tag):not(.where):not(.tip) { color: var(--muted); font-size: 1rem; }

/* Quick facts: a small 2 x 2 table on each card */
.facts {
  list-style: none; margin: 18px 0 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px;
}
.facts li { font-size: .9rem; line-height: 1.4; color: var(--ink); }
.facts span {
  display: block; margin-bottom: 2px;
  font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #7a8a56;
}
/* "Good to know": a quiet note at the bottom of the card */
.tip {
  margin: 16px 0 0; padding: 14px 0 0;
  font-size: .88rem; line-height: 1.55; color: var(--muted);
  border-top: 1px solid #e1e4d8;
}
.tip b {
  display: block; margin-bottom: 2px;
  font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: #8b9586;
}

/* "Birds to look for": the highlight of each card */
.place-panel .where {
  margin: 18px 0 0; padding: 14px 16px 16px;
  background: rgba(210, 232, 117, .3);
  border: 1px solid rgba(169, 194, 90, .55);
  border-left: 4px solid #8fb03e;
  border-radius: 6px;
  color: #5c7a2e;
}
.place-panel .where b {
  margin-top: 6px;
  font-size: 1.02rem; line-height: 1.6;
  color: var(--forest);
}
.place-copy .where { margin-top: 18px; }

.photo-credit { margin: 8px 0 0; font-size: .75rem; color: #8a9286; }
.photo-credit a { text-decoration: underline; text-underline-offset: 2px; }
.photo-credit a:hover { color: var(--forest); }

/* Entrance: the map rises and the pins drop in when the section first appears */
.js .places:not(.in-view) .map-frame { opacity: 0; transform: translateY(40px) scale(.96); }
.js .places:not(.in-view) .map-pin { opacity: 0; }
.js .sl-land { stroke-dasharray: 1; }
.js .places:not(.in-view) .sl-land { stroke-dashoffset: 1; fill-opacity: 0; }
.js .places:not(.in-view) .sl-coast,
.js .places:not(.in-view) .map-label { opacity: 0; }
.places.in-view .sl-land  { animation: draw-coast 1.6s .1s ease-in-out both, fill-land .6s 1.2s ease both; }
.places.in-view .sl-coast { animation: fade-in .8s 1.2s ease both; }
.places.in-view .map-label { animation: fade-in .6s 1.5s ease backwards; }
@keyframes draw-coast { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fill-land  { from { fill-opacity: 0; } to { fill-opacity: 1; } }
@keyframes fade-in    { from { opacity: 0; } to { opacity: 1; } }
.map-frame { transition: opacity .9s ease, transform .9s ease; }
.places.in-view .map-pin { animation: pin-drop .6s 1.6s cubic-bezier(.3, 1.5, .5, 1) both; }
.places.in-view .map-pin:nth-of-type(2) { animation-delay: 1.75s; }
.places.in-view .map-pin:nth-of-type(3) { animation-delay: 1.9s; }
.places.in-view .map-pin:nth-of-type(4) { animation-delay: 2.05s; }
.places.in-view .map-pin:nth-of-type(5) { animation-delay: 2.2s; }
.places.in-view .map-pin:nth-of-type(n+6) { animation-delay: 2.35s; }
@keyframes pin-drop {
  from { opacity: 0; margin-top: -40px; }
  to   { opacity: 1; margin-top: 0; }
}

/* Switching places: the photo settles in with a gentle zoom */
.place-panel.is-active .photo img { animation: photo-zoom 1.1s ease both; }
@keyframes photo-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: 1.3fr .85fr 1fr;
  grid-template-rows: repeat(5, 220px);
  gap: 14px;
}
.gallery .g1 { grid-row: span 2; }
.gallery .g3 { grid-column: 3; grid-row: span 2; }
.gallery .g5 { grid-column: 1 / span 2; }
/* extra row of three photos (gallery-7 to gallery-9) */
/* last row of three photos (gallery-10 to gallery-12) */
.gallery .g11 img { object-position: 50% 15%; }   /* keep the owl's head in view */
.gallery .g1 img { object-position: 70% 6%; }    /* tall eagle photo: keep its head and beak in view */

/* ---------- Contact ---------- */
.contact {
  position: relative;
  overflow: hidden;
  padding: 110px 24px;
  background: var(--forest);
  color: #f4f3e9;
  text-align: center;
}
.contact-mark {
  /* Large faint copy of the logo in the background */
  position: absolute; right: 4%; top: 50%;
  width: 520px; height: auto;
  transform: translateY(-50%);
  opacity: .1;
  pointer-events: none;
}
.contact-inner { position: relative; max-width: 1040px; margin: 0 auto; }
.contact .kicker { justify-content: center; color: #d4e784; }
.contact h2 {
  color: #f4f3e9;
  font-size: clamp(2.8rem, 6vw, 4rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.035em;
  margin: 6px 0 22px;
}
.contact h2 em { color: var(--lime); }
.contact p { color: rgba(244, 243, 233, .8); font-size: 1.05rem; margin-bottom: 30px; }
.contact .contact-intro { max-width: 560px; margin: 0 auto 44px; }
.contact .contact-email { margin: 16px 0 0; font-size: .95rem; color: rgba(244, 243, 233, .65); }

/* ---------- Footer ---------- */
.site-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 28px 6%;
  background: var(--deep);
  color: #e7e9da;
}
.brand-footer { color: #e7e9da; }
.brand-footer .brand-mark { color: var(--lime); }
.footer-note { margin: 0; max-width: 420px; font-size: .85rem; color: rgba(231, 233, 218, .7); }
.footer-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.footer-end a { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.footer-end a:hover { color: var(--lime); }
.footer-end small { font-size: .78rem; color: rgba(231, 233, 218, .55); }

/* =========================================================
   Tablet
   ========================================================= */
@media (max-width: 1000px) {
  .bird-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   Mobile
   ========================================================= */
/* =========================================================
   Wild places on medium screens (small laptops, tablets on their side):
   the map sits on the left and all the cards scroll up on the right,
   so the map can stay big without the cards covering it.
   ========================================================= */
@media (min-width: 801px) and (max-width: 1200px) {
  .scrolly-map { padding-right: calc(var(--card-w) * .55); }
  .map-frame { width: min(calc((100vh - var(--header-h) - 24px) * 940 / 1570), 100%, 680px); }
  .scrolly-intro,
  .place-panel,
  .place-panel:nth-of-type(odd) { margin-left: auto; }
}

/* =========================================================
   Wild places on phones
   ========================================================= */
@media (max-width: 800px) {
  /* Phones: the map shows the whole island once, above the cards.
     It does not stay on screen, so the cards never slide underneath it. */
  .scrolly-steps { margin-top: 0; pointer-events: auto; padding-bottom: 4vh; }
  .scrolly-intro { width: auto; margin: 2vh 0 0; }
  .place-panel, .place-panel:nth-of-type(odd) { width: auto; margin: 5vh 0; opacity: 1; transform: none; }
  .scrolly-map {
    position: relative; top: auto;
    height: auto;
    padding: 0;
  }
  .map-frame {
    width: auto;
    height: min(70vh, 560px);
  }
  .map-label { font-size: .62rem; }
  .map-label.park { display: none; }   /* fewer labels so the small map stays clear */
  .pin-name { font-size: .66rem; padding: 2px 6px; }
}

@media (max-width: 800px) {
  :root { --header-h: 68px; }
  .site-header { padding: 0 5%; }

  .menu-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 6% 24px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 24px rgba(16, 43, 37, .1);
    font-size: 1.05rem;
  }
  .site-nav.is-open { display: flex; }
  .site-nav > a:not(.nav-book) { padding: 15px 0; border-bottom: 1px solid var(--line); }
  .nav-book { margin-top: 18px; padding: 15px; text-align: center; }


  .wrap { padding: 0 22px; }
  .intro { padding-top: 76px; padding-bottom: 70px; }
  .intro-body { grid-template-columns: 1fr; gap: 22px; }
  .stats { grid-template-columns: 1fr; gap: 18px; margin-top: 44px; }

  .section { padding: 72px 0; }
  .section-heading { flex-direction: column; align-items: flex-start; gap: 14px; }


  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(7, 170px); gap: 10px; }
  .gallery figcaption { font-size: .95rem; left: 12px; right: 12px; bottom: 10px; }
  .gallery .g1 { grid-row: span 2; }
  .gallery .g3 { grid-column: auto; grid-row: auto; }
  .gallery .g5 { grid-column: auto; }
  .gallery .g6 { grid-column: auto; }
  .gallery .g9 { grid-column: auto; }
  .gallery .g12 { grid-column: 1 / span 2; }   /* last photo full width */

  .contact { padding: 84px 22px; }
  .contact-mark { right: -35%; width: 380px; }

  .site-footer { flex-direction: column; align-items: flex-start; padding: 28px 22px; }
  .footer-end { align-items: flex-start; }
}

@media (max-width: 560px) {
  .bird-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 4.6rem; }
}

/* Respect visitors who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ---------- Meet your guide ---------- */
.guide-card {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  background: var(--forest);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(16, 43, 37, .18);
}
.guide-photo { min-height: 480px; height: 100%; }
.guide-photo::after { display: none; }
.guide-copy {
  padding: clamp(32px, 5vw, 64px);
  color: #f4f3e9;
  display: flex; flex-direction: column; justify-content: center;
}
.guide-copy h2 { color: #f4f3e9; font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 500; letter-spacing: -.02em; }
.guide-role { margin: 6px 0 20px; color: var(--lime); font-weight: 600; }
.guide-copy > p:not(.kicker):not(.guide-role) { color: rgba(244, 243, 233, .85); font-size: 1.05rem; line-height: 1.75; }
.guide-facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px;
  margin: 10px 0 30px; padding: 20px 0 0;
  border-top: 1px solid rgba(244, 243, 233, .18);
}
.guide-facts dt { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #b9cd8f; }
.guide-facts dd { margin: 3px 0 0; font-size: 1rem; color: #f4f3e9; }
.guide-copy .button { align-self: flex-start; }
.guide-photo img { object-position: 50% 15%; }   /* keep the face in view */
.guide-copy > p:not(.kicker):not(.guide-role) { margin-bottom: .8em; }
.guide-copy h2 { line-height: 1.1; margin-bottom: 22px; }
.guide .section-heading { margin-bottom: 36px; }
.guide-tags {
  list-style: none; margin: 0 0 30px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.guide-tags li {
  font-size: .78rem; font-weight: 600;
  color: #e7efc4;
  border: 1px solid rgba(210, 232, 117, .45);
  border-radius: 999px;
  padding: 5px 12px;
}
.guide-facts { margin-bottom: 22px; }

@media (max-width: 800px) {
  /* Phones: the photo fills the top of the screen and fades into dark green,
     with the text below it, so the bird is never hidden behind the words */
  .hero { padding: calc(var(--header-h) + 48px) 7% 64px; min-height: 112vh; align-items: flex-end; }
  .hero-photo { bottom: 30%; }
  .hero-photo img { object-position: 38% 50%; transform: none; }
  .hero-photo::after { background: linear-gradient(180deg, rgba(16, 43, 37, .5) 0%, rgba(16, 43, 37, 0) 22%, rgba(16, 43, 37, .15) 60%, #102b25 100%); }
  .hero-photo figcaption { display: none; }   /* photo label hidden on phones */
  .hero-content > .kicker { display: none; }   /* "Birding experiences · Sri Lanka" line hidden on phones */
  .hero-bottom { display: none; }
  .guide-card { grid-template-columns: 1fr; }
  .guide-photo { min-height: 0; height: auto; aspect-ratio: 4 / 5; }
  .guide-photo img { object-position: 50% 18%; }
}

/* ---------- More of our guides (smaller cards under the main guide) ---------- */
.team-kicker { margin-top: 56px; }
.team-grid {
  display: grid;
  grid-template-columns: 1fr;   /* one wide card per guide, stacked */
  gap: 24px;
}
.team-card {
  display: grid; grid-template-columns: minmax(180px, 34%) 1fr;
  background: var(--forest);            /* same dark green as the main guide card */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(16, 43, 37, .18);
}
.team-photo { min-height: 300px; height: 100%; }
.team-photo::after { display: none; }
.team-photo img { object-position: 50% 25%; }
.team-copy { padding: 28px 30px 30px; color: #f4f3e9; }
.team-copy h3 { font-size: 1.9rem; line-height: 1.15; font-weight: 500; color: #f4f3e9; margin-bottom: 16px; }
.team-role { margin: 6px 0 14px; font-size: .95rem; font-weight: 600; color: var(--lime); }
.team-copy > p:not(.team-role) { font-size: 1rem; line-height: 1.75; color: rgba(244, 243, 233, .85); margin-bottom: .7em; }
.team-facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px;
  margin: 16px 0 0; padding-top: 14px;
  border-top: 1px solid rgba(244, 243, 233, .18);
}
.team-facts dt { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #b9cd8f; }
.team-facts dd { margin: 3px 0 0; font-size: .95rem; line-height: 1.45; color: #f4f3e9; }
.team-facts-wide { grid-column: 1 / -1; }
.team-quals { margin: 4px 0 0; padding-left: 18px; }
.team-quals li { margin-bottom: 4px; }
.team-quals em { color: rgba(244, 243, 233, .65); }
/* Qualifications list on the main guide card */
.guide-facts-wide { grid-column: 1 / -1; }
.guide-quals { margin: 6px 0 0; padding-left: 18px; }
.guide-quals li { margin-bottom: 6px; }
.guide-quals em { color: rgba(244, 243, 233, .65); }
.team-copy .guide-tags { margin: 18px 0 22px; }
.team-photo { min-height: 420px; }

@media (max-width: 800px) {
  .team-kicker { margin-top: 40px; }
  .team-grid { grid-template-columns: 1fr; }
  .team-card { grid-template-columns: 1fr; }
  .team-photo { min-height: 0; height: auto; aspect-ratio: 4 / 5; }
  .team-copy { padding: 22px 22px 24px; }
}

/* ---------- WhatsApp ---------- */
.button-whatsapp { background: #25d366; color: #fff; }
.button-whatsapp:hover { background: #1ebe5b; }
.wa-icon { width: 22px; height: 22px; flex: none; }
.contact-or { margin: 22px 0 14px !important; font-size: .8rem !important; letter-spacing: .14em; text-transform: uppercase; color: rgba(244, 243, 233, .55) !important; }

.wa-float {
  position: fixed; z-index: 60;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25d366; color: #fff;
  box-shadow: 0 8px 22px rgba(16, 43, 37, .3);
  transition: transform .2s, background-color .2s;
}
.wa-float:hover { transform: scale(1.07); background: #1ebe5b; }
.wa-float .wa-icon { width: 30px; height: 30px; }
@media (max-width: 800px) {
  .wa-float { width: 48px; height: 48px; right: 12px; bottom: 14px; }
  .wa-float .wa-icon { width: 26px; height: 26px; }
}
/* Hidden while the booking section (with its own WhatsApp button) is on screen */
.wa-float { transition: transform .2s, background-color .2s, opacity .3s; }
.wa-float.is-hidden { opacity: 0; pointer-events: none; transform: scale(.8); }

/* Small "Copy" buttons next to the email address and WhatsApp number */
.copy-btn {
  margin-left: 8px; padding: 3px 10px;
  font: 600 .72rem/1.4 var(--sans); letter-spacing: .06em;
  color: #f4f3e9; background: transparent;
  border: 1px solid rgba(244, 243, 233, .35); border-radius: 999px;
  cursor: pointer; vertical-align: 1px;
  transition: background-color .2s, border-color .2s;
}
.copy-btn:hover { background: rgba(244, 243, 233, .1); border-color: var(--lime); }

/* Janaka's photo: keep his face and the scope in view, and show the photographer's credit */
.team-photo img[src*="guide-janaka-field"] { object-position: 66% 30%; }
.team-photo .photo-credit-tag {
  left: 12px; right: auto; top: 12px; bottom: auto;   /* top corner, over the leaves */
  font: 500 .72rem/1.3 var(--sans); font-style: normal;
  color: #fff; background: rgba(16, 43, 37, .55);
  padding: 3px 9px; border-radius: 999px;
}

/* ---------- Booking form ---------- */
.contact-grid {
  display: grid; grid-template-columns: 1.45fr 1fr; gap: 28px;
  text-align: left;
}
.booking-form {
  display: grid; gap: 18px;
  padding: 32px;
  background: #14372d;
  border: 1px solid rgba(244, 243, 233, .14);
  border-radius: 12px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.booking-form label {
  display: grid; gap: 7px;
  font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #b9cd8f;
}
.booking-form .optional { font-weight: 500; letter-spacing: .04em; text-transform: none; color: rgba(244, 243, 233, .5); }
.booking-form input,
.booking-form textarea {
  width: 100%;
  padding: 13px 14px;
  font: 400 1rem/1.5 var(--sans); letter-spacing: 0; text-transform: none;
  color: #f4f3e9;
  background: rgba(244, 243, 233, .06);
  border: 1px solid rgba(244, 243, 233, .28);
  border-radius: 6px;
  transition: border-color .2s, background-color .2s;
}
.booking-form textarea { resize: vertical; min-height: 130px; }
.booking-form input::placeholder,
.booking-form textarea::placeholder { color: rgba(244, 243, 233, .4); }
.booking-form input:focus,
.booking-form textarea:focus { outline: none; border-color: var(--lime); background: rgba(244, 243, 233, .1); }
.form-send { justify-self: start; border: 0; cursor: pointer; font-family: var(--sans); }
.form-send[disabled] { opacity: .6; cursor: wait; }
.contact .form-status { margin: 0; font-size: .95rem; min-height: 1.4em; }
.form-status.is-error { color: #ffd2a8 !important; }
.form-status a { text-decoration: underline; }
.form-done { text-align: center; padding: 40px 10px; }
.form-done h3 { color: #f4f3e9; font-size: 2rem; margin-bottom: 10px; }
.contact .form-done p { margin: 0; }

.contact-direct {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px;
  padding: 32px;
  background: #14372d;
  border: 1px solid rgba(244, 243, 233, .14);
  border-radius: 12px;
}
.contact .contact-direct-title {
  margin: 0 0 16px;
  font: 500 1.5rem/1.25 var(--serif); color: #f4f3e9;
}
.contact-direct .contact-email { margin: 10px 0 24px; }
.contact-direct .contact-email:last-child { margin-bottom: 0; }
.button-outline { color: #f4f3e9; border: 1px solid rgba(244, 243, 233, .5); }
.button-outline:hover { border-color: var(--lime); color: var(--lime); }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
  .booking-form, .contact-direct { padding: 22px 18px; }
  .form-send { justify-self: stretch; justify-content: center; }
}


.team-photo img[src*="guide-kalum"] { object-position: 50% 25%; }

/* =========================================================
   Animations
   ========================================================= */

/* Scroll-in: script.js adds "reveal" to parts of the page, then "is-visible" as they scroll into view */
.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--reveal-delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal.reveal-done { transition: transform .4s ease, box-shadow .4s ease; transition-delay: 0s; }

/* Hero: the words rise in one after another, and the photo settles from a slight zoom */
.hero-content > * { animation: hero-rise 1s cubic-bezier(.2, .7, .2, 1) both; }
.hero-content > :nth-child(2) { animation-delay: .15s; }
.hero-content > :nth-child(3) { animation-delay: .3s; }
.hero-content > :nth-child(4) { animation-delay: .45s; }
.hero-photo { animation: hero-settle 2.4s cubic-bezier(.2, .7, .2, 1) both; }
.hero-bottom, .hero-photo figcaption { animation: fade-in 1s 1s ease both; }
@keyframes hero-rise   { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: none; } }
@keyframes hero-settle { from { transform: scale(1.08); } to { transform: scale(1); } }

/* Hover: cards lift a little and photos zoom in slowly */
.bird-card { transition: transform .4s ease, box-shadow .4s ease; }
.bird-card:hover,
.js .bird-card.reveal-done:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(16, 43, 37, .14); }
.bird-card .photo img,
.gallery .photo img,
.guide-photo img,
.team-photo img { transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.bird-card:hover .photo img,
.gallery .photo:hover img { transform: scale(1.06); }
.guide-card:hover .guide-photo img,
.team-card:hover .team-photo img { transform: scale(1.04); }

/* Visitors who prefer less motion see everything straight away */
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Gallery photo pop-up
   ========================================================= */
.gallery .photo[data-bird] { cursor: zoom-in; }
.gallery .photo[data-bird]:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
html.lightbox-open { overflow: hidden; }

.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox-backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 28, 23, .86);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .25s ease;
}
.lightbox-panel {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) 360px;
  width: min(1180px, 100%); max-height: calc(100vh - 48px);
  background: var(--forest);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  opacity: 0; transform: scale(.94) translateY(16px);
  transition: opacity .3s ease, transform .35s cubic-bezier(.2, .8, .2, 1);
}
.lightbox.is-open .lightbox-backdrop { opacity: 1; }
.lightbox.is-open .lightbox-panel { opacity: 1; transform: none; }

.lb-photo { position: relative; background: #0c211b; display: grid; place-items: center; min-height: 0; }
.lb-photo img { width: 100%; height: 100%; max-height: calc(100vh - 48px); object-fit: contain; }
.lb-photo.is-changing img { animation: lb-fade .45s ease both; }
@keyframes lb-fade { from { opacity: 0; transform: scale(1.02); } to { opacity: 1; transform: none; } }

.lb-nav, .lb-close {
  position: absolute; z-index: 2;
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  border: 0; cursor: pointer;
  color: #f4f3e9; background: rgba(16, 43, 37, .7);
  font: 400 1.9rem/1 var(--sans);
  transition: background-color .2s;
}
.lb-nav:hover, .lb-close:hover { background: var(--lime); color: var(--deep); }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-close { top: 14px; right: 14px; width: 40px; height: 40px; font-size: 1rem; }

.lb-info { padding: 46px 32px 32px; overflow-y: auto; color: #f4f3e9; }
.lb-status {
  display: inline-block; margin: 0 0 14px; padding: 4px 12px;
  font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #b9cd8f; border: 1px solid rgba(185, 205, 143, .5); border-radius: 999px;
}
.lb-status.is-endemic { color: var(--deep); background: var(--lime); border-color: var(--lime); }
.lb-info h3 { color: #f4f3e9; font-size: 2rem; line-height: 1.15; font-weight: 500; margin-bottom: 14px; }
.lb-about { color: rgba(244, 243, 233, .85); font-size: 1rem; line-height: 1.7; }
.lb-info .where {
  margin: 20px 0 0; padding: 14px 16px;
  background: rgba(210, 232, 117, .12); border: 1px solid rgba(210, 232, 117, .3);
  border-left: 4px solid var(--lime); border-radius: 6px;
  color: #b9cd8f; border-top-color: rgba(210, 232, 117, .3);
}
.lb-info .where b { color: #f4f3e9; }
.lb-note { margin: 16px 0 0; font-size: .82rem; color: rgba(244, 243, 233, .55); }
.lb-count { margin: 18px 0 0; font-size: .78rem; letter-spacing: .14em; color: rgba(244, 243, 233, .5); }

@media (max-width: 800px) {
  .lightbox { padding: 0; align-items: end; }
  .lightbox-panel {
    grid-template-columns: 1fr; grid-template-rows: auto 1fr;
    width: 100%; max-height: 92vh;
    border-radius: 16px 16px 0 0;
    transform: translateY(40px);
  }
  .lb-photo img { max-height: 46vh; }
  .lb-info { padding: 22px 22px 30px; }
  .lb-info h3 { font-size: 1.6rem; }
  .lb-nav { width: 40px; height: 40px; font-size: 1.6rem; }
}

/* =========================================================
   Gallery hover: the photo pops out into a card with the bird's details (computers only)
   ========================================================= */
.bird-pop {
  position: fixed; z-index: 70; left: 0; top: 0;
  overflow: hidden;
  background: rgba(248, 247, 241, .86);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
          backdrop-filter: blur(12px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 12px;
  box-shadow: 0 26px 60px rgba(16, 43, 37, .32);
  cursor: zoom-in;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: scale(.82);
  transition: opacity .22s ease, transform .32s cubic-bezier(.2, .85, .25, 1.05), visibility 0s .32s;
}
.bird-pop.is-visible {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: none;
  transition: opacity .22s ease, transform .32s cubic-bezier(.2, .85, .25, 1.05), visibility 0s;
}
.bp-photo { aspect-ratio: 16 / 10; overflow: hidden; background: #50684f; }
.bp-photo img { width: 100%; height: 100%; object-fit: cover; }
.bird-pop.is-tall .bp-photo { aspect-ratio: 1 / 1; }
.bp-body { padding: 16px 20px 16px; }
.bird-pop .bp-status {
  display: inline-block; margin: 0 0 8px; padding: 3px 10px;
  font-size: .64rem; letter-spacing: .08em; white-space: nowrap;
  border: 1px solid rgba(122, 138, 86, .5); border-radius: 999px;
}
.bird-pop .bp-status.is-endemic { color: var(--deep); background: var(--lime); border-color: var(--lime); }
.bird-pop h3 { font-size: 1.4rem; line-height: 1.2; margin-bottom: 6px; }
.bird-pop .bp-about { margin: 0; font-size: .9rem; line-height: 1.55; color: var(--muted); }
.bird-pop .where {
  margin: 12px 0 0; padding: 9px 12px 11px;
  background: rgba(210, 232, 117, .3);
  border: 1px solid rgba(169, 194, 90, .55); border-left: 4px solid #8fb03e;
  border-radius: 6px; color: #5c7a2e;
}
.bird-pop .where b { font-size: .88rem; line-height: 1.45; color: var(--forest); }
.bird-pop .bp-more { margin: 10px 0 0; font-size: .74rem; color: #8a9286; }

/* Privacy line under the booking form */
.contact .form-privacy { margin: -6px 0 0; font-size: .8rem; color: rgba(244, 243, 233, .55); }

/* ---------- "Page not found" (404.html) ---------- */
.notfound {
  min-height: 100vh;
  display: grid; place-items: center; text-align: center;
  padding: 40px 24px;
  background: var(--forest); color: #f4f3e9;
}
.notfound-inner { max-width: 520px; }
.notfound img { width: 120px; height: auto; margin: 0 auto 26px; }
.notfound h1 { color: #f4f3e9; font-size: clamp(2.4rem, 7vw, 3.6rem); font-weight: 500; line-height: 1.05; margin-bottom: 16px; }
.notfound h1 em { color: var(--lime); }
.notfound p { color: rgba(244, 243, 233, .8); font-size: 1.05rem; margin-bottom: 30px; }

/* ---------- Mini maps in the place cards (phones only) ---------- */
.mini-map { display: none; }
@media (max-width: 800px) {
  .mini-map {
    display: block;
    width: 58px; height: auto; aspect-ratio: 940 / 1570;
    padding: 6px;
    background: rgba(248, 247, 241, .82);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(16, 43, 37, .25);
    overflow: visible;
  }
  .place-panel .photo .mini-map { position: absolute; top: 10px; right: 10px; z-index: 3; }
  .place-copy > .mini-map { float: right; margin: 0 0 8px 14px; }
  .mini-land {
    fill: #dfe8cc; stroke: #3d5e3a; stroke-width: 26; stroke-linejoin: round;
    stroke-dasharray: 1; stroke-dashoffset: 1; fill-opacity: 0;
  }
  .mini-dot { fill: var(--forest); stroke: var(--lime); stroke-width: 18; opacity: 0; transform-box: fill-box; transform-origin: center; }
  .mini-ring { fill: none; stroke: #8fb03e; stroke-width: 16; opacity: 0; transform-box: fill-box; transform-origin: center; }

  /* when the card scrolls into view: draw the coast, fill the island, drop the pin, then pulse */
  .mini-on .mini-land { animation: draw-coast 1.2s ease-in-out forwards, fill-land .5s 1s ease forwards; }
  .mini-on .mini-dot  { animation: mini-drop .5s 1.2s cubic-bezier(.3, 1.5, .5, 1) forwards; }
  .mini-on .mini-ring { animation: mini-pulse 1.8s 1.6s ease-out infinite; }
}
@keyframes mini-drop  { from { opacity: 0; transform: translateY(-120px) scale(.6); } to { opacity: 1; transform: none; } }
@keyframes mini-pulse { from { opacity: .9; transform: scale(.7); } to { opacity: 0; transform: scale(2.6); } }
@media (prefers-reduced-motion: reduce) {
  .mini-land { stroke-dashoffset: 0; fill-opacity: 1; }
  .mini-dot { opacity: 1; }
}

/* ---------- Booking form: date pickers and group-size buttons ---------- */
.booking-form .date-input { color-scheme: dark; min-height: 50px; }
.booking-form .date-input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 1; filter: invert(1) brightness(1.1); padding: 4px; }
.booking-form .date-input:not(:valid),
.booking-form .date-input:invalid { color: rgba(244, 243, 233, .55); }

.group-picker { border: 0; margin: 0; padding: 0; min-width: 0; }
.group-picker legend {
  padding: 0; margin-bottom: 9px;
  font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #b9cd8f;
}
.group-options { display: flex; flex-wrap: wrap; gap: 10px; }
.booking-form .chip { display: inline-flex; cursor: pointer; letter-spacing: 0; text-transform: none; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chip span {
  display: inline-grid; place-items: center;
  min-width: 52px; height: 46px; padding: 0 16px;
  font: 600 1rem/1 var(--sans); color: #f4f3e9;
  background: rgba(244, 243, 233, .06);
  border: 1px solid rgba(244, 243, 233, .28); border-radius: 999px;
  transition: background-color .2s, border-color .2s, color .2s, transform .15s;
}
.chip:hover span { border-color: var(--lime); }
.chip input:checked + span { background: var(--lime); border-color: var(--lime); color: var(--deep); transform: scale(1.04); }
.chip input:focus-visible + span { outline: 3px solid var(--lime); outline-offset: 2px; }
.booking-form .group-custom { margin-top: 12px; max-width: 220px; display: grid; }
.booking-form .group-custom[hidden] { display: none; }
.booking-form .group-custom input::-webkit-outer-spin-button,
.booking-form .group-custom input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.booking-form .group-custom input { -moz-appearance: textfield; appearance: textfield; }

/* Bird cards: small facts row (size, food, conservation status) */
.bird-facts {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 14px;
  margin: auto 0 0; padding-top: 14px;
  border-top: 1px solid #e1e4d8;
}
.bird-facts div { display: contents; }
.bird-facts dt {
  font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #7a8a56; padding-top: 3px;
}
.bird-facts dd { margin: 0; font-size: .88rem; line-height: 1.45; color: var(--ink); }

/* Tablets and small laptops (801–1060px): use the ☰ menu too, so the top menu never gets squashed */
@media (min-width: 801px) and (max-width: 1060px) {
  .menu-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 6% 24px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 24px rgba(16, 43, 37, .1);
    font-size: 1.05rem;
  }
  .site-nav.is-open { display: flex; }
  .site-nav > a:not(.nav-book) { padding: 15px 0; border-bottom: 1px solid var(--line); color: var(--forest) !important; }
  .nav-book { margin-top: 18px; padding: 15px; text-align: center; }
}
