/* ============================================================
   देव धाम श्री देव नारायण मन्दिर — स्टाइलशीट
   ============================================================ */

:root {
  --maroon: #7A1F2B;
  --maroon-deep: #5A141D;
  --saffron: #E8A33D;
  --saffron-light: #F4C57A;
  --ivory: #FBF3E7;
  --ivory-deep: #F3E6D2;
  --ink: #2B1B14;
  --ink-soft: #5B4A3D;
  --rose: #C9707A;
  --gold-line: rgba(232, 163, 61, 0.55);

  --font-display: "Yatra One", "Hind", "Noto Sans Devanagari", system-ui, sans-serif;
  --font-body: "Hind", "Noto Sans Devanagari", system-ui, sans-serif;

  --container: 1140px;
  --radius: 6px;
  --shadow-soft: 0 18px 40px -20px rgba(90, 20, 29, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Diya loader ---------- */
.diya-loader {
  position: fixed; inset: 0; z-index: 999;
  display: flex; align-items: center; justify-content: center;
  background: var(--ivory);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.diya-loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.diya-loader .flame {
  transform-origin: 50% 100%;
  animation: flicker 1.1s ease-in-out infinite alternate;
}
@keyframes flicker {
  0%   { transform: scaleY(1) rotate(-2deg); opacity: 1; }
  50%  { transform: scaleY(1.08) rotate(1deg); opacity: 0.92; }
  100% { transform: scaleY(0.96) rotate(-1deg); opacity: 1; }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: transparent;
  transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
  padding: 22px 0;
}
.site-header.is-scrolled {
  background: rgba(251, 243, 231, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 24px -12px rgba(43, 27, 20, 0.25);
  padding: 12px 0;
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit;
}
.brand-mark {
  width: 34px; height: 34px; flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
}
.footer-brand .brand-mark { width: 28px; height: 28px; }
.brand-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ivory);
  display: flex; flex-direction: column; line-height: 1.25;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
  transition: color 0.35s ease, text-shadow 0.35s ease;
}
.site-header.is-scrolled .brand-text { color: var(--maroon-deep); text-shadow: none; }
.brand-text small { font-family: var(--font-body); font-size: 0.62rem; letter-spacing: 0.06em; opacity: 0.85; }

.main-nav { display: flex; gap: 30px; }
.main-nav a {
  color: var(--ivory);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35);
  transition: color 0.35s ease, text-shadow 0.35s ease;
}
.site-header.is-scrolled .main-nav a { color: var(--ink); text-shadow: none; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--saffron);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s ease;
}
.main-nav a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; background: none; border: none; cursor: pointer;
}
.nav-toggle span {
  width: 24px; height: 2px; background: var(--ivory); transition: background 0.3s ease;
}
.site-header.is-scrolled .nav-toggle span { background: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh; min-height: 560px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  color: var(--ivory);
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.6s ease, transform 9s ease-out;
}
.hero-slide.is-active { opacity: 1; transform: scale(1); z-index: 1; }
.hero-veil {
  position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(180deg, rgba(43,27,20,0.55) 0%, rgba(43,27,20,0.35) 40%, rgba(43,27,20,0.75) 100%);
}
.hero-content {
  position: relative; z-index: 3; text-align: center; max-width: 780px; padding: 0 24px;
}
.hero-eyebrow {
  font-family: var(--font-display);
  color: var(--saffron-light);
  letter-spacing: 0.08em;
  margin: 0 0 10px;
}
.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  line-height: 1.25;
  margin: 0 0 16px;
  text-wrap: balance;
  text-shadow: 0 6px 30px rgba(0,0,0,0.4);
}
.hero-sub {
  font-size: 1.05rem;
  opacity: 0.95;
  margin: 0 0 32px;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  border: 1.5px solid transparent;
}
.btn-primary {
  background: var(--saffron);
  color: var(--maroon-deep);
  box-shadow: 0 10px 26px -12px rgba(232, 163, 61, 0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(232, 163, 61, 0.75); }
.btn-ghost {
  background: rgba(251,243,231,0.08);
  border-color: rgba(251,243,231,0.55);
  color: var(--ivory);
}
.btn-ghost:hover { background: rgba(251,243,231,0.18); transform: translateY(-2px); }

.hero-dots {
  position: absolute; z-index: 3; bottom: 84px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px;
}
.hero-dots button {
  width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid var(--ivory); background: transparent;
  padding: 0; cursor: pointer; opacity: 0.7;
  transition: background 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}
.hero-dots button.is-active { background: var(--saffron); border-color: var(--saffron); opacity: 1; transform: scale(1.15); }

.scroll-cue {
  position: absolute; z-index: 3; bottom: 28px; left: 50%; transform: translateX(-50%);
}
.scroll-cue span {
  display: block; width: 22px; height: 36px; border: 2px solid rgba(251,243,231,0.75); border-radius: 20px;
  position: relative;
}
.scroll-cue span::before {
  content: ""; position: absolute; top: 6px; left: 50%; width: 4px; height: 8px;
  background: var(--saffron-light); border-radius: 3px; transform: translateX(-50%);
  animation: cue 1.6s ease-in-out infinite;
}
@keyframes cue { 0% { top: 6px; opacity: 1; } 70% { top: 18px; opacity: 0; } 100% { top: 6px; opacity: 0; } }

/* ---------- Section base ---------- */
.section { padding: 100px 0; }
.section.about { background: var(--ivory); }
.section.people { background: var(--ivory-deep); }
.section.seva { background: var(--ivory); }
.section.utsav { background: var(--maroon); color: var(--ivory); }
.section.gallery { background: var(--ivory-deep); }
.section.contact { background: var(--ivory); }

.eyebrow {
  font-family: var(--font-display);
  color: var(--saffron);
  text-transform: none;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.eyebrow.center { text-align: center; }
.utsav .eyebrow { color: var(--saffron-light); }

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  margin: 0 0 28px;
  color: var(--maroon-deep);
  text-wrap: balance;
}
.utsav h2 { color: var(--ivory); }
h2.center { text-align: center; }

/* section divider glow */
.section:not(.hero)::before {
  content: "🪔";
  display: block;
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
  filter: drop-shadow(0 0 10px var(--gold-line));
}

/* ---------- About ---------- */
.about-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 64px; align-items: center;
}
.about-text p { color: var(--ink-soft); margin: 0 0 18px; }
.about-purpose {
  margin-top: 28px; padding: 22px 24px;
  background: rgba(232, 163, 61, 0.1);
  border-inline-start: 3px solid var(--saffron);
  border-radius: var(--radius);
}
.about-purpose p:last-child { margin: 0; }
.about-figure { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); }
.about-figure img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/5; }
.about-figure-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 18px;
  background: linear-gradient(0deg, rgba(43,27,20,0.85), transparent);
  color: var(--ivory);
  font-size: 0.9rem;
}

/* ---------- People ---------- */
.people-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.person-card {
  background: var(--ivory);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.person-photo {
  width: 128px; height: 128px; border-radius: 50%; overflow: hidden;
  margin: 0 auto 18px;
  border: 3px solid var(--saffron);
  padding: 4px;
}
.person-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.person-photo-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--maroon); border-radius: 50%;
}
.person-photo-placeholder svg { width: 56%; height: 56%; }
.person-card h3 { font-family: var(--font-display); color: var(--maroon-deep); margin: 0 0 10px; font-size: 1.2rem; }
.person-card p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* ---------- Services ---------- */
.seva-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.seva-card {
  background: var(--ivory-deep);
  padding: 30px 22px;
  border-radius: var(--radius);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.seva-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.seva-icon { font-size: 2.1rem; display: block; margin-bottom: 14px; }
.seva-card h3 { font-family: var(--font-display); color: var(--maroon-deep); font-size: 1.05rem; margin: 0 0 10px; }
.seva-card p { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }

/* ---------- Utsav timeline ---------- */
.utsav-intro { max-width: 760px; margin: 0 auto 48px; text-align: center; opacity: 0.92; }
.timeline { list-style: none; margin: 0; padding: 0; max-width: 760px; margin-inline: auto; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 130px; top: 6px; bottom: 6px; width: 2px;
  background: rgba(251,243,231,0.25);
}
.timeline li {
  display: grid; grid-template-columns: 130px 1fr; gap: 24px;
  padding: 16px 0; position: relative;
}
.timeline li::after {
  content: ""; position: absolute; left: 125px; top: 22px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--saffron); border: 2px solid var(--maroon);
}
.timeline-date {
  font-family: var(--font-display);
  color: var(--saffron-light);
  font-size: 1.05rem;
  display: flex; flex-direction: column;
  text-align: right; padding-right: 8px;
}
.timeline-date span { font-family: var(--font-body); font-size: 0.75rem; opacity: 0.75; margin-top: 4px; }
.timeline-body { opacity: 0.92; padding-top: 4px; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.gallery-item {
  border: none; padding: 0; cursor: zoom-in; border-radius: var(--radius);
  overflow: hidden; aspect-ratio: 4/3; position: relative;
  box-shadow: var(--shadow-soft);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item::after {
  content: "🔍"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(43,27,20,0); font-size: 1.4rem; opacity: 0; color: var(--ivory);
  transition: background 0.3s ease, opacity 0.3s ease;
}
.gallery-item:hover::after { background: rgba(43,27,20,0.35); opacity: 1; }
.gallery-more {
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1.5px dashed var(--rose);
  color: var(--ink-soft);
  gap: 10px;
}
.gallery-more span { font-size: 1.6rem; }
.gallery-more p { margin: 0; font-size: 0.85rem; text-align: center; padding: 0 12px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contact-info p { color: var(--ink-soft); }
.contact-list { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.contact-list li { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); }
.contact-placeholder { opacity: 0.6; font-style: italic; }
.map-btn { display: inline-block; margin: 24px 0 20px; }
.map-embed {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft);
  border: 1px solid rgba(122,31,43,0.15);
}
.map-embed iframe { width: 100%; height: 280px; border: 0; display: block; }
.contact-form {
  display: flex; flex-direction: column; gap: 18px;
  background: var(--ivory-deep); padding: 32px; border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.contact-form label { display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; color: var(--ink-soft); }
.contact-form input, .contact-form textarea {
  font-family: var(--font-body); font-size: 1rem;
  padding: 12px 14px; border-radius: var(--radius); border: 1px solid rgba(122,31,43,0.2);
  background: var(--ivory); color: var(--ink); resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: 2px solid var(--saffron); outline-offset: 1px;
}
.form-note { font-size: 0.85rem; color: var(--maroon); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--maroon-deep); color: var(--ivory); padding: 36px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.1rem; }
.footer-brand .brand-mark { color: var(--saffron); }
.footer-inner p { margin: 0; font-size: 0.85rem; opacity: 0.8; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20, 12, 8, 0.92);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 4px; box-shadow: 0 30px 60px rgba(0,0,0,0.5); }
.lightbox-close {
  position: absolute; top: 24px; right: 28px; background: none; border: none;
  color: var(--ivory); font-size: 2.2rem; line-height: 1; cursor: pointer;
}

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-figure { order: -1; }
  .people-grid { grid-template-columns: 1fr; gap: 24px; }
  .seva-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline::before { left: 90px; }
  .timeline li { grid-template-columns: 90px 1fr; gap: 16px; }
  .timeline li::after { left: 85px; }
}

@media (max-width: 720px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .site-header.nav-open .main-nav {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ivory); padding: 20px 24px; gap: 18px;
    box-shadow: 0 12px 24px -12px rgba(0,0,0,0.3);
  }
  .site-header.nav-open .main-nav a { color: var(--ink); text-shadow: none; }
  .section { padding: 70px 0; }
  .seva-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .timeline-date { text-align: left; }
}
