/* BhutanFlight home page, everything below the hero (and the sticky section bar).
   Only h- classes are styled here, so nothing is inherited from the older section rules in styles.css.
   One frame: every section pads to var(--gut); content starts and ends on those two lines.
   Grids are equal tracks (minmax(0, 1fr)); rows are always complete at 3/4, 2 and 1 columns. */

/* ---------- sections ---------- */
.h-sec {
  --h-cg: clamp(20px, 2.4vw, 32px); /* padding either side of a vertical hairline */
  --h-gap: clamp(10px, 1.1vw, 16px); /* gap between photo tiles and cards */
  padding: clamp(56px, 7vw, 104px) var(--gut);
  scroll-margin-top: 72px;
}
.h-bone { background: var(--bg); color: var(--ink); }
.h-dark { background: var(--ink); color: #f2eee6; }
/* a hairline on the frame (not full-bleed) between two bone sections */
.h-rule { background: linear-gradient(var(--line), var(--line)) var(--gut) 0 / calc(100% - 2 * var(--gut)) 1px no-repeat var(--bg); }

.h-head { margin-bottom: clamp(32px, 4vw, 56px); }
.h-cap { margin: 0 0 18px; color: var(--sun); }
.h-h2 {
  max-width: none; margin: 0;
  font-family: var(--display); font-size: clamp(32px, 4.2vw, 56px); font-weight: 500;
  letter-spacing: -.04em; line-height: 1.04; text-wrap: balance;
}
.h-sec h3 { margin: 0; font-family: var(--display); font-weight: 500; letter-spacing: -.03em; }
.h-sec p { margin: 0; }
.h-sec .go { max-width: 100%; }

.h-act { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px; margin-top: clamp(28px, 3.4vw, 48px); }
.h-act .go { min-width: 260px; }
.h-act-split { justify-content: space-between; padding-top: clamp(20px, 2.4vw, 28px); border-top: 1px solid var(--line); }
.h-note { flex: 1 1 320px; min-width: 0; max-width: 62ch; color: var(--mut); font-size: 14.5px; line-height: 1.55; }

.h-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 16px; border: 1px solid currentColor; border-radius: 99px;
  font-size: 13.5px; font-weight: 500; white-space: nowrap;
}
.h-pill i { font-style: normal; }

/* ---------- (01) what you get: 3 x 2 tiles ---------- */
.h-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--h-gap); }
.h-tile {
  position: relative; isolation: isolate; overflow: hidden; min-width: 0;
  aspect-ratio: 4 / 3; display: flex; flex-direction: column; justify-content: flex-end; gap: 16px;
  padding: clamp(20px, 2.2vw, 30px); background: var(--ink); color: #f2eee6;
}
.h-tile-photo img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.h-tile-photo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(13, 20, 18, 0) 38%, rgba(13, 20, 18, .5) 62%, rgba(13, 20, 18, .9) 100%); }
.h-tile-type { justify-content: space-between; }
.h-tile h3 { font-size: clamp(21px, 1.9vw, 27px); line-height: 1.1; }
.h-tile-in p { margin-top: 6px; max-width: 36ch; color: rgba(242, 238, 230, .8); font-size: 15px; line-height: 1.45; }
.h-fig {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 18px;
  font-family: var(--display); font-size: clamp(40px, 4vw, 64px); font-weight: 500; letter-spacing: -.045em; line-height: .95;
}
.h-fig span { display: inline-flex; align-items: baseline; gap: 8px; }
.h-fig small, .h-fig > small { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--mut-d); }
.h-fig i { font-style: normal; color: var(--sun); }

/* ---------- (02) why here: the comparison table ---------- */
.h-vs { width: 100%; border-collapse: collapse; table-layout: fixed; border-top: 1px solid rgba(242, 238, 230, .5); }
.h-vs col { width: 33.3333%; }
.h-vs th, .h-vs td { padding: 18px var(--h-cg); border-bottom: 1px solid var(--line-d); text-align: left; vertical-align: top; font-size: 16px; font-weight: 400; line-height: 1.45; }
.h-vs tr > :first-child { padding-left: 0; }
.h-vs tr > :nth-child(2) { border-left: 1px solid var(--line-d); }
.h-vs tbody th { font-weight: 500; color: #f2eee6; }
.h-vs tbody td { color: var(--mut-d); }
.h-vs thead th { padding-top: 16px; padding-bottom: 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mut-d); }
/* the winning column: a bone block with an orange rule on top */
.h-vs .h-us { background: var(--bg); color: var(--ink); border-bottom-color: var(--line); font-weight: 500; }
.h-vs thead .h-us { color: var(--ink); box-shadow: inset 0 3px 0 var(--sun); }
.h-vs tbody tr:last-child > * { border-bottom: 0; }

/* ---------- (03) your days: four stops on a line ---------- */
.h-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(36px, 4vw, 52px) var(--h-cg); }
.h-stop { position: relative; min-width: 0; padding-top: 32px; display: flex; flex-direction: column; gap: 18px; }
.h-stop::before { content: ""; position: absolute; top: 5px; left: 0; right: calc(-1 * var(--h-cg)); height: 1px; background: var(--ink); }
.h-stop:last-child::before { right: 0; }
.h-dot { position: absolute; top: 0; left: 0; z-index: 1; width: 11px; height: 11px; background: var(--ink); box-shadow: 0 0 0 4px var(--bg); }
.h-stop:first-child .h-dot { background: var(--sun); }
.h-stop-ph { aspect-ratio: 4 / 5; overflow: hidden; background: #e6dfd1; }
.h-stop-ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.h-stop-tx { display: flex; flex-direction: column; gap: 6px; }
.h-stop h3 { font-size: clamp(22px, 2vw, 28px); line-height: 1.05; }
.h-stop .mono { color: var(--mut); }
.h-stop-tx p:last-child { margin-top: 4px; color: var(--mut); font-size: 15px; line-height: 1.5; }

/* ---------- (04) our two houses ---------- */
.h-houses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--h-gap); }
.h-house {
  position: relative; isolation: isolate; overflow: hidden; min-width: 0;
  aspect-ratio: 4 / 5; display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  padding: clamp(20px, 2.6vw, 36px); background: #141d1a; color: #f2eee6; text-decoration: none;
}
.h-house-ph { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.h-house::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(13, 20, 18, .5) 0%, rgba(13, 20, 18, 0) 26%, rgba(13, 20, 18, .1) 42%, rgba(13, 20, 18, .9) 82%, rgba(13, 20, 18, .96) 100%); }
.h-house:hover .h-house-ph { transform: scale(1.04); }
.h-house-logo { align-self: flex-start; display: block; max-width: 100%; padding: 10px 14px; background: rgba(13, 20, 18, .42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.h-house-logo img { display: block; width: auto; max-width: 100%; height: clamp(36px, 3.6vw, 48px); }
.h-house-in { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.h-house .mono { color: rgba(242, 238, 230, .82); }
.h-house h3 { font-size: clamp(30px, 3.4vw, 48px); line-height: 1; letter-spacing: -.04em; }
.h-house-p { max-width: 42ch; color: rgba(242, 238, 230, .84); font-size: 16px; line-height: 1.5; }
.h-house .h-pill { margin-top: 8px; border-color: rgba(242, 238, 230, .55); }
.h-house:hover .h-pill, .h-house:focus-visible .h-pill { background: var(--sun); border-color: var(--sun); color: var(--ink); }

/* ---------- (05) routes: two columns of identical rows ---------- */
.h-routes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; border-top: 1px solid var(--ink); }
.h-route {
  display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr) auto; align-items: center; gap: 16px;
  min-width: 0; min-height: 92px; margin: 0; padding: 18px 0;
  background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer;
}
.h-route:nth-child(odd) { padding-right: var(--h-cg); border-right: 1px solid var(--line); }
.h-route:nth-child(even) { padding-left: var(--h-cg); }
.h-route-place, .h-route-air { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.h-route-place strong { font-family: var(--display); font-size: clamp(20px, 1.8vw, 24px); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; overflow-wrap: break-word; }
.h-route-place small { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); }
.h-route-air { font-size: 13.5px; line-height: 1.45; }
.h-route-air > span { display: block; min-height: 1.45em; }
.h-route-air > span + span { color: var(--mut); }
.h-route .h-pill { min-width: 11em; padding: 0 14px; justify-self: end; }
.h-route:hover .h-pill, .h-route:focus-visible .h-pill { background: var(--ink); border-color: var(--ink); color: #f2eee6; }
.h-src { margin-top: 18px; max-width: 90ch; color: var(--mut); font-size: 12.5px; line-height: 1.55; }

/* ---------- (06) who we are ---------- */
.h-trust { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(2 * var(--h-cg)); align-items: stretch; }
.h-trust-say { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; min-width: 0; }
.h-trust-say p { max-width: 54ch; color: rgba(242, 238, 230, .84); font-size: clamp(17px, 1.45vw, 20px); line-height: 1.55; }
.h-trust-say b { font-weight: 600; color: #f2eee6; }
.h-trust-say .go { margin-top: auto; }
.h-trust-ph { position: relative; min-width: 0; height: 100%; min-height: 360px; overflow: hidden; background: #141d1a; }
.h-trust-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.h-dark .go.ghost { background: none; color: #f2eee6; border: 1px solid rgba(242, 238, 230, .5); }
.h-dark .go.ghost:hover { background: var(--sun); border-color: var(--sun); color: var(--ink); }

.h-ledger { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: clamp(40px, 4.6vw, 64px) 0 0; border-top: 1px solid rgba(242, 238, 230, .5); }
.h-ledger > div { min-width: 0; padding: 20px var(--h-cg) 22px; border-bottom: 1px solid var(--line-d); border-left: 1px solid var(--line-d); }
.h-ledger > div:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
.h-ledger > div:nth-child(3n) { padding-right: 0; }
.h-ledger > div:nth-last-child(-n + 3) { border-bottom: 0; }
.h-ledger dt { margin-bottom: 8px; color: var(--mut-d); }
.h-ledger dd { margin: 0; color: #f2eee6; font-weight: 500; overflow-wrap: anywhere; }
.h-ledger small { display: block; margin-top: 3px; color: var(--mut-d); font-size: 13.5px; font-weight: 400; }
.h-ledger a { display: inline-block; padding: 10px 0; margin: -10px 0; color: inherit; text-decoration-color: var(--sun); text-underline-offset: 4px; }

/* ---------- (07) how it works ---------- */
.h-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.h-step { min-width: 0; padding: 28px var(--h-cg) 8px; border-left: 1px solid var(--line); }
.h-step:nth-child(4n + 1) { padding-left: 0; border-left: 0; }
.h-step:nth-child(4n) { padding-right: 0; }
.h-num { display: block; font-family: var(--display); font-size: clamp(48px, 5vw, 80px); font-weight: 500; letter-spacing: -.04em; line-height: 1; color: var(--ink); }
.h-step h3 { margin: 22px 0 10px; font-size: clamp(20px, 1.7vw, 24px); line-height: 1.15; }
.h-step p { color: var(--mut); font-size: 15px; line-height: 1.55; }

/* ---------- closing band ---------- */
.h-close {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 62vh; display: flex; align-items: flex-end;
  padding: clamp(56px, 7vw, 104px) var(--gut); background: var(--ink); color: #f2eee6;
}
.h-close-ph { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.h-close::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(13, 20, 18, .3) 0%, rgba(13, 20, 18, .42) 45%, rgba(13, 20, 18, .88) 100%); }
.h-close-in { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(24px, 3vw, 40px); width: 100%; min-width: 0; }
.h-close .h-h2 { color: #f2eee6; font-size: clamp(40px, 6.4vw, 96px); line-height: .98; }
.go.h-go-sun { min-width: 280px; min-height: 64px; padding: 0 28px; background: var(--sun); color: var(--ink); font-size: 17px; }
.go.h-go-sun:hover { background: #f09a60; }

/* ---------- the sticky section bar ---------- */
.h-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: 56px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 24px;
  padding: 0 var(--gut); background: var(--ink); color: #f2eee6; border-bottom: 1px solid var(--line-d);
  transform: translateY(-100%); visibility: hidden;
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .3s;
}
.h-bar.is-on { transform: none; visibility: visible; transition: transform .3s cubic-bezier(.2, .7, .2, 1), visibility 0s; }
.h-bar-brand { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration: none; font-family: var(--display); font-size: 19px; font-weight: 500; letter-spacing: -.03em; white-space: nowrap; }
.h-bar-brand span { color: var(--sun); }
.h-bar-links { display: flex; gap: clamp(12px, 1.6vw, 28px); }
.h-bar-links a { position: relative; display: inline-flex; align-items: center; min-height: 44px; color: rgba(242, 238, 230, .7); font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.h-bar-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 2px; background: var(--sun); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.h-bar-links a:hover, .h-bar-links a[aria-current="true"] { color: #f2eee6; }
.h-bar-links a[aria-current="true"]::after { transform: scaleX(1); }
.h-bar-go { justify-self: end; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 99px; background: var(--sun); color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.h-bar-go:hover { background: #f09a60; }

/* ---------- 1180px ---------- */
@media (max-width: 1180px) {
  /* routes: place over days on the left, the pill on the right */
  .h-route { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "place go" "air go"; row-gap: 8px; }
  .h-route-place { grid-area: place; } .h-route-air { grid-area: air; } .h-route .h-pill { grid-area: go; }
}

/* ---------- 980px: everything to two columns, rows kept complete ---------- */
@media (max-width: 980px) {
  .h-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .h-bar-links { display: none; }

  .h-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .h-days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-stop:nth-child(2n)::before { right: 0; }

  .h-ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-ledger > div, .h-ledger > div:nth-child(3n + 1), .h-ledger > div:nth-child(3n) { padding: 20px var(--h-cg) 22px; border-left: 1px solid var(--line-d); border-bottom: 1px solid var(--line-d); }
  .h-ledger > div:nth-child(2n + 1) { padding-left: 0; border-left: 0; }
  .h-ledger > div:nth-child(2n) { padding-right: 0; }
  .h-ledger > div:nth-last-child(-n + 2) { border-bottom: 0; }

  .h-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-step, .h-step:nth-child(4n + 1), .h-step:nth-child(4n) { padding: 28px var(--h-cg) 28px; border-left: 1px solid var(--line); }
  .h-step:nth-child(2n + 1) { padding-left: 0; border-left: 0; }
  .h-step:nth-child(2n) { padding-right: 0; }
  .h-step:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* ---------- 700px: one column, vertical hairlines become horizontal ---------- */
@media (max-width: 700px) {
  .h-act .go, .go.h-go-sun { min-width: 0; width: 100%; }

  .h-tiles { grid-template-columns: minmax(0, 1fr); }
  .h-tile-type { aspect-ratio: auto; min-height: 220px; }

  /* table: label on its own line, the two answers side by side */
  .h-vs, .h-vs thead, .h-vs tbody { display: block; width: 100%; }
  .h-vs colgroup, .h-vs .h-vs-blank { display: none; }
  .h-vs tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--line-d); }
  .h-vs tbody tr:last-child { border-bottom: 0; }
  .h-vs th, .h-vs td { padding: 10px 14px 16px; border: 0; font-size: 14.5px; }
  .h-vs thead th { padding-top: 14px; padding-bottom: 14px; }
  .h-vs thead th:nth-child(2), .h-vs tbody td:nth-child(2) { padding-left: 0; border-left: 0; }
  .h-vs tbody th { grid-column: 1 / -1; padding: 16px 0 4px; }

  .h-days { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .h-stop { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); }
  .h-stop::before, .h-dot { display: none; }

  .h-houses { grid-template-columns: minmax(0, 1fr); }
  .h-house { aspect-ratio: auto; min-height: clamp(460px, 128vw, 620px); }

  .h-routes { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .h-route:nth-child(odd), .h-route:nth-child(even) { padding: 16px 0; border-right: 0; }
  .h-route { min-height: 84px; } .h-route .h-pill { min-width: 0; }

  .h-trust { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .h-trust-ph { height: auto; min-height: 0; aspect-ratio: 4 / 3; }

  .h-ledger, .h-steps { grid-template-columns: minmax(0, 1fr); }
  .h-ledger > div, .h-ledger > div:nth-child(n) { padding: 18px 0 20px; border-left: 0; border-bottom: 1px solid var(--line-d); }
  .h-ledger > div:last-child { border-bottom: 0; }
  .h-step, .h-step:nth-child(n) { padding: 24px 0; border-left: 0; border-top: 1px solid var(--line); }
  .h-step:first-child { border-top: 0; }
  .h-num { font-size: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .h-bar, .h-bar.is-on, .h-bar-links a::after, .h-house-ph { transition: none; }
  .h-house:hover .h-house-ph { transform: none; }
}

/* director's pass: first line of a heading is the longer one */
.h-h2 { text-wrap: pretty; }
#close-h span { display: block; color: rgba(242, 238, 230, .55); }

/* director's pass: at tablet width the two house cards stack, so their text has room */
@media (max-width: 900px) {
  .h-houses { grid-template-columns: minmax(0, 1fr); }
  .h-house { aspect-ratio: 16 / 11; }
}
