/* ==========================================================
   Bundelkhand Tour and Travel — custom styles
   Palette variables live in src/tailwind.css (:root).
   ========================================================== */

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute; left: 1rem; top: -120px; z-index: 100;
  padding: .75rem 1rem; border-radius: 8px;
  background: var(--accent); color: var(--dark); font-weight: 700;
}
.skip-link:focus { top: 1rem; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  color: #fff;
  transition: background-color .35s ease, color .35s ease, box-shadow .35s ease;
}
.site-header.is-scrolled {
  background: rgb(250 248 242 / .94);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  color: var(--dark);
  box-shadow: 0 1px 0 var(--border), 0 10px 30px -18px rgb(23 34 31 / .25);
}
.site-header.menu-open { background: var(--primary-dark); color: #fff; box-shadow: none; }

.nav-link {
  position: relative; display: block;
  padding: .55rem .8rem; border-radius: 8px;
  font-size: 15px; font-weight: 600; opacity: .85;
  transition: opacity .2s ease, background-color .2s ease;
}
.nav-link:hover { opacity: 1; background: rgb(255 255 255 / .08); }
.site-header.is-scrolled .nav-link:hover { background: rgb(18 61 50 / .06); }
.nav-link.is-active { opacity: 1; }
.nav-link.is-active::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .2rem;
  height: 2px; border-radius: 2px; background: var(--accent);
}

.header-wa {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid currentColor; border-color: rgb(255 255 255 / .35);
  transition: background-color .2s ease, transform .2s ease, border-color .2s ease;
}
.site-header.is-scrolled .header-wa { border-color: var(--border); color: #1E9E52; }
.header-wa:hover { transform: translateY(-1px); background: rgb(255 255 255 / .1); }

.menu-toggle { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; }
.menu-toggle__close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__close { display: block; }
@media (min-width: 1024px) { .menu-toggle, .mobile-menu { display: none; } }

.mobile-menu {
  background: var(--primary-dark); color: #fff;
  max-height: calc(100svh - 64px); overflow-y: auto;
  opacity: 0; transform: translateY(-8px);
  transition: opacity .28s ease, transform .28s ease;
}
.mobile-menu.is-open { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero-overlay {
  background:
    linear-gradient(180deg, rgb(10 43 35 / .55) 0%, rgb(10 43 35 / 0) 22%),
    linear-gradient(180deg, rgb(10 43 35 / .78) 0%, rgb(10 43 35 / .88) 100%);
}
@media (min-width: 1024px) {
  .hero-overlay {
    background:
      linear-gradient(180deg, rgb(10 43 35 / .5) 0%, rgb(10 43 35 / 0) 20%),
      linear-gradient(90deg, rgb(10 43 35 / .94) 0%, rgb(10 43 35 / .78) 38%, rgb(10 43 35 / .3) 72%, rgb(10 43 35 / .45) 100%);
  }
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .75rem;
  color: var(--accent); font-size: 12.5px; font-weight: 700; letter-spacing: .18em;
}

.hero-route {
  position: absolute; left: 0; bottom: 4%; z-index: -5;
  width: min(75vw, 900px); height: auto;
  color: var(--accent); opacity: .7; pointer-events: none;
}
@media (max-width: 639px) { .hero-route { display: none; } }
.route-draw { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: route-draw 2.6s cubic-bezier(.45,.05,.2,1) .6s forwards; }
.route-node--end { opacity: 0; animation: fade-in .5s ease 3s forwards; }

[data-hero-in] { animation: hero-in .9s cubic-bezier(.2,.7,.2,1) both; animation-delay: var(--d, 0ms); }

@keyframes route-draw { to { stroke-dashoffset: 0; } }
@keyframes fade-in    { to { opacity: 1; } }
@keyframes hero-in    { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

[data-parallax] > img { will-change: transform; }

/* ---------- Scroll reveal (only when JS is running) ---------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s ease, transform .8s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="clip"] {
  transform: none;
  clip-path: inset(10% 10% 10% 10% round 20px);
  transition: opacity .6s ease, clip-path 1.1s cubic-bezier(.2,.7,.2,1);
}
.js [data-reveal="clip"].is-in { clip-path: inset(0 0 0 0 round 0); }
.js .trust-item.is-in .trust-icon { animation: icon-pop .6s cubic-bezier(.2,.9,.3,1.4) both; animation-delay: calc(var(--d, 0ms) + 150ms); }
@keyframes icon-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Route rail (MP section) ---------- */
.route-rail {
  margin-top: 2rem; display: flex; gap: 20px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-left: 0;
  padding-bottom: 1rem;
  scrollbar-width: thin; scrollbar-color: rgb(217 164 65 / .5) transparent;
}
.route-rail:focus-visible { outline-offset: 6px; border-radius: 14px; }
.route-stop { position: relative; flex: 0 0 auto; width: 248px; padding-top: 34px; scroll-snap-align: start; }
.route-stop > :last-child { height: 320px; }
.route-stop::before {
  content: ""; position: absolute; top: 10px; left: 13px; right: -33px;
  border-top: 2px dashed rgb(217 164 65 / .55);
}
.route-stop:last-child::before { display: none; }
.route-dot {
  position: absolute; top: 4px; left: 6px; z-index: 1;
  width: 14px; height: 14px; border-radius: 999px;
  background: var(--primary-dark); border: 2px solid var(--accent);
}
.route-stop--start .route-dot { background: var(--accent); box-shadow: 0 0 0 5px rgb(217 164 65 / .2); }

/* Photo cards with caption over a dark fade */
.dest-card, .area-card {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; overflow: hidden;
  min-height: 300px; border-radius: 14px; background: var(--primary);
}
.area-card { min-height: 400px; border-radius: 16px; }
.dest-card::after, .area-card::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(to top, rgb(10 43 35 / .94) 0%, rgb(10 43 35 / .45) 42%, rgb(10 43 35 / 0) 70%);
}
.dest-card > figcaption, .area-card > span { z-index: 1; }

/* ---------- Booking steps ---------- */
.steps { position: relative; display: grid; gap: 2.25rem; max-width: 1040px; margin-inline: auto; }
.step { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 1.25rem; }
.step:not(:last-child)::after {
  content: ""; position: absolute; left: 27px; top: 64px; bottom: -2rem;
  border-left: 2px dashed rgb(217 164 65 / .6);
}
.step__num {
  position: relative; z-index: 1; display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 999px;
  background: var(--primary); color: var(--accent);
  font-family: "DM Sans", sans-serif; font-weight: 700; font-size: 18px;
  box-shadow: 0 0 0 8px var(--surface);
}
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 3rem; }
  .steps::before {
    content: ""; position: absolute; top: 28px; left: 16.66%; right: 16.66%;
    border-top: 2px dashed rgb(217 164 65 / .6);
  }
  .step { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .step:not(:last-child)::after { display: none; }
  .step__body { margin-top: 1.5rem; }
  .step__body h3 { justify-content: center; }
}

/* ---------- Gallery ---------- */
.gallery { columns: 1; column-gap: 20px; }
@media (min-width: 640px)  { .gallery { columns: 2; } }
@media (min-width: 1024px) { .gallery { columns: 3; } }
.gallery__item { break-inside: avoid; margin-bottom: 20px; }
.gallery__btn { position: relative; display: block; width: 100%; overflow: hidden; border-radius: 16px; cursor: zoom-in; background: var(--border); }
.gallery__btn img { display: block; height: auto; }
.gallery__zoom {
  position: absolute; top: 12px; right: 12px;
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px;
  background: rgb(255 255 255 / .92); color: var(--primary);
  opacity: 0; transform: scale(.9); transition: opacity .25s ease, transform .25s ease;
}
.gallery__btn:hover .gallery__zoom, .gallery__btn:focus-visible .gallery__zoom { opacity: 1; transform: none; }

.lightbox { max-width: min(94vw, 1100px); max-height: 92vh; padding: 0; border: 0; background: transparent; overflow: visible; }
.lightbox::backdrop { background: rgb(6 22 18 / .9); }
.lightbox__stage img { display: block; max-width: 100%; max-height: 86vh; width: auto; margin: auto; border-radius: 14px; }
.lightbox__close {
  position: fixed; top: 1rem; right: 1rem;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
  background: rgb(255 255 255 / .12); color: #fff;
}
.lightbox__close:hover { background: rgb(255 255 255 / .22); }

/* ---------- FAQ accordion ---------- */
.accordion__item { border-bottom: 1px solid var(--border); }
.accordion__item:first-child { border-top: 1px solid var(--border); }
.accordion__trigger {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.35rem 0; text-align: left;
  font-family: "DM Sans", sans-serif; font-size: 17px; font-weight: 700; color: var(--dark);
}
.accordion__trigger:hover { color: var(--primary); }
.accordion__icon {
  display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--primary);
  transition: transform .3s ease, background-color .3s ease, color .3s ease, border-color .3s ease;
}
.accordion__trigger[aria-expanded="true"] .accordion__icon {
  transform: rotate(45deg); background: var(--primary); border-color: var(--primary); color: var(--accent);
}
.accordion__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease; }
.accordion__panel.is-open { grid-template-rows: 1fr; }
.accordion__inner { overflow: hidden; }
.js .accordion__panel:not(.is-open) .accordion__inner { visibility: hidden; transition: visibility 0s .35s; }
html:not(.js) .accordion__panel { grid-template-rows: 1fr; }

/* ---------- Floating WhatsApp & mobile bar ---------- */
.wa-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 40;
  display: none; place-items: center; width: 56px; height: 56px; border-radius: 999px;
  background: #25D366; color: #fff;
  box-shadow: 0 12px 28px -8px rgb(10 43 35 / .45);
  transition: transform .25s ease, opacity .25s ease;
}
.wa-float:hover { transform: translateY(-2px) scale(1.04); }
.wa-float.is-hidden { opacity: 0; transform: translateY(12px); pointer-events: none; }
@media (min-width: 768px) { .wa-float { display: grid; } }

.mobile-bar {
  position: fixed; inset: auto 0 0 0; z-index: 40;
  display: grid; grid-template-columns: 1fr 1fr;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--primary);
  box-shadow: 0 -10px 30px -12px rgb(10 43 35 / .4);
}
@media (min-width: 768px) { .mobile-bar { display: none; } }
.mobile-bar__btn { display: flex; align-items: center; justify-content: center; gap: .5rem; height: 58px; font-weight: 700; font-size: 15px; }
@media (max-width: 767px) {
  body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; }
  .js [data-reveal], [data-hero-in] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .route-draw { stroke-dashoffset: 0; }
  .route-node--end { opacity: 1; }
  [data-parallax] > img { transform: none !important; }
}
