/* Sarveshwar Mahadev Jyotirling Dham Trust — design system */

:root {
  --bg: #fdfaf4;
  --bg-alt: #f7f1e4;
  --surface: #ffffff;
  --surface-2: #f8f3e8;
  --border: #e5dac4;
  --text: #2b2119;
  --muted: #79695a;
  --accent: #b4461a;
  --accent-2: #dd8b1c;
  --accent-ink: #ffffff;
  --deep: #3d1520;
  --deep-2: #55202c;
  --danger: #b3261e;
  --success: #2f7d4f;
  --radius: 8px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Marcellus", Georgia, "Times New Roman", serif;
  --font-deva: "Noto Serif Devanagari", var(--font-display);
  --shell: min(1160px, 100% - 2.5rem);
  --grad: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.7rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.shell { width: var(--shell); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--tight { padding: clamp(2.75rem, 5.5vw, 4rem) 0; }
.section--alt { background: var(--bg-alt); }
.section--deep { background: var(--deep); color: #f6ece0; }
.section--deep h2, .section--deep h3 { color: #fff; }
.section--deep .lede, .section--deep p { color: #dcc9b8; }
.section--deep .eyebrow { color: var(--accent-2); }
.muted { color: var(--muted); }
.lede { font-size: clamp(1.03rem, 1.5vw, 1.19rem); color: var(--muted); max-width: 64ch; line-height: 1.8; }
.center { text-align: center; margin-inline: auto; }
.deva { font-family: var(--font-deva); }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; padding: 0.7rem 1.1rem; background: var(--accent); color: #fff; }
.skip-link:focus { left: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 1.6rem; height: 1px; background: var(--grad); }
.eyebrow--center { justify-content: center; }

/* ------------------------------------------------------------- header */

.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.header.is-scrolled { border-bottom-color: var(--border); box-shadow: 0 6px 24px -20px #2b2119; }
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 4.6rem; }

.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--text); }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-text { display: grid; line-height: 1.2; }
.brand-text b { font-family: var(--font-display); font-weight: 400; font-size: 1.12rem; letter-spacing: 0.01em; }
.brand-text span { font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 1.9rem; }
.nav a:not(.btn) { font-size: 0.93rem; color: var(--muted); text-decoration: none; position: relative; padding: 0.3rem 0; transition: color 0.15s ease; }
.nav a:not(.btn):hover, .nav a:not(.btn)[aria-current="page"] { color: var(--text); }
.nav a:not(.btn)[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--grad); border-radius: 2px; }
.nav-cta { margin-left: 0.3rem; }

.nav-toggle {
  display: none; margin-left: auto; width: 2.6rem; height: 2.6rem; padding: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); cursor: pointer;
}
.nav-toggle svg { margin-inline: auto; }

@media (max-width: 900px) {
  .nav {
    position: absolute; inset: 100% 0 auto; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.5rem 1.25rem 1.25rem; background: var(--bg); border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 0.85rem 0; border-bottom: 1px solid var(--border); }
  .nav a:not(.btn)[aria-current="page"]::after { display: none; }
  .nav-cta { margin: 1rem 0 0; text-align: center; }
  .nav-toggle { display: block; }
}

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.78rem 1.5rem;
  font: inherit; font-size: 0.94rem; font-weight: 600;
  border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 10px 24px -14px var(--accent); }
.btn--primary:hover { box-shadow: 0 16px 30px -14px var(--accent); }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--onDeep { background: #fff; color: var(--deep); }
.btn--onDeep:hover { background: #ffeede; }
.btn--lg { padding: 0.95rem 1.85rem; font-size: 1rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* --------------------------------------------------------------- hero */

.hero { position: relative; overflow: hidden; padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(3rem, 7vw, 5rem); background: var(--bg-alt); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background:
    radial-gradient(38rem 24rem at 88% -12%, color-mix(in srgb, var(--accent-2) 30%, transparent), transparent 62%),
    radial-gradient(30rem 20rem at -6% 100%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%);
}
.hero > * { position: relative; }
.hero-grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
@media (min-width: 940px) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; } }
.hero h1 em { font-style: normal; color: var(--accent); }

.sanskrit {
  padding: 1.5rem 1.75rem;
  border-left: 3px solid var(--accent-2);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border-radius: 0 10px 10px 0;
}
.sanskrit p { margin: 0 0 0.4rem; font-family: var(--font-deva); font-size: 1.3rem; line-height: 1.6; color: var(--text); }
.sanskrit span { font-size: 0.86rem; color: var(--muted); font-style: italic; }

.emblem { width: min(320px, 78%); margin-inline: auto; }

/* -------------------------------------------------------------- cards */

.cards { display: grid; gap: 1.1rem; }
.cards--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); }
.cards--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }

.card {
  position: relative; padding: 1.8rem;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.card--link:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-3px); box-shadow: 0 20px 40px -32px #2b2119; }
.card h3 { margin-bottom: 0.45rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.94rem; }
.card a.stretched::after { content: ""; position: absolute; inset: 0; }
.card-icon {
  width: 2.9rem; height: 2.9rem; margin-bottom: 1.2rem; display: grid; place-items: center;
  border-radius: 50%; background: color-mix(in srgb, var(--accent-2) 18%, transparent); color: var(--accent);
}
.card-link { margin-top: 1rem; display: inline-flex; gap: 0.4rem; font-size: 0.88rem; font-weight: 600; color: var(--accent); text-decoration: none; }

.tick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.tick-list li { position: relative; padding-left: 1.7rem; color: var(--muted); font-size: 0.95rem; line-height: 1.7; }
.tick-list li::before { content: ""; position: absolute; left: 0.15rem; top: 0.7em; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--grad); }
.tick-list strong { color: var(--text); font-weight: 600; }

.split { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split--aside { grid-template-columns: 1.2fr 0.8fr; } }

.panel { padding: clamp(1.5rem, 3vw, 2.1rem); border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 1.5rem; }
.stat b { display: block; font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.4rem); color: var(--accent); }
.stat span { font-size: 0.85rem; color: var(--muted); }
.section--deep .stat b { color: var(--accent-2); }
.section--deep .stat span { color: #cbb6a4; }

.quote { padding: 2rem 2.2rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.quote p { font-family: var(--font-display); font-size: clamp(1.15rem, 2.1vw, 1.5rem); line-height: 1.55; margin-bottom: 1rem; }
.quote footer { font-size: 0.86rem; color: var(--muted); }

.steps { display: grid; gap: 1rem; counter-reset: s; }
.step { position: relative; padding: 1.6rem 1.7rem 1.6rem 4.3rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.step::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 1.6rem; top: 1.6rem;
  width: 1.9rem; height: 1.9rem; display: grid; place-items: center;
  border-radius: 50%; font-family: var(--font-display); font-size: 0.95rem;
  background: color-mix(in srgb, var(--accent-2) 20%, transparent); color: var(--accent);
}
.step h3 { margin-bottom: 0.3rem; font-size: 1.08rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.94rem; }

.faq-item { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.faq-item + .faq-item { margin-top: 0.7rem; }
.faq-item button {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.2rem 1.4rem; font: 400 1.05rem var(--font-display); text-align: left; color: var(--text);
  background: none; border: 0; cursor: pointer;
}
.faq-item button::after { content: "+"; color: var(--accent); flex: none; font-size: 1.2rem; }
.faq-item.is-open button::after { content: "\2212"; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.faq-item.is-open .faq-answer { max-height: 24rem; }
.faq-answer p { margin: 0; padding: 0 1.4rem 1.35rem; color: var(--muted); font-size: 0.94rem; }

.cta-band {
  position: relative; overflow: hidden;
  padding: clamp(2.6rem, 6vw, 4.2rem);
  border-radius: 18px; color: #f6ece0;
  background: linear-gradient(140deg, var(--deep-2), var(--deep) 62%);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #dcc9b8; max-width: 54ch; }

/* ------------------------------------------------------------- footer */

.footer { background: var(--deep); color: #cbb6a4; padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; }
.footer-grid { display: grid; gap: 2.5rem; }
@media (min-width: 780px) { .footer-grid { grid-template-columns: 1.7fr repeat(3, 1fr); } }
.footer .brand { color: #fff; }
.footer .brand-text span { color: #a58d7d; }
.footer h4 { font-family: var(--font); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: #a58d7d; margin-bottom: 1.1rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.footer a { color: #cbb6a4; text-decoration: none; font-size: 0.92rem; }
.footer a:hover { color: #fff; }
.footer p { font-size: 0.92rem; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.85rem; color: #a58d7d;
}
.social { display: flex; gap: 0.55rem; }
.social a { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 1px solid rgba(255,255,255,0.18); border-radius: 50%; }
.social a:hover { border-color: var(--accent-2); color: #fff; }

[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card--link:hover { transform: none; }
}

.contact-card { padding: 1.4rem 1.5rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.contact-card + .contact-card { margin-top: 0.9rem; }
.contact-card h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.contact-card a { font-size: 0.95rem; text-decoration: none; }
.contact-card p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.88rem; }

/* Headings that wrap a link should read as headings, not as links. */
.card h3 a, .cell h3 a, .step h3 a { color: inherit; text-decoration: none; }

/* auto-fit packs as many columns as will fit, which leaves an orphaned card on
   the second row (5 cards became 4+1, 6 became 4+2). Three columns at desktop
   keeps the rows balanced. */
@media (min-width: 1000px) {
  .cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
