/* ═══════════════════════════════════════════════════════════
   Shri Parasnath Ji Mandir · Kashiwala — landing page
   ═══════════════════════════════════════════════════════════ */

:root {
  --ink: #0a0d1c;
  --ink-2: #10142a;
  --gold: #e8b34b;
  --gold-bright: #ffd98a;
  --saffron: #ff8a3c;
  --cream: #f5ead6;
  --muted: rgba(245, 234, 214, 0.62);
  --line: rgba(232, 179, 75, 0.22);
  --font-head: 'Marcellus', serif;
  --font-dev: 'Rozha One', serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;   /* fallback */
  overflow-x: clip;     /* mobile browsers ignore body-only overflow-x */
  touch-action: pan-y pinch-zoom;   /* no horizontal panning, ever */
}

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  overflow-x: clip;
  touch-action: pan-y pinch-zoom;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(232, 179, 75, 0.35); color: #fff; }

/* ═══ Loader ═══ */
#loader {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(ellipse at 50% 60%, #171332 0%, #07091a 70%);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 1s ease, visibility 1s;
}
#loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { text-align: center; }
.loader-om {
  font-size: 3.4rem; color: var(--gold);
  text-shadow: 0 0 40px rgba(232, 179, 75, 0.8);
  animation: omPulse 2.2s ease-in-out infinite;
}
@keyframes omPulse {
  0%, 100% { transform: scale(1); text-shadow: 0 0 30px rgba(232,179,75,.5); }
  50% { transform: scale(1.07); text-shadow: 0 0 60px rgba(232,179,75,.95); }
}
.loader-mantra {
  font-family: var(--font-dev);
  margin-top: 0.8rem; font-size: 1.1rem; letter-spacing: 0.12em;
  color: var(--muted);
}
.loader-bar {
  width: 140px; height: 1px; margin: 1.6rem auto 0;
  background: rgba(232,179,75,.15); overflow: hidden; border-radius: 2px;
}
.loader-bar span {
  display: block; height: 100%; width: 40%;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: barSlide 1.3s ease-in-out infinite;
}
@keyframes barSlide { 0% { transform: translateX(-100%);} 100% { transform: translateX(350%);} }

/* ═══ WebGL canvas ═══ */
#gl {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%; display: block;
  transition: opacity .5s ease;
}
#canvas-veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 42%, transparent 40%, rgba(7, 9, 24, 0.42) 100%);
}
body.no-webgl #gl { display: none; }
body.no-webgl #canvas-veil {
  background:
    radial-gradient(ellipse at 50% 95%, rgba(255,138,60,.35) 0%, transparent 55%),
    linear-gradient(180deg, #07091a 0%, #171332 55%, #4a2a35 85%, #7a4030 100%);
}

/* ═══ Nav ═══ */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  transition: background .5s ease, backdrop-filter .5s ease, box-shadow .5s ease;
}
#nav.scrolled {
  background: rgba(8, 10, 25, 0.94);
  box-shadow: 0 1px 0 var(--line);
}
.nav-brand {
  display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none; color: var(--cream);
  font-family: var(--font-dev); font-size: 1.02rem; letter-spacing: .02em;
}
.nav-brand em { font-family: var(--font-head); font-style: normal; color: var(--muted); font-size: .85em; }
.nav-diya { filter: drop-shadow(0 0 8px rgba(255,170,60,.8)); }
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.2rem); }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: .82rem;
  letter-spacing: .14em; text-transform: uppercase; font-weight: 400;
  transition: color .3s;
}
.nav-links a:hover { color: var(--gold-bright); }
.nav-cta {
  border: 1px solid var(--line); padding: .45rem 1.1rem; border-radius: 100px;
  color: var(--gold) !important;
  transition: background .3s, box-shadow .3s !important;
}
.nav-cta:hover { background: rgba(232,179,75,.12); box-shadow: 0 0 24px rgba(232,179,75,.25); }
@media (max-width: 760px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .nav-brand { font-size: .9rem; white-space: nowrap; }
  .nav-brand em { display: none; }
}

main { position: relative; z-index: 2; overflow-x: clip; }

/* ═══ Hero ═══ */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 4.4rem 1.4rem 4rem; position: relative;
  overflow: hidden;   /* the ::before glow extends past the viewport */
}
.hero-inner { position: relative; width: min(100%, 46rem); }
.hero-inner::before {
  content: ''; position: absolute; inset: -22% -16%; z-index: -1;
  background: radial-gradient(ellipse at 50% 42%,
    rgba(5, 7, 18, 0.80) 0%,
    rgba(5, 7, 18, 0.48) 48%,
    transparent 74%);
  filter: blur(14px); pointer-events: none;
}
.eyebrow {
  font-family: var(--font-dev);
  color: var(--gold-bright); font-size: clamp(.85rem, 1.6vw, 1.05rem);
  letter-spacing: .28em; margin-bottom: 1.2rem;
  text-shadow: 0 1px 10px rgba(5,7,18,.95), 0 0 26px rgba(232,179,75,.5);
}
.hero-title { display: flex; flex-direction: column; gap: .4rem; }
.hero-title .dev {
  font-family: var(--font-dev); font-weight: 400;
  font-size: clamp(2.6rem, 8vw, 5.4rem); line-height: 1.15;
  background: linear-gradient(180deg, #fff3d8 0%, var(--gold-bright) 45%, var(--saffron) 110%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 3px 6px rgba(5, 7, 18, 0.9)) drop-shadow(0 4px 34px rgba(255, 150, 50, 0.35));
}
.hero-title .lat {
  font-family: var(--font-head);
  font-size: clamp(1rem, 2.6vw, 1.6rem);
  letter-spacing: .68em; text-indent: .68em;
  color: rgba(245, 234, 214, 0.94);
  text-shadow: 0 1px 8px rgba(5,7,18,.95), 0 2px 24px rgba(5,7,18,.7);
}

.hero-sub {
  max-width: 36rem; margin: 1.7rem auto 2.4rem;
  color: rgba(245, 234, 214, 0.95); font-size: clamp(.95rem, 1.8vw, 1.08rem);
  text-shadow: 0 1px 6px rgba(5, 7, 18, 0.95), 0 2px 18px rgba(5, 7, 18, 0.85);
}

/* ═══ Store buttons ═══ */
.store-buttons { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.store-btn {
  display: flex; align-items: center; gap: .8rem;
  padding: .8rem 1.5rem; border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(38,32,24,.82), rgba(24,20,34,.82));
  color: var(--cream); text-decoration: none; text-align: left;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, border-color .35s;
}
.store-btn:hover {
  transform: translateY(-3px);
  border-color: rgba(232,179,75,.55);
  box-shadow: 0 12px 40px rgba(232,179,75,.22), 0 0 0 1px rgba(232,179,75,.1) inset;
}
.store-btn svg { width: 26px; height: 26px; color: var(--gold); flex: none; }
.store-btn span { display: flex; flex-direction: column; line-height: 1.25; font-family: var(--font-head); font-size: 1.05rem; }
.store-btn small { font-family: var(--font-body); font-size: .58rem; letter-spacing: .18em; color: var(--muted); }

/* ═══ Scroll hint ═══ */
.scroll-hint { position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%); }
.scroll-line {
  display: block; width: 1px; height: 56px;
  background: linear-gradient(180deg, var(--gold), transparent);
  position: relative; overflow: hidden;
}
.scroll-line::after {
  content: ''; position: absolute; left: 0; top: -30%;
  width: 100%; height: 30%; background: #fff;
  animation: scrollDrop 2s ease-in-out infinite;
}
@keyframes scrollDrop { 0% { top: -30%; opacity: 1; } 80% { top: 100%; opacity: 0; } 100% { top: 100%; opacity: 0; } }

/* ═══ Sections ═══ */
.section {
  position: relative; padding: clamp(5rem, 12vh, 9rem) 1.6rem;
  background: #0b0e1d;
  overflow-x: clip;
}
#shrine {
  background: linear-gradient(180deg, rgba(11,14,29,0) 0%, #0b0e1d 22%, #0b0e1d 100%);
  padding-top: clamp(8rem, 18vh, 13rem);
}
.section-inner { max-width: 62rem; margin: 0 auto; }
.section-inner.center { text-align: center; }
.section h2 {
  font-family: var(--font-head); font-weight: 400;
  font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.2;
  color: var(--cream); margin-bottom: 2.4rem;
}
.two-col {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.4rem;
  color: var(--muted); font-size: 1.02rem;
}
.two-col em { color: var(--gold); font-style: italic; }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }

.mantra-strip {
  margin-top: 3.6rem; padding: 1.4rem 1rem;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: .6rem 1rem;
  justify-content: center; align-items: baseline;
  font-family: var(--font-dev); font-size: clamp(.9rem, 2vw, 1.12rem);
  color: var(--gold);
  text-shadow: 0 0 18px rgba(232,179,75,.35);
}
.mantra-strip i { color: var(--muted); font-style: normal; }

/* ═══ Heritage timeline ═══ */
.heritage-intro {
  max-width: 46rem; color: var(--muted); font-size: 1.02rem;
  margin: -0.8rem 0 0;
}
.timeline {
  list-style: none; margin-top: 3rem; padding-left: 1.8rem;
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2rem;
}
.timeline li { position: relative; }
.timeline li::before {
  content: ''; position: absolute; top: .5rem; left: calc(-1.8rem - 4.5px);
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(232, 179, 75, 0.85);
}
.tl-era {
  display: block; font-family: var(--font-head); font-size: 1.05rem;
  letter-spacing: .08em; color: var(--gold-bright); margin-bottom: .25rem;
}
.timeline p { color: var(--muted); font-size: .95rem; max-width: 44rem; }
.timeline em { color: var(--gold); font-style: italic; }

/* ═══ Gallery ═══ */
.gallery {
  margin-top: 3rem;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem;
}
.g-item {
  position: relative; margin: 0; overflow: hidden; border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(232,179,75,.04);
  aspect-ratio: 3 / 4; cursor: zoom-in;
}
.g-hero { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
@media (max-width: 760px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.g-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .8s cubic-bezier(.2,.7,.2,1), filter .8s;
  filter: saturate(.92);
}
.g-item:hover img { transform: scale(1.05); filter: saturate(1.05); }
.g-item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 2.2rem .9rem .8rem;
  font-size: .78rem; line-height: 1.45; color: rgba(245,234,214,.92);
  background: linear-gradient(180deg, transparent, rgba(5,7,18,.88));
  opacity: 0; transform: translateY(8px);
  transition: opacity .45s, transform .45s;
  pointer-events: none;
}
.g-item:hover figcaption { opacity: 1; transform: none; }
.g-hero figcaption { opacity: 1; transform: none; font-family: var(--font-dev); font-size: .92rem; }

/* ═══ Lightbox ═══ */
#lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(4, 6, 15, 0.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 1rem; padding: 3rem 1.2rem 2rem;
  opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
  cursor: zoom-out;
}
#lightbox.open { opacity: 1; visibility: visible; }
#lightbox img {
  max-width: min(92vw, 1100px); max-height: 78vh;
  border-radius: 12px; border: 1px solid var(--line);
  box-shadow: 0 30px 90px rgba(0,0,0,.7);
}
#lightbox p { color: var(--muted); font-size: .9rem; text-align: center; max-width: 40rem; }
#lightbox .lb-close {
  position: absolute; top: 1.1rem; right: 1.4rem;
  font-size: 1.6rem; color: var(--muted); font-family: var(--font-body);
}

/* ═══ Features ═══ */
.feature-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem;
}
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: minmax(0, 1fr); } }
.feature {
  border: 1px solid var(--line); border-radius: 18px;
  padding: 1.8rem 1.6rem;
  background: linear-gradient(160deg, rgba(232,179,75,.06), rgba(232,179,75,.015));
  transition: transform .4s cubic-bezier(.2,.8,.2,1), border-color .4s, box-shadow .4s;
}
.feature:hover {
  transform: translateY(-5px);
  border-color: rgba(232,179,75,.45);
  box-shadow: 0 18px 50px rgba(0,0,0,.45), 0 0 30px rgba(232,179,75,.10);
}
.feature-icon { font-size: 1.9rem; margin-bottom: .9rem; filter: drop-shadow(0 0 12px rgba(255,170,60,.5)); }
.feature h3 { font-family: var(--font-head); font-weight: 400; font-size: 1.18rem; margin-bottom: .5rem; color: var(--gold-bright); }
.feature p { color: var(--muted); font-size: .92rem; }
.feature-link {
  display: inline-block; margin-top: .8rem;
  color: var(--gold); text-decoration: none; font-size: .82rem;
  letter-spacing: .06em; border-bottom: 1px solid transparent;
  transition: border-color .3s, color .3s;
}
.feature-link:hover { color: var(--gold-bright); border-color: var(--gold); }

/* ═══ Download ═══ */
.section-download {
  background: linear-gradient(180deg, #0b0e1d 0%, #150f22 100%);
}
.download-diya { font-size: 2.6rem; margin-bottom: 1rem; filter: drop-shadow(0 0 24px rgba(255,170,60,.8)); }
.download-sub { color: var(--muted); margin: -1.4rem 0 2.4rem; }

.yt-line { margin-top: 1.6rem; color: var(--muted); font-size: .9rem; }
.yt-line a { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(232,179,75,.35); transition: color .3s; }
.yt-line a:hover { color: var(--gold-bright); }

/* ═══ Footer ═══ */
footer {
  position: relative; text-align: center;
  padding: 3rem 1.5rem 3.4rem;
  background: #060815;
  border-top: 1px solid var(--line);
}
.footer-mantra { font-family: var(--font-dev); color: var(--gold); letter-spacing: .2em; margin-bottom: .8rem; }
.footer-links { margin-bottom: .8rem; }
.footer-links a { color: var(--muted); font-size: .84rem; text-decoration: none; border-bottom: 1px solid rgba(232,179,75,.25); transition: color .3s; }
.footer-links a:hover { color: var(--gold-bright); }
.footer-copy { color: rgba(245,234,214,.4); font-size: .8rem; }

/* ═══ Reveal on scroll ═══ */
.reveal {
  opacity: 0; transform: translateY(34px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }

/* ═══ Touch devices ═══ */
@media (hover: none) {
  .g-item figcaption { opacity: 1; transform: none; }   /* no hover on touch — show captions */
  .g-item { cursor: default; }
}
@media (max-width: 480px) {
  .eyebrow { letter-spacing: .14em; }
  .hero-title .lat { letter-spacing: .42em; text-indent: .42em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .loader-om, .loader-bar span, .scroll-line::after { animation: none; }
}
