/* =========================================================
   Vailongara Kalari — traditional layout, modern feel
   Colours: temple maroon, lamp gold, sandalwood cream
   ========================================================= */
:root {
  --maroon: #6E1414;
  --maroon-2: #8E1F1F;
  --maroon-deep: #3E0B0B;
  --gold: #B8862B;
  --gold-soft: #E3BE72;
  --gold-pale: #F4E3BC;
  --cream: #FBF6EC;
  --sand: #F3E8D3;
  --ink: #2A1A12;
  --muted: #6B5646;
  --line: #E4D3B4;
  --white: #FFFFFF;
  --radius: 14px;
  --shadow: 0 18px 40px -22px rgba(62, 11, 11, .45);
  --max: 1180px;
  --serif: 'Cormorant Garamond', 'Noto Serif Malayalam', Georgia, serif;
  --display: 'Marcellus', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', 'Noto Sans Malayalam', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ml: 'Noto Serif Malayalam', serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--cream); line-height: 1.65; font-size: 17px; }
img { max-width: 100%; display: block; }
a { color: var(--maroon-2); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; color: var(--maroon-deep); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.55rem; }
p { margin: 0 0 1em; }
.ml { font-family: var(--ml); }
.container { width: min(var(--max), 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--maroon); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 10px; }

/* ---------- small ornaments ---------- */
.eyebrow { font-family: var(--display); letter-spacing: .22em; text-transform: uppercase; font-size: .78rem; color: var(--gold); display: inline-flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.eyebrow::before, .eyebrow::after { content: ''; width: 34px; height: 1px; background: currentColor; opacity: .7; }
.center { text-align: center; }
.center .eyebrow { justify-content: center; }
.divider { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--gold); margin: 6px auto 26px; }
.divider::before, .divider::after { content: ''; height: 1px; width: min(120px, 22vw); background: linear-gradient(90deg, transparent, var(--gold-soft)); }
.divider::after { transform: scaleX(-1); }
.divider svg { width: 26px; height: 26px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 720px; }
.center .lead { margin-inline: auto; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 999px; font-weight: 600; font-size: .98rem; text-decoration: none; border: 1.5px solid transparent; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; cursor: pointer; }
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: linear-gradient(135deg, var(--gold-soft), var(--gold)); color: var(--maroon-deep); box-shadow: 0 10px 24px -12px rgba(184, 134, 43, .9); }
.btn-ghost { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.btn-maroon { background: var(--maroon); color: #fff; }
.btn-maroon:hover { background: var(--maroon-2); }
.btn svg { width: 20px; height: 20px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251, 246, 236, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--maroon-deep); }
.brand img { width: 48px; height: 48px; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.45rem; line-height: 1; }
.brand-sub { display: block; font-family: var(--display); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-top: 4px; }
.menu { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.menu a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: .95rem; }
.menu a:hover { color: var(--maroon-2); }
.menu .btn { color: #fff; padding: 11px 20px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--maroon-deep); }
.nav-toggle svg { width: 28px; height: 28px; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(92vh, 860px); display: grid; align-items: end; color: #fff; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30, 6, 6, .25) 0%, rgba(30, 6, 6, .35) 40%, rgba(30, 6, 6, .88) 100%); }
.hero-content { position: relative; z-index: 2; padding: 120px 0 90px; }
.hero .eyebrow { color: var(--gold-soft); }
.hero-ml { font-family: var(--ml); font-weight: 700; font-size: clamp(1.7rem, 4.2vw, 3.2rem); line-height: 1.45; margin: 0 0 14px; color: #fff; max-width: 900px; }
.hero-en { font-family: var(--serif); font-size: clamp(1.25rem, 2.2vw, 1.7rem); color: var(--gold-pale); margin-bottom: 30px; max-width: 760px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-frame { position: absolute; inset: 18px; border: 1px solid rgba(227, 190, 114, .35); z-index: 1; pointer-events: none; }

/* ---------- stats strip ---------- */
.stats { background: var(--maroon-deep); color: var(--gold-pale); }
.stats .container { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 30px 18px; text-align: center; border-right: 1px solid rgba(227, 190, 114, .18); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-family: var(--serif); font-size: 2.3rem; color: var(--gold-soft); line-height: 1.1; }
.stat span { font-size: .9rem; letter-spacing: .04em; }

/* ---------- sections ---------- */
section { padding: 100px 0; }
.bg-sand { background: var(--sand); }
.bg-maroon { background: radial-gradient(circle at 20% 0%, var(--maroon-2), var(--maroon-deep) 70%); color: var(--gold-pale); }
.bg-maroon h2, .bg-maroon h3 { color: #fff; }
.bg-maroon .lead { color: var(--gold-pale); }
.pattern { background-image: radial-gradient(rgba(184, 134, 43, .12) 1px, transparent 1.2px); background-size: 18px 18px; }

/* ---------- heritage + lineage ---------- */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.heritage-text p { color: var(--muted); }
.quote { font-family: var(--serif); font-size: 1.5rem; font-style: italic; color: var(--maroon); border-left: 3px solid var(--gold); padding-left: 18px; margin: 24px 0; }
.wide-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); position: relative; }
.wide-img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.wide-img::after { content: ''; position: absolute; inset: 12px; border: 1px solid rgba(255, 236, 196, .6); border-radius: 8px; pointer-events: none; }

.lineage { margin-top: 70px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; position: relative; }
.lineage::before { content: ''; position: absolute; left: 6%; right: 6%; top: 34%; height: 2px; background: linear-gradient(90deg, transparent, var(--gold-soft), transparent); z-index: 0; }
.gen { position: relative; z-index: 1; text-align: center; }
.arch { position: relative; border-radius: 999px 999px 12px 12px; overflow: hidden; border: 3px solid var(--gold-soft); box-shadow: var(--shadow); background: var(--maroon-deep); }
.arch img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.gen .num { display: inline-block; margin-top: 14px; font-family: var(--display); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.gen h4 { font-family: var(--serif); font-size: 1.15rem; margin: 4px 0 0; color: var(--maroon-deep); }
.gen.current .arch { border-color: var(--gold); border-width: 4px; }

/* ---------- acharya feature ---------- */
.acharya { display: grid; grid-template-columns: .9fr 1.1fr; gap: 70px; align-items: center; }
.acharya .arch { max-width: 460px; margin-inline: auto; border-width: 4px; }
.acharya .arch img { aspect-ratio: 10/13; }
.acharya-frame { position: relative; padding: 18px; }
.acharya-frame::before { content: ''; position: absolute; inset: 0; border: 1px solid rgba(227, 190, 114, .45); border-radius: 999px 999px 18px 18px; }
.acharya h2 { margin-bottom: 4px; }
.acharya .role { font-family: var(--display); letter-spacing: .16em; text-transform: uppercase; font-size: .8rem; color: var(--gold-soft); margin-bottom: 22px; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 50px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 30px; position: relative; transition: transform .25s ease, box-shadow .25s ease; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card::before { content: ''; position: absolute; top: 0; left: 30px; right: 30px; height: 3px; background: linear-gradient(90deg, var(--gold-soft), var(--gold)); border-radius: 0 0 4px 4px; }
.card .icon { width: 54px; height: 54px; border-radius: 50%; background: var(--sand); display: grid; place-items: center; color: var(--maroon); margin-bottom: 18px; }
.card .icon svg { width: 28px; height: 28px; }
.card p { color: var(--muted); font-size: .98rem; }
.card .meta { margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .9rem; color: var(--muted); }
.card .price { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--maroon); }

/* ---------- poojas ---------- */
.pooja-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 26px; margin-top: 50px; }
.pooja-feature { border-radius: var(--radius); overflow: hidden; position: relative; min-height: 440px; color: #fff; display: flex; align-items: flex-end; box-shadow: var(--shadow); }
.pooja-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pooja-feature::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(30, 6, 6, .9)); }
.pooja-feature .inner { position: relative; z-index: 1; padding: 34px; }
.pooja-feature h3 { color: #fff; font-size: 2rem; }
.pooja-feature .price { color: var(--gold-soft); font-family: var(--serif); font-size: 1.5rem; }
.pooja-list { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; }
.pooja-list ul { list-style: none; margin: 18px 0 0; padding: 0; }
.pooja-list li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.pooja-list li:last-child { border-bottom: 0; }
.pooja-list li svg { flex: none; width: 22px; height: 22px; color: var(--gold); margin-top: 4px; }
.pooja-list strong { font-family: var(--serif); font-size: 1.3rem; color: var(--maroon-deep); display: block; }
.pooja-list span { color: var(--muted); font-size: .95rem; }
.days { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.days span { background: var(--sand); color: var(--maroon); border-radius: 999px; padding: 6px 14px; font-size: .85rem; font-weight: 600; }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 120px; gap: 16px; margin-top: 50px; }
.gallery figure { margin: 0; position: relative; min-height: 0; }
.gallery button { display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; position: relative; background: var(--maroon-deep); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gallery button:hover img { transform: scale(1.05); }
.g1 { grid-column: span 7; grid-row: span 4; }
.g2 { grid-column: span 5; grid-row: span 2; }
.g3 { grid-column: span 5; grid-row: span 2; }
.g4 { grid-column: span 4; grid-row: span 3; }
.g5 { grid-column: span 4; grid-row: span 3; }
.g6 { grid-column: span 4; grid-row: span 3; }
.gallery figcaption { position: absolute; left: 14px; bottom: 12px; color: #fff; font-family: var(--serif); font-size: 1.1rem; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.lightbox { position: fixed; inset: 0; background: rgba(20, 5, 5, .94); display: none; align-items: center; justify-content: center; z-index: 100; padding: 30px; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 88vh; border-radius: 8px; }
.lightbox button { position: absolute; top: 18px; right: 22px; background: none; border: 0; color: #fff; font-size: 2.4rem; cursor: pointer; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 50px; counter-reset: step; }
.step { text-align: center; padding: 10px 14px; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; border: 2px solid var(--gold-soft); color: var(--gold-soft); font-family: var(--serif); font-size: 1.8rem; font-weight: 700; }
.step h3 { font-size: 1.3rem; }
.step p { font-size: .95rem; }

/* ---------- visit ---------- */
.visit { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: stretch; }
.timings { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; }
.timings table { width: 100%; border-collapse: collapse; margin: 10px 0 20px; }
.timings td { padding: 13px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.timings td:first-child { color: var(--muted); padding-right: 16px; }
.timings td:last-child { font-weight: 600; text-align: right; }
.map { border-radius: var(--radius); overflow: hidden; min-height: 420px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }

/* ---------- faq ---------- */
.faq { max-width: 860px; margin: 40px auto 0; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; padding: 0 24px; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 0; font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--maroon-deep); display: flex; justify-content: space-between; gap: 20px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--gold); font-size: 1.6rem; line-height: 1; }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }

/* ---------- contact / form ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 50px; }
.contact-list { list-style: none; padding: 0; margin: 24px 0 0; }
.contact-list li { display: flex; gap: 14px; margin-bottom: 18px; }
.contact-list svg { width: 22px; height: 22px; color: var(--gold-soft); flex: none; margin-top: 4px; }
.form { background: var(--white); color: var(--ink); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.form label { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
.form input, .form select, .form textarea { width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; font-size: 1rem; background: var(--cream); margin-bottom: 16px; color: var(--ink); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--gold); background: #fff; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form small { color: var(--muted); display: block; margin-top: 10px; }
.form-status { margin-top: 12px; font-weight: 600; }
.form-status.ok { color: #1E7A46; }
.form-status.err { color: var(--maroon-2); }

/* ---------- footer ---------- */
.site-footer { background: #1E0707; color: #D9C7A8; padding: 70px 0 28px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h4 { font-family: var(--display); color: var(--gold-soft); letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; margin: 0 0 16px; }
.site-footer a { color: #D9C7A8; text-decoration: none; }
.site-footer a:hover { color: var(--gold-soft); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.footer-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.footer-brand img { width: 58px; }
.footer-brand strong { font-family: var(--serif); font-size: 1.5rem; color: #fff; }
.footer-bottom { border-top: 1px solid rgba(227, 190, 114, .15); margin-top: 50px; padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .85rem; color: #A89377; }

/* ---------- floating WhatsApp ---------- */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 60px; height: 60px; border-radius: 50%; background: #25D366; display: grid; place-items: center; box-shadow: 0 12px 26px -10px rgba(0, 0, 0, .5); transition: transform .2s ease; }
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 32px; height: 32px; color: #fff; }

/* ---------- legal pages ---------- */
.page-hero { background: radial-gradient(circle at 20% 0%, var(--maroon-2), var(--maroon-deep) 70%); color: #fff; padding: 80px 0 60px; text-align: center; }
.page-hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.4rem); }
.page-hero p { color: var(--gold-pale); margin: 0; }
.legal { max-width: 820px; margin: 0 auto; padding: 70px 0 90px; }
.legal h2 { font-size: 1.8rem; margin-top: 2em; }
.legal p, .legal li { color: #4A3628; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal .box { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; padding: 20px 24px; margin: 24px 0; }
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; background: #fff; }
.legal th, .legal td { border: 1px solid var(--line); padding: 12px 14px; text-align: left; }
.legal th { background: var(--sand); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .lineage { grid-template-columns: repeat(3, 1fr); }
  .lineage::before { display: none; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  body { font-size: 16px; }
  section { padding: 72px 0; }
  .nav-toggle { display: block; }
  .menu { position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--cream); border-bottom: 1px solid var(--line); padding: 8px 20px 20px; display: none; }
  .menu.open { display: flex; }
  .menu li a { display: block; padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .menu li:last-child a { border: 0; margin-top: 12px; justify-content: center; }
  .split, .acharya, .pooja-grid, .visit, .contact, .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .cards { grid-template-columns: 1fr; }
  .stats .container { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat { border-bottom: 1px solid rgba(227, 190, 114, .18); }
  .gallery { grid-auto-rows: 90px; }
  .g1 { grid-column: span 12; grid-row: span 3; }
  .g2, .g3 { grid-column: span 6; grid-row: span 2; }
  .g4, .g5, .g6 { grid-column: span 12; grid-row: span 3; }
  .hero-content { padding: 100px 0 64px; }
  .form .row { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 560px) {
  .lineage { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .steps { grid-template-columns: 1fr; }
  .brand-name { font-size: 1.2rem; }
  .brand img { width: 40px; height: 40px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .pooja-feature { min-height: 380px; }
}
