.featured {
  margin-top: clamp(24px, 2.7vw, 44px);
  scroll-margin-top: 15px;
}
.featured-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px clamp(18px, 4.8vw, 72px);
  margin: 0 0 clamp(16px, 1.8vw, 26px) clamp(0px, 1.55vw, 24px);
}
.featured-head h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.052em;
}
.featured-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 12px;
}
.featured-tabs > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px clamp(16px, 2.15vw, 34px);
  border: 1px solid #b1bdef;
  border-radius: 999px;
  color: #394363;
  font-size: clamp(0.83rem, 1.25vw, 1.12rem);
  font-weight: 750;
}
.featured-tabs > a:hover {
  border-color: var(--accent);
  color: var(--accent);
}
body:not(:has(#countries:target)) .featured-tabs > a:first-child,
body:has(#countries:target) .featured-tabs > a:last-child {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--white);
}
.featured-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1.03vw, 16px);
}
.featured-tile {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  aspect-ratio: 4.65;
  border-radius: clamp(15px, 2.1vw, 32px);
  color: var(--white);
  background: #2f587d;
}
.featured-tile--lead {
  grid-column: 1 / -1;
  align-items: center;
  aspect-ratio: 7.125;
  min-height: 124px;
  border-start-start-radius: 14% 65%;
  border-end-start-radius: 7% 37%;
}
.featured-image,
.featured-tile::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}
.featured-image {
  object-fit: cover;
  object-position: center 44%;
  transition: transform 380ms var(--ease);
}
.featured-image[src$="krabi-destination.jpg"] { object-position: center 35%; }
.featured-image[src$="fuji-pagoda-destination.jpg"] { object-position: center 42%; }
.featured-tile--lead .featured-image { object-position: center 61%; }
.featured-tile::after {
  content: "";
  background: linear-gradient(0deg, rgb(9 16 40 / 57%), transparent 52%);
}
.featured-tile--lead::after {
  background: linear-gradient(90deg, rgb(8 27 60 / 64%), rgb(8 27 60 / 16%) 40%, transparent 62%);
}
.featured-tile:is(:hover, :focus-visible) .featured-image { transform: scale(1.035); }
.featured-copy {
  padding: clamp(9px, 1.2vw, 20px) clamp(12px, 2.05vw, 32px);
}
.featured-tile--lead .featured-copy {
  padding-inline-start: clamp(20px, 5.6vw, 88px);
}
.featured-copy h3 {
  margin: 0;
  font-size: clamp(1.05rem, 2.15vw, 2.02rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.featured-tile--lead h3 {
  font-size: clamp(1.95rem, 3.65vw, 3.65rem);
}
.featured-action {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-top: clamp(8px, 1.25vw, 19px);
  padding: 7px clamp(14px, 1.65vw, 25px);
  border-radius: 999px;
  background: var(--accent);
  font-size: clamp(0.82rem, 1.28vw, 1.18rem);
  font-weight: 780;
}
.featured-action .icon,
.atlas-action .icon { filter: brightness(0) invert(1); }
.featured-tile:hover .featured-action { background: var(--accent-hover); }

.destination-atlas {
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(15rem, 1fr) minmax(0, 1.65fr);
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "intro map"
    "picker map"
    "picker card";
  column-gap: clamp(20px, 3.2vw, 48px);
  row-gap: 14px;
  margin-top: clamp(30px, 3.3vw, 52px);
}
.atlas-intro {
  grid-area: intro;
  align-self: start;
}
.atlas-intro h2 {
  margin-bottom: 8px;
}
.atlas-intro p {
  max-width: 38ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(.9375rem, 1.15vw, 1.0625rem);
  line-height: 1.45;
}
.atlas-map,
.atlas-card {
  width: min(100%, 880px);
  justify-self: end;
}
.atlas-map {
  --fr-x: 50.54%; --fr-y: 16.96%;
  --jp-x: 84.87%; --jp-y: 26.28%;
  --th-x: 77.22%; --th-y: 43.63%;
  --tr-x: 57.01%; --tr-y: 22.37%;
  --us-x: 32.06%; --us-y: 22.58%;
  --br-x: 38.59%; --br-y: 73.97%;
  --za-x: 54.65%; --za-y: 82.56%;
  --au-x: 88.12%; --au-y: 82.52%;
  grid-area: map;
  z-index: 0;
  min-width: 0;
  align-self: start;
  overflow: hidden;
  aspect-ratio: 2;
}
.atlas-map-stage {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: var(--focus-x, 50%) var(--focus-y, 50%);
  transition: transform 620ms var(--ease), transform-origin 620ms var(--ease);
}
.atlas-map-stage > img { display: block; width: 100%; height: 100%; }
.atlas-map[data-zoom]:has(.atlas-pin[aria-current]) .atlas-map-stage { transform: scale(1.08); }
.atlas-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  translate: -50% -78%;
  display: grid;
  place-items: center;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  color: #6055ec;
}
.atlas-pin[data-atlas-code="FR"] { --x: var(--fr-x); --y: var(--fr-y); }
.atlas-pin[data-atlas-code="JP"] { --x: var(--jp-x); --y: var(--jp-y); }
.atlas-pin[data-atlas-code="TH"] { --x: var(--th-x); --y: var(--th-y); }
.atlas-pin[data-atlas-code="TR"] { --x: var(--tr-x); --y: var(--tr-y); }
.atlas-pin[data-atlas-code="US"] { --x: var(--us-x); --y: var(--us-y); }
.atlas-pin[data-atlas-code="BR"] { --x: var(--br-x); --y: var(--br-y); }
.atlas-pin[data-atlas-code="ZA"] { --x: var(--za-x); --y: var(--za-y); }
.atlas-pin[data-atlas-code="AU"] { --x: var(--au-x); --y: var(--au-y); }
.atlas-map:has(.atlas-pin[data-atlas-code="FR"][aria-current]) { --focus-x: var(--fr-x); --focus-y: var(--fr-y); }
.atlas-map:has(.atlas-pin[data-atlas-code="JP"][aria-current]) { --focus-x: var(--jp-x); --focus-y: var(--jp-y); }
.atlas-map:has(.atlas-pin[data-atlas-code="TH"][aria-current]) { --focus-x: var(--th-x); --focus-y: var(--th-y); }
.atlas-map:has(.atlas-pin[data-atlas-code="TR"][aria-current]) { --focus-x: var(--tr-x); --focus-y: var(--tr-y); }
.atlas-map:has(.atlas-pin[data-atlas-code="US"][aria-current]) { --focus-x: var(--us-x); --focus-y: var(--us-y); }
.atlas-map:has(.atlas-pin[data-atlas-code="BR"][aria-current]) { --focus-x: var(--br-x); --focus-y: var(--br-y); }
.atlas-map:has(.atlas-pin[data-atlas-code="ZA"][aria-current]) { --focus-x: var(--za-x); --focus-y: var(--za-y); }
.atlas-map:has(.atlas-pin[data-atlas-code="AU"][aria-current]) { --focus-x: var(--au-x); --focus-y: var(--au-y); }
.atlas-pin > span {
  width: clamp(18px, 1.65vw, 25px);
  aspect-ratio: 1;
  background: currentColor;
  mask: url("/assets/atlas-map-pin.svg") center / contain no-repeat;
  transform-origin: 50% 82%;
  transition: transform 260ms var(--ease), background-color 190ms;
}
.atlas-pin:is([aria-current], :hover, :focus-visible) {
  z-index: 1;
  color: var(--accent);
  background: rgb(89 76 239 / 13%);
}
.atlas-pin:is([aria-current], :hover, :focus-visible) > span { transform: scale(1.44); }
.atlas-picker {
  grid-area: picker;
  min-width: 0;
  width: min(100%, 440px);
}
.atlas-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding-inline: 14px;
  border: 1px solid #b1bdef;
  border-radius: 999px;
}
.atlas-search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.atlas-search > .icon { width: 19px; height: auto; opacity: .74; }
.atlas-search > input {
  width: 100%;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  color: var(--ink);
  background: none;
  font-size: 1rem;
  outline: none;
}
.atlas-search > input::placeholder { color: var(--muted); }
.atlas-choices {
  --choice-height: 50px;
  --choice-gap: 6px;
  --choice-rows: 4;
  display: grid;
  gap: var(--choice-gap);
  max-height: calc(var(--choice-rows) * (var(--choice-height) + var(--choice-gap)) - var(--choice-gap) + 8px);
  margin-top: 10px;
  padding: 4px;
  margin-inline: -4px;
  overflow: auto;
  scrollbar-gutter: stable;
}
.atlas-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: var(--choice-height);
  padding: 6px 11px;
  border: 1px solid #cbd4ef;
  border-radius: 10px;
  font-size: .9375rem;
}
.atlas-choice:is(:hover, :focus-visible) { border-color: #8b82ee; }
.atlas-choice[aria-current] {
  border-color: var(--accent);
  background: var(--tint);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.atlas-choice > .icon { opacity: .75; }
.atlas-choice > :is(.flag, .flag-code) { width: 28px; }
.atlas-choice > strong { overflow-wrap: anywhere; }
.atlas-empty { margin: 10px 4px; color: var(--muted); }
.atlas-card {
  grid-area: card;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 34%) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #c7d0ee;
  border-radius: 16px;
  min-height: 145px;
}
.atlas-card:has(.atlas-photo[hidden]) { grid-template-columns: 1fr; }
.atlas-photo {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 166px;
  object-fit: cover;
}
.atlas-card[aria-busy] .atlas-photo { opacity: .62; }
.atlas-card-copy {
  align-self: center;
  padding: clamp(12px, 1.6vw, 20px);
}
.atlas-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: clamp(1.1875rem, 1.7vw, 1.625rem);
  line-height: 1.1;
  letter-spacing: -0.05em;
  overflow-wrap: anywhere;
}
.atlas-card h3 > span:first-child { display: flex; flex: none; }
.atlas-card h3 :is(.flag, .flag-code) { width: 28px; }
.atlas-card p {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: .9375rem;
}
.atlas-action {
  display: inline-flex;
  justify-content: space-between;
  width: fit-content;
  max-width: 100%;
  gap: 10px;
  min-height: 46px;
  padding-inline: 16px;
  border-radius: 999px;
  font-size: .875rem;
}

@media (max-width: 820px) {
  .destination-atlas {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "intro" "map" "picker" "card";
    gap: 12px;
  }
  .atlas-picker { width: 100%; }
  .atlas-choices {
    --choice-rows: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 650px) {
  .featured-tile:not(.featured-tile--lead) { aspect-ratio: 2.95; max-height: 64px; }
  .featured-tile--lead { aspect-ratio: auto; }
  .featured-tile--lead .featured-image { object-position: 62% center; }
  .atlas-map-stage .atlas-pin { min-width: 26px; min-height: 26px; }
}
@media (max-width: 460px) {
  .atlas-card { grid-template-columns: 1fr; }
  .atlas-photo { height: 112px; }
  .atlas-choice { gap: 7px; padding-inline: 8px; }
  .atlas-choice > .icon { width: 14px; height: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .featured-image, .atlas-map-stage, .atlas-pin > span { transition: none; }
  .featured-tile:is(:hover, :focus-visible) .featured-image { transform: none; }
}
