/* ============================================================
   Gangaikondacholapuram — shared design system
   ============================================================ */

:root {
  --maroon-dark: #3f0f14;
  --maroon: #6b1e23;
  --maroon-light: #8f2c2c;
  --gold: #c9932c;
  --gold-light: #e8c873;
  --gold-pale: #f3e2b3;
  --cream: #f8f1e4;
  --cream-dark: #efe3cc;
  --stone: #2e2620;
  --stone-soft: #6b5d4f;
  --white: #fffaf0;

  --font-display: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Lato', 'Segoe UI', sans-serif;

  --radius: 6px;
  --shadow-soft: 0 12px 30px -12px rgba(63, 15, 20, 0.35);
  --container: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--stone);
  font-family: var(--font-body);
  line-height: 1.7;
  font-size: 17px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--maroon-dark);
  line-height: 1.25;
  margin: 0 0 0.6em;
  font-weight: 700;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); color: var(--maroon); }

p { margin: 0 0 1em; }

a { color: var(--maroon); }

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

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------- Header / Nav ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, var(--maroon-dark), var(--maroon));
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 4px 18px rgba(0,0,0,0.25);
}

.lang-switch {
  border: 1px solid var(--gold);
  color: var(--gold-light) !important;
  border-radius: 999px !important;
  padding: 6px 14px !important;
  font-size: 0.8rem !important;
  margin-left: 4px;
}
.lang-switch:hover { background: rgba(201,147,44,0.18); }

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: var(--container);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-light);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.brand svg { width: 34px; height: 34px; flex-shrink: 0; }
.brand .brand-sub {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-pale);
  opacity: 0.85;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--gold-light);
  width: 42px;
  height: 38px;
  cursor: pointer;
  font-size: 1.3rem;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  color: var(--gold-pale);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(201, 147, 44, 0.18);
  color: var(--white);
}

.site-nav a.active {
  background: var(--gold);
  color: var(--maroon-dark);
  font-weight: 700;
}

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--maroon-dark);
    border-bottom: 3px solid var(--gold);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .site-nav.open { max-height: 420px; }
  .site-nav ul { flex-direction: column; padding: 10px 20px 18px; gap: 2px; }
  .site-nav a { padding: 12px 10px; }
}

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  background: radial-gradient(ellipse at top, var(--maroon-light) 0%, var(--maroon-dark) 70%);
  color: var(--white);
  text-align: center;
  padding: 90px 24px 130px;
  overflow: hidden;
}

.hero > .container {
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.8rem;
  margin-bottom: 14px;
}

.hero h1 { color: var(--white); }

.hero .lede {
  max-width: 640px;
  margin: 18px auto 0;
  color: var(--gold-pale);
  font-size: 1.1rem;
}

.hero-art {
  position: absolute;
  z-index: 1;
  bottom: -2px; left: 0; right: 0;
  width: 100%;
  height: clamp(40px, 6vw, 80px);
  color: var(--cream);
  pointer-events: none;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-hero {
  padding: 70px 24px 100px;
}

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
}

.btn:hover { transform: translateY(-2px); }

.btn-gold {
  background: var(--gold);
  color: var(--maroon-dark);
  box-shadow: 0 8px 18px -6px rgba(201,147,44,0.6);
}

.btn-outline {
  border-color: var(--gold-light);
  color: var(--gold-light);
}

/* ---------------- Sections ---------------- */

section { padding: 80px 0; }
.section-alt { background: var(--cream-dark); }

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 50px;
}

.section-head .kicker {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  font-weight: 700;
  display: block;
  margin-bottom: 10px;
}

.divider {
  display: flex;
  justify-content: center;
  margin: 18px 0 40px;
  color: var(--gold);
}
.divider svg { width: 80px; height: 24px; }

/* ---------------- Facts strip ---------------- */

.facts-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: -80px;
  position: relative;
  z-index: 5;
}

.fact-card {
  background: var(--white);
  border: 1px solid var(--gold-pale);
  border-radius: var(--radius);
  padding: 26px 18px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.fact-card .fact-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--maroon);
  font-weight: 700;
  display: block;
}

.fact-card .fact-label {
  font-size: 0.85rem;
  color: var(--stone-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (max-width: 900px) {
  .facts-strip { grid-template-columns: repeat(2, 1fr); margin-top: 30px; }
}

/* ---------------- Visitor counter ---------------- */

.visitor-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 460px;
  margin: -46px auto 0;
  position: relative;
  z-index: 6;
  background: var(--white);
  border: 1px solid var(--gold-pale);
  border-radius: 999px;
  padding: 12px 26px;
  box-shadow: var(--shadow-soft);
  font-size: 0.95rem;
  color: var(--stone-soft);
}

.visitor-counter svg { width: 22px; height: 22px; color: var(--gold); flex-shrink: 0; }

.visitor-counter strong {
  font-family: var(--font-display);
  color: var(--maroon);
  font-size: 1.15rem;
}

@media (max-width: 600px) {
  .visitor-counter { flex-wrap: wrap; text-align: center; margin-top: 20px; }
}

/* ---------------- Cards / grids ---------------- */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-soft);
  border-top: 3px solid var(--gold);
}

.cta-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s;
  border-bottom: 4px solid var(--gold);
}
.cta-card:hover { transform: translateY(-6px); }
.cta-card .cta-body { padding: 24px; }
.cta-card .cta-glyph {
  height: 90px;
  background: linear-gradient(135deg, var(--maroon), var(--maroon-dark));
  color: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
}
.cta-card .cta-glyph svg { width: 40px; height: 40px; }
.cta-card h3 { margin-bottom: 6px; }
.cta-card .cta-link { color: var(--gold); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; }

/* ---------------- Photo placeholder slots ---------------- */

.photo-slot {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg, var(--cream-dark), var(--cream-dark) 10px, var(--cream) 10px, var(--cream) 20px);
  border: 2px dashed var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--stone-soft);
  font-size: 0.85rem;
  padding: 20px;
}

.photo-slot .slot-icon { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--gold); }

/* ---------------- Devotional / quote blocks ---------------- */

.devotional {
  background: linear-gradient(180deg, var(--maroon-dark), var(--maroon));
  color: var(--gold-pale);
  border-radius: var(--radius);
  padding: 50px;
}

.devotional h2, .devotional h3 { color: var(--white); }
.devotional h3 { color: var(--gold-light); }

.devotional ul { padding-left: 0; list-style: none; margin: 0; }
.devotional li {
  padding: 18px 0 18px 40px;
  border-top: 1px solid rgba(232, 200, 115, 0.25);
  position: relative;
}
.devotional li:first-child { border-top: none; }
.devotional li::before {
  content: "\2740";
  position: absolute;
  left: 0; top: 18px;
  color: var(--gold);
}
.devotional li strong { color: var(--white); }

.reference-list {
  margin-top: 24px;
  display: grid;
  gap: 18px;
}
.reference-list .ref-item {
  background: rgba(255,255,255,0.06);
  border-left: 3px solid var(--gold);
  padding: 16px 20px;
  border-radius: 4px;
}
.reference-list .ref-item strong { color: var(--gold-light); }

/* ---------------- Timeline (Tour page) ---------------- */

.tour-steps { display: grid; gap: 34px; counter-reset: step; }

.tour-step {
  display: grid;
  grid-template-columns: 90px 1fr 1.1fr;
  gap: 28px;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-soft);
}

.tour-step .step-num {
  counter-increment: step;
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--gold);
  text-align: center;
  font-weight: 700;
}
.tour-step .step-num::before { content: counter(step, decimal-leading-zero); }

@media (max-width: 860px) {
  .tour-step { grid-template-columns: 1fr; text-align: center; }
}

/* ---------------- Comparison table (Architecture) ---------------- */

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare-table th, .compare-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--cream-dark);
}
.compare-table th {
  background: var(--maroon);
  color: var(--gold-pale);
  font-family: var(--font-display);
  font-weight: 700;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table td:first-child { font-weight: 700; color: var(--maroon); width: 30%; }

/* ---------------- Info page ---------------- */

.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.info-list li {
  display: flex; gap: 16px;
  background: var(--white);
  padding: 18px 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.info-list .info-icon { color: var(--gold); width: 26px; height: 26px; flex-shrink: 0; }
.info-list strong { display: block; color: var(--maroon); }

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 3px solid var(--gold);
}
.map-embed iframe { width: 100%; height: 340px; border: 0; display: block; }

.notice {
  background: var(--gold-pale);
  border-left: 4px solid var(--maroon);
  padding: 16px 20px;
  border-radius: 4px;
  font-size: 0.95rem;
}

/* ---------------- Comments page ---------------- */

.comment-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 18px;
}

.comment-form label { font-weight: 700; color: var(--maroon); font-size: 0.9rem; }
.comment-form input,
.comment-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--stone);
  margin-top: 6px;
}
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form .hp-field { position: absolute; left: -9999px; top: -9999px; }

.form-status { font-size: 0.9rem; min-height: 1.2em; }
.form-status.error { color: var(--maroon); }
.form-status.success { color: #2f6b3a; }

.comment-list { margin-top: 44px; display: grid; gap: 18px; }

.comment-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-soft);
  border-left: 4px solid var(--gold);
}
.comment-card .comment-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
}
.comment-card .comment-author {
  font-family: var(--font-display);
  color: var(--maroon);
  font-weight: 700;
}
.comment-card .comment-time { color: var(--stone-soft); font-size: 0.8rem; }
.comment-card p { margin: 0; white-space: pre-wrap; word-break: break-word; }

.comment-empty { color: var(--stone-soft); font-style: italic; text-align: center; padding: 30px 0; }

/* ---------------- Gallery page ---------------- */

.gallery-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 860px) {
  .gallery-layout { grid-template-columns: 1fr; }
}

.gallery-sidebar {
  position: sticky;
  top: 90px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 10px 0;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

@media (max-width: 860px) {
  .gallery-sidebar { position: static; max-height: none; }
}

.gallery-sidebar summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 20px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--maroon);
  border-bottom: 1px solid var(--cream-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}
.gallery-sidebar summary::-webkit-details-marker { display: none; }
.gallery-sidebar summary::before {
  content: "▸";
  color: var(--gold);
  transition: transform 0.2s;
  display: inline-block;
}
.gallery-sidebar details[open] > summary::before { transform: rotate(90deg); }

.gallery-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 4px 0 10px;
}
.gallery-sidebar ul li a {
  display: block;
  padding: 9px 20px 9px 40px;
  color: var(--stone-soft);
  text-decoration: none;
  font-size: 0.92rem;
  border-left: 3px solid transparent;
}
.gallery-sidebar ul li a:hover,
.gallery-sidebar ul li a:focus-visible {
  color: var(--maroon);
  background: var(--cream);
  border-left-color: var(--gold);
}

.gallery-section {
  margin-bottom: 46px;
  scroll-margin-top: 90px;
}

.gallery-section .gallery-section-label {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: block;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}

.gallery-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border-bottom: 3px solid var(--gold);
}

.gallery-card .gallery-card-title {
  padding: 12px 14px 6px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--maroon);
  font-size: 0.95rem;
  line-height: 1.3;
}

.gallery-card button.gallery-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  padding: 0;
  cursor: zoom-in;
  background: var(--cream-dark);
}
.gallery-card button.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-card .gallery-card-caption {
  padding: 8px 14px 14px;
  font-size: 0.85rem;
  color: var(--stone-soft);
}

.gallery-empty {
  text-align: center;
  color: var(--stone-soft);
  padding: 60px 20px;
  font-style: italic;
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 6, 8, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 30px;
}
.lightbox.open { display: flex; }

.lightbox-inner {
  max-width: min(90vw, 1000px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-inner img {
  max-width: 100%;
  max-height: 72vh;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-caption {
  color: var(--gold-pale);
  text-align: center;
  margin-top: 16px;
}
.lightbox-caption .lightbox-title {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.lightbox-close {
  position: absolute;
  top: 22px; right: 28px;
  background: none;
  border: 1px solid var(--gold-light);
  color: var(--gold-light);
  width: 42px; height: 42px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
}
.lightbox-nav {
  background: none;
  border: 1px solid var(--gold-light);
  color: var(--gold-light);
  width: 46px; height: 46px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ---------------- Footer ---------------- */

.site-footer {
  background: var(--maroon-dark);
  color: var(--gold-pale);
  padding: 50px 0 26px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}
.site-footer h4 { color: var(--gold-light); font-size: 1rem; margin-bottom: 12px; }
.site-footer a { color: var(--gold-pale); text-decoration: none; opacity: 0.9; }
.site-footer a:hover { text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(232,200,115,0.2);
  padding-top: 18px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.75;
}

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------------- Scroll reveal ---------------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
