:root {
  --gold: #c9962b;
  --turmeric: #e8a317;
  --maroon: #6b1420;
  --maroon-dark: #4a0d16;
  --green: #2f5d3a;
  --cream: #fff6e0;
  --ink: #3a1a12;
  --side: 25%;
  /* page palette: set per visit by js/app.js */
  --p-bg1: #0b0b0b; --p-bg2: #1c1409; --p-glow: rgba(232,163,23,.28);
  --p-title: #f5c453; --p-text: #f4dca0; --p-accent: #f5c453;
  --kolam: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 48 24'%3E%3Cg fill='none' stroke='%23c9962b' stroke-width='1.4'%3E%3Cpath d='M24 3 L35 12 L24 21 L13 12 Z'/%3E%3Cpath d='M0 12 Q6 3 12 12 Q6 21 0 12'/%3E%3Cpath d='M48 12 Q42 3 36 12 Q42 21 48 12'/%3E%3C/g%3E%3Cg fill='%23c9962b'%3E%3Ccircle cx='24' cy='12' r='2'/%3E%3Ccircle cx='5' cy='12' r='1.4'/%3E%3Ccircle cx='43' cy='12' r='1.4'/%3E%3C/g%3E%3C/svg%3E");
  --serif: "Lora", "Noto Serif Tamil", "Noto Serif Telugu", "Noto Serif Kannada", "Noto Serif Devanagari", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.75;
  letter-spacing: .005em;
  color: var(--ink);
  background: var(--p-bg1);
}
button { font: inherit; cursor: pointer; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; color: var(--maroon); font-weight: 700; }
.hidden { display: none !important; }

/* kolam border strips */
.kolam {
  height: 24px;
  background: var(--kolam) repeat-x center;
}

/* fade-in, slow */
.fade { animation: fade 1.6s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- music button ---------- */
.music-btn {
  position: fixed; right: 16px; bottom: 16px; z-index: 50;
  width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--maroon); color: var(--cream);
  font-size: 22px; line-height: 1;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.music-btn:hover { background: var(--maroon-dark); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: .6em 1.8em;
  border: 2px solid var(--gold);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--turmeric), var(--gold));
  color: var(--maroon-dark);
  font-weight: 700; font-size: 1.1rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(107,20,32,.3);
  transition: transform .6s ease, box-shadow .6s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(107,20,32,.4); }

/* ---------- landing ---------- */
.landing {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background:
    radial-gradient(ellipse at 50% 30%, var(--p-glow), transparent 60%),
    linear-gradient(180deg, var(--p-bg1), var(--p-bg2));
  color: var(--p-text);
  transition: background 1s ease;
  position: relative; overflow: hidden;
}
.landing-body {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 24px 16px; gap: 20px;
  position: relative; z-index: 1;
}
.mandala {
  position: absolute; left: 50%; top: 50%;
  width: min(90vmin, 720px); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  opacity: .2; z-index: 0;
  animation: spin 120s linear infinite;
  pointer-events: none;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.diya { font-size: 3rem; animation: glow 5s ease-in-out infinite; }
@keyframes glow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(232,163,23,.5)); }
  50% { filter: drop-shadow(0 0 22px rgba(255,200,60,.95)); }
}
.landing h1 { color: var(--p-title); font-size: clamp(2rem, 6vw, 3.6rem); margin: 0; text-shadow: 0 2px 12px rgba(0,0,0,.22); }
.landing .by { font-size: .95rem; font-weight: 500; letter-spacing: .06em; color: var(--p-text); margin-top: -10px; }
.lang-pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 560px; }
.pill {
  padding: .35em 1.2em; border-radius: 999px; font-size: 1.1rem; font-weight: 500;
  border: 1.5px solid var(--gold);
  background: rgba(255,255,255,.08); color: var(--p-text);
  transition: background .5s ease, color .5s ease;
}
.pill:hover { background: rgba(255,255,255,.2); }
.pill.active { background: var(--gold); border-color: var(--gold); color: #2a1209; font-weight: 700; }
.lang-label { font-size: 1.1rem; color: var(--p-text); }

/* ---------- shared header ---------- */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px;
  background: var(--maroon); color: var(--cream);
}
.topbar .brand { font-weight: 700; font-size: 1.3rem; color: var(--turmeric); flex: 1; }
.topbar a { color: var(--cream); text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.lang-select {
  font: inherit; padding: .2em .6em; border-radius: 8px;
  border: 1.5px solid var(--gold); background: var(--cream); color: var(--maroon);
}

/* ---------- theme page ---------- */
.page { min-height: 100vh; display: flex; flex-direction: column; }
.theme-page {
  background:
    radial-gradient(ellipse at 50% 15%, var(--p-glow), transparent 60%),
    linear-gradient(180deg, var(--p-bg1), var(--p-bg2));
  color: var(--p-text);
}
.theme-wrap { max-width: 860px; margin: 0 auto; padding: 32px 16px 96px; text-align: center; }
.theme-wrap h1 { color: var(--p-title); font-size: clamp(2.2rem, 6vw, 3.4rem); margin-bottom: .1em; }
.theme-wrap .tag { color: var(--p-accent); font-size: 1.45rem; font-weight: 700; margin-bottom: 1.2em; }
.theme-wrap p { text-align: left; font-size: 1.3rem; }
.theme-wrap h2 { color: var(--p-title); margin-top: 1.6em; font-size: 1.8rem; }
.elements-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 24px 0; }
.el-card {
  border: 2px solid var(--c, var(--gold)); border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, color-mix(in srgb, var(--c, var(--gold)) 28%, #fff) 100%);
  padding: 16px 8px; text-decoration: none; color: var(--ink);
  border-top: 8px solid var(--c, var(--gold));
  transition: transform .6s ease, box-shadow .6s ease;
}
.el-card:hover { transform: translateY(-4px); box-shadow: 0 8px 18px rgba(107,20,32,.25); }
.el-card .ico { font-size: 2.2rem; display: block; }
.el-card strong { display: block; color: var(--maroon); font-size: 1.3rem; }
.el-card small { color: var(--ink); opacity: .85; font-size: 1rem; }
.theme-wrap .btn { margin-top: 24px; }

/* ---------- golu viewer ---------- */
.golu { height: 100vh; display: flex; flex-direction: column; }
.split { flex: 1; display: flex; min-height: 0; }
.side {
  flex: 0 0 var(--side); min-width: 150px; max-width: 60%;
  overflow-y: auto;
  /* follows the page colour, a shade darker so it reads as a separate panel */
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--p-bg1) 78%, #000),
    color-mix(in srgb, var(--p-bg2) 78%, #000));
  padding: 12px 8px;
}
.side a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 8px;
  border-radius: 12px; text-decoration: none; color: var(--ink);
  border: 2px solid transparent; border-left: 6px solid var(--c, var(--gold));
  background: rgba(255,255,255,.9);
  transition: background .5s ease, transform .5s ease;
}
.side a:hover { background: #fff; transform: translateX(3px); }
.side a.active { background: var(--maroon); color: var(--cream); border-color: var(--gold); border-left-color: var(--c, var(--gold)); }
.side .ico { font-size: 1.6rem; }
.side .txt { font-size: 1.1rem; font-weight: 700; }
.side .txt { line-height: 1.25; min-width: 0; }
.side .txt small { display: block; opacity: .8; font-size: .9rem; }
.side .sep { height: 1px; background: var(--gold); margin: 10px 4px; opacity: .6; }
.divider {
  flex: 0 0 8px; cursor: col-resize;
  background: var(--gold);
  background-image: linear-gradient(90deg, transparent 3px, rgba(107,20,32,.55) 3px, rgba(107,20,32,.55) 5px, transparent 5px);
  touch-action: none;
}
.divider:hover, .divider.drag { background-color: var(--turmeric); }
.main {
  flex: 1; min-width: 0; overflow-y: auto; padding: 20px clamp(12px, 3vw, 32px) 96px;
  background:
    radial-gradient(ellipse at 50% 0%, var(--p-glow), transparent 55%),
    linear-gradient(180deg, var(--p-bg1), var(--p-bg2));
  color: var(--p-text);
}
.main > h2, .gal-year h2 { color: var(--p-title); }

.intro {
  border: 2px solid var(--gold); border-left: 8px solid var(--c, var(--gold));
  border-radius: 14px; background: #fff; padding: 16px 20px; margin-bottom: 20px;
  color: var(--ink);
}
.intro h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: .3em; }
.intro .sk { color: var(--green); font-size: 1.1rem; font-weight: 500; }
.intro p { margin: 0 0 .6em; font-size: 1.25rem; }
.intro .tale { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 1.1rem; margin-bottom: .3em; }
.intro .tale strong { color: var(--maroon); }
.intro .temple { color: var(--maroon); font-size: 1.1rem; }

.stage {
  position: relative; width: 100%;
  height: clamp(420px, 76vh, 820px);
  background: #2a1209; border: 3px solid var(--gold); border-radius: 14px;
  overflow: hidden; user-select: none;
}
.stage img, .stage video, .stage iframe {
  width: 100%; height: 100%; object-fit: contain; border: 0; display: block;
}
.stage .bg {
  position: absolute; inset: -30px;
  background-size: cover; background-position: center;
  filter: blur(26px) brightness(.55) saturate(1.2);
}
.stage img { position: relative; z-index: 1; }
.stage video, .stage iframe { position: relative; z-index: 1; }
.zone { position: absolute; top: 0; bottom: 0; width: 50%; z-index: 2; }
.zone.l { left: 0; cursor: w-resize; }
.zone.r { right: 0; cursor: e-resize; }
.arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--gold); background: rgba(74,13,22,.75); color: var(--cream);
  font-size: 1.4rem; line-height: 1;
}
.arrow.l { left: 10px; } .arrow.r { right: 10px; }
.arrow:hover { background: var(--maroon); }
.arrow:disabled { opacity: .3; cursor: default; }
/* picture + story side by side on wide screens, stacked on narrow ones */
.el-grid { display: block; }
.story {
  background: #fff; color: var(--ink);
  border: 2px solid var(--gold); border-left: 8px solid var(--c, var(--gold));
  border-radius: 14px; margin-bottom: 16px;
}
.story summary {
  cursor: pointer; padding: 14px 18px; font-weight: 700; font-size: 1.25rem; color: var(--maroon);
  list-style: none;
}
.story summary::-webkit-details-marker { display: none; }
.story summary::after { content: " ▾"; color: var(--c, var(--gold)); }
.story[open] summary::after { content: " ▴"; }
.story-body { padding: 0 20px 16px; }
.story-body p { margin: 0 0 .8em; font-size: 1.18rem; }
.story-body h4 { margin: 1em 0 .3em; color: var(--green); font-size: 1.2rem; }
.story-body blockquote {
  margin: .8em 0 0; padding: 12px 16px; border-radius: 10px; font-style: italic; font-weight: 600;
  background: color-mix(in srgb, var(--c, var(--gold)) 16%, #fff);
  border-left: 5px solid var(--c, var(--gold)); color: var(--maroon);
}
@media (min-width: 1250px) {
  .el-grid { display: grid; grid-template-columns: minmax(340px, 470px) minmax(0, 1fr); gap: 22px; align-items: start; }
  .el-grid .story { order: 2; margin: 0; position: sticky; top: 0; max-height: calc(100vh - 110px); overflow-y: auto; }
  .el-grid .viewer { order: 1; }
  .el-grid.solo { display: block; max-width: 520px; margin: 0 auto; }
}
.hint { text-align: center; font-size: 1rem; color: var(--p-accent); margin: 6px 0 0; }

.info {
  margin-top: 14px; padding: 16px 20px;
  background: #fff; border: 2px solid var(--gold); border-radius: 14px;
  color: var(--ink);
}
.info h3 { margin-bottom: .3em; }
.info p { margin: 0; font-size: 1.25rem; }
.info h3 { font-size: 1.6rem; }
.counter { float: right; color: var(--green); font-size: 1.05rem; }
.thumbs {
  display: flex; gap: 8px; margin-top: 14px; padding: 4px 2px 8px;
  overflow-x: auto; scroll-behavior: smooth;
}
.thumbs button {
  flex: 0 0 auto; width: 56px; height: 84px; padding: 0;
  border: 2px solid transparent; border-radius: 8px; overflow: hidden;
  background: #2a1209; opacity: .65; transition: opacity .5s ease, transform .5s ease;
}
.thumbs button:hover { opacity: 1; }
.thumbs button.on { border-color: var(--maroon); opacity: 1; transform: translateY(-2px); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs .vid { color: #fff; font-size: 1.2rem; line-height: 80px; }
.dots { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.dots button {
  width: 12px; height: 12px; padding: 0; border-radius: 50%;
  border: 1.5px solid var(--maroon); background: transparent;
}
.dots button.on { background: var(--maroon); }

/* gallery */
.gal-year { margin-bottom: 28px; }
.gal-year h2 { border-bottom: 2px solid var(--gold); padding-bottom: 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.grid button {
  padding: 0; border: 2px solid var(--gold); border-radius: 10px; overflow: hidden;
  background: #2a1209; aspect-ratio: 4 / 3;
}
.grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1s ease; }
.grid button:hover img { transform: scale(1.06); }
.empty { text-align: center; color: var(--p-text); padding: 40px 0; }
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(30,8,10,.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px; gap: 12px; color: var(--cream);
}
.lightbox img { max-width: 100%; max-height: 78vh; border: 3px solid var(--gold); border-radius: 8px; }
.lightbox .close { position: absolute; top: 12px; right: 16px; font-size: 2rem; background: none; border: 0; color: var(--cream); }
.lightbox .arrow { position: absolute; }

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  body { font-size: 18px; }
  .split { flex-direction: column; }
  .side {
    flex: 0 0 auto; max-width: none; display: flex; gap: 8px;
    overflow-x: auto; overflow-y: hidden; padding: 8px;
  }
  .side a { flex: 0 0 auto; margin: 0; padding: 8px 12px; border-left-width: 2px; border-bottom: 5px solid var(--c, var(--gold)); }
  .side .txt small, .side .sep { display: none; }
  .divider { display: none; }
  .arrow { width: 36px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- footer ---------- */
.site-footer {
  flex: 0 0 auto;
  background: var(--maroon-dark); color: var(--cream);
  text-align: center; padding: 10px 84px 10px 16px; /* right gap keeps clear of the music button */
  font-size: .95rem; line-height: 1.5;
  border-top: 2px solid var(--gold);
}
.site-footer .f-main { display: flex; flex-wrap: wrap; gap: 2px 14px; justify-content: center; align-items: baseline; }
.site-footer strong { color: var(--turmeric); font-weight: 700; }
.site-footer a { color: var(--turmeric); text-decoration: none; border-bottom: 1px solid transparent; }
.site-footer a:hover { border-bottom-color: var(--turmeric); }
.site-footer .f-credit { opacity: .85; font-size: .88rem; }
.landing .site-footer { background: transparent; border-top: 0; color: var(--p-text); }
.landing .site-footer strong, .landing .site-footer a { color: var(--p-title); }
.golu .site-footer { padding-top: 6px; padding-bottom: 6px; font-size: .88rem; line-height: 1.4; }
@media (max-width: 720px) { .site-footer { padding: 10px 70px 10px 12px; } }

/* ---------- photo icons for theme tiles ---------- */
.ico.ph {
  display: inline-block; flex: 0 0 auto; overflow: hidden; border-radius: 50%;
  width: 46px; height: 46px; border: 2px solid var(--gold); background: #2a1209;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.ico.ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; display: block; }
.el-card .ico.ph { width: 78px; height: 78px; margin: 0 auto 6px; border-color: var(--c, var(--gold)); }
.intro h2 .ico.ph { width: 54px; height: 54px; border-color: var(--c, var(--gold)); }
.side a.active .ico.ph { border-color: var(--turmeric); }
@media (max-width: 720px) { .side .ico.ph { width: 34px; height: 34px; } }

/* ---------- what is Navarathiri Golu ---------- */
.about-wrap { max-width: 1040px; margin: 0 auto; padding: 28px 16px 40px; width: 100%; }
.about-wrap h1 { color: var(--p-title); text-align: center; font-size: clamp(2rem, 5.5vw, 3.1rem); margin-bottom: .3em; }
.about-cta { text-align: center; margin: 14px 0 22px; }
.about-cta.bottom { margin: 30px 0 70px; }
.about-grid { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); gap: 34px; align-items: start; }
.about-photo { margin: 0; position: sticky; top: 16px; }
.about-photo img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 30%; display: block;
  border: 3px solid var(--gold); border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.about-text p { font-size: 1.22rem; margin: 0 0 1em; color: var(--p-text); }
.about-text p.lead { font-size: 1.38rem; font-weight: 600; }
.about-text h2 { color: var(--p-title); font-size: 1.7rem; margin: 1.3em 0 .4em; }
@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; gap: 20px; }
  .about-photo { position: static; max-width: 340px; margin: 0 auto; }
  .about-photo img { aspect-ratio: 4 / 3; }
}

.story-body ul { margin: 0 0 .9em; padding-left: 1.25em; }
.story-body li { font-size: 1.12rem; margin-bottom: .45em; }
.story-body li::marker { color: var(--c, var(--gold)); }
