/* =====================================================================
   Homepage — hero, India atlas, experience tiles, editorial band, planner
   ===================================================================== */

/* ---- Cinematic hero -------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img, .hero__bg video {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06);
  animation: heroDrift 26s var(--ease-io) infinite alternate;
}
@keyframes heroDrift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to   { transform: scale(1.16) translate3d(-1.5%, -1.5%, 0); }
}
@media (prefers-reduced-motion: reduce) { .hero__bg img, .hero__bg video { animation: none; transform: scale(1.02); } }

.hero__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom, rgba(2,16,31,.72) 0%, rgba(2,16,31,.32) 34%, rgba(2,16,31,.82) 78%, var(--navy-950) 100%),
    radial-gradient(90% 60% at 50% 40%, transparent 30%, rgba(2,16,31,.55) 100%);
}
/* Fine grain so large flat gradients don't band on cheap panels. */
.hero__grain {
  position: absolute; inset: 0; z-index: -1; opacity: .28; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.hero__inner {
  position: relative;
  /* A grid item defaults to min-width:auto, so one stubborn child — the search
     field — could push the whole hero wider than the phone and clip the
     headline. This lets it shrink to the screen. */
  min-width: 0;
  padding-top: calc(var(--nav-h) + 40px);
  padding-bottom: clamp(60px, 10vh, 130px);
  text-align: center;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -.045em;
  color: var(--white);
  margin: 0 0 var(--s-4);
  text-shadow: 0 4px 44px rgba(2,16,31,.6);
}
.hero__title .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(46px) rotate(2deg);
  animation: wordUp .95s var(--ease-out) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes wordUp { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero__title .word { opacity: 1; transform: none; animation: none; } }

.hero__sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.1vw, 1.6rem);
  font-weight: 300;
  color: rgba(240,246,255,.86);
  margin: 0 auto var(--s-6);
  max-width: 44ch;
  opacity: 0;
  animation: wordUp .9s var(--ease-out) .55s forwards;
}

.hero__cta {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin-bottom: var(--s-7);
  opacity: 0;
  animation: wordUp .9s var(--ease-out) .72s forwards;
}
@media (max-width: 560px) {
  .hero__cta .btn--lg { padding: 14px 24px; min-height: 50px; font-size: .95rem; }
  .hero__stats { gap: 20px 34px; }
}
.hero__search { opacity: 0; animation: wordUp .9s var(--ease-out) .88s forwards; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: grid; place-items: center; gap: 8px;
  color: rgba(220,228,238,.6); font-size: var(--fs-micro);
  letter-spacing: .18em; text-transform: uppercase;
  animation: bob 2.4s var(--ease-io) infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 9px); } }
.hero__scroll span { width: 1px; height: 34px; background: linear-gradient(to bottom, var(--azure-bright), transparent); }
@media (max-width: 900px) { .hero__scroll { display: none; } }

.hero__stats {
  display: flex; justify-content: center; gap: clamp(20px, 5vw, 62px); flex-wrap: wrap;
  margin-top: var(--s-7);
  opacity: 0; animation: wordUp .9s var(--ease-out) 1s forwards;
}
.hero__stat { text-align: center; }
.hero__stat b {
  display: block; font-family: var(--font-display); font-weight: 650;
  font-size: clamp(1.4rem, 2.6vw, 2.1rem); color: var(--white); letter-spacing: -.03em; line-height: 1;
}
.hero__stat small { font-size: var(--fs-micro); letter-spacing: .13em; text-transform: uppercase; color: rgba(220,228,238,.6); }

/* =====================================================================
   THE INDIA ATLAS — the centrepiece
   ===================================================================== */

.atlas {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: clamp(20px, 3vw, 48px);
  align-items: stretch;
}
@media (max-width: 1000px) { .atlas { grid-template-columns: 1fr; } }

.atlas__stage {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background:
    radial-gradient(90% 80% at 50% 15%, rgba(30,167,232,.14), transparent 62%),
    linear-gradient(165deg, var(--navy-900), var(--navy-950));
  border: 1px solid var(--border);
  min-height: clamp(460px, 74vh, 820px);
  display: grid;
  place-items: center;
  touch-action: none;
  cursor: grab;
}
.atlas__stage:active { cursor: grabbing; }
.atlas__stage::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(70% 60% at 50% 45%, #000 20%, transparent 80%);
  pointer-events: none;
}

.atlas__svg {
  width: 100%; height: 100%;
  max-height: clamp(440px, 72vh, 800px);
  overflow: visible;
}
.atlas__svg .vb { transition: transform .78s var(--ease-io); }

.atlas__state {
  fill: rgba(255,255,255,.055);
  stroke: rgba(255,255,255,.14);
  stroke-width: .55;
  stroke-linejoin: round;
  transition: fill .28s var(--ease-out), stroke .28s var(--ease-out), filter .28s;
  vector-effect: non-scaling-stroke;
}
.atlas__state--live {
  fill: url(#atlasFill);
  stroke: rgba(127,219,255,.42);
  cursor: pointer;
}
.atlas__state--live:hover,
.atlas__state--live:focus-visible {
  fill: url(#atlasFillHot);
  stroke: var(--azure-soft);
  stroke-width: 1.1;
  filter: drop-shadow(0 0 14px rgba(69,200,245,.75));
  outline: none;
}
.atlas__state.is-selected {
  fill: url(#atlasFillHot);
  stroke: var(--white);
  stroke-width: 1.2;
  filter: drop-shadow(0 0 20px rgba(69,200,245,.9));
}
.atlas__state.is-dimmed { opacity: .3; }
.atlas__state.is-stamped { fill: url(#atlasFillStamped); }

.atlas__dot {
  fill: var(--azure-bright);
  opacity: .85;
  pointer-events: none;
  animation: pulseDot 2.6s var(--ease-io) infinite;
}
@keyframes pulseDot { 0%,100% { r: 1.6; opacity: .85; } 50% { r: 2.6; opacity: .35; } }

/* Cursor-following tooltip */
.atlas__tip {
  position: absolute; z-index: 12;
  width: 250px;
  padding: 12px;
  border-radius: var(--r-md);
  pointer-events: none;
  opacity: 0; transform: translate3d(0,0,0) scale(.94);
  transition: opacity .18s var(--ease-out), transform .22s var(--ease-back);
}
.atlas__tip.is-on { opacity: 1; transform: translate3d(0,0,0) scale(1); }
.atlas__tip img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  border-radius: 11px; margin-bottom: 10px; background: var(--navy-800);
}
.atlas__tip h4 { font-size: 1.02rem; margin: 0 0 4px; letter-spacing: -.02em; }
.atlas__tip p { font-size: var(--fs-xs); color: var(--text-dim); margin: 0 0 9px; }
.atlas__tip .atlas__tip-cta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--fs-xs); color: var(--azure-bright); font-weight: 600;
  border-top: 1px solid var(--border); padding-top: 8px;
}
@media (max-width: 900px) { .atlas__tip { display: none; } }

/* Stage controls */
.atlas__controls {
  position: absolute; left: 16px; bottom: 16px; z-index: 8;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.atlas__ctrl {
  height: 40px; padding: 0 15px;
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: var(--r-full);
  background: rgba(4,22,42,.78);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  color: var(--text); font-size: var(--fs-xs); font-weight: 600;
  transition: all var(--t-fast) var(--ease-out);
}
.atlas__ctrl:hover { border-color: var(--azure); color: var(--text-bright); transform: translateY(-2px); }
.atlas__ctrl--spin { background: rgba(229,180,91,.16); border-color: rgba(229,180,91,.4); color: var(--gold-soft); }
.atlas__ctrl--spin:hover { background: var(--gold); color: #2B1D06; border-color: transparent; }

.atlas__legend {
  position: absolute; right: 16px; top: 16px; z-index: 8;
  font-size: var(--fs-micro); color: var(--text-dim);
  letter-spacing: .1em; text-transform: uppercase;
  display: flex; align-items: center; gap: 7px;
  background: rgba(4,22,42,.6); backdrop-filter: blur(10px);
  padding: 7px 13px; border-radius: var(--r-full); border: 1px solid var(--border);
}
.atlas__legend i { width: 8px; height: 8px; border-radius: 99px; background: var(--grad-brand); display: inline-block; }
@media (max-width: 600px) { .atlas__legend { display: none; } }

/* ---- Atlas drawer ---------------------------------------------------- */

.atlas__drawer {
  border-radius: var(--r-xl);
  padding: clamp(20px, 2.4vw, 30px);
  display: flex; flex-direction: column;
  min-height: 0;
  position: relative;
  overflow: hidden;
}
.atlas__drawer-empty { display: grid; place-content: center; text-align: center; gap: 14px; height: 100%; min-height: 320px; }
.atlas__drawer-empty .glyph {
  font-size: 2.6rem; opacity: .5;
  background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.atlas__panel { display: none; flex-direction: column; height: 100%; animation: panelIn .45s var(--ease-out); }
.atlas__panel.is-on { display: flex; }
@keyframes panelIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }

.atlas__panel-head { margin-bottom: var(--s-4); }
.atlas__panel-head h3 {
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  letter-spacing: -.035em; margin: 0 0 6px;
}
.atlas__panel-head .tag { font-family: var(--font-serif); font-style: italic; color: var(--azure-bright); font-size: var(--fs-sm); }

.atlas__counts { display: flex; gap: 18px; flex-wrap: wrap; margin: var(--s-4) 0; }
.atlas__count b { display: block; font-family: var(--font-display); font-size: 1.35rem; font-weight: 650; color: var(--text-bright); line-height: 1; }
.atlas__count small { font-size: var(--fs-micro); letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }

.atlas__list {
  display: grid; gap: 9px;
  overflow-y: auto;
  margin: 0 calc(var(--s-3) * -1) var(--s-4);
  padding: 0 var(--s-3);
  max-height: 340px;
  flex: 1;
}
.atlas__item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid transparent;
  color: var(--text);
  transition: all var(--t-fast) var(--ease-out);
}
.atlas__item:hover { background: var(--surface-strong); border-color: var(--border-strong); transform: translateX(4px); color: var(--text-bright); }
.atlas__item img { width: 56px; height: 44px; border-radius: 9px; object-fit: cover; background: var(--navy-800); flex-shrink: 0; }
.atlas__item-main { min-width: 0; flex: 1; }
.atlas__item b { display: block; font-size: .92rem; font-weight: 600; color: var(--text-bright); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atlas__item small { font-size: var(--fs-xs); color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.atlas__item .arrow { color: var(--text-dim); transition: transform var(--t-fast), color var(--t-fast); }
.atlas__item:hover .arrow { transform: translateX(3px); color: var(--azure-bright); }

.atlas__panel-foot { display: flex; gap: 9px; flex-wrap: wrap; margin-top: auto; padding-top: var(--s-4); border-top: 1px solid var(--border); }

/* Mobile: the drawer becomes a bottom sheet */
@media (max-width: 1000px) {
  .atlas__drawer {
    position: fixed; inset: auto 0 0 0; z-index: 96;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    max-height: 76svh;
    transform: translateY(102%);
    transition: transform .42s var(--ease-out);
    box-shadow: 0 -20px 60px -10px rgba(2,10,20,.7);
    padding-bottom: calc(var(--s-5) + env(safe-area-inset-bottom));
  }
  .atlas__drawer.is-open { transform: none; }
  .atlas__drawer-empty { display: none; }
  .atlas__drawer::before {
    content: ''; position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
    width: 42px; height: 4px; border-radius: 99px; background: var(--border-strong);
  }
  .atlas__panel { padding-top: 14px; }
  .atlas__list { max-height: 40svh; }
}

/* ---- Experience tiles ------------------------------------------------ */

/* Two up on a phone, then as many as fit. min(48%,…) is what forces the
   second column instead of one enormous tile. */
.exp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(48%, 178px), 1fr));
  gap: 12px;
}

.exp-tile {
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-end;
  aspect-ratio: 4 / 3.4;
  padding: var(--s-4);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--navy-850);
  border: 1px solid var(--border);
  color: var(--text-bright);
  isolation: isolate;
  transition: transform var(--t-mid) var(--ease-out), box-shadow var(--t-mid), border-color var(--t-mid);
}
.exp-tile img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  opacity: .55;
  transition: transform 1.1s var(--ease-out), opacity var(--t-mid);
}
.exp-tile::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(2,16,31,.94), rgba(2,16,31,.36) 62%, rgba(2,16,31,.12));
  transition: background var(--t-mid);
}
.exp-tile:hover {
  transform: translateY(-5px);
  border-color: var(--azure);
  box-shadow: var(--sh-glow);
  color: var(--text-bright);
}
.exp-tile:hover img { transform: scale(1.1); opacity: .72; }
.exp-tile__emoji { font-size: 1.7rem; line-height: 1; margin-bottom: auto; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); }
.exp-tile__name { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; letter-spacing: -.02em; }
.exp-tile__count { font-size: var(--fs-micro); color: var(--silver-dim); letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }

/* ---- Editorial (hidden gems) ----------------------------------------- */

.editorial {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(190px, auto);
  gap: clamp(12px, 1.6vw, 20px);
}
@media (max-width: 1000px) { .editorial { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .editorial { grid-template-columns: 1fr; } }

.editorial > :nth-child(1) { grid-column: span 2; grid-row: span 2; }
@media (max-width: 560px) { .editorial > :nth-child(1) { grid-column: span 1; grid-row: span 1; } }

.gem {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--navy-850); border: 1px solid var(--border);
  padding: var(--s-5); color: var(--text-bright); isolation: isolate; min-height: 190px;
  transition: transform var(--t-mid) var(--ease-out), box-shadow var(--t-mid);
}
.gem img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.gem::after { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--grad-veil); }
.gem:hover { transform: translateY(-4px); box-shadow: var(--sh-3); color: var(--text-bright); }
.gem:hover img { transform: scale(1.07); }
.gem__eyebrow { font-family: var(--font-serif); font-style: italic; font-size: var(--fs-xs); color: var(--gold-soft); margin-bottom: 5px; }
.gem__title { font-family: var(--font-display); font-weight: 600; letter-spacing: -.025em; font-size: 1.12rem; line-height: 1.2; }
.gem__where { font-size: var(--fs-xs); color: var(--silver-dim); margin-top: 4px; }
.gem:first-child .gem__title { font-size: clamp(1.35rem, 2.6vw, 2rem); }
.gem:first-child .gem__desc { font-size: var(--fs-sm); color: rgba(220,228,238,.8); margin-top: 8px; max-width: 44ch; }

/* ---- Story cards ----------------------------------------------------- */

.story-card {
  display: flex; flex-direction: column; gap: var(--s-4);
  padding: var(--s-5);
  border-radius: var(--r-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: transform var(--t-mid) var(--ease-out), border-color var(--t-mid), box-shadow var(--t-mid);
  height: 100%;
}
.story-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--sh-2); }
.story-card__quote {
  font-family: var(--font-serif); font-style: italic;
  font-size: 1.04rem; line-height: 1.62; color: var(--text-bright);
  position: relative; padding-top: 6px; flex: 1;
}
.story-card__quote::before {
  content: '“'; position: absolute; top: -18px; left: -6px;
  font-size: 3.4rem; color: var(--azure); opacity: .28; line-height: 1;
}
.story-card__who { display: flex; align-items: center; gap: 12px; padding-top: var(--s-4); border-top: 1px solid var(--border); }
.story-card__who img { width: 46px; height: 46px; border-radius: var(--r-full); object-fit: cover; background: var(--navy-800); flex-shrink: 0; }
.story-card__who b { display: block; font-size: .93rem; color: var(--text-bright); font-weight: 600; }
.story-card__who small { font-size: var(--fs-xs); color: var(--text-dim); }

/* ---- Planner strip --------------------------------------------------- */

.planner-card {
  border-radius: var(--r-xl);
  padding: clamp(24px, 3.4vw, 48px);
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(30,167,232,.14), transparent 55%),
    linear-gradient(160deg, rgba(7,29,52,.9), rgba(4,22,42,.94));
  border: 1px solid var(--border);
}
.planner-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--s-3);
  align-items: end;
}
.planner-form .field { margin: 0; }
.planner-form .btn { min-height: 50px; }

/* ---- Newsletter / CTA band ------------------------------------------- */

.cta-band {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  padding: clamp(36px, 6vw, 80px) clamp(24px, 4vw, 64px);
  text-align: center;
  background: linear-gradient(150deg, var(--blue-royal), var(--azure) 62%, var(--azure-bright));
  color: #04162A;
  isolation: isolate;
}
.cta-band::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 80% at 15% 20%, rgba(255,255,255,.32), transparent 60%),
    radial-gradient(50% 70% at 88% 85%, rgba(4,22,42,.32), transparent 60%);
}
.cta-band h2 { color: #04162A; letter-spacing: -.035em; }
.cta-band p { color: rgba(4,22,42,.78); max-width: 52ch; margin-inline: auto; }
.cta-band .subscribe {
  display: flex; gap: 10px; max-width: 480px; margin: var(--s-6) auto 0; flex-wrap: wrap;
}
.cta-band .subscribe .input {
  flex: 1; min-width: 200px;
  background: rgba(255,255,255,.86); border-color: rgba(4,22,42,.16); color: #04162A;
}
.cta-band .subscribe .input::placeholder { color: rgba(4,22,42,.5); }
.cta-band .subscribe .input:focus { background: #fff; box-shadow: 0 0 0 4px rgba(4,22,42,.12); }
.cta-band .btn--dark { --btn-bg: #04162A; --btn-fg: #fff; --btn-bd: transparent; }

/* ---- Spin-the-map result modal --------------------------------------- */

.spin-modal {
  position: fixed; inset: 0; z-index: 210;
  display: grid; place-items: center;
  padding: var(--gutter);
  background: rgba(2,10,20,.86);
  backdrop-filter: blur(16px);
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-mid), visibility var(--t-mid);
}
.spin-modal.is-open { opacity: 1; visibility: visible; }
.spin-modal__card {
  width: min(560px, 100%);
  border-radius: var(--r-xl);
  overflow: hidden;
  transform: scale(.9) translateY(20px);
  transition: transform .45s var(--ease-back);
}
.spin-modal.is-open .spin-modal__card { transform: none; }
.spin-modal__media { position: relative; aspect-ratio: 16/9; background: var(--navy-800); }
.spin-modal__media img { width: 100%; height: 100%; object-fit: cover; }
.spin-modal__media::after { content: ''; position: absolute; inset: 0; background: var(--grad-veil-soft); }
.spin-modal__dice {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  font-size: 1.6rem; animation: rollDice .9s var(--ease-back);
}
@keyframes rollDice { from { transform: rotate(-360deg) scale(.2); } to { transform: none; } }
.spin-modal__body { padding: var(--s-6); }
.spin-modal__body h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -.035em; margin-bottom: 4px; }
.spin-modal__chips { display: flex; gap: 8px; flex-wrap: wrap; margin: var(--s-4) 0; }
.spin-modal__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: var(--s-5); }
