/* =====================================================================
   DESTINATIONS PAGE
   Page-specific layouts. Every value comes from css/tokens.css.
   1. Hero
   2. Sticky filter bar shell
   3. Desktop controls — two tiers of pills
   4. Tablet and mobile controls — dependent dropdowns
   5. Uniform destination grid + cards
   6. Destination detail — slide-over sheet
   7. Plan a route CTA
   8. Responsive
   ===================================================================== */


/* ------------------------------------------------------------------
   1. HERO
   ------------------------------------------------------------------ */
.dhero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 420px;
  padding-block: calc(var(--header-height) + var(--space-xl)) var(--space-xl);
  isolation: isolate;
  overflow: hidden;
  background: var(--color-green-900);
}
.dhero__media { position: absolute; inset: 0; z-index: -2; }
.dhero__media img { width: 100%; height: 100%; object-fit: cover; }
.dhero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--scrim-hero-vertical);
}

.dhero__inner { position: relative; }

.dhero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: var(--weight-black);
  line-height: 1.05;
  letter-spacing: var(--tracking-tight);
  color: var(--color-white);
}
.dhero__title::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin-top: var(--space-sm);
  border-radius: var(--radius-pill);
  background: var(--color-accent);
}

/* Overlapping region rail that breaks out of the hero */
.dhero__railwrap { position: relative; margin-top: var(--space-2xl); }
.dhero__rail {
  display: flex;
  gap: var(--space-sm);
  margin: 0;
  padding: 0 0 var(--space-xs);
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.dhero__rail::-webkit-scrollbar { display: none; }
.dhero__rail li { flex: 1 0 clamp(150px, 15vw, 210px); scroll-snap-align: start; }
.dhero__rail a {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: transform var(--duration-base) var(--ease-spring);
}
.dhero__rail a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--scrim-card);
}
.dhero__rail img { width: 100%; height: 100%; object-fit: cover; }
.dhero__rail a:hover,
.dhero__rail a:focus-visible { transform: translateY(-6px); }
.dhero__railnum {
  position: absolute;
  top: var(--space-xs);
  left: var(--space-xs);
  z-index: 1;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  background: var(--color-accent);
  color: var(--color-green-900);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
}
.dhero__railname {
  position: absolute;
  inset-inline: var(--space-sm);
  bottom: var(--space-sm);
  z-index: 1;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--color-white);
}
/* ------------------------------------------------------------------
   2. FILTER BAR — the sticky shell both control sets live in
   It sticks under the header so the controls stay reachable however
   far down the grid you have scrolled.
   ------------------------------------------------------------------ */
.dfilter {
  position: relative;
  padding-block: var(--section-y) var(--section-y);
  scroll-margin-top: var(--header-height);
}

.dfilterbar {
  position: sticky;
  top: var(--header-height);
  z-index: var(--z-sticky);
  margin-bottom: var(--space-2xl);
  padding-block: var(--space-sm);
  border-block: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-xs);
}
.dfilterbar__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.dfilterbar__foot {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.dfilterbar__count {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
}
.dfilterbar__count strong { color: var(--color-green-900); }

.dfilterbar__reset {
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: transparent;
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
}
.dfilterbar__reset:hover { border-color: var(--color-primary); color: var(--color-primary); }
.dfilterbar__cta { margin-left: auto; flex: none; }


/* ------------------------------------------------------------------
   3. DESKTOP CONTROLS — two tiers of pills
   Regions on top; the cities inside the chosen region directly below.
   Hidden below 1080px, where the dropdowns take over.
   ------------------------------------------------------------------ */
.dpills {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}
.dpills__tier {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-width: 0;
}
/* The city tier is a consequence of the row above it rather than a
   second equal choice, so it sits behind a hairline. */
.dpills__tier--sub {
  padding-top: var(--space-2xs);
  border-top: 1px dashed var(--color-border);
}
.dpills__label {
  flex: none;
  width: 3.5rem;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

/* The pill rows scroll horizontally rather than wrapping into a tall
   block — the bar has to stay short enough to sit under the header. */
.fchiprow {
  display: flex;
  flex: 1;
  gap: var(--space-2xs);
  min-width: 0;
  margin: 0;
  padding: 2px 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.fchiprow::-webkit-scrollbar { display: none; }
.fchiprow > li { scroll-snap-align: start; }

/* Changing region replaces the whole city rail, so it fades back in
   rather than swapping its contents under the pointer. */
.fchiprow--city {
  transition: opacity var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out);
}
.fchiprow--city.is-swap { opacity: 0; transform: translateY(6px); }
/* A city outside the chosen region leaves the row entirely, so the
   rail only ever offers combinations that return something. */
.fchiprow--city > li[hidden] { display: none; }

.fchip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-white);
  white-space: nowrap;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}
.fchip--sm {
  padding: 0.3rem 0.7rem;
  font-size: var(--text-xs);
}
.fchip:hover {
  border-color: var(--color-green-200);
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
.fchip__i {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-subtle);
}
.fchip__n {
  padding: 0.05rem 0.4rem;
  border-radius: var(--radius-pill);
  background: var(--color-canvas-sunk);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-subtle);
}
.fchip--sm .fchip__n { font-size: 0.6875rem; }

.fchip.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-white);
}
.fchip.is-active .fchip__i { color: var(--color-accent); }
.fchip.is-active .fchip__n {
  background: rgba(255, 255, 255, 0.18);
  color: var(--color-white);
}


/* ------------------------------------------------------------------
   4. TABLET AND MOBILE CONTROLS — two dependent dropdowns
   Twenty-two pills will not fit a phone without wrapping into a wall,
   so below 1080px the same two choices become selects.
   ------------------------------------------------------------------ */
.dselects { display: none; }

.dselect {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  margin: 0;
}
.dselect__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-subtle);
}
.dselect__field { position: relative; display: block; }
/* Drawn rather than drafted into the sprite — it is one chevron, and
   it has to inherit the field's colour when the filter is set. */
.dselect__field::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.95rem;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.dselect__input {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 0.6rem 2.1rem 0.6rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-white);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-green-900);
  text-overflow: ellipsis;
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out),
              background-color var(--duration-fast) var(--ease-out);
}
.dselect__input:hover { border-color: var(--color-green-200); }
/* A dropdown carrying a filter should read as chosen, the way an
   active pill does on the desktop row. */
.dselect__input.is-set {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  font-weight: var(--weight-semibold);
}

/* ------------------------------------------------------------------
   5. UNIFORM GRID — every place gets the same card, whatever its size
   ------------------------------------------------------------------ */
.dgrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
  list-style: none;
}

.dcard {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-white);
  box-shadow: var(--shadow-xs);
  opacity: 1;
  transform: none;
  transition: opacity var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
}
.dcard:hover {
  border-color: var(--color-green-200);
  box-shadow: var(--shadow-md);
}

/* Filtered out: faded and lifted, then taken out of flow by [hidden]
   once the transition has finished (handled in js/destinations.js). */
.dcard.is-out {
  opacity: 0;
  transform: translateY(10px) scale(0.97);
}
.dcard[hidden] { display: none; }

.dcard__media {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--color-canvas-sunk);
}
.dcard__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}
.dcard:hover .dcard__media img { transform: scale(1.05); }

.dcard__tag {
  position: absolute;
  top: var(--space-xs);
  left: var(--space-xs);
  z-index: var(--z-raised);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  color: var(--color-green-800);
}

/* The body grows to fill the row's height so every card in a row ends
   flush, whether or not it carries a supporting line. */
.dcard__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-2xs);
  padding: var(--space-md);
}

/* With the region headings gone, each card has to say where it is. */
.dcard__where {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-primary);
}
.dcard__where .icon {
  flex: none;
  width: 13px;
  height: 13px;
  color: var(--color-accent);
}

.dcard__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--color-green-900);
}
/* The 25–35 word summary. It sits above a margin-top:auto link, so the
   "Read more" line always lands on the bottom edge of the card however
   long the name and the summary turn out to be. */
.dcard__note {
  margin: 0.15rem 0 0;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
}

.dcard__more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: var(--space-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
  text-decoration: none;
  color: var(--color-primary);
}
.dcard__more .icon {
  flex: none;
  width: 15px;
  height: 15px;
  color: var(--color-accent);
  transition: transform var(--duration-base) var(--ease-out);
}
.dcard:hover .dcard__more .icon,
.dcard__more:hover .icon { transform: translateX(4px); }
.dcard__more:hover,
.dcard__more:focus-visible { text-decoration: underline; }

/* The whole card is the hit area; the link carries the accessible name,
   so the overlay sits behind nothing and needs no label of its own. */
.dcard__more::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: var(--z-raised);
}
.dcard { position: relative; }

.dgrid__empty {
  margin: var(--space-2xl) 0 0;
  padding: var(--space-xl);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  font-size: var(--text-md);
  color: var(--color-text-muted);
}
.dgrid__emptybtn {
  padding: 0;
  border: 0;
  border-bottom: 2px solid var(--color-accent);
  background: none;
  font: inherit;
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  cursor: pointer;
}

/* ------------------------------------------------------------------
   6. DESTINATION DETAIL — a slide-over sheet, not a new page

   Opening a place must never cost you your scroll position or your
   filter, so the detail view is a sheet over the grid rather than
   forty-six separate documents. Everything inside it is rendered by
   js/destinations-detail.js from js/destinations-data.js.
   ------------------------------------------------------------------ */
.ddetail {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
}
.ddetail[hidden] { display: none; }

.ddetail__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 51, 17, 0.52);
  opacity: 0;
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  backdrop-filter: blur(10px) saturate(1.1);
  transition: opacity var(--duration-base) var(--ease-out);
  cursor: pointer;
}

/* The sheet itself. Right-hand slide-over on a wide screen, where the
   grid stays visible alongside; full width on a phone. */
.ddetail__sheet {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  width: min(620px, 100%);
  flex-direction: column;
  overflow: hidden;
  background: var(--color-canvas);
  box-shadow: var(--shadow-xl);
  transform: translateX(100%);
  transition: transform var(--duration-slow) var(--ease-out);
}
.ddetail.is-open .ddetail__backdrop { opacity: 1; }
.ddetail.is-open .ddetail__sheet { transform: translateX(0); }

/* A floating close button, over the photograph and over everything that
   scrolls under it. The sheet does not scroll, its inner column does,
   so absolute here behaves like fixed. */
.ddetail__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  z-index: 3;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-white);
  box-shadow: var(--shadow-md);
  color: var(--color-green-900);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}
.ddetail__close .icon { width: 20px; height: 20px; }
.ddetail__close:hover {
  background: var(--color-accent);
  transform: rotate(90deg);
}

.ddetail__scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ---- gallery ----------------------------------------------------- */
.dgal {
  position: relative;
  overflow: hidden;
  background: var(--color-green-900);
}
.dgal__track {
  display: flex;
  transition: transform var(--duration-slow) var(--ease-out);
}
.dgal__slide {
  flex: 0 0 100%;
  margin: 0;
  min-width: 0;
}
.dgal__slide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.dgal__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  color: var(--color-green-900);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background var(--duration-fast) var(--ease-out);
}
.dgal__arrow:hover { background: var(--color-accent); }
.dgal__arrow .icon { width: 18px; height: 18px; }
.dgal__arrow--prev { left: var(--space-sm); }
.dgal__arrow--next { right: var(--space-sm); }
/* A two-slide gallery still works; a one-slide one has nothing to step
   through, so the controls are removed rather than left inert. */
.dgal.is-single .dgal__arrow,
.dgal.is-single .dgal__dots { display: none; }

.dgal__dots {
  position: absolute;
  bottom: var(--space-sm);
  left: 50%;
  z-index: 2;
  display: flex;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translateX(-50%);
}
.dgal__dot {
  display: block;
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out),
              width var(--duration-fast) var(--ease-out);
}
.dgal__dot.is-active {
  width: 22px;
  background: var(--color-accent);
}

/* Most of these photographs carry a CC BY or CC BY-SA licence, which
   requires the author and licence to stay visible. See
   assets/images/CREDITS.md for the full list. */
.dgal__credit {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  margin: 0;
  padding: var(--space-xl) var(--space-md) 0.35rem;
  background: linear-gradient(to top, rgba(13, 51, 17, 0.8), transparent);
  font-size: 0.6875rem;
  line-height: var(--leading-snug);
  color: rgba(255, 255, 255, 0.82);
}
.dgal__credit:empty { display: none; }

/* ---- written content --------------------------------------------- */
.ddetail__body { padding: var(--space-lg) var(--space-lg) var(--space-md); }

.ddetail__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 var(--space-sm);
}
.ddetail__badge {
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--color-primary-soft);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-green-800);
}
.ddetail__badge--city {
  background: var(--color-accent);
  color: var(--color-green-900);
}

.ddetail__title {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--color-green-900);
}

.ddetail__prose p {
  margin: 0 0 var(--space-sm);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
}
.ddetail__prose p:last-child { margin-bottom: 0; }

.ddetail__hl {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius-md);
  background: var(--color-white);
}
.ddetail__hltitle {
  margin: 0 0 var(--space-sm);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-primary);
}
.ddetail__hllist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-xs);
}
.ddetail__hllist li {
  display: flex;
  gap: 0.5rem;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-green-900);
}
.ddetail__hllist .icon {
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 0.15rem;
  color: var(--color-primary);
}

/* ---- the ask ----------------------------------------------------- */
.ddetail__cta {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--color-green-900);
}
.ddetail__ctatext {
  margin: 0 0 var(--space-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-white);
}
.ddetail__ctarow {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}
.ddetail__ctarow .btn { flex: 1 1 auto; justify-content: center; }

/* ---- previous / next through the filtered set -------------------- */
.ddetail__nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xs);
  padding: 0 var(--space-lg) var(--space-xl);
}
.ddetail__navbtn {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 64px;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}
.ddetail__navbtn:hover:not(:disabled) {
  border-color: var(--color-green-200);
  box-shadow: var(--shadow-sm);
}
.ddetail__navbtn:disabled {
  opacity: 0.4;
  cursor: default;
}
.ddetail__navbtn--next { justify-content: flex-end; text-align: right; }
.ddetail__navbtn .icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--color-accent);
}
.ddetail__navtext { display: block; min-width: 0; }
.ddetail__navlabel {
  display: block;
  font-size: 0.625rem;
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-subtle);
}
.ddetail__navname {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--color-green-900);
}

/* While the sheet is open the page behind it must not scroll — set on
   <html> by the detail script, which also preserves the offset. The
   reserved gutter means losing the scrollbar does not shift the grid
   sideways as the sheet opens and closes. */
html { scrollbar-gutter: stable; }
.has-ddetail { overflow: hidden; }

/* The floating WhatsApp button sits below the sheet but would still
   show through the blurred backdrop, so it steps aside. */
.whatsapp-float[hidden] { display: none; }


/* ------------------------------------------------------------------
   7. PLAN A ROUTE — CTA
   ------------------------------------------------------------------ */
.plan {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: var(--section-y);
  background: var(--color-green-900);
  scroll-margin-top: calc(var(--header-height) + 64px);
}
.plan__media { position: absolute; inset: 0; z-index: -2; }
.plan__media img { width: 100%; height: 100%; object-fit: cover; }
.plan::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--scrim-full);
}
.plan__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(var(--space-xl), 4vw, var(--space-3xl));
  align-items: center;
}
.plan__title {
  margin: var(--space-sm) 0 var(--space-md);
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-white);
  text-wrap: balance;
}
.plan__title em { font-style: normal; color: var(--color-accent); }
.plan__lede {
  margin: 0;
  max-width: 54ch;
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text-on-dark-muted);
}
.plan__points {
  margin: var(--space-lg) 0 var(--space-xl);
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-sm);
}
.plan__points li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: var(--text-base);
  color: var(--color-text-on-dark);
}
.plan__points .icon { flex: none; color: var(--color-accent); }
.plan__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.plan__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-lg) 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-on-dark-muted);
}
.plan__meta .icon { flex: none; color: var(--color-accent); }

.plan__quote {
  position: relative;
  margin: 0;
  padding: clamp(var(--space-lg), 3vw, var(--space-2xl));
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}
.plan__quotemark {
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-sm);
  color: var(--color-accent);
}
.plan__quote p {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  color: var(--color-white);
}
.plan__quote footer {
  margin-top: var(--space-md);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-on-dark-muted);
}
/* ------------------------------------------------------------------
   8. RESPONSIVE
   ------------------------------------------------------------------ */
@media (max-width: 1240px) {
  .dgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Narrow enough that a pill row starts to overflow — fade its right edge
   so the clipped pill reads as "more to come", not as broken text. */
@media (max-width: 1320px) {
  .fchiprow {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent);
  }
}

/* Tablet and below: the pills would wrap into a wall at this width, so
   they hand over to the two dependent dropdowns. Both control sets stay
   in the DOM and share one state, so a resize lands on the same filter. */
@media (max-width: 1080px) {
  .dhero { min-height: 380px; }

  .dpills { display: none; }
  .dselects {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-md);
  }

  .plan__inner { grid-template-columns: minmax(0, 1fr); }
}

/* One card per row from here down. Two columns on a phone left each
   card too narrow for its photograph and its summary to carry any
   weight; a single column gives both room and reads far better. */
@media (max-width: 860px) {
  .dgrid { grid-template-columns: minmax(0, 1fr); }

  /* One column means the card is now as wide as the page, so the
     photograph is let out to a landscape crop rather than stretching a
     4:3 frame to half the height of the screen. */
  .dcard__media img { aspect-ratio: 16 / 9; }
  .dcard__body { padding: var(--space-md) var(--space-lg) var(--space-lg); }
  .dcard__title { font-size: var(--text-xl); }
  .dcard__note { font-size: var(--text-base); }
}

@media (max-width: 760px) {
  .dhero::after { background: var(--scrim-hero-vertical-strong); }
  .dhero {
    min-height: 340px;
    padding-block: calc(var(--header-height) + var(--space-lg)) var(--space-lg);
  }
  .dhero__railwrap { margin-top: var(--space-xl); }

  .dfilter { padding-block: var(--section-y-tight); }

  /* A phone cannot spare much sticky bar — tighten the fields and drop
     the label row onto the same line as the count. */
  .dfilterbar { padding-block: var(--space-sm); }
  .dselects { gap: var(--space-xs); }
  .dselect__label { font-size: 0.625rem; }
  .dselect__input {
    padding: 0.5rem 1.8rem 0.5rem 0.75rem;
    font-size: var(--text-xs);
  }
  .dselect__field::after { right: 0.75rem; }
  .dfilterbar__cta { display: none; }
  .dfilterbar__foot { flex-wrap: wrap; gap: var(--space-sm); }

  .dgrid { gap: var(--space-md); }
  .dcard__body { padding: var(--space-sm) var(--space-md) var(--space-md); }

  .plan__actions .btn { width: 100%; justify-content: center; }
}

/* On a phone the single column is the whole screen, so the card can
   behave like a magazine entry: a tall photograph, the name, and the
   summary in full. The summary stays — it is what the card is for. */
@media (max-width: 540px) {
  .dhero { min-height: 300px; }
  .dhero__railwrap { margin-top: var(--space-lg); }

  .dcard__media img { aspect-ratio: 4 / 3; }
  .dcard__title { font-size: var(--text-lg); }
  .dcard__note { font-size: var(--text-sm); }
  .dcard__body { padding: var(--space-md); }

  /* Edge to edge, with the sheet taking the whole screen. */
  .ddetail__sheet { width: 100%; }
  .ddetail__body,
  .ddetail__nav { padding-inline: var(--space-md); }
  .ddetail__ctarow .btn { flex: 1 1 100%; }

  /* "Previous destination" will not sit on one line in half a phone
     screen, and wrapped it unbalances the pair. The word goes to screen
     readers only; the destination's name underneath says the rest. */
  .ddetail__navlabel { letter-spacing: var(--tracking-wide); }
  .ddetail__navword {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* The sheet is tall and thin on a phone in landscape, so the gallery
   gives up some height to the words. */
@media (max-height: 520px) {
  .dgal__slide img { aspect-ratio: 16 / 9; }
}

@media (prefers-reduced-motion: reduce) {
  .dhero__rail a,
  .dcard,
  .dcard__media img { transition: none; }
  .dcard:hover .dcard__media img { transform: none; }
  .dcard.is-out { transform: none; }
  .dcard:hover .dcard__more .icon,
  .dcard__more:hover .icon { transform: none; }
  .fchiprow--city { transition: none; }
  .fchiprow--city.is-swap { opacity: 1; transform: none; }

  /* The sheet still appears and disappears, it just stops sliding. */
  .ddetail__sheet,
  .ddetail__backdrop,
  .dgal__track { transition: none; }
  .ddetail__close:hover { transform: none; }
}

/* =====================================================================
   SECTION HEADS, CENTRED ON A PHONE

   A one-column phone layout leaves an eyebrow, a heading and a lede
   sitting straight on the page background with nothing to line up
   against, so a left edge reads as a column that has drifted off to one
   side. Centring gives the stack its own axis -- the same treatment the
   region map intro already gets.

   Only copy out in the open is listed. Anything inside a card, a form,
   a panel or a quote rule keeps its left edge, because there the edge is
   what the text is aligned to.
   ===================================================================== */

@media (max-width: 767px) {
  .plan__copy {
    text-align: center;
    justify-items: center;
    justify-content: center;
  }

  /* The ticked points below the copy are a list; they stay left so the
     ticks make a column. */
  .plan__points {
    justify-self: stretch;
    text-align: left;
  }
}
