/*
 * Homepage destinations (3.0.7) — "Where we travel" country panels and the
 * "Featured destinations" bento. Front page only; enqueued from
 * inc/front-page-redesign.php after front-page.css. Uses the shared tokens
 * from style.css (--ink, --gold, --paper, --line, --font-display, --radius…).
 */

/* ── Where we travel ─────────────────────────────────────────────────── */
.hd-where__head { max-width: none; margin-bottom: 34px; }
.hd-where__lead {
  margin: 10px 0 0;
  font: 500 clamp(1.45rem, 2.5vw, 2.15rem)/1.28 var(--font-display);
  letter-spacing: -.01em; color: var(--ink);
}

.hd-countries { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.hd-country {
  position: relative; isolation: isolate; overflow: hidden;
  aspect-ratio: 3 / 4; min-height: 480px; border-radius: 18px;
  color: #fff; background: var(--forest-deep); box-shadow: var(--shadow);
}
.hd-country > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.hd-country::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(24,11,2,.05) 30%, rgba(24,11,2,.55) 58%, rgba(24,11,2,.92) 100%);
}
.hd-country:hover > img { transform: scale(1.05); }
/* 3.1.1 — extra panel photos crossfade over the first (14s loop: 7s each). */
.hd-country > img.hd-country__alt,
.hd-tile > img.hd-tile__alt { opacity: 0; animation: hd-xfade 14s ease-in-out infinite; }
.hd-mini__media img.hd-tile__alt { display: none; } /* compact row shows the first photo only */
@keyframes hd-xfade {
  0%, 42%   { opacity: 0; }
  50%, 92%  { opacity: 1; }
  100%      { opacity: 0; }
}
.hd-country__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 26px 24px; }
.hd-country__num {
  display: inline-block; margin-bottom: 8px; padding-bottom: 6px;
  font: 600 .8rem/1 var(--font-body); letter-spacing: .2em; color: var(--gold);
  border-bottom: 2px solid var(--gold);
}
.hd-country__name { margin: 0 0 6px; font: 600 clamp(1.9rem, 2.6vw, 2.4rem)/1.05 var(--font-display); }
.hd-country__name a { color: #fff; text-decoration: none; }
.hd-country__name a::after { content: ""; position: absolute; inset: 0; z-index: 0; } /* whole panel clickable */
.hd-country__tag { margin: 0 0 14px; color: var(--cream); font-size: .95rem; line-height: 1.5; }
.hd-country__places { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.hd-country__places a {
  display: inline-block; padding: 6px 12px; border-radius: 100px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: #fff; font-size: .82rem; font-weight: 500; text-decoration: none; transition: background .2s, border-color .2s;
}
.hd-country__places a:hover { background: rgba(238,174,5,.28); border-color: var(--gold); }
.hd-country__cta {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 100px; background: var(--gold); color: var(--ink-ongold, #241a06);
  font-weight: 600; font-size: .92rem; text-decoration: none; transition: background .2s, transform .2s;
}
.hd-country__cta:hover { background: #fff; transform: translateY(-1px); }

.hd-beyond {
  display: flex; align-items: baseline; gap: 10px 18px; flex-wrap: wrap;
  margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line);
}
.hd-beyond__label { font: 600 .74rem/1 var(--font-body); letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep); }
.hd-beyond ul { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; }
.hd-beyond li { display: flex; align-items: center; }
.hd-beyond li:not(:last-child)::after { content: "·"; margin: 0 10px; color: var(--gold-deep); }
.hd-beyond a { color: var(--ink); font-size: .95rem; text-decoration: none; border-bottom: 1px solid transparent; }
.hd-beyond a:hover { border-bottom-color: var(--gold); }

/* ── Featured destinations — bento ───────────────────────────────────── */
.hd-bento {
  display: grid; gap: 18px;
  grid-template-columns: 1.55fr 1fr; grid-template-rows: repeat(2, minmax(250px, 1fr));
}
.hd-tile {
  position: relative; isolation: isolate; overflow: hidden; display: block;
  border-radius: 18px; color: #fff; text-decoration: none; background: var(--forest-deep);
  min-height: 250px; box-shadow: var(--shadow-sm);
}
.hd-tile--hero { grid-row: 1 / span 2; min-height: 520px; }
.hd-tile > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.hd-tile::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(24,11,2,0) 35%, rgba(24,11,2,.82) 100%);
}
.hd-tile:not(.hd-tile--hero)::after { background: linear-gradient(180deg, rgba(24,11,2,.08) 0%, rgba(24,11,2,.5) 45%, rgba(24,11,2,.9) 100%); }
.hd-tile__body, .hd-country__body { text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.hd-tile:hover > img { transform: scale(1.05); }
.hd-tile__body { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; }
.hd-tile__country {
  align-self: flex-start; padding: 5px 11px; border-radius: 100px; background: var(--gold);
  color: var(--ink-ongold, #241a06); font: 700 .68rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase;
}
.hd-tile__title { font: 600 1.55rem/1.1 var(--font-display); }
.hd-tile--hero .hd-tile__title { font-size: clamp(2rem, 3.4vw, 2.9rem); }
.hd-tile__blurb {
  max-width: 40em; color: var(--cream); font-size: .92rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hd-tile--hero .hd-tile__blurb { font-size: 1.02rem; -webkit-line-clamp: 3; }
.hd-tile__go { margin-top: 4px; font-weight: 600; font-size: .9rem; color: var(--gold); }
.hd-tile:hover .hd-tile__go { color: #fff; }
.hd-tile:focus-visible, .hd-mini:focus-visible, .hd-country a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* Further in Asia */
.hd-further { margin-top: 30px; }
.hd-further__title {
  display: flex; align-items: center; gap: 14px; margin: 0 0 14px;
  font: 600 .78rem/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft);
}
.hd-further__title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.hd-further__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.hd-mini {
  display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 14px;
  background: var(--card, #fff); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.hd-mini:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.hd-mini__media { flex: none; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; }
.hd-mini__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hd-mini__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hd-mini__country { font: 600 .68rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }
.hd-mini__title { font: 600 1.08rem/1.2 var(--font-display); }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hd-further__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hd-countries {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 22px;
    margin-inline: -22px; padding: 4px 22px 14px; scrollbar-width: none;
  }
  .hd-countries::-webkit-scrollbar { display: none; }
  .hd-country { scroll-snap-align: start; min-height: 440px; }
  .hd-bento { grid-template-columns: 1fr; grid-template-rows: none; }
  .hd-tile--hero { grid-row: auto; min-height: 0; aspect-ratio: 4 / 3; }
  .hd-tile { min-height: 0; aspect-ratio: 16 / 10; }
}
@media (max-width: 560px) {
  .hd-countries { grid-auto-columns: 86%; }
  .hd-tile--hero { aspect-ratio: 4 / 5; }
  .hd-tile__body { padding: 18px; }
  .hd-further__row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hd-mini { flex-direction: column; align-items: stretch; gap: 10px; }
  .hd-mini__media { width: 100%; height: auto; aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) {
  .hd-country > img, .hd-tile > img, .hd-mini { transition: none; }
  .hd-country > img.hd-country__alt, .hd-tile > img.hd-tile__alt { animation: none; opacity: 0; }
}

/* ── Heading fit (3.1.5) — assets/js/heading-fit.js sizes these to an exact
   line count from 700px up; below that they wrap naturally. ─────────── */
.hd-fit { max-width: none; }
.hd-fit[data-fit-lines="2"] { text-wrap: balance; }
.hd-fit.is-fit[data-fit-lines="1"] { white-space: nowrap; }
.section-head--fit { max-width: none; }
.section-head--row.section-head--fit > div:first-child { flex: 1 1 auto; min-width: 0; max-width: none; }
.section-head--row.section-head--fit > .seeall { flex: none; }
