/* ==========================================================================
   Destinations — Figma 7:2 › header 12:3480, ticket grid 13:4540, feature row 55:12451
   (tickets 13:4620 / 13:4744 / 13:4705 / 13:4581 / 19:5672 / 13:4666, master 13:3670),
   wax stamps 23:274–23:278 + 71:2093, "Explore" button 13:5328, concierge line 19:5625.
   Fonts Geist / DM Sans are declared in header.css (.font-geist / .font-dm).

   Text trimming: Figma trims many text boxes to cap-height → baseline
   ("text-box-trim: cap alphabetic"). We reproduce that with negative margins
   computed from the font metrics so it works in every browser:
     Inter  (asc .96875 / desc .2412 / cap .7275):  margin = .3638em − line-height/2 (top & bottom)
     STIX   (asc .762 / desc .238 / cap .657), line-height 1:  top −.105em, bottom −.238em
     Geist  (asc 1.005 / desc .295 / cap .71):      margin = .355em − line-height/2
   ========================================================================== */

/* ---------- Header (12:3480) ----------------------------------------------- */

/* Intro paragraph 12:3479 — Inter 16/17, trimmed. Figma's box is 593 wide; browsers set
   the second line a few px wider, so allow 620 to keep Figma's two-line break. */
.dest-intro {
  max-width: 620px;
  margin-block: calc(0.3638em - 8.5px);
}

/* Feature row 55:12451 — moved by the client from the header's right side to a
   centred row under the concierge line. Horizontal items: icon frame 22.782 +
   12.847 gap + one-line text (Inter Display 17.525/21.03, -0.438px); items 25.694 apart.
   Concierge (ends 3193) → row (3218) = 25px; row → next section (3298) = 57.22px. */
.dest-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 25.694px;
  row-gap: 14px;
  margin-top: 25px;
}
.dest-feature {
  display: flex;
  align-items: center;
  gap: 12.847px;
}
/* Figma draws each icon group inset in a 22.782 frame; the SVGs are the groups
   at their natural size, centred in that frame. */
.dest-feature__icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 22.782px;
  height: 22.782px;
}
.dest-feature__icon img { display: block; max-width: none; }
.dest-feature__text {
  white-space: nowrap;
  font-size: 15px;
  line-height: 19px;
  letter-spacing: -0.44px;
  color: #000;
}
@media (min-width: 640px) {
  .dest-feature__text {
    font-size: 17.525px;
    line-height: 21.03px;
    letter-spacing: -0.4381px;
  }
  /* Figma's auto-width text boxes (55:12456 / 55:12461 / 55:12467) — keeps the row 717.2 wide */
  .dest-feature:nth-child(1) .dest-feature__text { min-width: 186px; }
  .dest-feature:nth-child(2) .dest-feature__text { min-width: 165px; }
  .dest-feature:nth-child(3) .dest-feature__text { min-width: 208px; }
}
@media (min-width: 768px) {
  .dest-section { padding-bottom: 57.22px; }
}

/* ---------- Ticket grid (13:4540) --------------------------------------- */

/* Header → grid: 136px from the title top in Figma (title 40 + 12 + trimmed intro 28.64 + 55.36) */
.dest-tickets { margin-top: 40px; }
@media (min-width: 768px) { .dest-tickets { margin-top: 55.36px; } }

.dest-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 15px;
}
/* Figma: two 600-wide tickets, 15 apart, x=112…1327 (3px / 2px past the content box).
   Tickets keep their own height and sit centred in the row (13:4744, 13:4705). */
@media (min-width: 1024px) {
  .dest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    margin-left: -3px;
    margin-right: -2px;
  }
}

/* ---------- Ticket (master 13:3670) ------------------------------------- */

.dest-ticket {
  position: relative;
  --stub: 112px;
}
@media (min-width: 640px) { .dest-ticket { --stub: 160px; } }
/* Denmark (19:5672) is stretched to its row height in Figma (289) */
@media (min-width: 1024px) {
  .dest-ticket--stretch { align-self: stretch; }
  .dest-ticket--stretch > .dest-card { height: 100%; }
}

.dest-card {
  position: relative;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fff;
}

/* Pass 13:4621 — padding 30/22/20, gap 14 */
.dest-pass {
  position: relative;
  display: flex;
  flex: 1 1 0%;
  min-width: 0;
  flex-direction: column;
  gap: 14px;
  padding: 24px 16px 20px;
}
@media (min-width: 640px) { .dest-pass { padding: 30px 22px 20px; } }
@media (min-width: 640px) { .dest-pass--pb30 { padding-bottom: 30px; } } /* Croatia 13:4667 */

/* Paper texture (pass image fill) */
.dest-pass__texture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.dest-pass__texture--stretch { object-fit: fill; } /* US: Figma "crop" fill */

.dest-pass__top {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Header row 13:4623 — flag 21.5 (+1.344 top margin), country, label */
.dest-pass__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dest-pass__title {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.dest-pass__title--tight { gap: 5px; } /* Finland: flag · name · tag, 5 apart */
.dest-pass__flag {
  display: block;
  flex-shrink: 0;
  width: 21.5px;
  height: 21.5px;
  margin-top: 1.344px;
  border-radius: 9999px;
}
.dest-pass__country {
  font-size: 16px;
  font-weight: 600;
  line-height: normal;
  color: var(--color-ink);
}
.dest-pass__country--medium { font-weight: 500; } /* United States 13:4709 is Medium */
.dest-pass__country--trim { margin-block: -0.2412em; } /* Finland 13:4624 is trimmed */
.dest-pass__label {
  display: none;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 0.55px;
  color: var(--color-muted);
}
@media (min-width: 440px) { .dest-pass__label { display: block; } }

/* Pill tag ("Most Popular", "Refund if we can't book") — 19 tall, border inside */
.dest-tag {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  padding: 2px 9px;
  border: 1px solid rgba(230, 235, 255, 0.8);
  border-radius: 99px;
  background: var(--color-tag-bg);
  font-size: 11px;
  font-weight: 500;
  line-height: 13px;
  letter-spacing: -0.22px;
  color: var(--color-tag);
  white-space: nowrap;
}
@media (min-width: 640px) {
  .dest-tag { padding-inline: 11px; }       /* 12 incl. border */
  .dest-tag--narrow { padding-inline: 8px; } /* Germany 13:5456: 9 incl. border */
}

/* Route 13:4626 — From / flight path / To, gap 12 */
.dest-route {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
@media (min-width: 640px) { .dest-route { gap: 12px; } }
.dest-route__end {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  white-space: nowrap;
}
.dest-route__end--to { align-items: flex-end; }
/* Airport code — STIX Medium 38, trimmed to cap height (25px box) */
.dest-route__code {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.38px;
  color: var(--color-ink);
  margin-top: -0.105em;
  margin-bottom: -0.238em;
}
@media (min-width: 640px) { .dest-route__code { font-size: 38px; } }
/* City — DM Sans 12, opsz 14, muted (16px tall in Figma) */
.dest-route__city {
  font-size: 12px;
  line-height: 16px;
  color: var(--color-muted);
}
/* Flight path 13:4630 — dashes 5.14 on / 5.14 off (half dash at each end), plane 20 */
.dest-route__path {
  display: flex;
  min-width: 0;
  flex: 1 1 0%;
  align-items: center;
  gap: 6px;
  padding-top: 3px;
}
@media (min-width: 640px) { .dest-route__path { padding-top: 5px; } }
.dest-route__dash {
  height: 2px;
  min-width: 0;
  flex: 1 1 0%;
  /* Figma draws the 2px stroke just above the line (y 13–15 of the 25px path) */
  transform: translateY(-1px);
  background: repeating-linear-gradient(90deg, var(--color-dash) 0 5.139px, transparent 5.139px 10.278px);
  background-position: -2.57px 0;
}
.dest-route__dash--end { background-position: calc(100% + 2.57px) 0; }
.dest-route__plane { display: block; flex-shrink: 0; width: 20px; height: 20px; }

/* Details 13:4638 — fields, then the guide link (or its reserved, invisible slot) */
.dest-details {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dest-details--gap15 { gap: 15px; } /* UK 13:4762 / Croatia 13:4684: guide sits inside Fields */
@media (min-width: 640px) {
  /* Croatia: Details is a fixed 121 frame with its content centred */
  .dest-details--h121 { min-height: 121px; justify-content: center; }
}
/* Every Figma ticket keeps a 20px slot for "Read the full … guide"; on most it is invisible */
.dest-details__spacer { display: block; height: 20px; }
.dest-fields {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.dest-fields__row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px 45px;
}
.dest-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dest-fields--loose .dest-field { gap: 5px; } /* Germany 13:4602 / 13:4608 */
.dest-field__label {
  font-size: 10px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 0.6px;
  color: var(--color-muted);
}
.dest-field__value {
  font-size: 14px;
  line-height: normal;
  letter-spacing: -0.14px;
  color: var(--color-body);
}
.dest-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.dest-status__dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 9999px;
  background: var(--color-light);
}
.dest-status__dot--available { background: var(--color-success); }
.dest-guide {
  align-self: flex-start;
  font-size: 12px;
  line-height: 20px;
  color: #475569;
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
  transition: color 0.15s;
}
.dest-guide:hover { color: var(--color-ink); }

/* Stub 13:4654 — 160 wide, photo + gradient, dashed perforation, price + Start */
.dest-stub {
  position: relative;
  display: flex;
  width: var(--stub);
  flex-shrink: 0;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  overflow: hidden;
  padding: 14px 12px 16px;
}
.dest-stub__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.dest-stub:hover .dest-stub__photo { transform: scale(1.03); }
/* UK 13:4778 uses a cropped fill: image region x .074–.928, y .149–.999, stretched to the stub */
.dest-stub__photo--crop-uk {
  inset: auto;
  left: -8.702%;
  top: -17.542%;
  width: 117.185%;
  height: 117.670%;
  max-width: none;
  object-fit: fill;
}
.dest-stub__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(35, 26, 46, 0) 30%, rgba(35, 26, 46, 0.92) 82%);
}
.dest-stub__perf {
  position: absolute;
  inset-block: 0;
  left: 0;
  pointer-events: none;
  border-left: 2px dashed #e1d7e7;
}
/* Price 13:4655 — STIX Medium 20, trimmed */
.dest-stub__price {
  position: relative;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.4px;
  color: #fff;
  white-space: nowrap;
  margin-top: -0.105em;
  margin-bottom: -0.238em;
}
@media (min-width: 640px) { .dest-stub__price { font-size: 20px; } }
/* "Start →" 13:4656 — Inter Light 14, trimmed */
.dest-stub__start {
  position: relative;
  font-size: 14px;
  font-weight: 300;
  line-height: normal;
  color: #fff;
  white-space: nowrap;
  margin-block: -0.2412em;
}
.dest-stub__arrow { display: inline-block; transition: transform 0.3s; }
.dest-stub:hover .dest-stub__arrow { transform: translateX(2px); }

/* Perforation notches 13:4657 / 13:4658 */
.dest-notch {
  position: absolute;
  right: calc(var(--stub) - 11px);
  width: 20px;
  height: 20px;
  pointer-events: none;
}
.dest-notch--top { top: -11px; }
.dest-notch--bottom { bottom: -11.02px; }

/* ---------- Wax stamp (23:274–23:278, 71:2093) ---------------------------
   Per-ticket geometry comes from Figma, measured from the stamp's centre:
     --st-top    distance from the ticket top to the (unrotated) stamp box top
     --st-right  gap between the stamp box's right edge and the perforation (stub's left edge)
     --st-size   stamp box size, --st-rot final rotation (CSS clockwise)
   Drop shadow 0 4 10 rgba(35,26,46,.18) follows the wax outline. */
.dest-stamp {
  position: absolute;
  z-index: 10;
  width: var(--st-size);
  height: var(--st-size);
  pointer-events: none;
  /* mobile: tucked bottom-right of the pass, 60% size */
  bottom: 12px;
  right: calc(var(--stub) + 12px);
  transform: scale(0.6);
  transform-origin: bottom right;
  filter: drop-shadow(0 4px 10px rgba(35, 26, 46, 0.18));
}
@media (min-width: 640px) {
  .dest-stamp {
    bottom: auto;
    top: var(--st-top);
    right: calc(var(--stub) + 1px + var(--st-right));
    transform: none;
  }
}
.dest-stamp__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: rotate(var(--st-rot));
}
/* Press-in starting state (js/destinations.js animates it once the ticket is in view).
   Only when JS runs and motion is allowed — otherwise the stamp is simply shown. */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .dest-stamp__img { opacity: 0; }
}

/* ---------- "Explore 4 More Destinations" (13:5328) --------------------- */

.dest-more { overflow: hidden; }
/* padding keeps the perforation notches inside the clip while animating */
.dest-more__grid { padding-top: 15px; }

/* Button 13:5329 — 246×38, border inside → padding 9/19; Geist 15.223, trimmed */
.dest-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 19px;
  border: 1px solid #e6ebf6;
  border-radius: 8px;
  background: #fff;
  font-family: "Geist", var(--font-sans);
  font-variation-settings: normal;
  font-size: 15.223px;
  line-height: 18px;
  letter-spacing: -0.5437px;
  color: #757779;
  transition: color 0.3s, border-color 0.3s;
}
.dest-more-btn:hover { border-color: var(--color-border); color: var(--color-ink); }
.dest-more-btn:focus-visible { outline: 2px solid var(--color-passport); outline-offset: 2px; }
/* Chevron 13:5334 — 14×7.75 group inside an 18×18 frame */
.dest-more-btn__chevron {
  display: block;
  width: 14px;
  height: 7.75px;
  margin: 0 2px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.dest-more-btn[aria-expanded="true"] .dest-more-btn__chevron { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .dest-more-btn__chevron { transition: none; } }

/* ---------- Concierge line 19:5625 ------------------------------------- */
.dest-concierge__link { color: #25d366; } /* Figma 19:5630 */

/* Feature icon groups at their Figma size (55:12454 / 55:12459 / 55:12464) */
.dest-feature__img--check    { width: 22.429px; height: 22.428px; }
.dest-feature__img--whatsapp { width: 21.642px; height: 21.747px; }
.dest-feature__img--calendar { width: 20.884px; height: 22.782px; }
