/* ==========================================================================
   Site theme — loaded after main.css on every page.
   Ramco blue, yellow and deep red (recoloured from the CVSLR theme), in light and dark versions.
   The theme is set by [data-theme] on <html> before first paint.
   1. Tokens  2. Base  3. Motifs  4. Top bar  5. Masthead  6. Menu bar
   7. Inner-page banner  8. Components  9. Footer  10. Dark-mode fixes
   11. Responsive
   ========================================================================== */

/* 1. Tokens -------------------------------------------------------------- */
:root,
:root[data-theme="light"] {
  color-scheme: light;

  --primary-900: #06193c;
  --primary-800: #082252;
  --primary-700: #0a2861;
  --primary:     #0b2e6f;
  --primary-500: #123e8f;
  --primary-100: #ced7e7;
  --primary-50:  #eaeef4;

  --secondary:     #8b1d33;
  --secondary-700: #6a1526;
  --secondary-50:  #fbecef;

  --accent:     #e4b92b;
  --accent-700: #94720a;
  --accent-50:  #fcf5df;

  --bg:          #f8f5ea;
  --surface:     #fffef8;
  --surface-alt: #f2eddc;
  --text:        #171b22;
  --text-muted:  #4a505d;
  --text-subtle: #6b7281;
  --border:      #e7e0ca;
  --border-strong: #b7c1d1;

  --heading:     #091d41;
  --header-bg:   rgba(255, 254, 248, .94);
  --panel:       #fffef8;
  --pattern-ink: rgba(139, 29, 51, .14);
  --ring-a: #e4b92b;
  --ring-b: #8b1d33;
  --slider-panel: #091d41;
  --row-alt: #fbf9f0;
  --solid-green: #0b2e6f;
  --solid-green-dark: #082252;
  --solid-maroon: #8b1d33;
  --shadow-color: 12, 28, 60;

  --font-heading: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

  --shadow-sm: 0 1px 2px rgba(var(--shadow-color), .06), 0 1px 3px rgba(var(--shadow-color), .08);
  --shadow:    0 6px 16px -6px rgba(var(--shadow-color), .16), 0 2px 4px -2px rgba(var(--shadow-color), .06);
  --shadow-lg: 0 24px 48px -20px rgba(var(--shadow-color), .35);
  --header-h: 60px;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  /* In dark mode the "deep" greens become light so headings/text stay readable;
     places that use them as fills are re-coloured in section 10. */
  --primary-900: #e3e8ef;
  --primary-800: #9cb6e3;
  --primary-700: #2b549e;
  --primary:     #5881c8;
  --primary-500: #5881c8;
  --primary-100: rgba(88, 129, 200, .24);
  --primary-50:  rgba(88, 129, 200, .12);

  --secondary:     #ec8a9c;
  --secondary-700: #f0a3b1;
  --secondary-50:  rgba(236, 138, 156, .12);

  --accent:     #f0c845;
  --accent-700: #f3d05c;
  --accent-50:  rgba(240, 200, 69, .12);

  --bg:          #0e1014;
  --surface:     #15181d;
  --surface-alt: #1a1e24;
  --text:        #dde1e9;
  --text-muted:  #a4aab4;
  --text-subtle: #7b828f;
  --border:      #29342e;
  --border-strong: #3a4740;

  --heading:     #f2edd9;
  --header-bg:   rgba(18, 21, 25, .92);
  --panel:       #15181d;
  --pattern-ink: rgba(240, 200, 69, .12);
  --ring-a: #f0c845;
  --ring-b: #ec8a9c;
  --slider-panel: #10141a;
  --row-alt: #181b21;
  --solid-green: #193e80;
  --solid-green-dark: #122e5f;
  --solid-maroon: #7a1a2d;
  --shadow-color: 0, 0, 0;
}

/* 2. Base ---------------------------------------------------------------- */
body {
  background:
    radial-gradient(1100px 500px at 100% -10%, rgba(228, 185, 43, .08), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  transition: background-color .3s ease, color .3s ease;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--heading);
  font-optical-sizing: auto;
}
h2, h3 { font-weight: 600; }
.eyebrow { color: var(--accent-700); font-family: var(--font-body); font-weight: 700; }
.eyebrow::before { background: var(--accent); }
::selection { background: var(--accent); color: #1d1807; }

.h-wrap {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: clamp(16px, 2.4vw, 32px);
}
/* Inner pages share the same wide frame as the home page */
.container { max-width: 1440px; padding-inline: clamp(16px, 2.4vw, 32px); }

/* 3. Motifs -------------------------------------------------------------- */
.diya { display: inline-block; width: 1.25em; height: 1.25em; flex: none; vertical-align: -.2em; }
.diya .flame { fill: var(--accent); }
.diya .bowl { fill: var(--secondary); }
.diya .base { stroke: var(--secondary); }

.kolam,
.page-hero,
.site-footer {
  --kolam: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cg fill='none' stroke='%23000000' stroke-width='1.2'%3E%3Cpath d='M22 6c9 7 9 25 0 32c-9-7-9-25 0-32z'/%3E%3Cpath d='M6 22c7-9 25-9 32 0c-7 9-25 9-32 0z'/%3E%3C/g%3E%3Cg fill='%23000000'%3E%3Ccircle cx='22' cy='22' r='2'/%3E%3Ccircle cx='0' cy='0' r='2'/%3E%3Ccircle cx='44' cy='0' r='2'/%3E%3Ccircle cx='0' cy='44' r='2'/%3E%3Ccircle cx='44' cy='44' r='2'/%3E%3C/g%3E%3C/svg%3E");
}

.h-rule { display: grid; grid-template-columns: 1fr 1.2fr 1fr; height: 5px; }
.h-rule span:nth-child(1) { background: #0a2861; }
.h-rule span:nth-child(2) { background: #e4b92b; }
.h-rule span:nth-child(3) { background: #8b1d33; }

/* 4. Top bar ------------------------------------------------------------- */
.h-topbar { background: #06193c; color: #d3dbe8; font-size: .8125rem; }
:root[data-theme="dark"] .h-topbar { background: #080b10; border-bottom: 1px solid var(--border); }
.h-topbar .h-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.h-topbar ul { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 22px; margin: 0; padding: 0; list-style: none; }
.h-topbar li { display: inline-flex; align-items: center; gap: 7px; }
.h-topbar svg { width: 14px; height: 14px; color: #e4b92b; flex: none; }
.h-topbar a { color: #eef1f6; text-decoration: none; }
.h-topbar a:hover { color: #ffffff; text-decoration: underline; }
.h-topbar-right { display: flex; align-items: center; gap: 18px; }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  color: #ffffff;
  cursor: pointer;
  transition: background-color .2s ease, transform .3s ease;
}
.theme-toggle:hover { background: rgba(255, 255, 255, .18); }
.theme-toggle:active { transform: rotate(-20deg) scale(.95); }
.theme-toggle svg { width: 16px; height: 16px; color: #ffffff; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; color: #f0c845; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* 5. Masthead ------------------------------------------------------------ */
.h-header {
  position: relative;
  background: linear-gradient(180deg, var(--surface) 0%, color-mix(in srgb, var(--surface) 70%, var(--bg)) 100%);
}
.h-header > .h-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
  padding-block: 16px 18px;
}
.h-emblem { display: block; line-height: 0; }
.h-emblem img { height: 132px; width: auto; }
:root[data-theme="dark"] .h-emblem { background: #fffef8; border-radius: 16px; padding: 6px 9px; }
:root[data-theme="dark"] .h-emblem img { height: 120px; }
.h-brand { min-width: 0; }
.h-brand-top { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; }
.h-name {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.6rem, 1.1rem + 2vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #0b2e6f;
}
.h-name a { color: inherit; text-decoration: none; }
:root[data-theme="dark"] .h-name { color: #7c9ed8; }
.h-place {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--accent-700);
}
.h-place::before { content: ""; width: 34px; height: 2px; border-radius: 2px; background: var(--accent); }
.h-school { margin: 8px 0 2px; font-size: clamp(.95rem, .85rem + .4vw, 1.2rem); line-height: 1.35; font-weight: 700; color: var(--secondary); }
.h-trust { margin: 0; font-family: var(--font-heading); font-style: italic; font-size: .95rem; line-height: 1.45; color: var(--text-muted); }

.h-portraits { display: flex; align-items: flex-start; gap: clamp(12px, 1.6vw, 24px); margin: 0; padding: 0; list-style: none; }
.h-portrait { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; width: 104px; }
.h-portrait a { display: contents; color: inherit; text-decoration: none; }
.h-faces { display: flex; align-items: center; justify-content: center; height: 78px; }
.h-face {
  position: relative;
  width: 74px;
  height: 74px;
  padding: 3px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--ring-a), var(--ring-b), var(--ring-a));
  box-shadow: 0 6px 14px -6px rgba(var(--shadow-color), .45);
  flex: none;
  transition: transform .3s ease;
}
.h-face img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid var(--surface); background: var(--surface-alt); }
.h-faces--duo .h-face { width: 62px; height: 62px; }
.h-faces--duo .h-face + .h-face { margin-left: -16px; }
.h-portrait:hover .h-face:first-child { transform: translateY(-2px) rotate(-4deg); }
.h-portrait:hover .h-face + .h-face { transform: translateY(-2px) rotate(4deg); }
.h-cap { font-size: .75rem; line-height: 1.3; font-weight: 600; color: var(--text-muted); }

/* Reduced-height masthead used on inner pages */
.h-header--compact > .h-wrap { padding-block: 10px; gap: 16px; }
.h-header--compact .h-emblem img { height: 78px; }
:root[data-theme="dark"] .h-header--compact .h-emblem { padding: 4px 7px; border-radius: 12px; }
:root[data-theme="dark"] .h-header--compact .h-emblem img { height: 70px; }
.h-header--compact .h-name { font-size: clamp(1.35rem, 1rem + 1.3vw, 2rem); }
.h-header--compact .h-place { font-size: .6875rem; }
.h-header--compact .h-school { margin-top: 4px; font-size: clamp(.875rem, .8rem + .25vw, 1rem); }
.h-header--compact .h-trust { font-size: .8125rem; }
.h-header--compact .h-portraits { gap: 14px; align-items: center; }
.h-header--compact .h-portrait { width: auto; flex-direction: row; gap: 8px; text-align: left; }
.h-header--compact .h-faces { height: 50px; }
.h-header--compact .h-face { width: 48px; height: 48px; padding: 2px; }
.h-header--compact .h-faces--duo .h-face { width: 42px; height: 42px; }
.h-header--compact .h-faces--duo .h-face + .h-face { margin-left: -12px; }
.h-header--compact .h-cap { font-size: .6875rem; max-width: 92px; }

/* 6. Sticky menu bar ----------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(1.3) blur(10px);
  -webkit-backdrop-filter: saturate(1.3) blur(10px);
}
.site-header .container { max-width: 1440px; padding-inline: clamp(16px, 2.4vw, 32px); min-height: var(--header-h); gap: 14px; }
.site-header.is-scrolled { box-shadow: 0 10px 24px -16px rgba(var(--shadow-color), .5); }
.mini-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  text-decoration: none;
  opacity: 0;
  transform: translateX(-6px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.mini-brand img { height: 40px; width: auto; }
:root[data-theme="dark"] .mini-brand img { background: #fffef8; border-radius: 8px; padding: 2px 4px; }
.mini-brand span {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--primary);
  font-size: 1rem;
  white-space: nowrap;
}
.is-stuck .mini-brand { opacity: 1; transform: none; pointer-events: auto; }
.main-nav { margin-left: auto; margin-right: auto; }
.nav-list { gap: 0; }
.nav-link { color: var(--text); font-family: var(--font-body); font-weight: 600; font-size: .9375rem; padding: 10px 11px; }
.nav-link:hover,
.nav-item:focus-within > .nav-link { background: var(--primary-50); color: var(--primary-800); }
.nav-item.is-current > .nav-link,
.nav-link[aria-current="page"] { color: var(--primary); }
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 11px; right: 11px; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.nav-home svg { width: 16px; height: 16px; }
.dropdown { background: var(--surface); border-color: var(--border); }
.dropdown a { color: var(--text); }
.dropdown a:hover, .dropdown a:focus-visible { background: var(--primary-50); color: var(--primary-800); }
.dropdown .sub-label { color: var(--accent-700); }
.nav-toggle { background: var(--surface); color: var(--heading); border-color: var(--border); }
.nav-cta { flex: none; }

/* 7. Inner-page banner --------------------------------------------------- */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(120deg, #05142f 0%, #0a2861 70%, #0b2e6f 100%);
  color: #d6deec;
}
:root[data-theme="dark"] .page-hero { background: linear-gradient(120deg, #060a12 0%, #0a1730 100%); border-bottom: 1px solid var(--border); }
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: rgba(246, 217, 127, .15);
  -webkit-mask: var(--kolam) 0 0 / 44px 44px repeat, linear-gradient(90deg, transparent 30%, #000000 90%);
  -webkit-mask-composite: source-in;
  mask: var(--kolam) 0 0 / 44px 44px repeat, linear-gradient(90deg, transparent 30%, #000000 90%);
  mask-composite: intersect;
}
.page-hero::after { display: none; }
.page-hero .container { padding-block: clamp(26px, 4vw, 44px); }
.page-hero h1 {
  color: #ffffff;
  font-weight: 600;
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem);
  letter-spacing: -.01em;
}
.page-hero-sub { color: #ced7e6; font-family: var(--font-heading); font-style: italic; }
.page-hero .breadcrumb { color: #b4c1d7; font-weight: 600; }
.page-hero .breadcrumb a { color: #eef1f6; }
.page-hero .breadcrumb [aria-current] { color: #f6d97f; }
.page-hero-mark {
  position: absolute;
  right: clamp(16px, 4vw, 64px);
  top: 50%;
  width: clamp(60px, 7vw, 96px);
  height: clamp(60px, 7vw, 96px);
  transform: translateY(-50%);
  opacity: .55;
}
.page-hero-mark .bowl { fill: #8b1d33; }
:root[data-theme="dark"] .page-hero-mark .bowl { fill: #b8384f; }

/* 8. Components ---------------------------------------------------------- */
.content-card, .side-card { background: var(--panel); border-color: var(--border); }
.content-card { border-radius: 24px; box-shadow: var(--shadow); }
.prose p, .message-body p { color: var(--text); }
.prose h2 { font-weight: 600; }
.prose h2::after { background: linear-gradient(90deg, var(--accent) 0 60%, var(--secondary) 60% 100%); width: 56px; }
.prose h3 { color: var(--primary-700); }
:root[data-theme="dark"] .prose h3 { color: #8caade; }
.prose h4 { color: var(--secondary); }
.prose strong, .prose b { color: inherit; }
.check-list li::before { background-color: var(--primary-50); border-color: var(--primary-100); }

.side-card h2 { font-family: var(--font-body); color: var(--accent-700); }
.side-nav a { color: var(--text); }
.side-nav a:hover { background: var(--primary-50); color: var(--primary-800); }
.side-nav a[aria-current="page"] { background: var(--solid-green); color: #ffffff; box-shadow: inset 4px 0 0 var(--accent); }
.side-contact { background: linear-gradient(150deg, #091d41, #0b2e6f); color: #dbe3f0; }
:root[data-theme="dark"] .side-contact { background: linear-gradient(150deg, #091120, #11264c); border: 1px solid var(--border); }
.side-contact h2 { color: #f6d97f; }
.side-contact a:not(.btn) { color: #ffffff; }

.card { background: var(--panel); border-color: var(--border); }
.card p { color: var(--text-muted); }
.card-media { background: var(--surface-alt); }

.data-table thead th { background: #082252; color: #ffffff; font-family: var(--font-body); font-weight: 700; }
.data-table thead tr + tr th { background: #0b2e6f; }
:root[data-theme="dark"] .data-table thead th { background: #10213f; }
:root[data-theme="dark"] .data-table thead tr + tr th { background: #162c54; }
.data-table tbody tr:nth-child(even) { background: var(--row-alt); }
.data-table tbody tr:hover { background: var(--primary-50); }
.table-wrap { background: var(--panel); border-color: var(--border); }

.accordion details { background: var(--panel); border-color: var(--border); }
.accordion summary { color: var(--heading); font-family: var(--font-heading); }
.accordion summary:hover { background: var(--primary-50); }

.gallery-item > a, .gallery-item figure > a, .gallery-item figure > img { border-color: var(--border); background: var(--surface-alt); }
.gallery-item figcaption { color: var(--text-muted); }
.media img { border-color: var(--border); }
.media figcaption { color: var(--text-subtle); }

.quote { background: var(--accent-50); color: var(--text); border-left-color: var(--accent); font-family: var(--font-heading); }
.callout { background: var(--primary-50); border-color: var(--primary-100); color: var(--text); }

.timeline::before { background: linear-gradient(var(--primary-100), var(--primary), var(--primary-100)); }
.timeline-year { background: var(--solid-green); color: #ffffff; font-family: var(--font-heading); box-shadow: 0 0 0 5px var(--panel); }
.timeline-item:nth-child(3n+2) .timeline-year { background: #e4b92b; color: #241c05; }
.timeline-item:nth-child(3n) .timeline-year { background: var(--solid-maroon); color: #ffffff; }
.timeline-card { background: var(--panel); border-color: var(--border); }

.album-card h3 a { color: var(--heading); }
.pill { background: var(--primary-50); color: var(--primary-800); }
.pill--muted { background: var(--surface-alt); color: var(--text-muted); }

.contact-card .contact-list .label { color: var(--text-subtle); }
.map-frame { border-color: var(--border); }
:root[data-theme="dark"] .map-frame iframe { filter: invert(.9) hue-rotate(180deg) saturate(.7); }

.empty-state .muted { color: var(--text-muted); }

/* Buttons */
.btn { font-family: var(--font-body); font-weight: 700; --btn-bg: var(--solid-green); --btn-bd: var(--solid-green); }
.btn:hover { --btn-bg: var(--solid-green-dark); --btn-bd: var(--solid-green-dark); color: #ffffff; }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--primary); --btn-bd: var(--border-strong); }
.btn--outline:hover { --btn-bg: var(--primary-50); --btn-bd: var(--primary); color: var(--primary-800); }
.btn--light { --btn-bg: rgba(255, 255, 255, .1); --btn-fg: #ffffff; --btn-bd: rgba(255, 255, 255, .5); }
.btn--light:hover { --btn-bg: #ffffff; --btn-bd: #ffffff; color: #06193c; }
.btn--accent { --btn-bg: #e4b92b; --btn-bd: #e4b92b; --btn-fg: #241c05; }
.btn--accent:hover { --btn-bg: #f0c53a; --btn-bd: #f0c53a; color: #241c05; }
.icon-badge { background: var(--primary-50); color: var(--primary); }
.icon-badge--accent { background: var(--accent-50); color: var(--accent-700); }
.icon-badge--secondary { background: var(--secondary-50); color: var(--secondary); }
.link-arrow { color: var(--primary); }

.skip-link { background: #06193c; }
.to-top { background: var(--solid-green); }
.to-top:hover { background: var(--solid-green-dark); }

/* 9. Footer -------------------------------------------------------------- */
.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #091325;
  color: #b8c1d0;
}
:root[data-theme="dark"] .site-footer { background: #07090d; }
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: rgba(246, 217, 127, .07);
  -webkit-mask: var(--kolam) 0 0 / 44px 44px repeat, linear-gradient(180deg, #000000, transparent 70%);
  -webkit-mask-composite: source-in;
  mask: var(--kolam) 0 0 / 44px 44px repeat, linear-gradient(180deg, #000000, transparent 70%);
  mask-composite: intersect;
}
.site-footer .h-rule { height: 4px; }
.footer-main { padding-block: clamp(44px, 5vw, 64px) 36px; }
.site-footer h2 { font-family: var(--font-body); font-weight: 800; color: #f6d97f; }
.site-footer a { color: #dbe3f0; }
.site-footer a:hover { color: #ffffff; }
.footer-brand .brand { align-items: center; }
.footer-brand .brand img { background: #fffef8; border-radius: 14px; padding: 6px 9px; height: 84px; }
.footer-brand .brand-name { font-family: var(--font-heading); font-size: 1.25rem; letter-spacing: .04em; color: #ffffff; }
.footer-brand .brand-sub { color: #f0b7c1; font-size: .8125rem; }
/* Swamiji's quote — highlighted card (maroon, saffron edge, glowing gold words) */
.footer-quote {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 12px;
  align-items: start;
  margin: 18px 0 0;
  padding: 11px 16px 10px 14px;
  max-width: 380px;
  border: 1px solid rgba(246, 217, 127, .45);
  border-left: 4px solid #e4b92b;
  border-radius: 6px 18px 18px 6px;
  background: linear-gradient(135deg, #8b1d33 0%, #6a1526 55%, #4a0f1b 100%);
  container-type: inline-size;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .2), 0 14px 34px -14px rgba(228, 185, 43, .55);
}
.footer-quote::before { /* large decorative quote mark */
  content: "\201C";
  position: absolute;
  right: 12px;
  top: -8px;
  z-index: -1;
  font-family: var(--font-heading);
  font-size: 4.5rem;
  line-height: 1;
  color: rgba(246, 217, 127, .16);
}
.footer-quote::after { /* soft lamp glow behind the diya */
  content: "";
  position: absolute;
  left: -30px;
  top: -30px;
  z-index: -1;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 217, 127, .35), transparent 65%);
}
.footer-quote .diya { width: 28px; height: 28px; margin-top: 1px; grid-row: span 2; }
.footer-quote .diya .flame { fill: #ffdc61; transform-origin: 24px 16px; animation: flicker 2.6s ease-in-out infinite; }
.footer-quote .diya .bowl { fill: #f6d97f; }
.footer-quote .diya .base { stroke: #f6d97f; }
.footer-quote blockquote { margin: 0; }
.footer-quote blockquote p {
  margin: 0;
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  /* two fixed lines; the size shrinks only when the card is narrow */
  font-size: clamp(12px, calc((100cqi - 40px) / 16.6), 1rem);
  line-height: 1.35;
  color: #fff8e2;
}
.footer-quote .q-line { display: block; white-space: nowrap; }
.footer-quote mark {
  background: linear-gradient(100deg, #ffea9a 0%, #f6cf4a 55%, #e9b92a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  text-shadow: 0 0 18px rgba(255, 220, 97, .35);
}
.footer-quote figcaption {
  margin-top: 4px;
  font-family: var(--font-body);
  /* one line: shrinks only when the card is narrow (text column = inner width - diya - gap) */
  font-size: clamp(9px, calc((100cqi - 40px) / 23.5), .6875rem);
  line-height: 1.3;
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #f3c9d1;
}
@keyframes flicker {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  30% { transform: scale(1.06, .95) rotate(-2deg); opacity: .92; }
  60% { transform: scale(.96, 1.05) rotate(2deg); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .footer-quote .diya .flame { animation: none; }
}
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); }
.footer-bottom .container { color: #8e99ac; }
.social-links { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.site-footer .social-links a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(246, 217, 127, .35);
  border-radius: 50%;
  background: rgba(255, 255, 255, .04);
  color: #f6d97f;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.site-footer .social-links a:hover,
.site-footer .social-links a:focus-visible {
  background: #e4b92b;
  border-color: #e4b92b;
  color: #241c05;
  transform: translateY(-2px);
}
.social-links svg { width: 17px; height: 17px; }
/* keep the icons clear of the floating back-to-top button */
@media (min-width: 641px) {
  .footer-bottom .container { padding-right: calc(clamp(16px, 2.4vw, 32px) + 64px); }
}

/* 10. Dark-mode fixes for fills that used the brand greens ------------- */
:root[data-theme="dark"] .dropdown a[aria-current="page"] { color: #9cb6e3; }
:root[data-theme="dark"] .gallery-item.is-document img { background: #fffef8; }
:root[data-theme="dark"] .data-table img,
:root[data-theme="dark"] .media img { background: #fffef8; }
:root[data-theme="dark"] .empty-state img { opacity: .9; }

/* 11. Responsive --------------------------------------------------------- */
@media (max-width: 1400px) {
  .mini-brand span { display: none; }
}

@media (max-width: 1280px) {
  .nav-link { padding: 10px 8px; font-size: .9rem; }
  .nav-cta { display: none; }
  .h-portrait { width: 92px; }
  .h-face { width: 66px; height: 66px; }
  .h-faces--duo .h-face { width: 56px; height: 56px; }
  .h-emblem img { height: 112px; }
  .h-header--compact .h-cap { display: none; }
}

@media (max-width: 1100px) {
  .h-header > .h-wrap { grid-template-columns: auto minmax(0, 1fr); }
  .h-portraits {
    grid-column: 1 / -1;
    justify-content: center;
    padding-top: 14px;
    border-top: 1px dashed var(--border-strong);
  }
  .h-header--compact .h-portraits { padding-top: 8px; }
}

@media (max-width: 1060px) {
  :root { --header-h: 60px; }
  .mini-brand { opacity: 1; transform: none; pointer-events: auto; }
  .mini-brand span { display: inline; }
  .main-nav { background: var(--surface); margin: 0; }
  .nav-item { border-color: var(--border); }
  .nav-link[aria-current="page"]::after { display: none; }
  .nav-link.nav-home { justify-content: flex-start; gap: 10px; }
  .dropdown { background: var(--surface-alt); }
  .site-header {
    /* a backdrop-filter would trap the fixed mobile menu inside the bar */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--surface);
  }
}

@media (max-width: 640px) {
  .h-topbar .hide-sm { display: none; }
  .h-topbar-right .topbar-links { display: none; }
  .h-header > .h-wrap { grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding-block: 14px; }
  .h-emblem img { height: 92px; }
  :root[data-theme="dark"] .h-emblem img { height: 84px; }
  .h-place { letter-spacing: .24em; font-size: .6875rem; }
  .h-school { font-size: .9375rem; }
  .h-trust { font-size: .8125rem; }
  .h-portraits { gap: 8px; }
  .h-portrait { width: 30%; }
  .h-face { width: 60px; height: 60px; }
  .h-faces--duo .h-face { width: 50px; height: 50px; }
  .h-faces--duo .h-face + .h-face { margin-left: -14px; }
  .h-faces { height: 64px; }

  .h-header--compact > .h-wrap { padding-block: 10px; row-gap: 6px; }
  .h-header--compact .h-emblem img { height: 64px; }
  :root[data-theme="dark"] .h-header--compact .h-emblem img { height: 58px; }
  .h-header--compact .h-name { font-size: 1.3rem; }
  .h-header--compact .h-trust { display: none; }
  .h-header--compact .h-portraits { padding-top: 8px; gap: 18px; }
  .h-header--compact .h-portrait { width: auto; }
  .h-header--compact .h-faces { height: 42px; }
  .h-header--compact .h-face { width: 40px; height: 40px; }
  .h-header--compact .h-faces--duo .h-face { width: 36px; height: 36px; }
  .h-header--compact .h-faces--duo .h-face + .h-face { margin-left: -10px; }

  .page-hero-mark { display: none; }
}
