/* ===================================================================
   Kannimar Temple — Landing Page
   =================================================================== */

@font-face {
  font-family: "Noto Sans Tamil";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/noto-sans-tamil.woff2") format("woff2");
  unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+20B9, U+25CC;
}

@font-face {
  font-family: "Noto Sans Tamil";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/noto-sans-tamil-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}

:root {
  --bg-deep: #1a0508;
  --bg-mid: #3a0d14;
  --bg-warm: #5c1a1a;
  --gold: #f4c430;
  --gold-light: #ffe9a8;
  --flame: #ff9d33;
  --ink: #fff6e5;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  font-family: "Noto Sans Tamil", "Segoe UI", "Noto Sans", Latha, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg-deep);
}

/* ---------------------------------------------------------------
   Fixed full-screen animated background
--------------------------------------------------------------- */
.temple-bg {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 0;
  background: radial-gradient(ellipse at 50% 20%, var(--bg-warm) 0%, var(--bg-mid) 45%, var(--bg-deep) 100%);
}

#bg-canvas {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.vignette {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255, 140, 40, 0.25) 0%, rgba(0,0,0,0) 55%),
    radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%);
}

/* ---------------------------------------------------------------
   Temple bells (foreground, swaying)
--------------------------------------------------------------- */
.bells {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  pointer-events: none;
  z-index: 3;
}

.bell {
  position: absolute;
  top: -8px;
  width: clamp(48px, 8vw, 96px);
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.5)) drop-shadow(0 0 10px rgba(244,196,48,0.35));
  transform-origin: 50% 0%;
}

.bell--left {
  left: 4%;
  animation: bellSway 4.5s ease-in-out infinite;
}

.bell--right {
  right: 4%;
  animation: bellSway 4.5s ease-in-out infinite reverse;
  animation-delay: 0.6s;
}

@keyframes bellSway {
  0%   { transform: rotate(-7deg); }
  50%  { transform: rotate(7deg); }
  100% { transform: rotate(-7deg); }
}

@media (max-width: 640px) {
  .bell { top: -6px; width: clamp(36px, 12vw, 64px); }
}

/* ---------------------------------------------------------------
   Inner-page hero banner
--------------------------------------------------------------- */
.page-hero {
  position: relative;
  z-index: 5;
  padding: clamp(64px, 14vh, 120px) 20px clamp(40px, 8vh, 70px);
  text-align: center;
}

.page-hero-title {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  margin: 10px 0 12px;
  font-weight: 700;
  text-shadow: 0 0 30px rgba(244,196,48,0.3), 0 4px 18px rgba(0,0,0,0.5);
}

.page-hero-title span { color: var(--gold); }

.page-hero-sub {
  margin: 0 auto;
  max-width: 52ch;
  color: var(--ink);
  opacity: 0.8;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
}

.dummy-note {
  display: inline-block;
  margin-top: 16px;
  padding: 6px 14px;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--gold-light);
  background: rgba(244,196,48,0.1);
  border: 1px solid rgba(244,196,48,0.3);
  border-radius: 999px;
}

/* ---------------------------------------------------------------
   Content sections (inner pages)
--------------------------------------------------------------- */
.content-section {
  position: relative;
  z-index: 5;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(16px, 5vw, 48px) 90px;
}

.content-block {
  background: rgba(20, 6, 9, 0.55);
  border: 1px solid rgba(244,196,48,0.16);
  border-radius: 20px;
  padding: clamp(20px, 4vw, 36px);
  margin-bottom: 28px;
  backdrop-filter: blur(6px);
}

.content-block h2 {
  margin-top: 0;
  color: var(--gold-light);
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
}

.content-block p {
  line-height: 1.85;
  color: var(--ink);
  opacity: 0.88;
}

.content-block p + p { margin-top: 14px; }

.content-block h3 {
  margin: 24px 0 10px;
  color: var(--gold);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.content-block h3:first-child { margin-top: 0; }

.content-block .lore-list {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.content-block .lore-list li {
  position: relative;
  padding-left: 22px;
  line-height: 1.8;
  color: var(--ink);
  opacity: 0.88;
}

.content-block .lore-list li::before {
  content: "\2726";
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--gold);
  font-size: 0.85em;
}

.content-block .lore-list strong {
  color: var(--gold-light);
}

/* Card grid (committee, festivals, gallery) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(244,196,48,0.18);
  border-radius: 16px;
  padding: 22px;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(244,196,48,0.45);
}

.card-avatar {
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-light), var(--gold) 55%, #8a5a0f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #3a1a00;
  box-shadow: 0 0 0 4px rgba(244,196,48,0.15);
}

.card h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  color: var(--ink);
}

.card .role {
  display: block;
  margin-bottom: 10px;
  font-size: 0.82rem;
  color: var(--gold);
  letter-spacing: 0.03em;
}

.card p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ink);
  opacity: 0.8;
  margin: 0;
}

/* Timeline (temple history) */
.timeline {
  border-left: 2px solid rgba(244,196,48,0.3);
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.timeline-item { position: relative; }

.timeline-item::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(244,196,48,0.2);
}

.timeline-year {
  font-weight: 700;
  color: var(--gold-light);
  font-size: 0.95rem;
}

/* Daily pooja timing table */
.timing-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 14px;
}

.timing-table th,
.timing-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(244,196,48,0.15);
  color: var(--ink);
}

.timing-table th {
  background: rgba(244,196,48,0.12);
  color: var(--gold-light);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.timing-table tr:last-child td { border-bottom: none; }
.timing-table tr:hover td { background: rgba(255,255,255,0.03); }

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.gallery-item {
  min-height: 130px;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: rgba(255,246,229,0.55);
  border: 1px dashed rgba(244,196,48,0.35);
  background: linear-gradient(135deg, rgba(244,196,48,0.14), rgba(92,26,26,0.35));
}

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
}

@media (max-width: 780px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-info-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--ink);
  opacity: 0.9;
  line-height: 1.6;
}

.contact-info-list .icon {
  color: var(--gold);
  font-size: 1.1rem;
}

.map-placeholder {
  margin-top: 20px;
  height: 180px;
  border-radius: 14px;
  border: 1px dashed rgba(244,196,48,0.35);
  background: linear-gradient(135deg, rgba(244,196,48,0.1), rgba(92,26,26,0.3));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,246,229,0.6);
  font-size: 0.9rem;
  text-align: center;
  padding: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-field label {
  font-size: 0.85rem;
  color: var(--gold-light);
}

.form-field input,
.form-field textarea {
  font: inherit;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(244,196,48,0.25);
  background: rgba(255,255,255,0.05);
  color: var(--ink);
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.form-note {
  margin-top: 10px;
  font-size: 0.78rem;
  color: rgba(255,246,229,0.6);
}

.form-note--success {
  color: var(--gold-light);
}

/* ---------------------------------------------------------------
   Footer
--------------------------------------------------------------- */
.site-footer {
  position: relative;
  z-index: 5;
  margin-top: 20px;
  padding: 50px clamp(16px, 5vw, 48px) 0;
  background: linear-gradient(180deg, rgba(15,4,6,0) 0%, rgba(12,3,5,0.85) 30%, rgba(10,2,4,0.97) 100%);
}

.footer-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 30px;
  padding-bottom: 30px;
}

@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-col h4 {
  margin: 0 0 14px;
  color: var(--gold-light);
  font-size: 0.95rem;
}

.footer-col a {
  display: block;
  color: var(--ink);
  opacity: 0.8;
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.footer-col a:hover { opacity: 1; text-shadow: 0 0 8px rgba(244,196,48,0.6); }

.footer-col p {
  color: var(--ink);
  opacity: 0.75;
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0 0 10px;
}

.footer-brand p { max-width: 30ch; }

.footer-bottom {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid rgba(244,196,48,0.15);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,246,229,0.6);
}

/* ---------------------------------------------------------------
   Glowing diyas along the base
--------------------------------------------------------------- */
.diya-row {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14vh;
  min-height: 90px;
  display: flex;
  align-items: flex-end;
  justify-content: space-evenly;
  z-index: 2;
  pointer-events: none;
}

.diya {
  position: relative;
  width: var(--diya-size, 22px);
  height: calc(var(--diya-size, 22px) * 0.7);
  background: linear-gradient(180deg, #d99a3c, #8a4c14);
  border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
  box-shadow: inset 0 2px 3px rgba(255,220,150,0.4);
}

.diya::before {
  /* flame */
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 10px;
  height: 18px;
  margin-left: -5px;
  border-radius: 50% 50% 50% 50% / 65% 65% 35% 35%;
  background: radial-gradient(circle at 50% 70%, #fff6d0 0%, var(--flame) 45%, rgba(255,120,20,0) 80%);
  transform-origin: 50% 100%;
  animation: flicker 1.6s ease-in-out infinite;
  animation-delay: var(--flame-delay, 0s);
}

.diya::after {
  /* glow halo */
  content: "";
  position: absolute;
  left: 50%;
  bottom: 40%;
  width: 60px;
  height: 60px;
  margin-left: -30px;
  margin-bottom: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,180,60,0.45) 0%, rgba(255,140,30,0) 70%);
  filter: blur(2px);
  animation: glowPulse 2.2s ease-in-out infinite;
  animation-delay: var(--flame-delay, 0s);
}

@keyframes flicker {
  0%   { transform: scaleY(1) scaleX(1) rotate(0deg); opacity: 1; }
  20%  { transform: scaleY(1.08) scaleX(0.94) rotate(-2deg); opacity: 0.92; }
  40%  { transform: scaleY(0.92) scaleX(1.05) rotate(2deg); opacity: 1; }
  60%  { transform: scaleY(1.05) scaleX(0.96) rotate(-1deg); opacity: 0.95; }
  80%  { transform: scaleY(0.96) scaleX(1.02) rotate(1deg); opacity: 1; }
  100% { transform: scaleY(1) scaleX(1) rotate(0deg); opacity: 1; }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.15); }
}

/* ---------------------------------------------------------------
   Page chrome
--------------------------------------------------------------- */
.site-header {
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(16px, 5vw, 48px);
  background: linear-gradient(180deg, rgba(15, 4, 6, 0.55) 0%, rgba(15, 4, 6, 0) 100%);
}

.site-header .brand,
.site-header .site-nav a {
  text-shadow: 0 2px 10px rgba(0,0,0,0.75);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  flex-shrink: 0;
  white-space: nowrap;
}

.brand-om {
  font-size: 1.6rem;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(244,196,48,0.6);
}

.brand-name {
  font-size: 1.15rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.4vw, 24px);
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.9;
  white-space: nowrap;
  transition: opacity 0.2s ease, text-shadow 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  opacity: 1;
  text-shadow: 0 0 8px rgba(244,196,48,0.7);
}

.site-nav a.active {
  color: var(--gold-light);
}

/* Dropdown: கோவில் குறிப்புகள் */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  opacity: 0.9;
  cursor: pointer;
  padding: 4px 0;
}

.nav-dropdown-toggle:hover,
.nav-dropdown-toggle.active {
  opacity: 1;
  text-shadow: 0 0 8px rgba(244,196,48,0.7);
}

.nav-dropdown-toggle.active { color: var(--gold-light); }

.nav-dropdown-toggle .caret {
  font-size: 0.7em;
  transition: transform 0.2s ease;
}

.nav-dropdown.open .nav-dropdown-toggle .caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  display: none;
  flex-direction: column;
  padding: 10px;
  border-radius: 14px;
  background: rgba(26, 6, 10, 0.92);
  border: 1px solid rgba(244,196,48,0.25);
  box-shadow: 0 14px 34px rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  z-index: 20;
}

.nav-dropdown-menu a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  background: rgba(244,196,48,0.12);
}

.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: flex;
}

/* Hamburger toggle (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(244,196,48,0.3);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--gold-light);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1180px) {
  .site-header {
    position: relative;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: clamp(16px, 5vw, 48px);
    left: clamp(16px, 5vw, 48px);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(20, 5, 8, 0.96);
    border: 1px solid rgba(244,196,48,0.2);
    box-shadow: 0 18px 40px rgba(0,0,0,0.55);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.25s ease, opacity 0.2s ease;
  }

  .site-nav.open {
    max-height: 70vh;
    opacity: 1;
    pointer-events: auto;
    overflow-y: auto;
  }

  .site-nav a,
  .nav-dropdown-toggle {
    padding: 10px 8px;
    width: 100%;
    justify-content: space-between;
  }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    display: none;
    min-width: 0;
    background: rgba(255,255,255,0.04);
    box-shadow: none;
    border-color: rgba(244,196,48,0.15);
    margin: 2px 0 6px;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    display: flex;
  }

  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown:focus-within .nav-dropdown-menu {
    display: none;
  }

  .nav-dropdown.open:hover .nav-dropdown-menu,
  .nav-dropdown.open:focus-within .nav-dropdown-menu {
    display: flex;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 16px 56px 14px;
  }
}

.hero {
  position: relative;
  z-index: 5;
  min-height: 82vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
}

.goddess-figure {
  width: 300px;
  max-width: 100%;
  margin: 0 auto 18px;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,0.55)) drop-shadow(0 0 28px rgba(244,196,48,0.4));
  animation: goddessFloat 6s ease-in-out infinite;
}

.goddess-figure img {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes goddessFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

.hero-eyebrow {
  color: var(--gold-light);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin: 0 0 14px;
  opacity: 0.9;
}

.hero-title {
  font-size: clamp(2.4rem, 7vw, 5rem);
  margin: 0;
  font-weight: 700;
  text-shadow: 0 0 30px rgba(244,196,48,0.35), 0 4px 18px rgba(0,0,0,0.5);
}

.hero-title span {
  color: var(--gold);
}

.hero-subtitle {
  margin: 18px 0 34px;
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  color: var(--ink);
  opacity: 0.85;
  max-width: 42ch;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 13px 28px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #3a1a00;
  box-shadow: 0 6px 22px rgba(244,196,48,0.35);
}

.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: var(--ink);
  border: 1px solid rgba(255,233,168,0.4);
  backdrop-filter: blur(4px);
}

.btn:hover {
  transform: translateY(-2px);
}

.scroll-cue {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  padding-bottom: 22px;
}

.scroll-cue span {
  width: 22px;
  height: 36px;
  border: 2px solid rgba(255,246,229,0.5);
  border-radius: 14px;
  position: relative;
  display: block;
}

.scroll-cue span::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--gold);
  animation: scrollDot 1.6s ease-in-out infinite;
}

@keyframes scrollDot {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

