/* Polish layer: motion, micro-interactions and typographic finish.
 * Loaded after every other stylesheet. Transform/opacity only, so it stays cheap to render.
 * Everything here switches off under prefers-reduced-motion.
 */
:root {
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --font-display: 'Playfair Display', 'Playfair Display Fallback', Georgia, serif;
  --font-body: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- Typography finish ---------- */
h1, h2, h3, .stat-number { text-wrap: balance; }
p, li, dd, blockquote { text-wrap: pretty; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
::selection { background: #c8a84b; color: #10291d; }

/* Anchored sections clear the fixed header */
[id] { scroll-margin-top: 104px; }

/* ---------- Focus: visible, on-brand, keyboard only ---------- */
:focus-visible { outline: 2px solid #c8a84b; outline-offset: 3px; border-radius: 4px; }
.btn:focus-visible, .btn-nav:focus-visible { outline-offset: 4px; }

/* ---------- Buttons ---------- */
.btn, .btn-nav {
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background-color .25s var(--ease-soft), color .25s var(--ease-soft), border-color .25s var(--ease-soft);
  will-change: auto;
}
.btn:hover, .btn-nav:hover { transform: translateY(-2px); }
.btn:active, .btn-nav:active { transform: translateY(0) scale(.985); transition-duration: .1s; }
.btn-gold { box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 18px -8px rgba(200,168,75,.65); }
.btn-gold:hover { box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 14px 28px -10px rgba(200,168,75,.75); }
.btn span[aria-hidden="true"] { display: inline-block; transition: transform .35s var(--ease-out); }
.btn:hover span[aria-hidden="true"] { transform: translateY(3px); }

/* WeTravel buttons: match the site's type and give them the same tactile feel */
.wtrvl-checkout_button, .wtrvl-download_brochure_button {
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  letter-spacing: .01em;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), filter .25s var(--ease-soft);
}
.wtrvl-checkout_button:hover, .wtrvl-download_brochure_button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -12px rgba(16,41,29,.55);
  filter: brightness(1.04);
}
.wtrvl-checkout_button:active, .wtrvl-download_brochure_button:active { transform: scale(.985); transition-duration: .1s; }

/* Long button labels wrap on small phones instead of pushing the page sideways */
@media (max-width: 480px) { .btn { white-space: normal; max-width: 100%; text-align: center; } }

/* One-line custom tour link under the tour grids */
.custom-tour-line { margin: 28px auto 0; text-align: center; font-size: .95rem; color: #635f55; }
.custom-tour-line a { color: #153c2f; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.custom-tour-line a:hover { color: #765b1b; }

/* ---------- Navigation ---------- */
.nav { transition: box-shadow .4s var(--ease-soft), background-color .4s var(--ease-soft), top .3s var(--ease-soft); }
@media (min-width: 769px) {
  .nav-links a:not(.btn-nav) { position: relative; }
  .nav-links a:not(.btn-nav)::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1.5px;
    background: currentColor; transform: scaleX(0); transform-origin: right;
    transition: transform .45s var(--ease-out);
  }
  .nav-links a:not(.btn-nav):hover::after, .nav-links a.active::after { transform: scaleX(1); transform-origin: left; }
}

/* ---------- Cards ---------- */
.tour-card, .testi-card, .why-card, .step-item {
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out), border-color .4s var(--ease-soft);
}
.tour-card:hover { transform: translateY(-6px); box-shadow: 0 28px 50px -24px rgba(16,41,29,.38); }
.testi-card:hover, .why-card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -24px rgba(16,41,29,.3); }
.tour-card img, .tg-item img { transition: transform 1.1s var(--ease-out); }
.tour-card:hover img, .tg-item:hover img { transform: scale(1.045); }

/* ---------- Stats bar ---------- */
.stat-icon { transition: transform .6s var(--ease-out), background-color .4s var(--ease-soft); }
.stat-item:hover .stat-icon { transform: translateY(-2px) rotate(-4deg); }
.stat-number { font-variant-numeric: tabular-nums; }

/* ---------- Scroll reveal (replaces the old fade-up timing) ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease-out), transform 1s var(--ease-out);
}
.fade-up.visible { opacity: 1; transform: none; }
/* Siblings arrive in a gentle cascade */
.fade-up:nth-child(2) { transition-delay: .07s; }
.fade-up:nth-child(3) { transition-delay: .14s; }
.fade-up:nth-child(4) { transition-delay: .21s; }
.fade-up:nth-child(5) { transition-delay: .28s; }
.fade-up:nth-child(n+6) { transition-delay: .32s; }

/* ---------- Homepage hero entrance ---------- */
@keyframes pg-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pg-settle { from { transform: scale(1.07); } to { transform: scale(1); } }
@keyframes pg-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hero .hero-bg { animation: pg-settle 2.6s var(--ease-out) both; transform-origin: 60% 45%; }
.hero-content > * { animation: pg-rise .9s var(--ease-out) both; }
.hero-content > :nth-child(1) { animation-delay: .05s; }
.hero-content > :nth-child(2) { animation-delay: .14s; }
.hero-content > :nth-child(3) { animation-delay: .24s; }
.hero-content > :nth-child(4) { animation-delay: .34s; }
.hero-content > :nth-child(5) { animation-delay: .46s; }
.hero-trust { position: relative; border-top-color: transparent; }
.hero-trust::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, rgba(232,213,163,.55), rgba(255,255,255,.12) 70%, transparent);
  transform-origin: left; animation: pg-line 1.4s .6s var(--ease-out) both;
}
.hero-eyebrow { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* Inner-page heroes get the same calm settle */
.page-hero-bg { animation: pg-settle 2.4s var(--ease-out) both; }
.page-hero-content > * { animation: pg-rise .85s var(--ease-out) both; }
.page-hero-content > :nth-child(2) { animation-delay: .1s; }
.page-hero-content > :nth-child(3) { animation-delay: .2s; }

/* ---------- FAQ ---------- */
.faq-answer { transition: max-height .5s var(--ease-out); }
.faq-icon { transition: transform .45s var(--ease-out), background-color .3s var(--ease-soft); }

/* ---------- Smooth scrolling, only when motion is welcome ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------- Respect reduced motion completely ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fade-up { opacity: 1 !important; transform: none !important; }
  .tour-card:hover, .testi-card:hover, .why-card:hover, .btn:hover { transform: none; }
}
