/* Sri Veera Brahmendra Swamy Temple — one static page. Colours match the apps (plum, gold, kavi). */
:root {
  --plum: #6E1E44; --plum-deep: #3A1230; --night: #1E0818; --gold: #E7B860; --gold-light: #F3D48C;
  --kavi: #C1512A; --ivory: #FBF6EC; --text: #2B1622; --muted: #6E5560; --card: #FFFFFF;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Hind", "Noto Sans Telugu", system-ui, -apple-system, "Segoe UI", sans-serif;
  --te: "Noto Sans Telugu", "Hind", system-ui, sans-serif;
  --r: 22px; --gutter: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--text); background: var(--ivory); line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; }

/* Language switch: <span lang="te"> / <span lang="en"> pairs */
html[data-lang="en"] [lang="te"]:not(html), html[data-lang="te"] [lang="en"]:not(html) { display: none !important; }
html[data-lang="te"] body { font-family: var(--te); }
html[data-lang="te"] h2, html[data-lang="te"] blockquote { font-family: var(--te); font-weight: 700; letter-spacing: 0; }

/* Header */
.top { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 10px max(var(--gutter), env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(30,8,24,.92), rgba(30,8,24,.72)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(243,212,140,.18); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold-light); min-width: 0; }
.brand img { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.brand b { font-family: var(--serif); font-size: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
html[data-lang="te"] .brand b { font-family: var(--te); font-size: 16px; }
.nav { display: none; margin-left: auto; gap: 26px; }
.nav a { color: #F6E7CC; text-decoration: none; font-size: 15px; letter-spacing: .3px; opacity: .9; }
.nav a:hover { color: var(--gold-light); opacity: 1; }
.lang { margin-left: auto; flex: none; border: 1px solid rgba(243,212,140,.55); background: rgba(0,0,0,.25); color: var(--gold-light);
  border-radius: 999px; padding: 7px 14px; font: 600 14px var(--te); cursor: pointer; min-height: 40px; }
.lang:hover { background: rgba(243,212,140,.12); }
@media (min-width: 860px) { .nav { display: flex; } .lang { margin-left: 18px; } }

/* Hero */
.hero { position: relative; color: #FFF3DA; padding: calc(84px + env(safe-area-inset-top)) var(--gutter) 40px;
  background: radial-gradient(120% 80% at 70% 10%, #7A2B4E 0%, var(--plum-deep) 50%, var(--night) 100%);
  display: grid; gap: 28px; overflow: hidden; }
.eyebrow { margin: 0; color: var(--gold); font-size: 15px; letter-spacing: 1.6px; text-transform: uppercase; }
html[data-lang="te"] .eyebrow { letter-spacing: 0; text-transform: none; font-size: 17px; }
h1 { margin: 10px 0 0; line-height: 1.08; }
.h1-te { display: block; font-family: var(--te); font-weight: 700; font-size: clamp(30px, 7.6vw, 54px); color: var(--gold-light); }
.h1-en { display: block; font-family: var(--serif); font-weight: 700; font-size: clamp(30px, 7vw, 60px); margin-top: 6px; }
.lead { font-size: 18px; max-width: 34em; color: #F2E2C8; margin: 18px 0 0; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.btn.gold { background: linear-gradient(135deg, #F8E2A6, #D49A3A); color: #3A1230; box-shadow: 0 8px 24px rgba(212,154,58,.35); }
.btn.ghost { border: 1px solid rgba(243,212,140,.6); color: var(--gold-light); }
.btn:hover { transform: translateY(-1px); }
.btn.disabled { opacity: .85; cursor: default; margin-top: 18px; }
.btn.disabled:hover { transform: none; }

/* Layered shrine scene */
.scene-wrap { display: flex; justify-content: center; }
.scene { position: relative; width: min(100%, 460px); aspect-ratio: 1792 / 2400; border-radius: 28px; overflow: hidden; container-type: size;
  box-shadow: 0 30px 70px rgba(0,0,0,.5), 0 0 0 1px rgba(243,212,140,.28); transform: translateZ(0); }
.scene .layer, .scene .rays, .scene .flames { position: absolute; will-change: transform; }
.scene .layer img { display: block; }
.scene > img.layer:first-child { transform: scale(1.06); }
.rays { inset: 0; mix-blend-mode: screen; pointer-events: none;
  background: conic-gradient(from 160deg at 52% 9%, transparent 0deg, rgba(255,226,160,.18) 8deg, transparent 16deg, rgba(255,226,160,.12) 26deg, transparent 34deg, rgba(255,226,160,.16) 44deg, transparent 52deg);
  animation: rays 9s ease-in-out infinite alternate; }
@keyframes rays { from { opacity: .55; } to { opacity: 1; } }
.flames { inset: 0; pointer-events: none; }
.flames i { position: absolute; width: calc(var(--h) * 0.62 * 100cqh / 2400); height: calc(var(--h) * 100cqh / 2400);
  transform: translate(-50%, -100%); transform-origin: 50% 100%; border-radius: 50% 50% 45% 45% / 62% 62% 38% 38%;
  background: radial-gradient(ellipse at 50% 72%, #FFF6D6 0 22%, #FFC75A 45%, rgba(229,118,42,.55) 70%, transparent 74%);
  mix-blend-mode: screen; filter: blur(.3px); animation: flick 1.6s ease-in-out infinite; }
.flames i::after { content: ""; position: absolute; left: 50%; top: 55%; width: 420%; height: 300%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,190,90,.38), transparent 62%); }
.flames i:nth-child(2n) { animation-duration: 1.25s; animation-delay: -.4s; }
.flames i:nth-child(3n) { animation-duration: 1.9s; animation-delay: -.9s; }
@keyframes flick { 0%,100% { transform: translate(-50%,-100%) scale(1,1) skewX(0); } 30% { transform: translate(-50%,-100%) scale(.94,1.08) skewX(2deg); }
  60% { transform: translate(-50%,-100%) scale(1.04,.95) skewX(-2deg); } }
.motes { position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(1.6px 1.6px at 38% 30%, rgba(255,230,170,.9), transparent), radial-gradient(1.2px 1.2px at 55% 42%, rgba(255,230,170,.8), transparent),
    radial-gradient(1.4px 1.4px at 47% 18%, rgba(255,230,170,.8), transparent), radial-gradient(1px 1px at 62% 26%, rgba(255,230,170,.7), transparent),
    radial-gradient(1.3px 1.3px at 44% 50%, rgba(255,230,170,.7), transparent), radial-gradient(1.5px 1.5px at 58% 12%, rgba(255,230,170,.8), transparent);
  animation: motes 14s linear infinite; mix-blend-mode: screen; }
@keyframes motes { from { transform: translateY(6%); opacity: .2; } 50% { opacity: 1; } to { transform: translateY(-10%); opacity: .2; } }

@media (min-width: 900px) {
  .hero { grid-template-columns: 1.1fr .9fr; align-items: center; padding: 120px max(48px, 6vw) 80px; min-height: 92vh; }
  .scene { width: min(100%, 470px); }
}

/* Sections */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.band { padding: 64px 0; }
.two { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .two { grid-template-columns: 1.1fr .9fr; gap: 64px; } .two.rev { grid-template-columns: 1fr 1fr; } .band { padding: 96px 0; } }
.kicker { margin: 0; color: var(--kavi); font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; font-size: 14px; }
html[data-lang="te"] .kicker { letter-spacing: 0; text-transform: none; font-size: 16px; }
.kicker.light { color: var(--gold); }
h2 { font-family: var(--serif); font-size: clamp(28px, 5.4vw, 44px); line-height: 1.15; margin: 8px 0 18px; color: var(--plum-deep); }
h2.light { color: #FFF3DA; }
.card-img { margin: 0; border-radius: var(--r); overflow: hidden; box-shadow: 0 18px 44px rgba(58,18,48,.22); }
.card-img img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.card-img.wide img { aspect-ratio: 3 / 2; }
.ticks { list-style: none; padding: 0; margin: 0 0 20px; }
.ticks li { position: relative; padding-left: 28px; margin: 10px 0; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(231,184,96,.22); }
.note { border-left: 3px solid var(--kavi); background: #FFF; padding: 14px 16px; border-radius: 0 14px 14px 0; color: var(--muted); }

/* Kalagnanam band */
.kala { background: linear-gradient(135deg, #7A2B4E, #B8532A 60%, #E59A4A); color: #FFF6E6; text-align: center; padding: 64px 0; }
.kala blockquote { margin: 14px auto 10px; max-width: 26em; font-family: var(--serif); font-size: clamp(24px, 5vw, 38px); line-height: 1.3; font-weight: 600; }
.muted { opacity: .8; margin: 0; }

/* App */
.app { background: radial-gradient(120% 90% at 20% 0%, #6E1E44, var(--plum-deep) 55%, var(--night)); color: #F2E2C8; padding: 72px 0; overflow: hidden; }
.feat { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.feat li { display: flex; gap: 12px; align-items: center; font-size: 17px; }
.feat b { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: rgba(243,212,140,.14); font-size: 18px; color: var(--gold-light); }
.phones { display: flex; justify-content: center; gap: 12px; }
.phones img { width: 31%; max-width: 200px; height: auto; aspect-ratio: 420 / 937; object-fit: cover; border-radius: 22px; border: 5px solid #120610; box-shadow: 0 20px 40px rgba(0,0,0,.45); }
.phones img:nth-child(2) { transform: translateY(-18px); }

/* Gallery */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
.grid figure { margin: 0; border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 10px 26px rgba(58,18,48,.14); }
.grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .5s ease; }
.grid figure:hover img { transform: scale(1.04); }
.grid figcaption { padding: 10px 12px; font-size: 15px; color: var(--plum-deep); font-weight: 600; }

/* Location + footer */
.location { background: var(--plum-deep); color: #F2E2C8; padding: 64px 0; }
.addr { font-size: 17px; margin: 0; }
.addr b { display: block; color: var(--gold-light); font-size: 19px; margin-bottom: 6px; }
.map { border-radius: var(--r); overflow: hidden; box-shadow: 0 18px 44px rgba(0,0,0,.4); border: 1px solid rgba(243,212,140,.3); background: #2a1222; }
.map iframe { display: block; width: 100%; height: 340px; border: 0; }
@media (min-width: 900px) { .map iframe { height: 420px; } .location { padding: 96px 0; } }
.foot { background: var(--night); color: #C9A98F; text-align: center; font-size: 14px; padding: 22px var(--gutter) calc(22px + env(safe-area-inset-bottom)); }
.foot p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rays, .flames i, .motes { animation: none; }
  .scene .layer, .scene .rays, .scene .flames { transform: none !important; }
  .scene > img.layer:first-child { transform: scale(1.06) !important; }
}
@media (max-width: 420px) { .brand b { font-size: 17px; } html[data-lang="te"] .brand b { font-size: 14px; } .brand img { width: 34px; height: 34px; } .lang { padding: 6px 12px; } }
