/* ==========================================================================
   OUR PROJECTS · /projects/ (map stage) and /projects/{slug}/ (project page)
   Standalone: these pages load base, layout, components and this file only.
   1. Type colours and chips   2. Stage frame and poster   3. Filters
   4. Intro, panel, bottom sheet   5. Pins, clusters, preview   6. Caption,
   explore, arrival   7. Grid and cards   8. CTA and credits
   9. Project page   10. Reduced motion
   ========================================================================== */

/* 1. Type colours and chips
   -------------------------------------------------------------------------- */
[data-type="home"]        { --pc: var(--gold); }
[data-type="business"]    { --pc: var(--indigo); }
[data-type="farm"]        { --pc: var(--lime); }
[data-type="institution"] { --pc: var(--sky); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  white-space: nowrap;
}
.chip__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pc); box-shadow: 0 0 0 1.5px rgba(30, 31, 59, .55); }
.chip--type { color: var(--ink); font-weight: 600; }
.chip--team { background: #FFF1C7; color: #6B4E00; font-weight: 600; }
.chip--ongoing { background: #DDF3F8; color: #0B5568; font-weight: 600; }
.chip--sample { background: #FDE3DE; color: #962B1A; font-weight: 600; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip--team { background: #4A3C12; color: #FFE7A3; }
  :root:not([data-theme="light"]) .chip--ongoing { background: #12404B; color: #BDEEF8; }
  :root:not([data-theme="light"]) .chip--sample { background: #57261E; color: #FFD3CA; }
  :root:not([data-theme="light"]) .chip__dot { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .6); }
}

/* 2. Stage frame and poster
   -------------------------------------------------------------------------- */
.pstage {
  --edge: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  --col: 380px;
  --st-land: #F3F2F9;
  --st-dots: rgba(82, 114, 185, .13);
  --st-line: #5272B9;
  --st-glow: rgba(82, 114, 185, .16);
  --st-india: #FFFFFF;
  --st-ink: #1E1F3B;
  --st-space: #E3E2EF;
  position: relative;
  background: var(--st-land);
}
.pstage[data-theme="navy"] {
  --st-land: #1A1B42;
  --st-dots: rgba(180, 182, 228, .12);
  --st-line: #FAC423;
  --st-glow: rgba(250, 196, 35, .22);
  --st-india: #2A2C66;
  --st-ink: #FFFFFF;
  --st-space: #0F1029;
}
.pstage__frame {
  position: relative;
  height: min(78vh, 760px);
  min-height: 560px;
  overflow: hidden;
  display: grid;
  grid-template-columns: var(--col);
  grid-template-rows: auto minmax(0, 1fr);
  padding: 20px var(--edge) 20px;
  background-color: var(--st-land);
  background-image: radial-gradient(var(--st-dots) 1.1px, transparent 1.4px);
  background-size: 18px 18px;
}
.pstage__poster {
  position: absolute;
  inset: 0;
  padding: 150px calc(var(--edge) + 40px) 36px calc(var(--edge) + var(--col) + 56px);
  transition: opacity .3s ease-out;
}
.poster__svg { display: block; width: 100%; height: 100%; overflow: visible; }
.poster__glow { fill: none; stroke: var(--st-glow); stroke-width: 9; stroke-linejoin: round; }
.poster__land { fill: var(--st-india); stroke: var(--st-line); stroke-width: 1.4; stroke-linejoin: round; }
.poster__dot { fill: var(--pc); stroke: #1E1F3B; stroke-width: 1.3; }
.poster__dot--team { fill: #FFFFFF; stroke: var(--pc); stroke-width: 2.4; }
.poster__dot.is-off { display: none; }
.pstage.is-js .pstage__poster { cursor: pointer; }
.pstage.is-live .pstage__poster { opacity: 0; pointer-events: none; }

.pstage .pstage__map { /* beats MapLibre's own ".maplibregl-map { position: relative }" */
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .3s ease-out;
  background: var(--st-space);
}
.pstage__map.is-ready { opacity: 1; }
.pstage__map .maplibregl-ctrl-attrib { font-size: 11px; }
.pstage__map .maplibregl-ctrl-group { border-radius: 10px; box-shadow: var(--shadow); }

/* 3. Filters
   -------------------------------------------------------------------------- */
.pfilter {
  position: absolute;
  top: 20px;
  right: var(--edge);
  z-index: 6;
  display: grid;
  grid-template-areas: "seg city" "chips chips";
  align-items: center;
  gap: 6px 8px;
  max-width: calc(100% - var(--col) - 2 * var(--edge) - 24px);
  padding: 5px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.seg, .tchips { display: flex; gap: 4px; }
.seg { grid-area: seg; justify-self: start; }
.tchips { grid-area: chips; }
.pcity { grid-area: city; justify-self: end; }
.seg { padding: 3px; border-radius: 11px; background: var(--bg-alt); }
.seg__btn, .tchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 11px;
  border-radius: 9px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .18s, color .18s, box-shadow .18s;
}
.seg__btn { min-height: 38px; }
.seg__btn:hover, .tchip:hover { background: var(--bg-alt); }
.seg__btn[aria-current="true"] { background: var(--surface); box-shadow: 0 1px 2px rgba(30, 31, 59, .12), 0 0 0 1px var(--line); font-weight: 600; }
.tchip__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pc); box-shadow: 0 0 0 1.5px rgba(30, 31, 59, .5); }
.tchip__n { color: var(--muted); font-size: 13px; }
.tchip[aria-current="true"] { background: var(--ink); color: var(--bg); }
.tchip[aria-current="true"] .tchip__n { color: inherit; opacity: .75; }
.pcity { display: flex; gap: 6px; }
.pcity__select {
  min-height: 44px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%235F6180' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center / 12px;
  color: var(--ink);
  font: 500 14.5px var(--font-body);
  appearance: none;
  cursor: pointer;
}
.pcity__go { min-height: 44px; padding: 0 14px; border: 0; border-radius: 9px; background: var(--ink); color: var(--bg); font: 600 15px var(--font-body); }

/* 4. Intro, side panel, bottom sheet
   -------------------------------------------------------------------------- */
.pstage__intro {
  position: relative;
  z-index: 4;
  grid-column: 1;
  grid-row: 1;
  padding: 22px 22px 16px;
  border-radius: 14px 14px 0 0;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.pstage__intro:only-of-type, .pstage:not(.is-js) .pstage__intro { border-radius: 14px; }
.pstage__eyebrow { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink); }
.pstage__eyebrow .swatch { width: 16px; height: 16px; --c: var(--indigo); }
.pstage__title { margin-top: 10px; font-size: clamp(30px, 2.6vw, 38px); line-height: 1.08; color: var(--ink); }
.pstage__lede { margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--text); }
.pstage__summary {
  display: inline-flex;
  margin-top: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}
.pstage__summary[hidden] { display: none; }

.ppanel {
  position: relative;
  z-index: 4;
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-top: 1px solid var(--line);
  border-radius: 0 0 14px 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.ppanel[hidden] { display: none; }
.ppanel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; }
.ppanel__count { font-size: 14px; font-weight: 600; color: var(--muted); }
.ppanel__list { flex: 1; min-height: 0; margin: 0; padding: 0 8px 10px; list-style: none; overflow-y: auto; overscroll-behavior: contain; }
.ppanel__empty { padding: 4px 18px 18px; font-size: 15px; color: var(--muted); }
.ppanel__empty[hidden] { display: none; }

.prow {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .18s, box-shadow .18s, transform .18s;
}
.prow:hover { background: var(--bg-alt); transform: translateY(-1px); }
.prow-item.is-active .prow { background: var(--bg-alt); box-shadow: inset 0 0 0 2px var(--indigo); }
.prow__media { display: block; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--photo-placeholder); }
.prow__media img { width: 100%; height: 100%; object-fit: cover; }
.prow__body { display: grid; gap: 4px; align-content: start; min-width: 0; }
.prow__title { font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.prow__place { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .chips { gap: 4px; }
.prow .chip { padding: 1px 8px; font-size: 12px; }
.prow__distance, .pcard__distance { font-size: 13px; font-weight: 600; color: var(--brand-ink); }

/* 5. Pins, clusters, "you", preview
   -------------------------------------------------------------------------- */
.pin {
  position: relative;
  display: block;
  width: 30px;
  height: 38px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.pin svg { display: block; width: 100%; height: 100%; overflow: visible; transform-origin: 50% 100%; filter: drop-shadow(0 2px 2px rgba(20, 21, 42, .35)); transition: transform .18s ease-out; }
.pin__body { fill: var(--pc); stroke: #1E1F3B; stroke-width: 1.5; }
.pin__eye { fill: #FFFFFF; }
.pin--team .pin__body { fill: #FFFFFF; stroke: var(--pc); stroke-width: 3.2; }
.pin--team .pin__eye { fill: var(--pc); }
.pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 20px;
  height: 7px;
  border-radius: 50%;
  background: rgba(30, 31, 59, .22);
  transform: translateX(-50%);
  transition: box-shadow .18s, background-color .18s;
}
.pin:hover svg, .pin:focus-visible svg, .pin.is-hot svg { transform: scale(1.18); }
.pin.is-active svg { transform: scale(1.24); }
.pin.is-hot::after, .pin.is-active::after { background: rgba(82, 114, 185, .3); box-shadow: 0 0 0 3px rgba(82, 114, 185, .45); }
.pin:focus-visible { outline: none; }
.pin:focus-visible svg { filter: drop-shadow(0 0 0 #fff) drop-shadow(0 0 3px var(--accent)); }
.pin.is-dropping svg { animation: pin-drop .45s cubic-bezier(.3, 1.45, .5, 1) var(--delay, 0ms) both; }
@keyframes pin-drop { from { opacity: 0; transform: translateY(-18px) scale(.5); } to { opacity: 1; transform: none; } }

.cluster {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 2.5px solid #FFFFFF;
  border-radius: 999px;
  background: #1E1F3B;
  color: #FFFFFF;
  font: 600 14px var(--font-body);
  box-shadow: 0 4px 12px -2px rgba(20, 21, 42, .45);
  cursor: pointer;
}
.cluster:hover { background: var(--indigo); }
.cluster.is-dropping { animation: chip-in .3s ease-out var(--delay, 0ms) both; }
@keyframes chip-in { from { opacity: 0; scale: .6; } to { opacity: 1; scale: 1; } }

.you {
  width: 18px;
  height: 18px;
  border: 3px solid #FFFFFF;
  border-radius: 50%;
  background: #1E1F3B;
  box-shadow: 0 0 0 0 rgba(82, 114, 185, .55);
  animation: you-pulse 2.2s ease-out infinite;
}
@keyframes you-pulse { to { box-shadow: 0 0 0 18px rgba(82, 114, 185, 0); } }

/* Country names on the journey's opening view (UK, Saudi Arabia, India); the map is not
   interactive under them and they are decoration (the caption says the same in words) */
.map-country-at { pointer-events: none; }
.map-country {
  display: block;
  pointer-events: none;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #3A3C5C;
  text-shadow: 0 0 3px #FFFFFF, 0 0 6px #FFFFFF;
  opacity: 0;
  transition: opacity .5s ease;
}
.map-country.is-on { opacity: 1; }
.map-country--home { color: var(--indigo); }
.pstage[data-theme="navy"] .map-country { color: #DCDDF3; text-shadow: 0 0 4px #17183A, 0 0 8px #17183A; }
.pstage[data-theme="navy"] .map-country--home { color: #FAC423; }

.ppv-popup .maplibregl-popup-content { padding: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 16px 36px -12px rgba(20, 21, 42, .45); }
.ppv-popup .maplibregl-popup-tip { border-top-color: var(--surface); }
.ppv { position: relative; width: 280px; background: var(--surface); }
.ppv__img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.ppv__body { display: grid; gap: 6px; padding: 12px 14px 14px; }
.ppv__title { font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.ppv__place { font-size: 13.5px; color: var(--muted); }
.ppv__go { margin-top: 6px; min-height: 44px; font-size: 15px; }
.ppv__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: #1E1F3B;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(20, 21, 42, .2);
}
.ppv__close svg { width: 14px; height: 14px; }
.pstage__preview { position: absolute; z-index: 9; }
.pstage__preview[hidden] { display: none; }

/* 6. Caption, explore button, arrival popup
   -------------------------------------------------------------------------- */
.pstage__caption {
  position: absolute;
  z-index: 7;
  left: calc(var(--edge) + var(--col) + 24px);
  bottom: 24px;
  max-width: min(560px, calc(100% - var(--col) - 2 * var(--edge) - 48px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  padding: 11px 18px;
  border-radius: 14px;
  background: #1E1F3B;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 12px 28px -12px rgba(20, 21, 42, .6);
  animation: rise .22s ease-out;
}
.pstage__caption[hidden] { display: none; }
.pstage__step { color: var(--sun); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.pstage__caption-link { color: var(--sun); font-weight: 600; }
.arrival__all { padding: 0; border: 0; background: none; color: var(--brand-ink); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* The caption card while a city is shown: a small label, title, a line, buttons */
.pstage__caption { transition: opacity .26s ease, transform .26s ease; }
.pstage__caption.is-swapping { opacity: 0; transform: translateY(6px); }
.pstage__caption.is-card {
  display: block;
  width: min(440px, calc(100% - var(--col) - 2 * var(--edge) - 48px));
  padding: 16px 20px 18px;
  border-radius: 16px;
  background: rgba(30, 31, 59, .94);
  box-shadow: 0 18px 40px -16px rgba(20, 21, 42, .7);
}
.pstage__caption.is-card .pstage__step { display: block; letter-spacing: .14em; }
.pstage__caption-title { display: block; margin: 4px 0 4px; font-family: var(--font-display); font-size: 22px; font-weight: 600; line-height: 1.2; color: #FFFFFF; }
.pstage__caption-text { display: block; font-size: 14.5px; font-weight: 400; line-height: 1.5; color: #D6D8F0; }
.pstage__caption:not(.is-card) .pstage__caption-text { display: inline; font-size: inherit; font-weight: inherit; color: inherit; }
.pstage__caption-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pstage__caption-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  min-height: 40px;
  padding: 0 16px;
  border: 1.5px solid var(--sun);
  border-radius: 999px;
  background: var(--sun);
  color: #1E1F3B;
  font: 600 14px var(--font-body);
  cursor: pointer;
}
.pstage__caption-btn.is-ghost { border-color: rgba(255, 255, 255, .45); background: transparent; color: #FFFFFF; }
.pstage__caption.has-corner { padding-right: 150px; }
.pstage__caption-btn.is-corner { position: absolute; top: 12px; right: 12px; min-height: 34px; padding: 0 14px; font-size: 13px; }
.pstage__caption-btn:hover { filter: brightness(1.06); }
.pstage__caption-btn.is-ghost:hover { border-color: #FFFFFF; }
.pstage__caption-btn:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 2px; }

/* "Across India": gold office tags (dot + "Vadodara office"), popping in one after another */
.office-at { pointer-events: none; }
.office-tag {
  display: flex;
  align-items: center;
  gap: 7px;
  opacity: 0;
  transform: scale(.6);
  transform-origin: 7px 50%;
  transition: opacity .45s ease, transform .5s cubic-bezier(.3, 1.5, .5, 1);
}
.office-tag.is-on { opacity: 1; transform: none; }
.office-tag__dot { width: 12px; height: 12px; flex: none; border: 2px solid #FFFFFF; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 0 rgba(250, 196, 35, .65); }
.office-tag.is-on .office-tag__dot { animation: office-pulse 1.8s ease-out infinite; }
@keyframes office-pulse { to { box-shadow: 0 0 0 14px rgba(250, 196, 35, 0); } }
.office-tag b { padding: 4px 9px; border-radius: 6px; background: var(--sun); color: #1E1F3B; font: 600 12px/1.2 var(--font-body); white-space: nowrap; box-shadow: 0 4px 10px -4px rgba(20, 21, 42, .45); }

/* The visitor's city: name tag and two rings pulsing out (round the "you" dot). The dot
   shows once the glide to the city starts (MapLibre writes opacity on marker elements, so visibility is used) */
.you { position: relative; pointer-events: none; }
.you:not(.is-near) { visibility: hidden; }
.you__name {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px); /* below the dot: a project's pin on the same spot rises above it */
  padding: 7px 13px;
  border-radius: 10px;
  background: #FFFFFF;
  color: #1E1F3B;
  font: 600 15px/1 var(--font-display);
  white-space: nowrap;
  box-shadow: 0 8px 22px -6px rgba(20, 21, 42, .45);
  opacity: 0;
  transform: translate(-50%, -6px);
  transition: opacity .4s ease, transform .4s ease;
}
.you.is-here .you__name { opacity: 1; transform: translate(-50%, 0); }
.you__ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 2px solid var(--indigo);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.you.is-here .you__ring { animation: you-ring 2.4s ease-out infinite; }
.you.is-here .you__ring--late { animation-delay: 1.2s; }
@keyframes you-ring { from { opacity: .85; transform: scale(.5); } to { opacity: 0; transform: scale(3.2); } }
.pstage[data-theme="navy"] .you__ring { border-color: var(--sun); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.pstage__explore {
  position: absolute;
  z-index: 5;
  left: calc(50% + (var(--col) + 24px) / 2);
  bottom: 32px;
  transform: translateX(-50%);
}
.pstage__explore .btn { white-space: nowrap; box-shadow: 0 12px 28px -10px rgba(20, 21, 42, .55); }
.pstage__explore svg { width: 18px; height: 18px; }
.pstage.is-live .pstage__explore { display: none; }

.arrival {
  width: min(420px, calc(100vw - 32px));
  padding: 26px 26px 22px;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.arrival::backdrop { background: rgba(20, 21, 42, .38); }
.arrival[open] { animation: rise .24s ease-out; }
.arrival__close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.arrival__close:hover { background: var(--bg-alt); color: var(--ink); }
.arrival__close svg { width: 16px; height: 16px; }
.arrival__art svg { display: block; width: 120px; height: 44px; margin: 0 auto 10px; overflow: visible; }
.arrival__art path:not(.arrival__ground) { fill: var(--pc); stroke: #1E1F3B; stroke-width: 1.2; }
.arrival__art circle { fill: #FFFFFF; }
.arrival__ground { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 3 4; }
.arrival__title { font-size: 22px; font-weight: 600; color: var(--ink); }
.arrival__note { margin: 8px auto 18px; max-width: 30em; font-size: 14px; line-height: 1.5; color: var(--muted); }
.arrival__locate { width: 100%; }
.arrival__locate svg { width: 18px; height: 18px; }
.arrival__or { display: flex; align-items: center; gap: 12px; margin: 14px 0 10px; font-size: 13px; color: var(--muted); }
.arrival__or::before, .arrival__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.combo { position: relative; text-align: left; }
.combo__input { width: 100%; min-height: 48px; }
.combo__list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 2;
  max-height: 240px;
  margin: 0;
  padding: 4px;
  list-style: none;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.combo__list[hidden] { display: none; }
.combo__opt { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--ink); cursor: pointer; }
.combo__opt small { color: var(--muted); font-size: 12.5px; }
.combo__opt[aria-selected="true"], .combo__opt:hover { background: var(--bg-alt); }
.arrival__msg { min-height: 1.4em; margin-top: 8px; font-size: 13.5px; color: var(--brand-ink); }
.arrival__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; margin-top: 6px; }
.arrival__skip { min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink); font: 600 15px var(--font-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.arrival__intl { display: inline-flex; align-items: center; min-height: 44px; font-size: 13.5px; color: var(--brand-ink); }

/* 7. Grid below the stage, and grid cards
   -------------------------------------------------------------------------- */
.pall__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 28px; }
.pall__count { color: var(--muted); font-size: 15px; }
.pall__empty { display: grid; justify-items: start; gap: 14px; padding: 28px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.pall__empty[hidden] { display: none; }
.pall__toggle[hidden] { display: none; }
.pall__gallery.is-folded { display: none; }
.pall__toggle + .pall__gallery:not(.is-folded) { margin-top: 28px; }
.pall:has(.pall__gallery.is-folded) .pall__head { margin-bottom: 16px; }
.pgrid { display: grid; gap: clamp(18px, 2.4vw, 28px); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition: box-shadow .2s ease-out, transform .2s ease-out;
}
.pcard[hidden] { display: none; }
.pcard:hover, .pcard:focus-within { box-shadow: var(--shadow); transform: translateY(-2px); }
.pcard__media { aspect-ratio: 16 / 10; background: var(--photo-placeholder); overflow: hidden; }
.pcard__media img { width: 100%; height: 100%; object-fit: cover; }
.pcard__body { display: grid; gap: 8px; padding: 16px 18px 20px; align-content: start; }
.pcard__title { font-size: 18px; font-weight: 500; line-height: 1.3; }
.pcard__link { color: var(--ink); text-decoration: none; }
.pcard__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.pcard__link:focus-visible { outline: none; }
.pcard__link:focus-visible::after { outline: 3px solid var(--accent); outline-offset: -3px; border-radius: 12px; }
.pcard__place { font-size: 14px; color: var(--muted); }

/* 8. CTA band and credits
   -------------------------------------------------------------------------- */
.pcta { padding-block: clamp(48px, 7vw, 80px); background: #1E1F3B; color: var(--on-dark-text); }
.pcta__grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.pcta h2 { color: var(--on-dark); }
.pcta p { margin-top: 10px; max-width: 36em; }
.pcredits { padding-block: 18px 28px; font-size: 13px; color: var(--muted); }
.pcredits a { color: inherit; }

/* Stage on navy: intro and panel stay light cards; the map around them is dark */
.pstage[data-theme="navy"] .pfilter, .pstage[data-theme="navy"] .pstage__intro, .pstage[data-theme="navy"] .ppanel { box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .7); }

/* Phones: filters above the map, intro over its top, the list under the map (moved there by
   projects-stage.js, so the page has one scroll and nothing covers the map) */
@media (max-width: 767px) {
  .pstage { --col: 0px; }
  .pfilter {
    position: relative; /* keeps the hidden "City" label inside the scrolling row */
    top: auto; right: auto;
    display: flex;
    max-width: none;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    padding: 10px var(--gutter);
    border-radius: 0;
    overflow-x: auto;
    scrollbar-width: none;
    box-shadow: none;
    border-bottom: 1px solid var(--line);
  }
  .pfilter::-webkit-scrollbar { display: none; }
  .tchip { padding: 0 12px; border: 1px solid var(--line); }
  .pstage__frame {
    display: block;
    height: 64vh;
    min-height: 440px;
    max-height: 620px;
    padding: 0;
  }
  .pstage__poster { padding: 150px 24px 40px; }
  .pstage__intro {
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: 14px var(--gutter) 18px;
    border-radius: 0;
    background: linear-gradient(var(--st-land) 72%, transparent);
    box-shadow: none;
    pointer-events: none;
  }
  .pstage__intro > * { pointer-events: auto; }
  .pstage__title { font-size: 26px; margin-top: 6px; }
  .pstage__title .light, .pstage__title .bold { display: inline; }
  .pstage__lede { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px; font-size: 14px; }
  .pstage__summary { margin-top: 8px; }
  /* Once the map is live, the intro shrinks to its title so the map gets the room */
  .pstage.is-live .pstage__lede, .pstage.is-live .pstage__summary { display: none; }
  .pstage.is-live .pstage__intro { padding-bottom: 12px; }
  .pstage[data-theme="navy"] .pstage__intro { color: var(--on-dark-text); }
  .pstage[data-theme="navy"] .pstage__title, .pstage[data-theme="navy"] .pstage__eyebrow { color: #FFFFFF; }

  .ppanel {
    border-top: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
  }
  .ppanel__head { padding: 14px var(--gutter) 6px; }
  .ppanel__list { overflow: visible; padding: 0 calc(var(--gutter) - 10px) 16px; }
  .prow { grid-template-columns: 108px minmax(0, 1fr); }

  .pstage__caption, .pstage__preview { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .pstage__caption.is-card { width: auto; padding: 11px 14px 13px; }
  .pstage__caption.has-corner { padding-right: 132px; }
  .pstage__caption-title { margin: 2px 0; font-size: 18px; }
  .pstage__caption-text { font-size: 13.5px; line-height: 1.4; }
  .pstage__caption-actions { margin-top: 10px; }
  .pstage__caption-btn.is-corner { top: 9px; right: 10px; }
  .office-tag__word { display: none; }
  .pstage__preview .ppv { width: auto; display: grid; grid-template-columns: 112px minmax(0, 1fr); border-radius: 14px; overflow: hidden; box-shadow: 0 16px 36px -12px rgba(20, 21, 42, .5); }
  .pstage__preview .ppv__img { height: 100%; aspect-ratio: auto; }
  .pstage__preview .ppv__close { top: 6px; right: 6px; }
  .pstage__preview .ppv__body { padding-right: 48px; }
  .pstage__explore { left: 50%; bottom: 24px; }
  .arrival.is-card {
    position: absolute;
    inset: auto 12px 12px 12px;
    z-index: 12;
    width: auto;
    max-height: calc(100% - 24px);
    margin: 0;
    overflow: auto;
    padding: 20px 18px 14px;
  }
  .arrival.is-card .arrival__art { display: none; }
  .arrival.is-card .arrival__title { font-size: 19px; padding-right: 36px; }
  .arrival.is-card .arrival__note { margin: 6px 0 14px; }
  .pstage__map .maplibregl-ctrl-top-right { top: 120px; }
}

/* 9. Project page
   -------------------------------------------------------------------------- */
.pp-head { padding-top: clamp(24px, 4vw, 40px); }
.pp-title { margin-top: 14px; font-size: clamp(30px, 4vw, 48px); line-height: 1.1; font-weight: 500; color: var(--ink); max-width: 22em; }
.pp-place { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 16px; color: var(--text); }
.pp-place svg { width: 18px; height: 18px; color: var(--coral); }
.pp-chips { margin-top: 14px; }

.pp-gallery { position: relative; margin-top: clamp(22px, 3vw, 32px); }
.pp-mosaic { display: grid; gap: 8px; border-radius: 14px; overflow: hidden; }
.pp-shot { position: relative; display: block; overflow: hidden; background: var(--photo-placeholder); }
.pp-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease-out, filter .2s; }
.pp-shot:hover img { transform: scale(1.03); filter: brightness(.94); }
.pp-shot--main { aspect-ratio: 16 / 10; }
@media (min-width: 768px) {
  .pp-gallery--2 .pp-mosaic { grid-template-columns: 2fr 1fr; }
  .pp-gallery--3 .pp-mosaic, .pp-gallery--4 .pp-mosaic, .pp-gallery--5 .pp-mosaic { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; height: clamp(360px, 46vw, 560px); }
  .pp-gallery--3 .pp-mosaic { grid-template-columns: 2fr 1fr; }
  .pp-gallery--3 .pp-shot--main, .pp-gallery--4 .pp-shot--main, .pp-gallery--5 .pp-shot--main { grid-row: 1 / 3; aspect-ratio: auto; }
  .pp-gallery--4 .pp-shot:nth-child(4) { grid-column: 2 / 4; }
  .pp-gallery--2 .pp-mosaic { height: clamp(320px, 40vw, 520px); }
  .pp-gallery--2 .pp-shot--main { aspect-ratio: auto; }
  .pp-gallery--1 .pp-mosaic { max-height: 600px; }
}
/* Phones: the cover only, "Show all N photos" opens the swipeable lightbox. The other
   photos stay hidden, so they are not downloaded with the page. Without JavaScript a
   <noscript> style in page.php shows them as a swipeable row instead. */
@media (max-width: 767px) {
  .pp-mosaic { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 0; scrollbar-width: none; }
  .pp-mosaic::-webkit-scrollbar { display: none; }
  .pp-shot { display: none; flex: 0 0 86%; aspect-ratio: 16 / 10; border-radius: 12px; scroll-snap-align: start; }
  .pp-shot--main { display: block; flex-basis: 100%; }
}
.pp-shot__more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(20, 21, 42, .55);
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 600;
}
.pp-gallery__all { position: absolute; right: calc(var(--gutter) + 16px); bottom: 16px; min-height: 44px; background: var(--surface); }
.pp-gallery__caption { margin-top: 10px; font-size: 14px; color: var(--muted); }
@media (max-width: 767px) { .pp-gallery__all { position: static; margin-top: 12px; } }

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(14, 15, 33, .96);
  color: #FFFFFF;
}
.lightbox::backdrop { background: rgba(14, 15, 33, .96); }
.lightbox[open] { display: grid; place-items: center; }
/* Sideways swipes belong to the gallery (without this the browser cancels them) */
.lightbox { touch-action: pan-y pinch-zoom; }
.lightbox__figure { display: grid; justify-items: center; gap: 10px; margin: 0; padding: 64px 72px 72px; max-width: 100%; max-height: 100%; }
.lightbox__img { max-width: min(100%, 1400px); max-height: calc(100dvh - 160px); width: auto; height: auto; object-fit: contain; border-radius: 8px; }
.lightbox__caption { font-size: 15px; color: #DCDDF3; }
.lightbox__count { position: absolute; top: 20px; left: 24px; font-size: 15px; font-weight: 600; color: #DCDDF3; }
.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #FFFFFF;
  cursor: pointer;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, .22); }
.lightbox__btn svg { width: 18px; height: 18px; }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox__prev svg { transform: rotate(90deg); }
.lightbox__next { right: 14px; top: 50%; transform: translateY(-50%); }
.lightbox__next svg { transform: rotate(-90deg); }
.lightbox__btn[hidden] { display: none; }
@media (max-width: 767px) {
  .lightbox__figure { padding: 60px 12px 80px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 16px; transform: none; }
}

.pp-body { display: grid; gap: clamp(32px, 5vw, 56px); margin-top: clamp(32px, 5vw, 48px); padding-bottom: clamp(48px, 7vw, 80px); }
@media (min-width: 1024px) { .pp-body { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } }
.pp-main { display: grid; gap: clamp(32px, 4vw, 44px); min-width: 0; }
.pp-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 0; }
.pp-fact { display: grid; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.pp-fact dt { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.pp-fact__icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--bg-alt); color: var(--indigo); }
.pp-fact__icon svg { width: 16px; height: 16px; }
.pp-fact dd { margin: 0; font-size: 16px; font-weight: 600; color: var(--ink); }
.pp-story p { margin-top: 14px; max-width: 40em; }
.pp-story .heading-m + p { margin-top: 18px; }
.pp-lead { font-size: clamp(17px, 1.5vw, 19px); color: var(--ink); }
.pp-team-note { padding-left: 12px; border-left: 3px solid var(--gold); font-size: 15px; }
.pp-where__grid { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); gap: 24px; align-items: center; margin-top: 18px; }
.pp-where__map .india-outline { display: block; width: 100%; height: auto; }
.pp-where .india-outline__land { fill: var(--bg-alt); stroke: var(--indigo); stroke-width: 1.4; stroke-linejoin: round; }
.pp-where .india-outline__dot { fill: var(--coral); stroke: var(--surface); stroke-width: 2; }
.pp-where .india-outline__halo { display: none; }
/* The pulse is an HTML dot over the drawing: transform + opacity only, so the GPU runs
   it and the page's main thread stays free (an animated SVG circle would not) */
.pp-where__map { position: relative; }
.pp-pulse {
  position: absolute;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: var(--coral);
  opacity: 0;
  pointer-events: none;
  animation: pp-pulse 2.4s ease-out infinite;
}
@keyframes pp-pulse { 0% { opacity: .45; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.4); } }
.pp-where__place { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; color: var(--ink); }
.pp-where__place svg { width: 20px; height: 20px; color: var(--indigo); }
.pp-where__note { margin-top: 6px; font-size: 14px; color: var(--muted); }
.pp-where .text-link { margin-top: 10px; }
@media (max-width: 479px) { .pp-where__grid { grid-template-columns: 120px minmax(0, 1fr); gap: 16px; } }

.pp-side { scroll-margin-top: 100px; }
@media (min-width: 1024px) { .pp-side { position: sticky; top: 100px; } }
.pp-form { padding: clamp(20px, 3vw, 28px); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.pp-form__title { font-size: 22px; font-weight: 600; color: var(--ink); }
.pp-form__intro { margin: 8px 0 18px; font-size: 15px; color: var(--muted); }
.pp-form .enquiry-form__grid { grid-template-columns: 1fr; }
.pp-near { background: var(--bg-alt); }

/* Phones: the project bar replaces the shared mobile bar (same height, same call/WhatsApp) */
.pp-bar { display: none; }
@media (max-width: 767px) {
  main.project-page ~ .mobile-bar { display: none; }
  .pp-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: var(--surface);
  }
  .pp-bar__survey { flex: 1; }
  .pp-bar__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 48px;
    height: 48px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
  }
  .pp-bar__icon svg { width: 20px; height: 20px; }
  .pp-bar__icon[hidden] { display: none; }
  .pp-share {
    position: absolute;
    right: 12px;
    bottom: calc(100% + 8px);
    display: grid;
    min-width: 220px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .pp-share[hidden] { display: none; }
  .pp-share__opt { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: 500 15px var(--font-body); text-align: left; text-decoration: none; cursor: pointer; }
  .pp-share__opt:hover { background: var(--bg-alt); }
  .pp-share__msg { padding: 0 12px; font-size: 13px; color: var(--muted); }
  .pp-share__msg:empty { display: none; }
}

/* 10. Reduced motion: no drops, flights, lifts or pulses; fades are instant
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .pstage__poster, .pstage__map, .ppanel, .prow, .pcard, .pin svg, .pp-shot img, .pstage__caption, .office-tag, .you__name, .map-country { transition: none !important; }
  .pin.is-dropping svg, .cluster.is-dropping, .pstage__caption, .arrival[open], .you, .pp-pulse, .office-tag__dot, .you__ring { animation: none !important; }
  .prow:hover, .pcard:hover, .pcard:focus-within { transform: none; }
  .pp-shot:hover img { transform: none; }
}

/* Arrows after text links keep a small gap (the link is a flex box) */
.projects-page .text-link span[aria-hidden], .project-page .text-link span[aria-hidden] { margin-left: 6px; }

/* Navy look: the button and the caption chip stand out on the dark map */
.pstage[data-theme="navy"] .pstage__explore .btn { background: var(--sun); color: #1E1F3B; }
.pstage[data-theme="navy"] .pstage__caption { background: #FFFFFF; color: #1E1F3B; }
.pstage[data-theme="navy"] .pstage__step { color: var(--indigo); }
.pstage[data-theme="navy"] .pstage__caption-link { color: var(--indigo); }
.pstage[data-theme="navy"] .pstage__caption.is-card { background: rgba(14, 15, 43, .88); color: #FFFFFF; border: 1px solid rgba(255, 255, 255, .12); }
.pstage[data-theme="navy"] .pstage__caption.is-card .pstage__step, .pstage[data-theme="navy"] .pstage__caption.is-card .pstage__caption-link { color: var(--sun); }
