:root {
  --night: #120e2e;
  --night-2: #1c1645;
  --panel: rgba(255, 255, 255, .045);
  --line: rgba(232, 180, 90, .22);
  --gold: #e8b45a;
  --gold-soft: #f6d79b;
  --saffron: #f08a3c;
  --text: #f3eee2;
  --muted: #b9b1cf;
  --glow: #2d2270;
  --nav-bg: rgba(18, 14, 46, .78);
  --card-top: rgba(255, 255, 255, .06);
  --card-bottom: rgba(255, 255, 255, .02);
  --rule: rgba(255, 255, 255, .07);
  --band: rgba(255, 255, 255, .035);
  --radius: 18px;
  --max: 1140px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: "Inter", system-ui, sans-serif;
  background: radial-gradient(ellipse at 70% -10%, var(--glow) 0%, transparent 55%), var(--night);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; }

/* starfield */
.stars {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 10% 20%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 70%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 35%, #fff9 50%, transparent 51%),
    radial-gradient(1px 1px at 80% 15%, #fff7 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 60%, #fff5 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 20% 90%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 65% 85%, #fff5 50%, transparent 51%);
  background-size: 420px 420px;
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .55; } to { opacity: 1; } }

/* type */
h1, h2, h3 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; line-height: 1.15; }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 1rem; color: var(--gold-soft); }
h3 { font-size: 1.45rem; }
.ta, .ta-sub, .ta-inline { font-family: "Noto Serif Tamil", serif; }
.ta-inline { color: var(--gold-soft); }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .75rem; font-weight: 600; color: var(--saffron); margin-bottom: .6rem; }
.center { text-align: center; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--saffron));
  color: #241703; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; transition: transform .2s, box-shadow .2s;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px var(--saffron); }
.btn-ghost { background: transparent; color: var(--gold-soft); border-color: var(--gold); }
.btn-ghost:hover { background: rgba(232, 180, 90, .1); box-shadow: none; }
.btn-small { padding: .5rem 1.1rem; font-size: .9rem; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem max(16px, calc((100% - var(--max)) / 2));
  background: var(--nav-bg); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-family: "Cormorant Garamond", serif; font-size: 1.3rem; font-weight: 700; color: var(--gold-soft); }
.brand em { font-style: normal; font-weight: 500; color: var(--text); }
.brand-mark { width: 34px; height: 34px; color: var(--gold); flex: none; }
.nav-links { display: flex; align-items: center; gap: 1.8rem; }
.nav-links a:not(.btn) { text-decoration: none; color: var(--muted); font-size: .95rem; transition: color .2s; }
.nav-links a:not(.btn):hover { color: var(--gold-soft); }
.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; width: 24px; background: var(--gold-soft); margin: 6px auto; transition: transform .25s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* hero */
.hero {
  max-width: var(--max); margin: 0 auto; padding: 4rem 16px 1.75rem;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center;
}
.hero h1 .ta { display: block; font-size: clamp(2.2rem, 5vw, 3.6rem); color: var(--gold-soft); line-height: 1.35; font-weight: 700; }
.hero h1 .en { display: block; font-size: clamp(1.3rem, 2.4vw, 1.8rem); color: var(--text); margin-top: .6rem; font-weight: 500; }
.lead { color: var(--muted); font-size: 1.1rem; margin: 1.4rem 0 2rem; max-width: 34rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 2rem; font-size: .92rem; color: var(--muted); }
.stars-row { color: var(--gold); letter-spacing: .1em; }
.status::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: .5rem; vertical-align: middle; }
.status.open::before { background: #5fd38d; box-shadow: 0 0 8px #5fd38d; }
.status.closed::before { background: #e86a5a; }

.hero-art { display: flex; justify-content: center; }
.wheel { width: min(420px, 100%); height: auto; }
.ring-outer { transform-origin: 200px 200px; animation: spin 120s linear infinite; }
.ring-inner { transform-origin: 200px 200px; animation: spin 80s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ring-outer, .ring-inner, .stars { animation: none; }
}

/* sections */
.section { max-width: var(--max); margin: 0 auto; padding: 1.5rem 16px; }
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: center; }
.about p:not(.eyebrow) { color: var(--muted); margin-bottom: 1rem; font-size: 1.05rem; }
.facts { list-style: none; display: grid; gap: 1rem; }
.facts li { padding: 1.2rem 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; text-align: center; gap: .6rem; }
.facts strong { font-family: "Cormorant Garamond", serif; font-size: 1.8rem; color: var(--gold); white-space: nowrap; }
.facts span { color: var(--muted); font-size: .95rem; }

.profile-grid { display: grid; grid-template-columns: 1fr minmax(240px, 380px); gap: 3.5rem; align-items: center; }
.portrait { position: relative; margin: 0; order: 2; }
.portrait::before {
  content: ""; position: absolute; inset: -14px 14px 14px -14px;
  border: 1px solid var(--gold); border-radius: var(--radius); opacity: .5;
}
.portrait svg, .portrait img {
  position: relative; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 70% top;
  border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7);
}
.exp-badge {
  position: absolute; left: -18px; top: 28px;
  display: flex; align-items: center; gap: .6rem;
  padding: .8rem 1.1rem; border-radius: 14px;
  background: linear-gradient(135deg, var(--gold), var(--saffron)); color: #241703;
  box-shadow: 0 16px 34px -14px var(--saffron);
}
.exp-badge strong { font-family: "Cormorant Garamond", serif; font-size: 2.6rem; line-height: 1; }
.exp-badge span { font-size: .78rem; font-weight: 600; line-height: 1.25; text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 900px) { .exp-badge { left: 8px; } }
.ta-sub.big { font-size: 1.2rem; margin-top: -.4rem; }
.role { color: var(--text); font-weight: 500; margin-bottom: 1.2rem; }
.profile-text p:not(.eyebrow):not(.role):not(.ta-sub) { color: var(--muted); margin-bottom: 1rem; font-size: 1.05rem; }
.specialties { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.4rem 0 2rem; }
.specialties li { padding: .4rem 1rem; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; color: var(--gold-soft); background: var(--panel); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
.card {
  padding: 2rem; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card-top), var(--card-bottom));
  border: 1px solid var(--line); transition: transform .25s, border-color .25s;
}
.card:hover { transform: translateY(-6px); border-color: var(--gold); }
.card-icon { width: 56px; height: 56px; color: var(--gold); margin-bottom: 1.2rem; }
.card-icon svg { width: 100%; height: 100%; }
.ta-sub { color: var(--saffron); font-size: .95rem; margin: .2rem 0 .8rem; }
.card p:last-child { color: var(--muted); }

/* alternating full-width background bands (every other section) */
main > section { position: relative; }
html:not([data-bands="off"]) main > section:nth-child(even)::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw);
  background: var(--band); z-index: -1; pointer-events: none;
}

/* background styles chosen in the admin panel */
html[data-bg="plain"] body { background: var(--night); }
html[data-bg="gradient"] body { background: linear-gradient(180deg, var(--night-2) 0%, var(--night) 60%) fixed; }
html[data-bg="plain"] .stars, html[data-bg="gradient"] .stars { display: none; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 2.5rem; counter-reset: s; }
.steps li { text-align: center; padding: 0 1rem; }
.num {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--gold); color: var(--gold); font-family: "Cormorant Garamond", serif; font-size: 1.5rem; margin-bottom: 1rem;
}
.steps p { color: var(--muted); margin-top: .4rem; }

.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.5rem; }
.panel { padding: 2.2rem; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.hours { width: 100%; border-collapse: collapse; margin-top: .5rem; }
.hours th, .hours td { padding: .7rem .6rem; border-bottom: 1px solid var(--rule); text-align: left; font-weight: 400; }
.hours td { text-align: right; color: var(--muted); }
.hours tr.today { background: rgba(232, 180, 90, .1); }
.hours tr.today th, .hours tr.today td { color: var(--gold-soft); font-weight: 600; }
.note { margin-top: 1rem; font-size: .9rem; color: var(--muted); }
.review { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; }
.review p:not(.eyebrow) { color: var(--muted); margin-bottom: 1.2rem; }
.big-rating { font-family: "Cormorant Garamond", serif; font-size: 5rem; line-height: 1; color: var(--gold-soft); }
.stars-row.big { font-size: 1.6rem; }

.contact { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1.5rem; margin-top: 2.5rem; }
.contact-info { padding: 2.2rem; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 1.6rem; }
.info-row h3 { font-size: 1rem; font-family: "Inter", sans-serif; text-transform: uppercase; letter-spacing: .14em; color: var(--saffron); margin-bottom: .4rem; }
address { font-style: normal; color: var(--text); }
.phone { font-family: "Cormorant Garamond", serif; font-size: 2rem; color: var(--gold-soft); text-decoration: none; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: auto; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-height: 360px; }
.map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; filter: saturate(.85); }

.footer { text-align: center; padding: 3rem 16px 5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
.footer .ta { color: var(--gold-soft); font-size: 1.2rem; margin-bottom: .4rem; }
.footer a { color: var(--gold-soft); }
.footer .small { margin-top: .6rem; font-size: .8rem; opacity: .7; }

.fab {
  display: none; position: fixed; right: 16px; bottom: 16px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%; place-items: center;
  background: linear-gradient(135deg, var(--gold), var(--saffron)); box-shadow: 0 10px 30px -8px var(--saffron);
}
.fab svg { width: 26px; height: 26px; fill: #241703; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 2rem; padding-bottom: .5rem; text-align: center; }
  .hero-text { min-width: 0; }
  .hero h1 .ta { font-size: min(3.2rem, 7.4vw); }
  .hero-art { order: -1; }
  .wheel { width: min(280px, 80%); }
  .lead { margin-inline: auto; }
  .hero-cta, .hero-meta { justify-content: center; }
  .about-grid, .split, .contact, .profile-grid { grid-template-columns: 1fr; }
  .profile-grid { gap: 2.5rem; }
  .portrait { max-width: 320px; margin: 0 auto; order: 0; }
  .cards, .steps { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: .5rem 16px 1.2rem;
    background: var(--night-2); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: .8rem 0; width: 100%; text-align: center; }
  .nav-links .btn { margin-top: .6rem; }
  .brand { font-size: 1.1rem; }
  .brand em { display: none; }
  .fab { display: grid; }
  .section { padding: 1.15rem 16px; }
  .panel, .contact-info, .card { padding: 1.5rem; }
  .facts strong { font-size: 1.5rem; }
}

/* language switch */
.nav-links a.lang {
  padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 999px;
  color: var(--gold-soft); font-size: .88rem;
}
.nav-links a.lang:hover { border-color: var(--gold); }
.nav-links a.lang[lang="ta"] { font-family: "Noto Sans Tamil", "Noto Serif Tamil", sans-serif; }

/* Tamil page */
html[lang="ta"] body { font-family: "Noto Sans Tamil", "Inter", system-ui, sans-serif; line-height: 1.8; }
html[lang="ta"] h2, html[lang="ta"] h3, html[lang="ta"] .brand,
html[lang="ta"] .facts strong { font-family: "Noto Serif Tamil", "Cormorant Garamond", serif; }
html[lang="ta"] [lang="en"] { font-family: "Inter", system-ui, sans-serif; }
html[lang="ta"] h1 .en, html[lang="ta"] .ta-sub[lang="en"] { font-family: "Cormorant Garamond", Georgia, serif; }
html[lang="ta"] h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); line-height: 1.4; }
html[lang="ta"] h3 { font-size: 1.15rem; line-height: 1.5; }
html[lang="ta"] .eyebrow { text-transform: none; letter-spacing: .04em; font-size: .85rem; }
html[lang="ta"] .brand { font-size: 1.05rem; }
html[lang="ta"] .nav-links { gap: 1.1rem; }
html[lang="ta"] .nav-links a:not(.btn) { font-size: .9rem; }
html[lang="ta"] .facts strong { font-size: 1.35rem; }
html[lang="ta"] .exp-badge span { text-transform: none; letter-spacing: 0; font-size: .82rem; }
html[lang="ta"] .lead { font-size: 1.02rem; }
html[lang="ta"] .hours td { font-size: .92rem; }
@media (max-width: 1400px) and (min-width: 761px) {
  html[lang="ta"] .brand em { display: none; }
}
html[lang="ta"] .info-row h3 { font-family: "Noto Sans Tamil", sans-serif; text-transform: none; letter-spacing: 0; font-size: 1rem; }

/* keep each time range together; let the two ranges wrap as a pair */
.hours td span { white-space: nowrap; display: inline-block; }
@media (max-width: 760px) {
  .hours th, .hours td { padding: .6rem .4rem; }
  .hours td { font-size: .88rem; }
  .exp-badge { top: 12px; left: 12px; padding: .5rem .75rem; gap: .45rem; border-radius: 12px; }
  .exp-badge strong { font-size: 1.9rem; }
  .exp-badge span { font-size: .66rem; }
  html[lang="ta"] .exp-badge span { font-size: .72rem; }
}
@media (max-width: 760px) {
  .nav-links a.lang { width: auto; padding: .35rem 1.3rem; margin: .4rem auto 0; }
}

/* uploaded logo (admin panel) */
.brand-logo { object-fit: contain; border-radius: 6px; }

/* menu with the jathagam link: keep items on one line, tighten on mid-size screens */
.nav-links a { white-space: nowrap; }
@media (max-width: 1240px) and (min-width: 761px) {
  .nav-links { gap: 1.1rem; }
  .nav-links a:not(.btn) { font-size: .88rem; }
  .brand em { display: none; }
}

/* Tamil menu words are longer: shorter brand on desktop, tap-to-open menu below 1150px */
@media (min-width: 1151px) {
  html[lang="ta"] .brand em { display: none; }
  html[lang="ta"] .nav-links { gap: 1rem; }
  html[lang="ta"] .nav-links a:not(.btn) { font-size: .88rem; }
}
@media (max-width: 1150px) {
  html[lang="ta"] .nav-toggle { display: block; }
  html[lang="ta"] .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: .5rem 16px 1.2rem;
    background: var(--night-2); border-bottom: 1px solid var(--line);
    display: none;
  }
  html[lang="ta"] .nav-links.open { display: flex; }
  html[lang="ta"] .nav-links a:not(.btn) { padding: .8rem 0; width: 100%; text-align: center; font-size: .95rem; }
  html[lang="ta"] .nav-links a.lang { width: auto; padding: .35rem 1.3rem; margin: .4rem auto 0; }
  html[lang="ta"] .nav-links .btn { margin-top: .6rem; }
  html[lang="ta"] .brand em { display: inline; }
}

/* link inside a service card (e.g. Marriage Matching -> porutham tool) */
.card { display: flex; flex-direction: column; }
.card-link { margin-top: auto; padding-top: 1.1rem; color: var(--gold-soft); font-weight: 600; text-decoration: none; font-size: .95rem; }
.card-link:hover { color: var(--gold); text-decoration: underline; }
