/* IDEABAAZ Live 2047: Panchayat website stylesheet (shared by every page of every site).
   Mobile-first; no JavaScript anywhere. Fonts come from the shared /_assets/fonts/ folder (SIL OFL 1.1).
   Colours are variables only (D-28): the :root below holds the default preset (village_light) and
   the renderer appends a generated :root{...} with each site's own colours. */

@font-face { font-family: "IB Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/_assets/fonts/noto-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IB Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/_assets/fonts/noto-sans-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IB Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/_assets/fonts/noto-sans-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IB Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/_assets/fonts/noto-sans-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IB Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/_assets/fonts/noto-sans-devanagari-devanagari-400-normal.woff2") format("woff2");
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09; }
@font-face { font-family: "IB Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/_assets/fonts/noto-sans-devanagari-devanagari-700-normal.woff2") format("woff2");
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09; }
@font-face { font-family: "IB Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/_assets/fonts/noto-sans-gujarati-gujarati-400-normal.woff2") format("woff2");
  unicode-range: U+0951-0952, U+0964-0965, U+0A80-0AFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839; }
@font-face { font-family: "IB Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/_assets/fonts/noto-sans-gujarati-gujarati-700-normal.woff2") format("woff2");
  unicode-range: U+0951-0952, U+0964-0965, U+0A80-0AFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839; }
@font-face { font-family: "IB Display"; font-style: italic; font-weight: 800; font-display: swap;
  src: url("/_assets/fonts/barlow-condensed-latin-800-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* Site colours: overridden by the generated block at the end of assets/site.css. */
  --bg: #fbf8f2;
  --surface: #f0ede7;
  --surface-2: #e7e4de;
  --border: #d8d4ce;
  --text: #1f1a14;
  --muted: #736e68;
  --primary: #b4471a;
  --on-primary: #ffffff;
  --secondary: #2f7d32;
  --on-secondary: #ffffff;
  --header: #ffffff;
  --on-header: #0a0a0a;
  --hero-overlay: linear-gradient(180deg, rgba(0, 0, 0, .2) 0%, rgba(0, 0, 0, .78) 100%);
  /* Fixed in every theme: text on hero photos, video letterbox, print. */
  --hero-text: #ffffff;
  --hero-shadow: rgba(0, 0, 0, .6);
  --media-bg: #000000;
  --print-bg: #ffffff;
  --print-text: #000000;
  --radius: 12px;
  --max: 1200px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IB Sans", "Noto Sans", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}
img, video, iframe { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--primary); text-underline-offset: 3px; }
a:focus-visible, .pill:focus-visible, .button:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1, h2, .display {
  font-family: "IB Display", "IB Sans", sans-serif;
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .01em;
}
:lang(hi) h1, :lang(hi) h2, :lang(mr) h1, :lang(mr) h2, :lang(gu) h1, :lang(gu) h2,
:lang(kok) h1, :lang(kok) h2, :lang(bgc) h1, :lang(bgc) h2 {
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0;
}
h1 { font-size: clamp(2rem, 8vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 5.5vw, 2.25rem); }
h2 .accent { color: var(--primary); }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--primary); color: var(--on-primary); padding: 12px 16px; z-index: 10;
}
.skip:focus { left: 8px; top: 8px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }

.preview-banner {
  background: var(--secondary); color: var(--on-secondary); text-align: center;
  font-weight: 700; padding: 8px 16px;
}

/* --- header (top bar) ------------------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--border); background: var(--header); color: var(--on-header); }
.brand { display: flex; align-items: center; gap: 12px; padding: 14px 0 10px; text-decoration: none; color: var(--on-header); }
.brand img { width: 40px; height: 40px; flex: none; }
.brand-name { font-size: 1.25rem; font-weight: 700; line-height: 1.2; display: block; }
.brand-sub { color: var(--on-header); opacity: .85; font-size: .875rem; display: block; }

.nav, .langs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: thin; }
.nav ul, .langs ul { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.pill {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); text-decoration: none; white-space: nowrap; font-weight: 700;
}
.pill[aria-current="page"] { background: var(--primary); border-color: var(--on-header); color: var(--on-primary); }
.langs .pill { min-height: 40px; padding: 0 14px; font-weight: 400; font-size: .9375rem; }
.langs .pill[aria-current="true"] { background: var(--secondary); border-color: var(--secondary); color: var(--on-secondary); font-weight: 700; }

/* --- sections -------------------------------------------------------------------------- */
main { display: block; padding-bottom: 32px; }
.section { padding: 28px 0 8px; }
.section + .section { border-top: 1px solid var(--border); }
.lead { color: var(--muted); font-size: 1.0625rem; }
.muted { color: var(--muted); }

/* Without a photo the hero uses the page colours; with one, a dark overlay and white text. */
.hero { position: relative; background: linear-gradient(135deg, var(--surface-2) 0%, var(--bg) 70%); border-bottom: 4px solid var(--primary); overflow: hidden; }
.hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hero-body { padding: 32px 0 28px; }
.hero.has-photo { background: var(--media-bg); }
.hero.has-photo::after { content: ""; position: absolute; inset: 0; background: var(--hero-overlay); }
.hero.has-photo .hero-body { position: absolute; inset: auto 0 0 0; padding-bottom: 24px; z-index: 1; color: var(--hero-text); }
.hero.has-photo h1 { text-shadow: 0 2px 12px var(--hero-shadow); }
.hero h1 { margin-bottom: .25em; }
.tagline { font-size: clamp(1.125rem, 4.5vw, 1.5rem); max-width: 40ch; margin: 0; }
.hero.has-photo .tagline { text-shadow: 0 1px 8px var(--hero-shadow); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; overflow-wrap: anywhere;
}
.card h3 { margin-bottom: .35em; }
.grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.list { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }

.person { display: flex; gap: 14px; align-items: center; }
.avatar {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none;
  background: var(--surface-2); border: 2px solid var(--border);
}
.avatar.lg { width: 112px; height: 112px; border-color: var(--primary); }
.quote { border-left: 4px solid var(--primary); padding-left: 14px; margin: 14px 0 0; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.stat b { display: block; font-size: 1.5rem; color: var(--primary); line-height: 1.2; }
.stat span { color: var(--muted); font-size: .875rem; }

.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8125rem; font-weight: 700;
  background: var(--secondary); color: var(--on-secondary); border: 1px solid var(--secondary); margin-bottom: 8px;
}
.date { color: var(--muted); font-size: .875rem; display: block; margin-bottom: 4px; }

.gallery { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 12px 0 0; padding: 0; list-style: none; }
.gallery a { display: block; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo { border-radius: var(--radius); overflow: hidden; margin: 0 0 12px; background: var(--surface-2); }
.photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.media-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--media-bg); }
.media-frame iframe, .media-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.talent .card { display: flex; gap: 12px; align-items: flex-start; }
.talent .avatar { width: 64px; height: 64px; border-radius: 12px; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  padding: 0 20px; border-radius: 999px; background: var(--primary); color: var(--on-primary);
  font-weight: 700; text-decoration: none;
}
.button.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

dl.facts { display: grid; grid-template-columns: 1fr; gap: 4px 16px; margin: 0; }
dl.facts dt { color: var(--muted); font-size: .875rem; }
dl.facts dd { margin: 0 0 10px; }

.empty { color: var(--muted); font-style: italic; }

/* --- footer ---------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); background: var(--header); color: var(--on-header); padding: 24px 0 32px; font-size: .9375rem; }
.site-footer strong { color: var(--on-header); }
.powered { margin-top: 8px; opacity: .85; }
.powered b { color: var(--on-header); }

/* --- simple pages (redirect, 404, offline) ---------------------------------------------- */
.center { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 8px; padding: 48px 0; }

@media (min-width: 640px) {
  .grid.two, .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  dl.facts { grid-template-columns: max-content 1fr; }
}
@media (min-width: 960px) {
  .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero img { aspect-ratio: 21 / 8; }
  .site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 24px; }
  .nav, .langs { padding: 12px 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .pill, .button { transition: background-color .15s ease, color .15s ease; }
}
@media print {
  body, .site-header, .site-footer { background: var(--print-bg); color: var(--print-text); }
  .nav, .langs, .skip { display: none; }
}

/* Site colours (generated) */
:root{--bg:#b79a76;--surface:#b09371;--surface-2:#aa8e6d;--border:#a08566;--text:#2a1414;--muted:#462f28;--primary:#7b0a19;--on-primary:#ffffff;--secondary:#000000;--on-secondary:#ffffff;--header:#73303f;--on-header:#ffffff;--hero-overlay:linear-gradient(180deg, rgba(0, 0, 0, .2) 0%, rgba(0, 0, 0, .78) 100%);color-scheme:light}
