/* ==========================================================================
   Commonwealth Housing Trust — site styles
   Built on Bootstrap 5.3. Colours, type and spacing live in the custom
   properties below; the dark theme only redefines those tokens.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  --cht-primary: #0077b6;
  --cht-primary-rgb: 0, 119, 182;
  --cht-navy: #023e8a;
  --cht-navy-rgb: 2, 62, 138;
  --cht-deep: #012a5e;
  --cht-sky: #90e0ef;
  --cht-ice: #caf0f8;

  --bg: #ffffff;
  --bg-alt: #f2f8fc;
  --surface: #ffffff;
  --surface-2: #eaf4fa;
  --text: #1c2b3a;
  --text-muted: #4a5e72;
  --heading: var(--cht-navy);
  --link: #0070ab;
  --link-hover: var(--cht-navy);
  --border: #d6e4ee;
  --shadow-sm: 0 2px 10px rgba(2, 62, 138, 0.08);
  --shadow-md: 0 12px 32px rgba(2, 62, 138, 0.14);
  --nav-bg: rgba(255, 255, 255, 0.94);
  --nav-fg: var(--cht-navy);
  --focus: #ffb703;

  --font-head: "Merriweather", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --section-y: clamp(3.5rem, 7vw, 5.5rem);
  --radius: 0.9rem;
  --radius-sm: 0.55rem;
  --nav-h: 76px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --bs-primary: var(--cht-primary);
  --bs-primary-rgb: var(--cht-primary-rgb);
  --bs-link-color: var(--link);
  --bs-link-hover-color: var(--link-hover);
  --bs-body-font-family: var(--font-body);
  --bs-body-color: var(--text);
  --bs-body-bg: var(--bg);
}

[data-bs-theme="dark"] {
  --bg: #04122b;
  --bg-alt: #071a3a;
  --surface: #0a2250;
  --surface-2: #0d2b60;
  --text: #e4edf6;
  --text-muted: #a9bdd2;
  --heading: #ffffff;
  --link: #66c8f2;
  --link-hover: #ffffff;
  --border: #1d3d70;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
  --nav-bg: rgba(4, 18, 43, 0.94);
  --nav-fg: #ffffff;

  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-secondary-bg: var(--surface);
  --bs-tertiary-bg: var(--bg-alt);
  --bs-border-color: var(--border);
  --bs-emphasis-color: #ffffff;
  --bs-secondary-color: var(--text-muted);
}

/* ---------- 2. Base ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-head);
  color: var(--heading);
  line-height: 1.25;
  font-weight: 700;
}

h2, .h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3, .h3 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); }

main, .site-footer { overflow-x: clip; } /* reveal transforms must never widen the page on phones */

p { margin-bottom: 1.1rem; }
a { color: var(--link); text-underline-offset: 3px; transition: color 0.2s; }
a:hover { color: var(--link-hover); }
img { max-width: 100%; height: auto; }

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

::selection { background: var(--cht-primary); color: #fff; }

.skip-link {
  position: fixed;
  top: -60px;
  left: 1rem;
  z-index: 3000;
  background: var(--cht-navy);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; color: #fff; }

.visually-hidden-focusable:not(:focus):not(:focus-within) { /* bootstrap parity */
  position: absolute !important;
}

/* ---------- 3. Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader__inner { text-align: center; }
.preloader__mark {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #fff;
  padding: 6px;
  box-shadow: var(--shadow-md);
  animation: pulse 1.6s ease-in-out infinite;
}
.preloader__bar {
  width: 150px;
  height: 4px;
  margin: 1.4rem auto 0;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
}
.preloader__bar::after {
  content: "";
  display: block;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, var(--cht-primary), var(--cht-navy));
  border-radius: 4px;
  animation: load 1.2s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(1.08); } }
@keyframes load { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

/* ---------- 4. Navigation ---------- */
.site-nav {
  --nav-link: #fff;
  min-height: var(--nav-h);
  padding-block: 0.6rem;
  background: transparent;
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease), min-height 0.3s var(--ease);
  z-index: 1040;
}
.site-nav.is-solid,
.site-nav.menu-open {
  --nav-link: var(--nav-fg);
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 18px rgba(2, 62, 138, 0.12);
}
.site-nav.is-solid { min-height: 64px; }

.brand-logo {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.65rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}
.brand-logo img { height: 42px; width: auto; display: block; }

.site-nav .nav-link {
  position: relative;
  color: var(--nav-link);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.55rem 0.7rem;
  transition: color 0.2s;
}
.site-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.2rem;
  height: 2px;
  background: var(--cht-sky);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.site-nav .nav-link:hover::after,
.site-nav .nav-link.active::after { transform: scaleX(1); }
.site-nav .nav-link:hover,
.site-nav .nav-link.active { color: var(--nav-link); }
.site-nav .nav-link-cta {
  background: #ffb703;
  color: var(--cht-deep);
  font-weight: 700;
  border-radius: 50rem;
  padding-inline: 1.15rem;
  margin-left: 0.4rem;
  box-shadow: 0 4px 14px rgba(255, 183, 3, 0.45);
}
.site-nav .nav-link-cta::after { display: none; }
.site-nav .nav-link-cta:hover,
.site-nav .nav-link-cta.active { background: #ffc933; color: var(--cht-deep); transform: translateY(-1px); }
.site-nav .nav-link-cta:focus-visible { outline-color: #fff; }

.navbar-toggler {
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #fff;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
}
.site-nav.is-solid .navbar-toggler,
.site-nav.menu-open .navbar-toggler { border-color: var(--nav-fg); color: var(--nav-fg); }
.navbar-toggler:focus { box-shadow: none; }
.toggler-bars { display: grid; gap: 5px; width: 22px; }
.toggler-bars span {
  display: block;
  height: 2.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.navbar-toggler[aria-expanded="true"] .toggler-bars span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.navbar-toggler[aria-expanded="true"] .toggler-bars span:nth-child(2) { opacity: 0; }
.navbar-toggler[aria-expanded="true"] .toggler-bars span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.theme-toggle {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid currentColor;
  background: transparent;
  color: var(--nav-link);
  transition: transform 0.3s var(--ease), background-color 0.2s, color 0.2s;
}
.theme-toggle:hover { transform: rotate(18deg) scale(1.06); background: rgba(255, 255, 255, 0.16); }
.theme-toggle .icon-sun { display: none; }
[data-bs-theme="dark"] .theme-toggle .icon-sun { display: inline; }
[data-bs-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (max-width: 1199.98px) {
  .site-nav .navbar-collapse {
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
    padding: 0.8rem 0 1.2rem;
  }
  .site-nav .nav-link { padding: 0.8rem 0.25rem; border-bottom: 1px solid var(--border); }
  .site-nav .nav-link::after { display: none; }
  .site-nav .nav-link-cta { margin: 0.9rem 0 0; text-align: center; border-bottom: 0; }
}
@media (min-width: 1200px) {
  .site-nav .navbar-nav { gap: 0.1rem; align-items: center; }
}

/* ---------- 5. Buttons ---------- */
.btn { font-weight: 600; border-radius: 50rem; padding: 0.75rem 1.7rem; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s, color 0.2s, border-color 0.2s; }
.btn:hover { transform: translateY(-2px); }
.btn-cht { background: var(--cht-primary); color: #fff; border: 2px solid var(--cht-primary); box-shadow: 0 6px 18px rgba(var(--cht-primary-rgb), 0.35); }
.btn-cht:hover { background: var(--cht-navy); border-color: var(--cht-navy); color: #fff; box-shadow: 0 10px 24px rgba(var(--cht-navy-rgb), 0.4); }
.btn-navy { background: var(--cht-navy); color: #fff; border: 2px solid var(--cht-navy); }
.btn-navy:hover { background: var(--cht-primary); border-color: var(--cht-primary); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, 0.85); }
.btn-ghost:hover { background: #fff; color: var(--cht-navy); border-color: #fff; }
.btn-outline-cht { background: transparent; color: var(--link); border: 2px solid var(--cht-primary); }
.btn-outline-cht:hover { background: var(--cht-primary); color: #fff; }
.btn-light-solid { background: #fff; color: var(--cht-navy); border: 2px solid #fff; }
.btn-light-solid:hover { background: var(--cht-ice); border-color: var(--cht-ice); color: var(--cht-navy); }
.btn-sm { padding: 0.45rem 1.1rem; font-size: 0.9rem; }

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  text-align: center;
  isolation: isolate;
}
.hero__layer { position: absolute; inset: 0; will-change: transform; }
.hero__bg { inset: -14% 0; z-index: -4; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero__overlay {
  z-index: -3;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(2, 62, 138, 0.25), rgba(1, 25, 70, 0.72) 75%),
    linear-gradient(180deg, rgba(1, 25, 70, 0.55) 0%, rgba(2, 62, 138, 0.35) 45%, rgba(1, 30, 80, 0.8) 100%);
}
.hero__orb {
  z-index: -2;
  inset: auto;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}
.hero__orb--a { width: 34vw; height: 34vw; max-width: 480px; max-height: 480px; left: -8vw; top: 12%; background: radial-gradient(circle at 30% 30%, rgba(144, 224, 239, 0.4), rgba(0, 119, 182, 0) 70%); }
.hero__orb--b { width: 26vw; height: 26vw; max-width: 380px; max-height: 380px; right: -6vw; top: 28%; background: radial-gradient(circle at 60% 40%, rgba(0, 119, 182, 0.55), rgba(2, 62, 138, 0) 70%); }
.hero__orb--c { width: 12vw; height: 12vw; max-width: 160px; max-height: 160px; right: 22%; bottom: 24%; background: radial-gradient(circle, rgba(202, 240, 248, 0.35), rgba(202, 240, 248, 0) 70%); }
.hero__skyline { position: absolute; left: 0; right: 0; bottom: -1px; z-index: -1; line-height: 0; }
.hero__skyline svg { width: 100%; height: clamp(70px, 12vw, 170px); display: block; fill: var(--bg); transition: fill 0.35s var(--ease); }
.hero__skyline .far { opacity: 0.35; fill: var(--cht-sky); }
.hero__content { position: relative; padding: calc(var(--nav-h) + 2rem) 0 clamp(5rem, 14vh, 9rem); max-width: 880px; margin-inline: auto; }
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50rem;
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  margin-bottom: 1.4rem;
}
.hero h1,
.page-hero h1 {
  color: #fff;
  font-size: clamp(2.3rem, 6.4vw, 4.6rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  text-shadow: 0 3px 24px rgba(0, 20, 60, 0.55);
  margin-bottom: 1rem;
}
.hero__lead { font-size: clamp(1.1rem, 2.1vw, 1.5rem); font-weight: 500; max-width: 40ch; margin: 0 auto 2rem; text-shadow: 0 2px 14px rgba(0, 20, 60, 0.6); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: clamp(3.5rem, 11vw, 9rem);
  transform: translateX(-50%);
  z-index: 2;
  width: 28px;
  height: 46px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  display: block;
}
.hero__scroll::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: scrollcue 1.8s ease-in-out infinite; }
@keyframes scrollcue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(16px); } }

/* Inner-page hero */
.page-hero {
  position: relative;
  min-height: clamp(340px, 52vh, 520px);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  text-align: center;
  isolation: isolate;
}
.page-hero .hero__content { padding: calc(var(--nav-h) + 1.5rem) 0 4.5rem; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.3rem); }
.page-hero .hero__lead { margin-bottom: 0; font-size: clamp(1rem, 1.8vw, 1.25rem); }
.breadcrumb-lite { display: flex; gap: 0.5rem; justify-content: center; list-style: none; padding: 0; margin: 0 0 1rem; font-size: 0.88rem; font-weight: 500; }
.breadcrumb-lite a { color: var(--cht-ice); text-decoration: none; }
.breadcrumb-lite a:hover { text-decoration: underline; color: #fff; }
.breadcrumb-lite li + li::before { content: "/"; margin-right: 0.5rem; opacity: 0.65; }

/* ---------- 7. Sections ---------- */
.section { padding-block: var(--section-y); position: relative; }
.section--alt { background: var(--bg-alt); transition: background-color 0.35s var(--ease); }
.section-head { max-width: 760px; margin: 0 auto clamp(2rem, 4vw, 3.2rem); text-align: center; }
.section-head--left { text-align: left; margin-inline: 0; }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--link); margin-bottom: 0.7rem; }
.eyebrow::before { content: ""; display: inline-block; width: 28px; height: 2px; background: currentColor; vertical-align: middle; margin-right: 0.6rem; }
.section-head:not(.section-head--left) .eyebrow::after { content: ""; display: inline-block; width: 28px; height: 2px; background: currentColor; vertical-align: middle; margin-left: 0.6rem; }
.lead { font-size: 1.2rem; color: var(--text-muted); }
.text-muted-cht { color: var(--text-muted) !important; }

.prose { max-width: 70ch; }
.prose p { margin-bottom: 1.15rem; }
.prose h3 { margin: 2rem 0 0.8rem; }
.prose--wide { max-width: none; }

.tick-list { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.tick-list li { position: relative; padding-left: 1.9rem; margin-bottom: 0.55rem; }
.tick-list li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; top: 0.1em; width: 1.3rem; height: 1.3rem; display: grid; place-items: center; font-size: 0.65rem; color: #fff; background: var(--cht-primary); border-radius: 50%; line-height: 1.3rem; }
.tick-list--next li::before { content: "\f061"; background: var(--cht-navy); }
[data-bs-theme="dark"] .tick-list--next li::before { background: var(--cht-primary); }

/* Cards */
.card-cht {
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}
.card-cht:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: rgba(var(--cht-primary-rgb), 0.5); }
.card-cht__media { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: var(--surface-2); }
.card-cht__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.card-cht:hover .card-cht__media img { transform: scale(1.06); }
.card-cht__body { padding: 1.4rem 1.5rem 1.6rem; }
.card-cht__meta { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--link); margin-bottom: 0.45rem; }
.card-cht h3 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.card-cht h3 a { color: inherit; text-decoration: none; }
.card-cht h3 a::after { content: ""; position: absolute; inset: 0; }
.card-cht { position: relative; }
.card-cht p { color: var(--text-muted); font-size: 0.98rem; }
.link-arrow { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem; }
.link-arrow i { transition: transform 0.25s var(--ease); }
.link-arrow:hover i { transform: translateX(5px); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.panel h3 { margin-bottom: 1rem; }
.panel--accent { border-top: 5px solid var(--cht-primary); }
.panel--navy { background: linear-gradient(145deg, var(--cht-navy), var(--cht-deep)); color: #e9f3fb; border: 0; }
.panel--navy h3, .panel--navy h2 { color: #fff; }

.figure-frame { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.figure-frame img { width: 100%; display: block; }
.figure-frame::before { content: ""; position: absolute; inset: auto -14px -14px auto; width: 60%; height: 60%; z-index: -1; border-radius: var(--radius); background: var(--cht-primary); opacity: 0.18; }
.figure-wrap { position: relative; z-index: 0; }
.caption { font-size: 0.9rem; color: var(--text-muted); font-style: italic; margin-top: 0.75rem; }

/* ---------- 8. Statistics ---------- */
.stats {
  position: relative;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(3.5rem, 8vw, 6rem);
}
.stats__bg { position: absolute; inset: -20% 0; z-index: -2; will-change: transform; }
.stats__bg img { width: 100%; height: 100%; object-fit: cover; }
.stats::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(135deg, rgba(1, 42, 94, 0.93), rgba(2, 62, 138, 0.86)); }
.stat { text-align: center; padding: 1rem; }
.stat__icon { font-size: 1.7rem; color: var(--cht-sky); margin-bottom: 0.6rem; }
.stat__num { font-family: var(--font-head); font-weight: 900; font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.stat__label { margin-top: 0.6rem; font-size: 0.95rem; letter-spacing: 0.04em; color: var(--cht-ice); font-weight: 500; }

/* ---------- 9. Parallax band ---------- */
.parallax-band {
  position: relative;
  min-height: clamp(380px, 62vh, 560px);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  text-align: center;
  isolation: isolate;
}
.parallax-band__bg { position: absolute; inset: -20% 0; z-index: -2; will-change: transform; }
.parallax-band__bg img { width: 100%; height: 100%; object-fit: cover; }
.parallax-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(1, 25, 70, 0.55), rgba(2, 62, 138, 0.72)); }
.parallax-band blockquote { max-width: 780px; margin: 0 auto; padding: 3rem 1rem; }
.parallax-band blockquote p { font-family: var(--font-head); font-size: clamp(1.4rem, 3.2vw, 2.3rem); line-height: 1.4; font-weight: 700; text-shadow: 0 2px 16px rgba(0, 20, 60, 0.6); }
.parallax-band cite { display: block; font-style: normal; font-weight: 600; letter-spacing: 0.06em; color: var(--cht-ice); }
.parallax-band .quote-mark { font-size: 2.2rem; color: var(--cht-sky); margin-bottom: 0.8rem; }

/* ---------- 10. Timeline ---------- */
.timeline { --line: var(--cht-primary); position: relative; list-style: none; margin: 0; padding: 0; }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; background: linear-gradient(180deg, transparent, var(--line) 6%, var(--line) 94%, transparent); border-radius: 3px; }
.timeline__item { position: relative; width: 50%; padding: 0 3rem 2.6rem 0; }
.timeline__item:nth-child(even) { margin-left: 50%; padding: 0 0 2.6rem 3rem; }
.timeline__dot {
  position: absolute;
  top: 1.25rem;
  right: -11px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  border: 5px solid var(--cht-primary);
  box-shadow: 0 0 0 6px rgba(var(--cht-primary-rgb), 0.18);
  z-index: 1;
  transition: transform 0.3s var(--ease), background-color 0.3s;
}
.timeline__item:nth-child(even) .timeline__dot { right: auto; left: -11px; }
.timeline__item.is-visible .timeline__dot { background: var(--cht-primary); }
.timeline__card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.timeline__card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.timeline__card::after { content: ""; position: absolute; top: 1.35rem; right: -9px; width: 16px; height: 16px; background: var(--surface); border-top: 1px solid var(--border); border-right: 1px solid var(--border); transform: rotate(45deg); }
.timeline__item:nth-child(even) .timeline__card::after { right: auto; left: -9px; transform: rotate(-135deg); }
.timeline__date { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.2rem 0.7rem; border-radius: 50rem; background: var(--cht-primary); color: #fff; margin-bottom: 0.7rem; }
.timeline__card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.timeline__card p:last-child { margin-bottom: 0; }
.timeline__card img { border-radius: var(--radius-sm); margin-bottom: 0.9rem; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
@media (max-width: 767.98px) {
  .timeline::before { left: 14px; margin-left: 0; }
  .timeline__item, .timeline__item:nth-child(even) { width: 100%; margin-left: 0; padding: 0 0 2rem 3rem; }
  .timeline__dot, .timeline__item:nth-child(even) .timeline__dot { left: 4px; right: auto; }
  .timeline__card::after, .timeline__item:nth-child(even) .timeline__card::after { left: -9px; right: auto; transform: rotate(-135deg); }
}

/* ---------- 11. Gallery / lightbox ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.8rem; }
.gallery-grid--lg { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.gallery-item { position: relative; display: block; overflow: hidden; border-radius: var(--radius-sm); aspect-ratio: 4 / 3; background: var(--surface-2); box-shadow: var(--shadow-sm); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease), filter 0.3s; }
.gallery-item::after { content: "\f00e"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.6rem; color: #fff; background: rgba(2, 62, 138, 0.55); opacity: 0; transition: opacity 0.3s; }
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.08); }
.gallery-item:hover::after, .gallery-item:focus-visible::after { opacity: 1; }
.gallery-item[hidden] { display: none; }
.gallery-item__label { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.5rem 0.8rem 0.6rem; font-size: 0.82rem; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(1, 25, 70, 0.85)); z-index: 1; pointer-events: none; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 2rem; }
.filter-btn { border: 2px solid var(--border); background: var(--surface); color: var(--text); padding: 0.45rem 1.1rem; border-radius: 50rem; font-weight: 600; font-size: 0.92rem; transition: all 0.2s; }
.filter-btn:hover { border-color: var(--cht-primary); color: var(--link); }
.filter-btn.is-active, .filter-btn[aria-pressed="true"] { background: var(--cht-primary); border-color: var(--cht-primary); color: #fff; }
.filter-btn .count { opacity: 0.75; font-weight: 500; margin-left: 0.25rem; }

.lightbox { position: fixed; inset: 0; z-index: 4000; display: none; align-items: center; justify-content: center; background: rgba(1, 14, 38, 0.94); padding: 3.5rem 1rem 4.5rem; }
.lightbox.is-open { display: flex; animation: fadein 0.25s ease; }
.lightbox__figure { margin: 0; max-width: min(1200px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox__img { max-width: 100%; max-height: calc(100vh - 12rem); object-fit: contain; border-radius: 6px; box-shadow: 0 10px 50px rgba(0, 0, 0, 0.6); background: #0a1b3a; }
.lightbox__caption { color: #e6f1fa; text-align: center; margin-top: 1rem; font-size: 0.98rem; max-width: 70ch; min-height: 1.5em; }
.lightbox__count { position: absolute; top: 1.1rem; left: 1.2rem; color: #b9d3e8; font-size: 0.9rem; font-weight: 600; }
.lightbox__btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.08); color: #fff; display: grid; place-items: center; font-size: 1.15rem; transition: background-color 0.2s, transform 0.2s; }
.lightbox__btn:hover { background: var(--cht-primary); transform: scale(1.08); }
.lightbox__close { top: 0.9rem; right: 1rem; }
.lightbox__prev { left: 1rem; top: 50%; margin-top: -24px; }
.lightbox__next { right: 1rem; top: 50%; margin-top: -24px; }
@media (max-width: 575.98px) { .lightbox__prev, .lightbox__next { top: auto; bottom: 0.9rem; margin-top: 0; } .lightbox__prev { left: 28%; } .lightbox__next { right: 28%; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
body.lb-open { overflow: hidden; }

/* ---------- 12. Video ---------- */
.video-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); height: 100%; display: flex; flex-direction: column; }
.video-card video { width: 100%; display: block; background: #02122b; aspect-ratio: 16 / 9; object-fit: contain; }
.video-card__body { padding: 1.1rem 1.3rem 1.3rem; }
.video-card__body h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.video-card__body p { font-size: 0.95rem; color: var(--text-muted); margin: 0; }

/* ---------- 13. Team ---------- */
.person { text-align: center; }
.person__photo { width: 170px; height: 170px; margin: 0 auto 1.1rem; border-radius: 50%; overflow: hidden; border: 5px solid var(--surface); box-shadow: 0 0 0 3px var(--cht-primary), var(--shadow-md); }
.person__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.person__name { font-size: 1.25rem; margin-bottom: 0.15rem; }
.person__creds { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; margin-bottom: 0.5rem; }
.person__role { display: inline-block; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; background: var(--cht-primary); color: #fff; padding: 0.2rem 0.8rem; border-radius: 50rem; margin-bottom: 0.9rem; }
.person .card-cht__body { text-align: center; }
.bio-text { text-align: left; font-size: 0.97rem; }
.bio-text p { color: var(--text-muted); }
.patron-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.8rem; }
.patron-list li { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--cht-primary); border-radius: var(--radius-sm); padding: 0.9rem 1.1rem; font-weight: 600; color: var(--heading); }
.patron-list small { display: block; font-weight: 500; color: var(--text-muted); }

/* ---------- 14. Facts / info ---------- */
.fact { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; text-align: center; height: 100%; box-shadow: var(--shadow-sm); }
.fact__num { font-family: var(--font-head); font-size: 2.2rem; font-weight: 900; color: var(--link); line-height: 1.1; }
.fact__label { color: var(--text-muted); font-size: 0.95rem; }
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { display: flex; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--border); }
.info-list li:last-child { border-bottom: 0; }
.info-list__icon { flex: 0 0 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--cht-primary-rgb), 0.12); color: var(--link); font-size: 1.1rem; }
.info-list strong { display: block; color: var(--heading); }
.bank-table { width: 100%; }
.bank-table th { font-weight: 600; color: var(--text-muted); padding: 0.55rem 1rem 0.55rem 0; white-space: nowrap; }
.bank-table td { font-weight: 700; padding: 0.55rem 0; font-variant-numeric: tabular-nums; color: var(--heading); }

.sub-nav { position: sticky; top: calc(var(--nav-h) - 12px); z-index: 900; background: var(--nav-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.sub-nav ul { display: flex; gap: 0.4rem; list-style: none; padding: 0.55rem 0; margin: 0; overflow-x: auto; scrollbar-width: thin; }
.sub-nav a { white-space: nowrap; display: block; padding: 0.35rem 0.95rem; border-radius: 50rem; font-size: 0.9rem; font-weight: 600; text-decoration: none; color: var(--text); }
.sub-nav a:hover, .sub-nav a.active { background: var(--cht-primary); color: #fff; }

/* ---------- 15. FAQ accordion ---------- */
.accordion-cht { --bs-accordion-bg: var(--surface); --bs-accordion-border-color: var(--border); --bs-accordion-btn-bg: var(--surface); --bs-accordion-active-bg: var(--surface-2); --bs-accordion-active-color: var(--heading); --bs-accordion-btn-color: var(--heading); --bs-accordion-color: var(--text); --bs-accordion-btn-focus-box-shadow: 0 0 0 3px rgba(255, 183, 3, 0.55); --bs-accordion-border-radius: var(--radius); }
.accordion-cht .accordion-item { margin-bottom: 0.8rem; border: 1px solid var(--border); border-radius: var(--radius) !important; overflow: hidden; box-shadow: var(--shadow-sm); }
.accordion-cht .accordion-button { font-weight: 600; font-size: 1.05rem; padding: 1.1rem 1.4rem; }
.accordion-cht .accordion-button:not(.collapsed) { box-shadow: inset 4px 0 0 var(--cht-primary); }
[data-bs-theme="dark"] .accordion-cht .accordion-button::after { filter: invert(1) brightness(2); }
.accordion-cht .accordion-body { padding: 0.4rem 1.4rem 1.4rem; color: var(--text-muted); }

/* ---------- 16. News ---------- */
.news-timeline { max-width: 940px; margin-inline: auto; position: relative; }
.news-entry { position: relative; padding-left: 3.2rem; padding-bottom: 2.6rem; }
.news-entry::before { content: ""; position: absolute; left: 13px; top: 1.2rem; bottom: -0.2rem; width: 3px; background: var(--border); }
.news-entry:last-child::before { display: none; }
.news-entry__dot { position: absolute; left: 3px; top: 0.7rem; width: 23px; height: 23px; border-radius: 50%; border: 5px solid var(--cht-primary); background: var(--bg); box-shadow: 0 0 0 6px rgba(var(--cht-primary-rgb), 0.15); }
.news-entry.is-visible .news-entry__dot { background: var(--cht-primary); }
.news-entry__card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.news-entry__cover { aspect-ratio: 21 / 9; overflow: hidden; background: var(--surface-2); }
.news-entry__cover img { width: 100%; height: 100%; object-fit: cover; }
.news-entry__head { padding: 1.5rem 1.7rem 0.4rem; }
.news-entry__date { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--link); }
.news-entry__head h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); margin: 0.35rem 0 0.7rem; }
.news-entry__excerpt { color: var(--text-muted); margin-bottom: 0; }
.news-entry__toggle { margin: 1rem 1.7rem 1.5rem; }
[data-bs-toggle="collapse"] .when-open { display: none; }
[data-bs-toggle="collapse"][aria-expanded="true"] .when-open { display: inline; }
[data-bs-toggle="collapse"][aria-expanded="true"] .when-closed { display: none; }
.news-entry__toggle .fa-chevron-down { transition: transform 0.3s var(--ease); }
.news-entry__toggle[aria-expanded="true"] .fa-chevron-down { transform: rotate(180deg); }
.news-entry__body { padding: 0.4rem 1.7rem 1.8rem; }
.news-entry__body h3 { margin: 1.8rem 0 0.7rem; font-size: 1.3rem; }
.news-entry__body p { max-width: 72ch; }
.news-entry__body .btn { margin-top: 0.5rem; }
.photo-row { display: grid; gap: 0.7rem; margin: 1.3rem 0; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); }
.photo-row a { display: block; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); background: var(--surface-2); }
.photo-row img { width: 100%; height: 100%; max-height: 460px; object-fit: cover; display: block; transition: transform 0.5s var(--ease); }
.photo-row a:hover img { transform: scale(1.04); }
@media (max-width: 575.98px) { .photo-row { grid-template-columns: repeat(min(var(--cols, 1), 2), minmax(0, 1fr)); } .news-entry { padding-left: 2.4rem; } .news-entry__head, .news-entry__body { padding-inline: 1.15rem; } .news-entry__toggle { margin-inline: 1.15rem; } }
.news-video { margin: 1.5rem 0; max-width: 760px; }
.news-video video { width: 100%; border-radius: var(--radius-sm); background: #02122b; }
.news-video figcaption { font-size: 0.9rem; color: var(--text-muted); margin-top: 0.4rem; }

/* ---------- 17. Forms ---------- */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.4rem, 3.5vw, 2.4rem); box-shadow: var(--shadow-md); }
.form-label { font-weight: 600; color: var(--heading); }
.form-control, .form-select { border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 0.75rem 1rem; background-color: var(--bs-body-bg); color: var(--text); transition: border-color 0.2s, box-shadow 0.2s; }
.form-control:focus, .form-select:focus { border-color: var(--cht-primary); box-shadow: 0 0 0 4px rgba(var(--cht-primary-rgb), 0.2); background-color: var(--bs-body-bg); color: var(--text); }
.form-control::placeholder { color: var(--text-muted); opacity: 0.7; }
.invalid-feedback { font-weight: 500; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { display: none; border-radius: var(--radius-sm); padding: 1rem 1.2rem; font-weight: 500; }
.form-status.is-visible { display: block; }
.form-status.is-success { background: rgba(25, 135, 84, 0.14); border: 1px solid #198754; color: var(--text); }
.form-status.is-error { background: rgba(220, 53, 69, 0.12); border: 1px solid #dc3545; color: var(--text); }

/* ---------- 18. CTA band ---------- */
.cta-band { position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(120deg, var(--cht-navy), var(--cht-primary)); color: #fff; padding-block: clamp(3rem, 6vw, 4.5rem); }
.cta-band::before, .cta-band::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.08); z-index: -1; }
.cta-band::before { width: 380px; height: 380px; right: -90px; top: -160px; }
.cta-band::after { width: 240px; height: 240px; left: -70px; bottom: -120px; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #e3f2fb; }

/* ---------- 19. Footer ---------- */
.site-footer { background: var(--cht-deep); color: #cfe3f3; padding-block: 1.1rem; font-size: 0.92rem; }
[data-bs-theme="dark"] .site-footer { background: #020b1c; border-top: 1px solid var(--border); }
.site-footer__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.5rem; }
.site-footer p { margin: 0; }
.social-links { display: flex; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.social-links a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); text-decoration: none; transition: background-color 0.2s, transform 0.2s, color 0.2s; }
.social-links a:hover { background: var(--cht-primary); transform: translateY(-3px); color: #fff; border-color: var(--cht-primary); }
.social-links--lg a { width: 46px; height: 46px; font-size: 1.15rem; border-color: var(--border); color: var(--link); }
.social-links--lg a:hover { color: #fff; }

/* ---------- 20. Floating UI ---------- */
.back-to-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 1030;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background: var(--cht-navy);
  color: #fff;
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s, transform 0.3s var(--ease), visibility 0.3s, background-color 0.2s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--cht-primary); }
[data-bs-theme="dark"] .back-to-top { background: var(--cht-primary); border: 2px solid #fff; }

.sticky-cta {
  position: fixed;
  left: 1.2rem;
  bottom: 1.2rem;
  z-index: 1030;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.4rem;
  border-radius: 50rem;
  background: linear-gradient(135deg, var(--cht-primary), var(--cht-navy));
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 26px rgba(var(--cht-navy-rgb), 0.5);
  border: 2px solid rgba(255, 255, 255, 0.85);
  transition: transform 0.3s var(--ease), box-shadow 0.3s, opacity 0.3s;
}
.sticky-cta:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 12px 30px rgba(var(--cht-navy-rgb), 0.6); }
.sticky-cta i { animation: beat 2.2s ease-in-out infinite; }
@keyframes beat { 0%, 60%, 100% { transform: scale(1); } 70% { transform: scale(1.25); } 80% { transform: scale(1); } 90% { transform: scale(1.18); } }
.sticky-cta.is-hidden { opacity: 0; pointer-events: none; transform: translateY(20px); }
@media (max-width: 575.98px) { .sticky-cta { padding: 0.75rem 1.1rem; font-size: 0.95rem; left: 0.8rem; bottom: 0.8rem; } .back-to-top { right: 0.8rem; bottom: 0.8rem; width: 46px; height: 46px; } }

/* ---------- 21. Reveal animations ---------- */
[data-reveal] { opacity: 0; transform: translate3d(0, 34px, 0); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--delay, 0s); }
[data-reveal="left"] { transform: translate3d(-32px, 0, 0); }
[data-reveal="right"] { transform: translate3d(32px, 0, 0); }
[data-reveal="zoom"] { transform: scale(0.92); }
[data-reveal].is-visible { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* ---------- 22. Misc ---------- */
.doc-card { display: flex; gap: 1.4rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-sm); }
.doc-card img { width: 120px; border-radius: 6px; box-shadow: var(--shadow-sm); flex: none; }
.quote-card { position: relative; background: var(--surface); border-left: 5px solid var(--cht-primary); border-radius: var(--radius-sm); padding: 1.2rem 1.5rem; box-shadow: var(--shadow-sm); font-style: italic; }
.badge-soft { display: inline-block; background: rgba(var(--cht-primary-rgb), 0.14); color: var(--link); padding: 0.25rem 0.8rem; border-radius: 50rem; font-size: 0.82rem; font-weight: 700; }
.divider-wave { line-height: 0; }
hr.soft { border: 0; border-top: 1px solid var(--border); opacity: 1; margin: 2.5rem 0; }
.map-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); background: #fff; }
.map-frame img { width: 100%; display: block; }
.table-cht { --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-border-color: var(--border); }
.error-page { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 6rem 1rem 3rem; }
.error-page .code { font-family: var(--font-head); font-weight: 900; font-size: clamp(5rem, 18vw, 10rem); line-height: 1; color: var(--cht-primary); }

@media print {
  .site-nav, .sticky-cta, .back-to-top, .preloader, .lightbox, .hero__scroll { display: none !important; }
  .hero, .page-hero { min-height: 0; color: #000; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

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