/* =========================================================
   Samuru Gituto — design system (light default)
   ========================================================= */

:root,
[data-theme="light"] {
  --bg: #f4f7f5;
  --bg-soft: #e8f0ec;
  --ink: #0f1f1a;
  --muted: #4d635a;
  --brand: #0f766e;
  --brand-strong: #0b5f59;
  --brand-ink: #ffffff;
  --accent: #b45309;
  --card: #ffffff;
  --card-border: rgba(15, 31, 26, 0.1);
  --ring: rgba(15, 118, 110, 0.28);
  --shadow: 0 10px 30px rgba(15, 31, 26, 0.08);
  --shadow-lg: 0 18px 40px rgba(15, 31, 26, 0.12);
  --header-bg: #1a6b5a;
  --header-ink: #f0fdfa;
  --header-muted: #99f6e4;
  --logo-green: #5eead4;
  --logo-brown: #fbbf24;
  --logo-ring: #5eead4;
  --logo-circle: #1a3008;
  --radius: 16px;
  --radius-lg: 24px;
  --nav-h: 4.25rem;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0a1412;
  --bg-soft: #12201c;
  --ink: #e7f5f0;
  --muted: #9fb5ac;
  --brand: #2dd4bf;
  --brand-strong: #5eead4;
  --brand-ink: #042f2e;
  --accent: #fbbf24;
  --card: #132420;
  --card-border: rgba(167, 243, 208, 0.12);
  --ring: rgba(45, 212, 191, 0.3);
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 44px rgba(0, 0, 0, 0.5);
  --header-bg: #0f3d34;
  --header-ink: #ecfdf5;
  --header-muted: #5eead4;
  --logo-green: #6ee7b7;
  --logo-brown: #fcd34d;
  --logo-ring: #6ee7b7;
  --logo-circle: #244008;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
a:hover { color: var(--brand-strong); }

.form-control,
.form-select,
.form-control-theme {
  border-radius: 12px !important;
  border: 1px solid var(--card-border) !important;
  background: var(--card) !important;
  color: var(--ink) !important;
  padding: 0.7rem 1rem !important;
}
.form-control:focus,
.form-select:focus,
.form-control-theme:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 4px var(--ring) !important;
  outline: none !important;
}

.text-muted, small.text-muted { color: var(--muted) !important; }
.lead, .lead-muted { color: var(--muted); }

/* ---------- Header / Nav (high contrast — always readable) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1040;
  background: var(--header-bg);
  color: var(--header-ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.top-bar {
  background: rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  padding: 0.4rem 0;
  color: var(--header-muted);
}

.top-bar a { color: var(--header-ink); text-decoration: none; font-weight: 600; }
.top-bar a:hover { color: #fff; }
.top-bar .sep { margin: 0 0.45rem; opacity: 0.5; }

.logo-banner {
  background: var(--header-bg);
  padding: 0.75rem 0;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-banner a {
  display: block;
  text-decoration: none;
}

.logo-banner-img {
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.site-nav {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  min-height: var(--nav-h);
}

.site-brand {
  display: inline-flex !important;
  align-items: center;
  text-decoration: none !important;
  color: #fff !important;
  padding: 0.25rem 0;
}

.brand-logo {
  height: 58px;
  width: auto;
  display: block;
}

.brand-logo .logo-bg { fill: var(--logo-circle); }
.brand-logo .logo-ring { stroke: var(--logo-ring); }
.brand-logo .logo-text-green { fill: var(--logo-green); }
.brand-logo .logo-text-brown { fill: var(--logo-brown); }

@media (max-width: 991.98px) {
  .brand-logo { height: 46px; }
}

.brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #14b8a6, #0f766e);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

.brand-text small {
  font-size: 0.7rem;
  color: var(--header-muted);
  font-weight: 600;
}

.site-nav .nav-link {
  color: rgba(240, 253, 250, 0.88) !important;
  font-weight: 650;
  font-size: 0.92rem;
  padding: 0.5rem 0.8rem !important;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav .nav-link:hover,
.site-nav .nav-link:focus,
.site-nav .nav-link.active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.12);
}

.site-nav .nav-link.active {
  background: rgba(20, 184, 166, 0.28);
  color: #fff !important;
}

.site-nav-toggler {
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  border-radius: 10px;
  padding: 0.4rem 0.55rem;
  background: rgba(255, 255, 255, 0.06);
}

.site-nav-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(45, 212, 191, 0.35);
}

.site-nav-toggler .navbar-toggler-icon {
  width: 1.25rem;
  height: 1.25rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.95%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.site-dropdown {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 0.45rem;
  min-width: 15rem;
  margin-top: 0.5rem !important;
}

.site-dropdown .dropdown-item {
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
  color: var(--ink);
  font-weight: 600;
  white-space: normal;
}

.site-dropdown .dropdown-item:hover,
.site-dropdown .dropdown-item:focus {
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand-strong);
}

.site-dropdown .dropdown-divider {
  border-color: var(--card-border);
  opacity: 1;
}

@media (max-width: 991.98px) {
  #siteNav {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 14px;
    margin-top: 0.65rem;
    padding: 0.65rem;
  }
  .site-nav .nav-link {
    padding: 0.7rem 0.9rem !important;
  }
  .logo-banner-img { max-height: 130px; }
}

/* ---------- Layout primitives ---------- */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.alt { background: var(--bg-soft); }
.kicker {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-bottom: 0.6rem;
}
.heading {
  color: var(--brand);
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-bottom: 0.35rem;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
}
.subheading {
  font-size: clamp(1.75rem, 1rem + 2.5vw, 2.85rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.section-intro { max-width: 40rem; margin-left: auto; margin-right: auto; }

.btn-brand {
  background: var(--brand);
  color: var(--brand-ink) !important;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.35rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.25);
  transition: transform 0.15s ease, filter 0.15s ease;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-brand:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  color: var(--brand-ink) !important;
}

.btn-outline {
  border: 1.5px solid var(--card-border);
  color: var(--ink) !important;
  background: transparent;
  border-radius: 999px;
  padding: 0.72rem 1.3rem;
  font-weight: 650;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.btn-outline:hover {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--ink) !important;
  transform: translateY(-1px);
}

.btn:focus-visible,
.theme-toggle:focus-visible,
.site-nav-toggler:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.card-lite {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card-lite:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--card-border));
}

.count-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand-strong);
  font-size: 0.8rem;
  font-weight: 700;
}

.rounded-xl { border-radius: var(--radius-lg); }

/* ---------- Home hero ---------- */
.home-hero {
  position: relative;
  min-height: min(88vh, 720px);
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
}
.home-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
  z-index: 0;
}
.home-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(120deg, rgba(6, 30, 28, 0.88) 0%, rgba(11, 61, 56, 0.72) 48%, rgba(6, 30, 28, 0.55) 100%);
}
.home-hero .container { position: relative; z-index: 2; }
.home-hero .kicker { color: #fde68a; }
.home-hero .subheading { color: #fff; max-width: 16ch; }
.home-hero .lead { color: rgba(240, 253, 250, 0.9); max-width: 36rem; }
.home-hero .btn-outline {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff !important;
}
.home-hero .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff !important;
}

.home-stats {
  margin-top: -3rem;
  position: relative;
  z-index: 3;
  padding-bottom: 1rem;
}
.stat-card {
  text-align: center;
  padding: 1.25rem 1rem;
  height: 100%;
}
.stat-card .stat-value {
  font-size: clamp(1.45rem, 1rem + 1.6vw, 2rem);
  font-weight: 800;
  color: var(--brand);
  line-height: 1.1;
}
.stat-card .stat-label {
  margin: 0.3rem 0 0;
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--muted);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

.service-card {
  height: 100%;
  padding: 1.4rem;
}
.service-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.45rem;
  color: var(--ink);
}
.service-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .photo-strip { grid-template-columns: repeat(4, 1fr); }
}
.photo-strip figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
}
.photo-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.photo-strip figure:hover img { transform: scale(1.06); }
.photo-strip figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.55rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}

.quote-card {
  height: 100%;
  padding: 1.4rem;
}
.quote-card p {
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 1rem;
}
.quote-card cite {
  font-style: normal;
  font-weight: 700;
  color: var(--brand);
  font-size: 0.9rem;
}

/* ---------- Board / members ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding-top: clamp(3rem, 6vw, 4.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.hero.hero-photo {
  min-height: clamp(20rem, 48vw, 26rem);
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}
.hero.hero-photo .subheading,
.hero.hero-photo .lead-muted,
.hero.hero-photo .lead { color: #f8fafc !important; }
.hero.hero-photo .kicker { color: #fde68a; }
.hero-photo-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
}
.hero-photo-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(6, 30, 28, 0.78), rgba(6, 30, 28, 0.62));
}

.jump-bar {
  position: sticky;
  top: calc(var(--nav-h) + 0.5rem);
  z-index: 1020;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border-bottom: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.65rem 0;
}
.jump-bar .jump-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  justify-content: space-between;
}
.jump-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.jump-chip {
  display: inline-flex;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}
.jump-chip:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.board-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  max-width: 22rem;
  width: 100%;
}
.board-filter input {
  flex: 1 1 12rem;
  min-width: 0;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--ink);
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  outline: none;
}
.board-filter input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--ring);
}
.filter-count { font-size: 0.78rem; font-weight: 700; color: var(--muted); }

.member-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1.15rem 1.3rem;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.member-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}
.member-card h5 {
  font-weight: 750;
  font-size: 1.02rem;
  margin-bottom: 0.45rem;
  color: var(--ink);
}
.member-col.is-hidden,
.member-card.is-hidden { display: none !important; }

.avatar-initials {
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--brand), var(--brand-strong));
  color: #fff;
  font-size: 1.3rem;
  font-weight: 800;
  border-radius: 50%;
  margin-bottom: 1rem;
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.28);
}
.avatar-initials.is-accent {
  background: linear-gradient(145deg, var(--accent), #92400e);
  box-shadow: 0 6px 16px rgba(180, 83, 9, 0.28);
}

.role-badge {
  display: inline-block;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand-strong);
  margin: 0;
}
.role-badge.is-officer {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}

.stats-row { margin-top: -2.25rem; position: relative; z-index: 2; }

.minutes-block h3 { color: var(--ink); font-weight: 800; }
.minutes-list { padding-left: 1.15rem; margin-bottom: 1rem; }
.minutes-list li { margin-bottom: 0.55rem; color: var(--ink); }
.elected-list {
  list-style: none;
  padding-left: 0;
  counter-reset: elected;
  margin: 0.75rem 0 1rem;
}
.elected-list li {
  counter-increment: elected;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.45rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 10%, var(--card));
  border: 1px solid var(--card-border);
}
.elected-list li::before {
  content: counter(elected);
  width: 1.6rem;
  height: 1.6rem;
  flex-shrink: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
}
.elected-list strong { color: var(--ink); }

.empty-filter {
  display: none;
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-weight: 600;
}
.empty-filter.is-visible { display: block; }

/* Gallery */
.gallery-card { overflow: hidden; margin: 0; height: 100%; display: flex; flex-direction: column; }
.gallery-thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
  aspect-ratio: 16/10;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.gallery-card:hover .gallery-thumb img { transform: scale(1.04); }
.gallery-caption { padding: 1rem 1.15rem 1.15rem; text-align: left; }
.gallery-caption strong { display: block; color: var(--ink); margin-bottom: 0.15rem; }
.video-frame { overflow: hidden; border-radius: var(--radius-lg); background: #000; }
.video-frame video { display: block; width: 100%; max-height: 70vh; background: #000; }
.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(2, 12, 10, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.media-lightbox[hidden] { display: none !important; }
.media-lightbox-img {
  max-width: min(1100px, 96vw);
  max-height: 78vh;
  object-fit: contain;
  border-radius: 12px;
}
.media-lightbox-vid {
  max-width: min(1100px, 96vw);
  max-height: 78vh;
  border-radius: 12px;
  display: block;
}
.media-lightbox-caption { color: #e2e8f0; margin: 1rem 0 0; text-align: center; max-width: 40rem; }
.media-lightbox-close,
.media-lightbox-prev,
.media-lightbox-next {
  position: absolute;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2010;
}
.media-lightbox-close:hover,
.media-lightbox-prev:hover,
.media-lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
}
.media-lightbox-close { top: 1rem; right: 1.1rem; }
.media-lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.media-lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.media-lightbox-fake {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-22deg);
  z-index: 2050;
  background: rgba(220, 38, 38, 0.88);
  color: #fff;
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: .3em;
  text-transform: uppercase;
  padding: 12px 40px;
  border-radius: 8px;
  border: 5px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 32px rgba(0, 0, 0, .6);
  white-space: nowrap;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
  pointer-events: none;
  user-select: none;
}

/* Timeline */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
  border-radius: 4px;
}
.t-item { position: relative; margin-bottom: 1.5rem; }
.t-item::before {
  content: "";
  position: absolute;
  left: -0.2rem;
  top: 0.45rem;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

/* Theme toggle */
.theme-toggle {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 1050;
  width: auto;
  min-width: 3rem;
  height: 3rem;
  padding: 0 0.9rem 0 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--brand); transform: translateY(-2px); }
.theme-toggle .theme-icons { position: relative; width: 1.15rem; height: 1.15rem; }
.theme-toggle svg { width: 1.15rem; height: 1.15rem; }
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  top: 50%;
  left: 50%;
  transition: opacity 0.2s ease, transform 0.25s ease;
}
[data-theme="light"] .theme-toggle .icon-sun,
:root:not([data-theme="dark"]) .theme-toggle .icon-sun {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  pointer-events: none;
}
[data-theme="light"] .theme-toggle .icon-moon,
:root:not([data-theme="dark"]) .theme-toggle .icon-moon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
[data-theme="dark"] .theme-toggle .icon-moon {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  pointer-events: none;
}
.theme-toggle-text { font-size: 0.8rem; font-weight: 700; }
.theme-toggle.theme-toggle-nav {
  position: static;
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.theme-toggle.theme-toggle-nav .theme-toggle-text { display: none; }

.back-to-top {
  position: fixed;
  right: 1.1rem;
  bottom: 4.5rem;
  z-index: 1040;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Footer */
.site-footer {
  background: var(--header-bg);
  color: var(--header-ink);
  border-top: none;
  padding: 3.25rem 0 1.5rem;
  margin-top: 0;
}
.site-footer .footer-brand { font-weight: 800; color: #fff; }
.site-footer .text-muted { color: var(--header-muted) !important; }
.site-footer .footer-heading {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fde68a;
  margin-bottom: 0.75rem;
}
.site-footer .footer-links { list-style: none; padding: 0; margin: 0; }
.site-footer .footer-links li { margin-bottom: 0.4rem; }
.site-footer .footer-links a {
  color: rgba(240, 253, 250, 0.85);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.site-footer .footer-links a:hover { color: #fff; }
.site-footer .footer-bottom {
  margin-top: 2rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.cta-band {
  background:
    radial-gradient(700px 240px at 20% 0%, rgba(15, 118, 110, 0.14), transparent 60%),
    var(--bg-soft);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

#board-executive,
#ordinary-board-members,
#previous-board-2005-2017,
#sgm-2017,
#journey,
#photos,
#video,
#mission,
#services,
#stories {
  scroll-margin-top: 8rem;
}

@media (max-width: 767.98px) {
  .home-stats { margin-top: -1.75rem; }
  .jump-bar { top: 3.7rem; }
  .jump-bar .jump-inner { flex-direction: column; align-items: stretch; }
  .board-filter { max-width: none; }
  .theme-toggle:not(.theme-toggle-nav) .theme-toggle-text { display: none; }
  .theme-toggle:not(.theme-toggle-nav) {
    width: 2.85rem;
    min-width: 2.85rem;
    padding: 0;
  }
  .logo-banner-img { max-height: 100px; }
}

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