/* Homepage sections for production index.html */

html { scroll-behavior: auto; }

.map-track {
  position: relative;
  background: #07111f;
  /* Keep intro navy flush through iOS safe-area / overscroll */
  margin-top: 0;
}
.map-stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  color: var(--cream);
  background:
    radial-gradient(ellipse at 50% 58%, rgba(198, 161, 91, 0.16), transparent 32%),
    radial-gradient(circle at 14% 82%, rgba(159, 29, 42, 0.24), transparent 28%),
    radial-gradient(circle at 86% 16%, rgba(90, 122, 156, 0.16), transparent 24%),
    linear-gradient(180deg, #102848 0%, #0c1a33 54%, #07111f 100%);
}
.map-scene { position: absolute; inset: 0; }
.map-slot {
  position: absolute;
  left: 50%;
  top: 58%;
  z-index: 2;
  width: min(920px, 66vw);
  transform: translate(-50%, -50%);
  perspective: 1200px;
  perspective-origin: 50% 42%;
}
.map-field { position: relative; opacity: 0; transform-style: preserve-3d; }
.map-track.is-ready .map-field { opacity: 1; }
.map-stack {
  position: relative;
  aspect-ratio: 1032 / 607.1;
  transform-style: preserve-3d;
  z-index: 2;
}
.nepal-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.map-shadow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  opacity: 0;
  pointer-events: none;
}
/* Soft ground shadow only after fragments lock — never a preassembled mural. */
.map-track.is-locked .map-shadow { opacity: 0.45; }
.map-piece {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform;
  pointer-events: none;
}
.map-stack,
.map-shadow {
  pointer-events: none;
}
.fragment-depth,
.fragment-idle,
.fragment-body {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.fragment-depth,
.fragment-idle {
  backface-visibility: hidden;
  will-change: transform;
}
.piece-svg { filter: drop-shadow(5px 11px 10px rgba(7, 17, 31, 0.26)); }
.map-piece[data-set="phone"] { display: none; }
.piece-svg,
.piece-back {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.piece-back {
  transform: translate(3px, 4px);
  pointer-events: none;
}
.piece-svg { z-index: 1; }
.nepal-collage { pointer-events: none; }
.nepal-light { fill: url(#relief-light); opacity: 0.32; pointer-events: none; }
.nepal-thick { fill: #5c2e32; }
.nepal-edge {
  fill: none;
  stroke: rgba(255, 244, 220, 0.42);
  stroke-width: 2.6;
  stroke-linejoin: round;
  pointer-events: none;
}
.map-sheen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: soft-light;
  opacity: 1;
}
.map-sheen rect {
  pointer-events: none;
}
.map-field.is-revealing {
  filter: drop-shadow(0 18px 28px rgba(7, 17, 31, 0.28));
}
.map-together {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: clamp(1.7rem, 3.4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
  color: white;
  text-shadow: 0 12px 28px rgba(7, 17, 31, 0.45);
  visibility: hidden;
  opacity: 0;
}
.map-together-sub {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.36em;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.01em;
  color: var(--gold-text);
}
.map-opening {
  position: absolute;
  z-index: 3;
  top: 5.8vh;
  left: 50%;
  width: min(36rem, calc(100% - 2.5rem));
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  opacity: 0.9;
}

/* Three.js Earth — stage-filling transparent framebuffer.
   Push is camera dolly only; sphere never scales past the frustum. */
.intro-globe {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  transform: none;
  pointer-events: none;
  will-change: opacity;
  overflow: visible;
  border: none;
  outline: none;
  background: transparent;
  -webkit-mask-image: none;
  mask-image: none;
  clip-path: none;
  border-radius: 0;
}
.intro-globe-host {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  border: none;
  outline: none;
  background: transparent;
  border-radius: 0;
  -webkit-mask-image: none;
  mask-image: none;
  clip-path: none;
  pointer-events: none;
  touch-action: pan-y;
  cursor: default;
}
.intro-globe-host.is-interactive {
  pointer-events: auto;
  cursor: grab;
}
.intro-globe-host.is-dragging {
  cursor: grabbing;
  touch-action: none;
}
.intro-globe-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border: none;
  outline: none;
  background: transparent;
  border-radius: 0;
  -webkit-mask-image: none;
  mask-image: none;
  clip-path: none;
  pointer-events: none;
}
.map-opening h1 {
  font-size: clamp(1.62rem, 3.2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 8px 24px rgba(7, 17, 31, 0.4);
}
.map-opening h1 span {
  display: block;
  margin-top: 0.28rem;
  font-family: var(--devanagari);
  font-size: 0.62em;
  font-weight: 600;
  letter-spacing: 0;
  color: rgba(198, 161, 91, 0.88);
}
.map-opening p {
  margin-top: 0.55rem;
  font-size: clamp(0.95rem, 1.6vw, 1.12rem);
  font-weight: 500;
  font-style: italic;
  color: rgba(255, 248, 238, 0.78);
}
.scroll-cue {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 4vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  transform: translateX(-50%);
  color: rgba(198, 161, 91, 0.82);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.scroll-arrow {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(243, 221, 176, 0.5);
  border-radius: 50%;
  position: relative;
}
.scroll-arrow::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 7px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--gold-text);
  border-bottom: 2px solid var(--gold-text);
  transform: rotate(45deg);
}
.preview-flag {
  margin: 0;
  padding: 0.55rem 1.25rem;
  background: #f7f1e8;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}
.preview-flag a { color: var(--crimson); }

.hero { padding-top: 3.5rem; }
.hero-grid, .about-grid, .impact-grid, .contact-grid { display: grid; gap: 1.75rem; }
.hero h2 {
  margin: 0.35rem 0 1rem;
  font-size: clamp(2.3rem, 5vw, 4.4rem);
  color: var(--navy-900);
}
.hero-ne {
  font-family: var(--devanagari);
  font-size: 1.2rem;
  font-weight: 650;
  color: var(--crimson);
}
.namaste {
  margin: 1rem 0 1.35rem;
  font-size: 1.12rem;
}
.hero-figure {
  margin: 0;
  border-radius: 32px;
  overflow: hidden;
  background: #d7c3a4;
  box-shadow: var(--shadow);
}
.hero-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: 62% center;
}
.hero-figure figcaption {
  padding: 0.85rem 1.1rem 1rem;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.92rem;
}

.about { background: var(--paper); }
.about-copy p + p { margin-top: 1rem; }
.purpose-list {
  display: grid;
  gap: 0.8rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.purpose-list li {
  padding: 1rem 1.05rem 1rem 1.15rem;
  border-left: 3px solid var(--crimson);
  border-radius: 0 18px 18px 0;
  background: var(--cream);
}
.purpose-list strong { display: block; color: var(--navy-900); }
.about-portrait {
  margin: 0;
  border-radius: 32px;
  overflow: hidden;
  background: var(--navy-900);
  box-shadow: var(--shadow);
}
.about-portrait img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 18%;
}

.stats {
  background:
    radial-gradient(circle at 8% 0%, rgba(198, 161, 91, 0.16), transparent 28%),
    var(--navy-900);
  color: var(--cream);
}
.stat-grid, .feature-grid, .news-grid, .safety-grid, .notice-grid {
  display: grid;
  gap: 0.9rem;
}
.stat-card, .feature-card, .news-card, .safety-card, .notice-card, .impact-card {
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}
.stat-card {
  padding: 1.25rem 1.2rem 1.15rem;
  background: rgba(255, 253, 251, 0.06);
  border: 1px solid rgba(243, 221, 176, 0.18);
  color: var(--cream);
  box-shadow: none;
}
.stat-card h3 { font-size: 1.15rem; }
.stat-value {
  margin: 0.65rem 0 0.25rem;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--gold-text);
}
.stat-card p:last-child { color: rgba(251, 246, 239, 0.74); font-size: 0.92rem; }

.showcase { background: linear-gradient(180deg, var(--cream) 0%, #f7f1e7 100%); }
.shot-scroller {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.4rem;
  overscroll-behavior-x: contain;
}
.shot {
  flex: 0 0 78%;
  scroll-snap-align: center;
  margin: 0;
  padding: 0.85rem 0.85rem 1rem;
  border-radius: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.shot img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #f6f1ea;
  border-radius: 18px;
}
.shot figcaption {
  padding-top: 0.75rem;
  text-align: center;
  font-weight: 700;
  color: var(--navy-900);
}
.feature-grid { margin-top: 1.5rem; }
.feature-card { padding: 1.15rem 1.15rem 1.2rem; }
.feature-card span {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: var(--crimson);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.14em;
}
.feature-card h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.feature-card p { color: var(--muted); font-size: 0.96rem; }

.news { background: var(--paper); }
.news-card, .notice-card { overflow: hidden; }
.news-card { padding: 1.2rem; position: relative; }
.sample-stamp {
  display: inline-flex;
  margin-bottom: 0.8rem;
  padding: 0.2rem 0.55rem;
  border: 1.5px solid var(--crimson);
  border-radius: 999px;
  color: var(--crimson);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.news-card h3, .notice-card h3 { font-size: 1.35rem; margin-bottom: 0.45rem; color: var(--navy-900); }
.news-card p, .notice-card p { color: var(--muted); }

.announcements { background: var(--cream-2); }
.notice-grid { align-items: start; }
.notice-card img {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}
.notice-card { padding-bottom: 1.1rem; }
.notice-card h3, .notice-card p, .notice-cat, .notice-date { padding-inline: 1.15rem; }
.notice-cat {
  margin: 0.95rem 0 0.4rem;
  color: var(--crimson);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.notice-date { margin-top: 0.8rem; font-size: 0.86rem; }
.empty-note { color: var(--muted); }

.membership {
  background:
    radial-gradient(circle at 0% 0%, rgba(198, 161, 91, 0.16), transparent 30%),
    var(--cream);
}
.membership-panel {
  padding: 1.4rem 1.15rem 1.3rem;
  border-radius: 32px;
  color: var(--cream);
  background:
    radial-gradient(circle at 100% 0%, rgba(159, 29, 42, 0.35), transparent 32%),
    linear-gradient(145deg, #16315c, #0c1a33 58%, #241018);
  box-shadow: var(--shadow);
}
.membership-panel h2 { font-size: clamp(2rem, 4vw, 3.3rem); margin-bottom: 0.9rem; }
.membership-panel .lede { margin-bottom: 1.25rem; }
.support-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.support-list li {
  position: relative;
  padding: 0.75rem 0.85rem 0.75rem 2.3rem;
  border-radius: 14px;
  background: rgba(255, 253, 251, 0.06);
  line-height: 1.45;
}
.support-list li::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 1.05rem;
  width: 0.55rem;
  height: 0.3rem;
  border-left: 2px solid var(--gold-text);
  border-bottom: 2px solid var(--gold-text);
  transform: rotate(-45deg);
}
.trust-note {
  margin-top: 1.1rem;
  color: rgba(251, 246, 239, 0.88);
}
.price-note {
  margin-top: 0.8rem;
  color: var(--gold-text);
  font-size: 0.95rem;
}

.safety { background: var(--paper); }
.safety-card { padding: 1.15rem; }
.safety-card h3 { font-size: 1.12rem; margin-bottom: 0.35rem; }
.safety-card p { color: var(--muted); font-size: 0.95rem; }
.doc-links { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.2rem; }
.doc-links a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--navy-900);
  color: var(--cream);
  font-weight: 700;
  text-decoration: none;
}
.doc-links a:hover { background: var(--crimson); }

.impact { background: var(--cream); }
.impact-card {
  padding: 1.4rem 1.2rem;
  background: var(--paper);
  border-top: 4px solid var(--gold);
}
.impact-card h3 { margin-bottom: 0.55rem; font-size: 1.45rem; }
.impact-card p + p { margin-top: 0.75rem; color: var(--muted); }

.faq { background: var(--paper); }
.faq-list { display: grid; gap: 0.7rem; }
.faq-list details {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--cream);
  overflow: hidden;
}
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 60px;
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  font-weight: 700;
  color: var(--navy-900);
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--crimson);
  border-bottom: 2px solid var(--crimson);
  transform: rotate(45deg);
  flex: 0 0 auto;
}
.faq-list details[open] summary::after { transform: rotate(225deg); margin-top: 6px; }
.faq-list details p { padding: 0 1.1rem 1.1rem; color: var(--muted); }

.contact { background: var(--cream-2); }
.contact-card, .mail-card {
  padding: 1.4rem 1.2rem;
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}
.mail-card {
  background: var(--navy-900);
  color: var(--cream);
}
.mail-card a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 0.8rem;
  color: var(--gold-text);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-card p + p { margin-top: 0.8rem; }

.cta {
  padding: 4.5rem 0;
  text-align: center;
  color: white;
  background:
    radial-gradient(circle at 50% 0%, rgba(198, 161, 91, 0.2), transparent 36%),
    linear-gradient(180deg, #1a3058, #0c1a33);
}
.cta h2 {
  margin: 0 auto 0.8rem;
  max-width: 12ch;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
}
.cta p { max-width: 36rem; margin: 0 auto 1.4rem; color: rgba(251, 246, 239, 0.86); }
.cta .store-row { justify-content: center; }

@media (min-width: 768px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr 1fr; align-items: center; }
  .stat-grid, .feature-grid, .safety-grid, .notice-grid { grid-template-columns: 1fr 1fr; }
  .news-grid { grid-template-columns: 1fr 1fr; }
  .support-list { grid-template-columns: 1fr 1fr; }
  .shot { flex-basis: 42%; }
  .impact-grid { grid-template-columns: 0.8fr 1.2fr; align-items: end; }
  .membership-panel { padding: 2.4rem 2rem; }
}

@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 0.9fr 1.1fr; gap: 3rem; }
  .shot-scroller {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr;
    grid-template-rows: auto auto;
    overflow: visible;
    gap: 1rem;
  }
  .shot { flex: none; }
  .shot-home { grid-row: 1 / span 2; align-self: center; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(4, 1fr); }
  .news-grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .safety-grid { grid-template-columns: repeat(4, 1fr); }
  .notice-grid { grid-template-columns: repeat(2, 1fr); }
  .cta { padding: 6.5rem 0; }
}

@media (max-width: 767px) {
  .map-slot {
    width: min(100% - 0.85rem, 24rem);
    top: 49%;
    perspective: 1100px;
  }
  .map-piece[data-set="desk"] { display: none; }
  .map-piece[data-set="phone"] { display: block; }
  .piece-svg { filter: drop-shadow(0 6px 4px rgba(7, 17, 31, 0.18)); }
  .nepal-light { opacity: 0.2; }
  .piece-back { transform: translate(2px, 2.5px); }
  .fragment-motif { color: rgba(62, 28, 24, 0.5); }
  .map-shadow use { opacity: 0.4; }
  .nepal-edge { stroke-width: 3.2; }
  .map-opening {
    top: max(3.8vh, calc(var(--safe-top, 0px) + 2.75rem));
    width: min(20rem, calc(100% - 2.25rem));
  }
  .map-opening h1 { font-size: clamp(1.55rem, 6.4vw, 1.95rem); }
  .map-opening p { font-size: 0.98rem; margin-top: 0.45rem; }
  .map-together { margin-top: 0.55rem; font-size: clamp(1.35rem, 6vw, 1.55rem); }
  .scroll-cue {
    font-size: 0.84rem;
    white-space: nowrap;
    bottom: max(2.2vh, calc(var(--safe-bottom, 0px) + 0.85rem));
  }
  .intro-globe {
    inset: 0;
    width: 100%;
    height: 100%;
  }
  .hero-figure { order: -1; }
}

@media (max-width: 767px) and (max-height: 700px) {
  .map-opening {
    top: max(2vh, calc(var(--safe-top, 0px) + 1.75rem));
    width: min(18rem, calc(100% - 1.75rem));
  }
  .map-opening h1 { font-size: clamp(1.35rem, 5.8vw, 1.7rem); }
  .map-opening p { font-size: 0.9rem; }
  .map-slot { top: 52%; width: min(92vw, 20rem); }
  .scroll-cue {
    bottom: max(1.4vh, calc(var(--safe-bottom, 0px) + 0.55rem));
    font-size: 0.78rem;
    gap: 0.25rem;
  }
}

@media (max-width: 390px) {
  .map-opening {
    top: max(3.2vh, calc(var(--safe-top, 0px) + 2.4rem));
    width: min(17.5rem, calc(100% - 1.5rem));
  }
  .map-opening h1 { font-size: clamp(1.45rem, 6.8vw, 1.8rem); }
  .map-together { font-size: 1.3rem; }
  .scroll-cue { bottom: max(2vh, calc(var(--safe-bottom, 0px) + 0.7rem)); font-size: 0.8rem; }
}

@media (max-width: 767px) and (orientation: landscape) {
  .map-stage { height: 100svh; min-height: 100%; }
  .map-opening {
    top: max(1.2vh, calc(var(--safe-top, 0px) + 0.6rem));
    width: min(28rem, calc(100% - 3rem));
  }
  .map-opening h1 { font-size: clamp(1.2rem, 3.8vw, 1.55rem); }
  .map-opening p { display: none; }
  .map-slot { top: 56%; width: min(46vh, 52vw); }
  .scroll-cue { bottom: max(1vh, var(--safe-bottom, 0px)); }
}

/* Tall modern phones in landscape are often >768 wide but still short. */
@media (max-height: 480px) and (orientation: landscape) {
  .map-stage { height: 100svh; min-height: 100%; }
  .map-opening {
    top: max(1vh, calc(var(--safe-top, 0px) + 0.45rem));
    width: min(32rem, calc(100% - 3.5rem));
  }
  .map-opening h1 { font-size: clamp(1.15rem, 3.2vw, 1.5rem); }
  .map-opening p { display: none; }
  .map-together { font-size: clamp(1.1rem, 3vw, 1.35rem); }
  .map-slot { top: 54%; width: min(42vh, 48vw); }
  .scroll-cue {
    bottom: max(0.6vh, var(--safe-bottom, 0px));
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-field { opacity: 1; }
  .piece-svg { filter: none; }
  .piece-back, .fragment-motif { opacity: 0; }
  .map-shadow { opacity: 1; }
  .map-opening { opacity: 1; }
  .map-together { opacity: 0; visibility: hidden; }
  .scroll-cue { opacity: 1; }
}
