/* ============================================================================
   Sanskriti 365 — Design System
   Saffron / Marigold / Gold, warm paper, modern sans typography.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --saffron: #e2661f;
  --saffron-deep: #b8461a;
  --saffron-dark: #8c3310;
  --marigold: #f5a623;
  --marigold-light: #ffc861;
  --gold: #cf9f45;
  --gold-line: #e8c682;
  --gold-soft: #f7e6c2;
  --cream: #fffaf2;
  --cream-2: #fdf1de;
  --paper: #fffdf9;
  --ink: #2a1a11;
  --ink-2: #4a3527;
  --ink-3: #7a6455;
  --ink-4: #a2907f;
  --red: #d00000;
  --red-deep: #a30000;
  --green: #1f7a4d;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(74, 40, 15, .06), 0 2px 8px rgba(74, 40, 15, .05);
  --shadow: 0 2px 4px rgba(74, 40, 15, .05), 0 12px 28px -10px rgba(122, 60, 15, .18);
  --shadow-lg: 0 4px 10px rgba(74, 40, 15, .07), 0 28px 60px -18px rgba(110, 55, 12, .32);

  --sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial,
          "Noto Sans Devanagari", "Nirmala UI", "Kohinoor Devanagari", sans-serif;
  --serif-dev: "Noto Serif Devanagari", "Nirmala UI", "Kohinoor Devanagari", serif;

  --header-h: 72px;
  --shell: 1180px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 12% -8%, rgba(245, 166, 35, .22), transparent 45%),
    radial-gradient(circle at 92% 4%, rgba(226, 102, 31, .14), transparent 42%),
    radial-gradient(circle at 50% 108%, rgba(207, 159, 69, .16), transparent 55%);
  background-attachment: fixed;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--saffron-deep); text-decoration-color: rgba(184, 70, 26, .35); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

:focus-visible {
  outline: 3px solid var(--saffron);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--saffron-dark); color: #fff; padding: 12px 18px; border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

/* Devanagari reading comfort */
html[data-lang="hi"] body {
  font-family: "Noto Sans Devanagari", "Nirmala UI", "Kohinoor Devanagari", var(--sans);
  line-height: 1.78;
}
html[data-lang="hi"] .hero-title,
html[data-lang="hi"] .page-title,
html[data-lang="hi"] .history-title { letter-spacing: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 250, 242, .88);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(207, 159, 69, .35);
}
.site-header::after {
  content: ""; display: block; height: 3px;
  background: linear-gradient(90deg, var(--saffron-deep), var(--marigold) 42%, var(--gold) 70%, var(--saffron-deep));
}

.header-inner {
  max-width: var(--shell); margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 18px;
  min-height: var(--header-h);
}

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); flex: 0 0 auto; }
.brand-mark { width: 42px; height: 42px; flex: 0 0 auto; filter: drop-shadow(0 3px 8px rgba(184, 70, 26, .28)); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.12rem; font-weight: 800; letter-spacing: -.02em; }
.brand-365 {
  background: linear-gradient(135deg, var(--saffron), var(--marigold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-text small { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }

.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link {
  position: relative; padding: 9px 14px; border-radius: 999px;
  font-size: .9rem; font-weight: 600; color: var(--ink-2); text-decoration: none;
  transition: background .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.nav-link:hover { background: rgba(245, 166, 35, .14); color: var(--saffron-dark); }
.nav-link.active {
  background: linear-gradient(135deg, var(--saffron), #ee7f34);
  color: #fff; box-shadow: 0 4px 12px -4px rgba(184, 70, 26, .55);
}

.header-actions { display: flex; align-items: center; gap: 10px; }

.lang-toggle {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--gold-line); background: #fff;
  font-size: .82rem; font-weight: 700; color: var(--ink-3);
  transition: border-color .2s, box-shadow .2s, transform .12s;
}
.lang-toggle:hover { border-color: var(--marigold); box-shadow: 0 3px 10px -4px rgba(184, 70, 26, .4); }
.lang-toggle:active { transform: scale(.97); }
.lang-toggle [data-lang-label] { padding: 0 3px; opacity: .5; transition: opacity .2s, color .2s; }
.lang-toggle [data-lang-label].is-active { opacity: 1; color: var(--saffron-deep); }
.lang-sep { opacity: .35; }

.menu-btn {
  display: none; width: 42px; height: 42px; border-radius: 12px;
  border: 1.5px solid var(--gold-line); background: #fff; cursor: pointer;
  padding: 11px 10px; gap: 4px; flex-direction: column; justify-content: center;
}
.menu-btn span { display: block; height: 2px; border-radius: 2px; background: var(--saffron-deep); transition: transform .22s var(--ease), opacity .18s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Mandatory disclaimer ---------- */
.disclaimer {
  background: var(--red);
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, .22);
}
.disclaimer p {
  max-width: var(--shell); margin: 0 auto;
  padding: 9px 20px;
  font-size: .8rem; font-weight: 700; line-height: 1.5;
  letter-spacing: .005em;
  text-align: center;
  text-wrap: balance;
}
.disclaimer--top p { font-size: .78rem; }
.disclaimer p { text-shadow: 0 1px 0 rgba(0, 0, 0, .18); }

/* ---------- Main / views ---------- */
.site-main { max-width: var(--shell); margin: 0 auto; padding: 0 20px 80px; }
.site-main:focus { outline: none; }
.view { animation: viewIn .38s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; margin: 26px 0 10px;
  border-radius: var(--radius-lg); overflow: hidden;
  background:
    radial-gradient(120% 120% at 88% 0%, rgba(255, 200, 97, .55), transparent 55%),
    linear-gradient(140deg, #fff6e6 0%, #ffeed6 42%, #ffe2c0 100%);
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow);
  padding: clamp(28px, 5vw, 56px);
  isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 10px; border: 1px solid rgba(207, 159, 69, .5);
  border-radius: calc(var(--radius-lg) - 8px); pointer-events: none;
}
.hero-mandala {
  position: absolute; right: -90px; top: 50%; transform: translateY(-50%);
  width: min(560px, 82vw); color: rgba(184, 70, 26, .16);
  z-index: -1; pointer-events: none;
}
.hero-mandala svg { width: 100%; height: auto; animation: spin 160s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero-mandala svg { animation: none; } }

.hero-content { position: relative; max-width: 720px; }
.eyebrow {
  margin: 0 0 10px; font-size: .74rem; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase; color: var(--saffron-deep);
}
html[data-lang="hi"] .eyebrow { letter-spacing: .04em; }
.hero-title {
  margin: 0 0 12px;
  font-size: clamp(2.1rem, 6.2vw, 3.6rem);
  font-weight: 850; letter-spacing: -.035em; line-height: 1.03;
  color: var(--saffron-dark);
  background: linear-gradient(120deg, #7d2c0b 0%, #c2451c 45%, #e2861f 78%, #a8511a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { margin: 0; max-width: 60ch; font-size: 1.02rem; color: var(--ink-2); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-stat {
  display: inline-flex; align-items: baseline; gap: 7px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .72); border: 1px solid rgba(207, 159, 69, .45);
  font-size: .8rem; color: var(--ink-2); font-weight: 600;
}
.hero-stat b { font-size: 1rem; color: var(--saffron-deep); font-weight: 850; }

/* ---------- Aagami Parv ---------- */
.aagami {
  margin: 26px 0 30px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fffdf9 0%, #fff7ea 100%);
  border: 1.5px solid var(--gold-line);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.aagami-label {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 22px 0;
}
.aagami-label h2 {
  margin: 0; font-size: .78rem; font-weight: 900; letter-spacing: .18em;
  text-transform: uppercase; color: var(--saffron-deep);
}
html[data-lang="hi"] .aagami-label h2 { letter-spacing: .05em; }
.aagami-label-en {
  font-size: .76rem; font-weight: 600; color: var(--ink-4);
  padding-left: 10px; border-left: 1px solid var(--gold-line);
}
.pulse-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--saffron);
  box-shadow: 0 0 0 0 rgba(226, 102, 31, .6); animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(226, 102, 31, .55); }
  70% { box-shadow: 0 0 0 12px rgba(226, 102, 31, 0); }
  100% { box-shadow: 0 0 0 0 rgba(226, 102, 31, 0); }
}
.aagami-body { display: grid; grid-template-columns: 1.25fr .75fr; gap: 22px; padding: 14px 22px 22px; }
.aagami-left { min-width: 0; }
.aagami-eyebrow { margin: 0; font-size: .88rem; color: var(--ink-3); font-weight: 600; }
.aagami-name {
  margin: 2px 0 2px; font-size: clamp(1.7rem, 4.4vw, 2.5rem); font-weight: 850;
  letter-spacing: -.03em; line-height: 1.1; color: var(--ink);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.aagami-name .fest-emoji { font-size: .85em; }
.aagami-name-hi { font-family: var(--serif-dev); font-size: .68em; color: var(--saffron-deep); font-weight: 700; }
.aagami-meta { margin: 8px 0 14px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .86rem; color: var(--ink-3); }
.aagami-meta b { color: var(--ink-2); font-weight: 700; }
.aagami-story { margin: 0 0 18px; color: var(--ink-2); font-size: .95rem; }
.aagami-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.countdown-card {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 6px; text-align: center; padding: 20px 16px;
  border-radius: var(--radius); color: #fff;
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(255, 200, 97, .55), transparent 60%),
    linear-gradient(150deg, var(--saffron-deep), var(--saffron) 55%, #ed8a2c);
  box-shadow: 0 14px 30px -16px rgba(140, 51, 16, .8);
  position: relative; overflow: hidden;
}
.countdown-card::after {
  content: "ॐ"; position: absolute; right: -8px; bottom: -34px;
  font-size: 7rem; line-height: 1; color: rgba(255, 255, 255, .1);
  font-family: var(--serif-dev); pointer-events: none;
}
.countdown-num { font-size: clamp(2.6rem, 7vw, 3.6rem); font-weight: 850; line-height: 1; letter-spacing: -.04em; }
.countdown-unit { font-size: .78rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; opacity: .92; }
.countdown-sub { font-size: .78rem; opacity: .9; margin-top: 6px; }
.countdown-date { font-size: .82rem; font-weight: 700; margin-top: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; border: 1.5px solid transparent;
  font-family: inherit;
  font-size: .88rem; font-weight: 750; cursor: pointer; text-decoration: none;
  transition: transform .12s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s, border-color .2s;
  white-space: nowrap; line-height: 1.25;
}
.btn:active { transform: scale(.975); }
.btn-primary {
  background: linear-gradient(135deg, var(--saffron), #f0801f 60%, var(--marigold));
  color: #fff; box-shadow: 0 8px 18px -10px rgba(184, 70, 26, .95), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary:hover { box-shadow: 0 12px 24px -10px rgba(184, 70, 26, .95); transform: translateY(-1px); }
.btn-ghost {
  background: #fff; color: var(--saffron-deep); border-color: var(--gold-line);
}
.btn-ghost:hover { border-color: var(--marigold); background: #fffaf0; }
.btn-quiet {
  background: transparent; color: var(--ink-3); border-color: transparent; padding: 8px 10px;
}
.btn-quiet:hover { color: var(--saffron-deep); background: rgba(245, 166, 35, .12); }
.btn-sm { padding: 9px 14px; font-size: .8rem; line-height: 1.2; }
.fest-foot .btn svg { width: 15px; height: 15px; }
.fest-foot .btn { min-width: 0; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }

.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--saffron-deep); font-weight: 700; font-size: inherit;
  text-decoration: underline; text-decoration-color: rgba(184, 70, 26, .4); text-underline-offset: 3px;
}
.link-btn:hover { text-decoration-color: currentColor; }

/* ---------- Toolbar / search / filters ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  margin: 30px 0 20px;
}
.search-wrap { position: relative; flex: 1 1 280px; min-width: 220px; }
.search-icon {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; fill: none; stroke: var(--ink-4); stroke-width: 2; stroke-linecap: round;
  pointer-events: none;
}
.search-input {
  width: 100%; padding: 13px 44px 13px 44px;
  border-radius: 999px; border: 1.5px solid var(--gold-line);
  background: #fff; font-size: .92rem;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s;
}
.search-input::placeholder { color: var(--ink-4); }
.search-input:focus { outline: none; border-color: var(--marigold); box-shadow: 0 0 0 4px rgba(245, 166, 35, .18); }

.filter-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--gold-line); background: #fff;
  font-size: .78rem; font-weight: 700; color: var(--ink-3);
  transition: all .18s var(--ease);
}
.chip:hover { border-color: var(--marigold); color: var(--saffron-deep); }
.chip.is-active {
  background: var(--saffron-dark); border-color: var(--saffron-dark); color: #fff;
  box-shadow: 0 6px 14px -8px rgba(140, 51, 16, .9);
}

.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-title { margin: 0; font-size: 1.18rem; font-weight: 850; letter-spacing: -.02em; }
.list-count { font-size: .8rem; color: var(--ink-4); font-weight: 700; }

/* ---------- Festival grid ---------- */
.festival-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.fest-card {
  position: relative; display: flex; flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid rgba(207, 159, 69, .38);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s;
}
.fest-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--gold-line); }
.fest-card.is-next { border-color: var(--saffron); box-shadow: 0 0 0 2px rgba(226, 102, 31, .18), var(--shadow); }

.fest-top {
  position: relative;
  padding: 18px 20px 14px;
  background:
    radial-gradient(140% 100% at 100% 0%, rgba(255, 200, 97, .5), transparent 58%),
    linear-gradient(135deg, #fff8ec, #fff2df);
  border-bottom: 1px solid rgba(207, 159, 69, .3);
}
.fest-top::after {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(rgba(184, 70, 26, .22) .8px, transparent .8px);
  background-size: 12px 12px;
  -webkit-mask-image: linear-gradient(120deg, transparent 40%, #000 100%);
  mask-image: linear-gradient(120deg, transparent 40%, #000 100%);
}
.fest-badges { position: relative; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; z-index: 1; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  font-size: .66rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  background: rgba(255, 255, 255, .82); color: var(--saffron-deep);
  border: 1px solid rgba(207, 159, 69, .55);
}
.badge--next { background: var(--saffron-dark); color: #fff; border-color: var(--saffron-dark); }
.badge--est { background: #fdf3d7; color: #8a6a12; border-color: #e6cd8b; }
.fest-emoji-chip {
  position: relative; z-index: 1;
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(150deg, #fff, #ffeed6);
  border: 1px solid var(--gold-line);
  box-shadow: 0 6px 14px -8px rgba(140, 60, 15, .55);
  font-size: 1.5rem; margin-bottom: 10px;
}
.fest-name {
  position: relative; z-index: 1;
  margin: 0; font-size: 1.3rem; font-weight: 850; letter-spacing: -.025em; line-height: 1.18;
}
.fest-name-hi {
  position: relative; z-index: 1;
  margin: 3px 0 0; font-family: var(--serif-dev); font-size: .98rem; font-weight: 700;
  color: var(--saffron-deep);
}

.fest-body { padding: 16px 20px 0; flex: 1; }
.fest-tithi {
  display: inline-flex; align-items: flex-start; gap: 7px;
  margin: 0 0 12px; padding: 7px 12px; border-radius: 10px;
  background: #fdf6e8; border: 1px dashed rgba(207, 159, 69, .7);
  font-size: .78rem; font-weight: 650; color: #7a561d; line-height: 1.45;
}
.fest-tithi svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; }

.fest-story { margin: 0 0 12px; font-size: .9rem; color: var(--ink-2); }
.fest-story.is-clamped {
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.fest-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .78rem; color: var(--ink-3); margin-bottom: 12px; }
.fest-meta span { display: inline-flex; align-items: center; gap: 5px; }
.fest-meta svg { width: 13px; height: 13px; fill: none; stroke: var(--gold); stroke-width: 2; }

.regional { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.regional span {
  font-size: .7rem; font-weight: 700; color: var(--ink-3);
  padding: 3px 9px; border-radius: 999px; background: #f9f3e6; border: 1px solid #efe0c4;
}
.regional span b { color: var(--saffron-deep); font-weight: 800; }

.fest-foot {
  display: flex; gap: 8px; align-items: center;
  padding: 14px 20px 18px; margin-top: auto;
  border-top: 1px solid rgba(207, 159, 69, .26);
  background: linear-gradient(#fffdf9, #fffaf1);
}
.fest-foot .btn { flex: 1 1 auto; }
.fest-foot .btn-icon-only { flex: 0 0 auto; width: 42px; height: 42px; padding: 0; border-radius: 50%; }
.fest-foot svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.empty-state { text-align: center; color: var(--ink-3); padding: 40px 20px; font-size: .95rem; }

/* ---------- History (Phase 2) ---------- */
.history-shell {
  position: relative; margin: 30px 0; padding: clamp(30px, 6vw, 64px);
  border-radius: var(--radius-lg); overflow: hidden;
  background:
    radial-gradient(100% 90% at 50% 0%, rgba(255, 200, 97, .38), transparent 58%),
    linear-gradient(180deg, #fffaf0, #fff6e7 60%, #ffeed7);
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow);
  text-align: center;
  isolation: isolate;
}
.history-shell::before {
  content: ""; position: absolute; inset: 12px; border: 1px solid rgba(207, 159, 69, .45);
  border-radius: calc(var(--radius-lg) - 10px); pointer-events: none;
}
.history-ornament {
  width: clamp(120px, 22vw, 176px); margin: 0 auto 18px; color: var(--saffron-deep); opacity: .75;
}
.history-title {
  margin: 0 0 12px; font-size: clamp(2rem, 6vw, 3.2rem); font-weight: 850; letter-spacing: -.035em;
  line-height: 1.05;
  background: linear-gradient(120deg, #7d2c0b, #c2451c 50%, #e2861f);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.history-lead {
  margin: 0 auto 14px; max-width: 46ch;
  font-size: clamp(1rem, 2.4vw, 1.18rem); font-weight: 650; color: var(--ink-2);
}
.history-body { margin: 0 auto 30px; max-width: 62ch; color: var(--ink-3); font-size: .95rem; }
.history-pillars {
  list-style: none; margin: 0 auto 32px; padding: 0; max-width: 900px;
  display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  text-align: left;
}
.history-pillars li {
  display: flex; gap: 12px; padding: 16px 18px;
  border-radius: var(--radius); background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(207, 159, 69, .45);
}
.history-pillars li > span {
  font-size: .74rem; font-weight: 900; color: var(--marigold);
  letter-spacing: .06em; padding-top: 2px;
}
.history-pillars strong { display: block; font-size: .92rem; margin-bottom: 2px; }
.history-pillars p { margin: 0; font-size: .82rem; color: var(--ink-3); line-height: 1.55; }

/* ---------- Suggest form ---------- */
.suggest-shell {
  max-width: 760px; margin: 32px auto 0;
  padding: clamp(24px, 5vw, 44px);
  border-radius: var(--radius-lg);
  background: var(--paper); border: 1px solid var(--gold-line);
  box-shadow: var(--shadow);
}
.page-title { margin: 0 0 10px; font-size: clamp(1.8rem, 4.6vw, 2.5rem); font-weight: 850; letter-spacing: -.03em; }
.page-lead { margin: 0 0 28px; color: var(--ink-3); font-size: .96rem; max-width: 62ch; }

.suggest-form { display: grid; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.field label { font-size: .82rem; font-weight: 800; color: var(--ink-2); letter-spacing: .01em; }
.field .req { color: var(--red); }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--gold-line); background: #fff; font-size: .92rem;
  transition: border-color .2s, box-shadow .2s;
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--marigold); box-shadow: 0 0 0 4px rgba(245, 166, 35, .16);
}
.field.has-error input, .field.has-error textarea { border-color: var(--red); box-shadow: 0 0 0 3px rgba(208, 0, 0, .1); }
.field-error { font-size: .76rem; color: var(--red-deep); font-weight: 700; }
.field-row { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.char-count { position: absolute; right: 10px; bottom: 8px; font-size: .7rem; color: var(--ink-4); font-weight: 700; background: #fff; padding: 0 4px; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.form-note { margin: 0; font-size: .76rem; color: var(--ink-4); }
.form-status:empty { display: none; }
.form-status {
  padding: 13px 16px; border-radius: 12px; font-size: .87rem; font-weight: 650;
  border: 1.5px solid transparent; line-height: 1.5;
}
.form-status.is-success { background: #edf9f1; border-color: #b7e2c8; color: #14603a; }
.form-status.is-error { background: #fff0f0; border-color: #f3c2c2; color: var(--red-deep); }
.form-status.is-info { background: #fff8e8; border-color: #f0dcae; color: #7a561d; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 40px;
  background: linear-gradient(180deg, #fff8ec, #fdefd8);
  border-top: 1px solid rgba(207, 159, 69, .45);
}
.footer-inner { max-width: var(--shell); margin: 0 auto; padding: 34px 20px 26px; }
.footer-top { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: flex-start; }
.footer-brand strong { font-size: 1rem; font-weight: 850; color: var(--saffron-dark); }
.footer-brand p { margin: 4px 0 0; font-size: .82rem; color: var(--ink-3); max-width: 46ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; font-weight: 650; }
.footer-links a { color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--saffron-deep); text-decoration: underline; }

.visit-count {
  margin: 22px 0 0; padding: 9px 14px; display: inline-flex; border-radius: 999px;
  background: #fff; border: 1px solid rgba(207, 159, 69, .5);
  font-size: .8rem; font-weight: 700; color: var(--ink-2);
}
#visit-count { display: inline-flex; align-items: center; gap: 6px; }

.credits {
  margin-top: 20px; padding-top: 18px;
  border-top: 1px dashed rgba(207, 159, 69, .6);
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  font-size: .78rem; color: var(--ink-3); font-weight: 600;
}
.credits a { color: var(--saffron-deep); }
.credit-dot { color: var(--gold); opacity: .8; }

/* ---------- Toasts ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  z-index: 200; max-width: min(520px, calc(100vw - 32px));
  padding: 13px 20px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: .85rem; font-weight: 650;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: opacity .24s var(--ease), transform .24s var(--ease);
  text-align: center;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast[hidden] { display: none; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 18px; }
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(42, 26, 17, .55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: fadeIn .2s ease both;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal-panel {
  position: relative; width: min(560px, 100%); max-height: calc(100dvh - 36px);
  overflow: auto; padding: 20px;
  border-radius: var(--radius-lg); background: var(--paper);
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow-lg);
  animation: panelIn .28s var(--ease) both;
}
.modal-panel--story { width: min(720px, 100%); }
@keyframes panelIn { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.modal-head h2 { margin: 0; font-size: 1.06rem; font-weight: 850; letter-spacing: -.02em; }
.icon-btn {
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--gold-line); background: #fff; cursor: pointer; color: var(--ink-3);
  transition: all .18s;
}
.icon-btn:hover { color: var(--saffron-deep); border-color: var(--marigold); background: #fffaf0; }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.modal-preview {
  border-radius: var(--radius); overflow: hidden; background: #f7edda;
  display: grid; place-items: center; min-height: 200px;
  border: 1px solid rgba(207, 159, 69, .4);
}
.modal-preview img, .modal-preview canvas { width: 100%; height: auto; display: block; }
.modal-preview .spinner { margin: 46px auto; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions .btn { flex: 1 1 auto; }
.modal-note { margin: 10px 0 0; font-size: .74rem; color: var(--ink-4); text-align: center; }

.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(207, 159, 69, .3); border-top-color: var(--saffron);
  animation: rotate .9s linear infinite;
}
@keyframes rotate { to { transform: rotate(360deg); } }

/* Story modal */
.story-body { font-size: .93rem; color: var(--ink-2); }
.story-body h3 {
  margin: 20px 0 6px; font-size: .74rem; font-weight: 900; letter-spacing: .16em;
  text-transform: uppercase; color: var(--saffron-deep);
}
html[data-lang="hi"] .story-body h3 { letter-spacing: .04em; }
.story-body h3:first-child { margin-top: 0; }
.story-body p { margin: 0 0 12px; }
.story-body .story-tithi {
  margin: 0 0 18px; padding: 12px 14px; border-radius: 12px;
  background: #fdf6e8; border: 1px dashed rgba(207, 159, 69, .75);
  font-size: .82rem; font-weight: 700; color: #7a561d;
}
.story-body .regional { margin-bottom: 6px; }
.story-respect {
  margin-top: 18px; padding: 12px 14px; border-radius: 12px;
  background: #fff4f4; border: 1px solid #f2c9c9; color: var(--red-deep);
  font-size: .78rem; font-weight: 700;
}

/* ============================================================================
   SANKALP CARD — 1080 × 1080 render target
   Kept off-screen (not display:none, html2canvas needs layout).
   ========================================================================== */
.sankalp-stage {
  position: fixed; left: -20000px; top: 0;
  width: 1080px; height: 1080px; pointer-events: none; z-index: -1;
}
.sankalp-card {
  position: relative; width: 1080px; height: 1080px; overflow: hidden;
  color: #fff4dc;
  font-family: var(--sans);
  background:
    radial-gradient(90% 70% at 50% -10%, rgba(255, 214, 128, .55), transparent 62%),
    radial-gradient(120% 90% at 50% 118%, rgba(120, 30, 0, .55), transparent 58%),
    linear-gradient(155deg, #e2661f 0%, #cf5218 42%, #a83c10 72%, #8c2f0b 100%);
}
.sankalp-card * { box-sizing: border-box; }
.sc-watermark {
  position: absolute; inset: -12%; opacity: .2; color: #ffe3ac;
  display: grid; place-items: center;
}
.sc-watermark svg { width: 100%; height: 100%; }
.sc-frame {
  position: absolute; inset: 34px;
  border: 3px solid rgba(255, 216, 150, .85);
  border-radius: 20px;
  padding: 46px 52px 38px;
  display: flex; flex-direction: column;
  box-shadow: inset 0 0 0 10px rgba(255, 216, 150, .14), inset 0 0 90px rgba(90, 20, 0, .35);
}
.sc-frame::before {
  content: ""; position: absolute; inset: 14px; border: 1px solid rgba(255, 216, 150, .45); border-radius: 12px;
}
.sc-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 62px;
}
.sc-brand {
  display: flex; align-items: center; gap: 14px;
  font-size: 25px; font-weight: 800; letter-spacing: .3em; line-height: 1.2;
  color: #ffe6b8; white-space: nowrap;
}
.sc-brand-mark { width: 44px; height: 44px; flex: 0 0 auto; color: #ffe6b8; }

/* Category pill — fixed-height capsule, optically centred.
   ------------------------------------------------------------------------
   The spec used across the app is a 36px capsule with 14px type, 8px/20px
   padding and line-height:1. This card is a 1080px render target (2x the
   ~540px design scale, matching 104px titles and a 44px brand mark), so the
   same proportions are expressed at 2x via the tokens below — the alignment
   *mechanism* is identical, only the numbers scale.

   Why line-height:1 matters: any line-height above 1 adds half-leading above
   and below the glyphs, so a capsule sized by its content is never truly
   symmetric. With line-height:1 the line box equals the em box, and a fixed
   height + flex centring puts that box dead in the middle. Vertical padding is
   zero for the same reason — padding-top/bottom asymmetry is what pushes text
   off-centre. */
.sankalp-card {
  --sc-pill-h: 56px;        /* 36px spec x 1080/700 scale */
  --sc-pill-fs: 28px;       /* 14px spec x 2 */
  --sc-pill-fs-dev: 27px;   /* Devanagari runs slightly taller; nudge down */
  --sc-pill-pad-x: 20px;
}
.sc-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  height: var(--sc-pill-h);
  min-height: var(--sc-pill-h);
  max-height: var(--sc-pill-h);
  /* Vertical padding stays 0: flex centring owns the axis, so there is no
     padding-top / padding-bottom asymmetry to fight. */
  padding: 0 var(--sc-pill-pad-x);
  line-height: 1;
  font-family: var(--sans);
  font-size: var(--sc-pill-fs);
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
  color: #ffdfa6;
  border: 1.5px solid rgba(255, 216, 150, .6);
  border-radius: 999px;
  flex: 0 0 auto;
  overflow: visible;
}
/* Devanagari: keep the same capsule geometry, adjust the type only. */
.sc-kicker.is-dev {
  font-family: var(--serif-dev);
  font-size: var(--sc-pill-fs-dev);
  line-height: 1;
  padding: 0 var(--sc-pill-pad-x);
}

.sc-om {
  position: absolute; right: 58px; top: 122px;
  font-family: var(--serif-dev); font-size: 190px; line-height: 1;
  color: rgba(255, 228, 175, .14); font-weight: 700;
}
.sc-main { margin: auto 0; position: relative; z-index: 2; text-align: center; }
.sc-eyebrow {
  margin: 0 0 14px; font-size: 24px; font-weight: 800; letter-spacing: .34em;
  text-transform: uppercase; line-height: 1.3; color: #ffd58a;
}
/* Both titles are centred and share one rhythm: 1.2 line-height with a fixed
   top/bottom margin, so a two-line title and a one-line title still balance. */
.sc-name {
  margin: 12px 0 8px;
  font-size: 104px;
  line-height: 1.2;
  font-weight: 850;
  letter-spacing: -.035em;
  color: #fff9ec; text-shadow: 0 4px 22px rgba(90, 20, 0, .4);
  word-break: break-word;
  text-wrap: balance;
}
.sc-name.is-long { font-size: 82px; }
.sc-name.is-very-long { font-size: 66px; }
html[data-lang="hi"] .sc-name { font-family: var(--serif-dev); letter-spacing: 0; line-height: 1.32; }
.sc-name-alt {
  margin: 12px 0 8px;
  font-family: var(--serif-dev);
  font-size: 56px;
  font-weight: 700;
  color: #ffd58a;
  line-height: 1.2;
}
.sc-rule { display: flex; align-items: center; gap: 16px; margin: 26px 0 20px; color: #ffd58a; }
.sc-rule span { flex: 1 1 auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 216, 150, .8), transparent); }
.sc-rule i { font-style: normal; font-size: 22px; }
.sc-tithi { margin: 0 0 8px; font-size: 31px; font-weight: 650; color: #ffe9c6; line-height: 1.35; }
html[data-lang="hi"] .sc-tithi { font-family: var(--serif-dev); }
.sc-date { margin: 0; font-size: 27px; font-weight: 800; letter-spacing: .06em; color: #fff; text-transform: uppercase; }
.sc-line {
  margin: 22px auto 0; font-size: 25px; line-height: 1.5; color: #ffe0b8; font-weight: 600;
  max-width: 820px;
}
html[data-lang="hi"] .sc-line { font-family: var(--serif-dev); font-size: 27px; line-height: 1.7; }
.sc-foot {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 21px; font-weight: 700; letter-spacing: .12em; color: #ffd58a; text-transform: uppercase;
}
.sc-foot-brand { letter-spacing: .02em; text-transform: none; color: #ffe9c6; }

/* ============================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .aagami-body { grid-template-columns: 1fr; }
  .countdown-card { flex-direction: row; justify-content: space-between; text-align: left; padding: 16px 20px; }
  .countdown-card::after { bottom: -26px; }
  .countdown-num { font-size: 2.4rem; }
}

@media (max-width: 820px) {
  .header-inner { flex-wrap: wrap; gap: 10px; }
  .menu-btn { display: flex; }
  .site-nav {
    order: 3; width: 100%; flex-direction: column; align-items: stretch;
    gap: 4px; margin: 0; padding: 8px 0 4px;
    border-top: 1px solid rgba(207, 159, 69, .35);
    display: none;
  }
  .site-nav.is-open { display: flex; animation: viewIn .22s var(--ease) both; }
  .nav-link { padding: 12px 14px; border-radius: 12px; }
  .header-actions { margin-left: auto; }
  .disclaimer--top p { font-size: .72rem; padding: 8px 14px; }
  .footer-top { flex-direction: column; }
}

@media (max-width: 560px) {
  :root { --radius-lg: 20px; }
  .site-main { padding: 0 14px 64px; }
  .header-inner { padding: 8px 14px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-text strong { font-size: 1rem; }
  .brand-text small { font-size: .58rem; }
  .hero { padding: 24px 20px; margin-top: 18px; }
  .hero-sub { font-size: .93rem; }
  .festival-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .aagami-body { padding: 12px 16px 18px; }
  .aagami-label { padding: 12px 16px 0; }
  .aagami-label-en { display: none; }
  .disclaimer p { font-size: .72rem; line-height: 1.45; padding: 8px 12px; }
  .credits { font-size: .72rem; }
  .modal-actions { flex-direction: column; }
  .fest-foot { flex-wrap: wrap; }
  .fest-foot .btn-icon-only { width: 44px; height: 44px; }
  .toast { bottom: 14px; border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

/* Print: the festival list makes a serviceable handout */
@media print {
  .site-header, .site-footer .footer-links, .toolbar, .fest-foot, .aagami-actions, .menu-btn, .lang-toggle { display: none !important; }
  body { background: #fff; }
  .fest-card { break-inside: avoid; box-shadow: none; }
  .disclaimer { background: #fff; color: #d00000; border: 2px solid #d00000; }
  .disclaimer p { color: #d00000; }
}
