/* =====================================================================
   FCT Department of Veterinary Services — Public Site Stylesheet
   Vanilla CSS3, mobile-first. No build step, no external font/CSS CDN.
   ===================================================================== */

@import url("variables.css");

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul, ol { padding: 0; margin: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
input, select, textarea { font: inherit; color: inherit; }

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

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--forest); color: var(--white);
  padding: 12px 18px; z-index: 200; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ---------- Typography ---------- */
.font-display { font-family: var(--font-display); }
h1, h2, h3, .h1, .h2, .h3 { font-family: var(--font-display); color: var(--ink); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
h1, .h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2, .h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); }
h3, .h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
.lede { font-size: 1.15rem; color: var(--ink-soft); line-height: 1.6; max-width: 62ch; }
.eyebrow { font-family: var(--font-body); font-weight: 600; color: var(--teal); font-size: 0.9rem; }
.muted { color: var(--muted); }
.prose { max-width: 68ch; line-height: 1.7; color: var(--ink-soft); }
.prose p + p { margin-top: 1em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 0.95rem; transition: transform .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--forest); color: var(--white); }
.btn-primary:hover { background: var(--forest-dark); }
.btn-ghost { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn-ghost:hover { background: var(--forest-light); }
.btn-light { background: var(--white); color: var(--forest); }
.btn-light:hover { box-shadow: var(--shadow-lifted); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---------- Site header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(245,242,232,0.92);
  backdrop-filter: saturate(140%) blur(8px); border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand__crest { border-radius: 50%; flex-shrink: 0; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--forest-dark); }
.brand__sub { font-size: 0.7rem; color: var(--muted); }

.nav-toggle { display: flex; flex-direction: column; gap: 4px; background: none; border: none; padding: 8px; }
.nav-toggle__bar { width: 22px; height: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.site-nav {
  position: fixed; inset: 62px 0 0 0; background: var(--sand); padding: 8px 20px 24px;
  display: flex; flex-direction: column; gap: 2px; transform: translateY(-8px);
  opacity: 0; pointer-events: none; transition: opacity .18s var(--ease), transform .18s var(--ease);
  border-bottom: 1px solid var(--border);
}
.site-nav.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.site-nav a { padding: 13px 4px; font-weight: 600; border-bottom: 1px solid var(--border); color: var(--ink-soft); }
.site-nav a.is-active { color: var(--forest); }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static; inset: auto; background: none; padding: 0; flex-direction: row;
    opacity: 1; pointer-events: auto; transform: none; border: none; gap: 28px;
  }
  .site-nav a { padding: 6px 0; border: none; font-size: 0.94rem; position: relative; }
  .site-nav a.is-active::after, .site-nav a:hover::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--gold);
  }
}

/* ---------- Hero / carousel (the site's one big moment) ---------- */
.hero { position: relative; background: var(--forest-deep); }
.hero__carousel {
  position: relative; height: 62vh; min-height: 380px; max-height: 620px;
  display: flex; overflow: hidden;
}
.hero__track { display: flex; height: 100%; will-change: transform; }
.hero__slide {
  position: relative; flex: 0 0 auto; height: 100%; width: min(78vw, 520px);
  margin-right: 6px; overflow: hidden; background: var(--forest-dark);
}
.hero__slide img { width: 100%; height: 100%; object-fit: cover; }
.hero__slide-badge {
  position: absolute; left: 12px; bottom: 12px; background: rgba(18,42,24,0.72);
  color: var(--sand); font-size: 0.78rem; padding: 6px 12px; border-radius: 999px;
  backdrop-filter: blur(3px);
}
.hero__overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(18,42,24,0.55) 0%, rgba(18,42,24,0.05) 30%, rgba(18,42,24,0.15) 65%, rgba(18,42,24,0.85) 100%);
}
.hero__copy {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 20px 96px; color: var(--white); pointer-events: none;
}
.hero__copy .wrap { pointer-events: auto; }
.hero__kicker { color: var(--gold); font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; }
.hero__title { font-family: var(--font-display); font-size: clamp(1.8rem, 5vw, 3.1rem); line-height: 1.08; max-width: 16ch; text-shadow: 0 2px 18px rgba(0,0,0,0.35); }
.hero__actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.hero__loading { color: var(--sand); text-align: center; padding-top: 40%; opacity: .7; }

/* Counter callout — the single bold moment, intentionally breaking out of the hero */
.counter-card {
  position: relative; z-index: 5; margin: -64px 16px 0; background: var(--white);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lifted); padding: 26px 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.counter-card__headline { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.counter-card__number { font-family: var(--font-display); font-size: clamp(2.4rem, 7vw, 3.4rem); font-weight: 700; color: var(--gold); line-height: 1; }
.counter-card__label { font-size: 1rem; color: var(--ink-soft); max-width: 34ch; }
.counter-card__chips { display: flex; gap: 8px; flex-wrap: wrap; }
.council-chip {
  display: inline-flex; align-items: baseline; gap: 6px; background: var(--forest-light); color: var(--forest-dark);
  padding: 7px 13px; border-radius: 999px; font-size: 0.82rem; font-weight: 600;
}
.council-chip b { font-size: 0.95rem; }
.counter-card__footnote { font-size: 0.78rem; color: var(--muted); }

@media (min-width: 860px) {
  .counter-card { margin: -84px auto 0; max-width: 880px; padding: 32px 40px; flex-direction: row; align-items: center; justify-content: space-between; gap: 28px; }
  .counter-card__headline { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* ---------- Sections ---------- */
.section { padding: 88px 0 56px; }
.section--tight { padding: 48px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head .link-more { font-weight: 600; color: var(--forest); border-bottom: 2px solid var(--gold); padding-bottom: 2px; white-space: nowrap; }

/* ---------- Stats strip ---------- */
.stats-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.stats-strip__item { background: var(--white); padding: 22px 18px; text-align: center; }
.stats-strip__num { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--forest); }
.stats-strip__label { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
@media (min-width: 700px) { .stats-strip { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }

/* ---------- Programme cards ---------- */
.programme-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 640px) { .programme-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .programme-grid { grid-template-columns: repeat(3, 1fr); } }

.programme-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.programme-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.programme-card__media { position: relative; aspect-ratio: 4/3; background: var(--sand-deep); }
.programme-card__media img { width: 100%; height: 100%; object-fit: cover; }
.status-chip {
  position: absolute; top: 12px; left: 12px; font-size: 0.72rem; font-weight: 700;
  padding: 5px 11px; border-radius: 999px; background: var(--white); color: var(--ink-soft);
}
.status-chip--ongoing { background: var(--forest); color: var(--white); }
.status-chip--upcoming { background: var(--gold); color: var(--forest-deep); }
.status-chip--completed { background: var(--ink-soft); color: var(--white); }
.programme-card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.programme-card__cat { font-size: 0.76rem; color: var(--teal); font-weight: 600; }
.programme-card__title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.programme-card__desc { font-size: 0.9rem; color: var(--muted); line-height: 1.55; flex: 1; }
.programme-card__meta { font-size: 0.78rem; color: var(--muted); display: flex; gap: 10px; margin-top: 4px; }

/* ---------- Filters bar ---------- */
.filters-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.filters-bar select, .filters-bar input[type="search"] {
  background: var(--white); border: 1px solid var(--border); border-radius: 999px;
  padding: 10px 16px; font-size: 0.88rem; min-width: 150px;
}
.filters-bar input[type="search"] { flex: 1; min-width: 200px; }

/* ---------- Empty / skeleton states ---------- */
.skeleton { background: linear-gradient(90deg, var(--sand-deep) 25%, var(--border) 37%, var(--sand-deep) 63%); background-size: 400% 100%; animation: skeleton-shine 1.4s ease infinite; border-radius: var(--radius-sm); }
@keyframes skeleton-shine { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state h3 { color: var(--ink-soft); margin-bottom: 8px; }

/* ---------- Photo gallery grid + lightbox ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .photo-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .photo-grid { grid-template-columns: repeat(4, 1fr); } }
.photo-tile { position: relative; aspect-ratio: 1/1; border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; background: var(--sand-deep); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.photo-tile:hover img { transform: scale(1.06); }
.photo-tile__badge { position: absolute; left: 8px; bottom: 8px; font-size: 0.68rem; background: rgba(18,42,24,0.72); color: var(--sand); padding: 4px 9px; border-radius: 999px; }

.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(10,16,11,0.94); display: none; align-items: center; justify-content: center; padding: 20px; }
.lightbox.is-open { display: flex; }
.lightbox__figure { max-width: min(92vw, 1000px); max-height: 84vh; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.lightbox__figure img { max-height: 74vh; max-width: 100%; object-fit: contain; border-radius: var(--radius-sm); }
.lightbox__caption { color: var(--sand); text-align: center; font-size: 0.9rem; max-width: 60ch; }
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: absolute; background: rgba(255,255,255,0.12); color: var(--white); border: none;
  border-radius: 50%; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.lightbox__close:hover, .lightbox__prev:hover, .lightbox__next:hover { background: rgba(255,255,255,0.24); }
.lightbox__close { top: 18px; right: 18px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .lightbox__prev, .lightbox__next { width: 38px; height: 38px; } }

/* ---------- Impact / collation ---------- */
.impact-hero { background: var(--forest-deep); color: var(--sand); padding: 56px 0 40px; text-align: center; }
.impact-hero__num { font-family: var(--font-display); font-size: clamp(3rem, 9vw, 5rem); color: var(--gold); font-weight: 700; line-height: 1; }
.impact-hero__label { margin-top: 8px; color: var(--sand); opacity: .85; }

.collation-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius-md); overflow: hidden; }
.collation-table th, .collation-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.collation-table th { background: var(--sand-deep); font-weight: 700; color: var(--ink-soft); font-size: 0.78rem; text-transform: none; }
.collation-table tr.is-total td { font-weight: 700; background: var(--forest-light); }
.collation-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.collation-bar-track { background: var(--sand-deep); border-radius: 999px; height: 8px; overflow: hidden; margin-top: 6px; }
.collation-bar-fill { background: var(--teal); height: 100%; border-radius: 999px; }

/* ---------- Programme detail progress panel ---------- */
.progress-panel { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 22px 24px; }
.progress-panel__total { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--forest); }
.progress-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 0.88rem; }
.progress-row__name { width: 120px; flex-shrink: 0; color: var(--ink-soft); }
.progress-row__track { flex: 1; background: var(--sand-deep); border-radius: 999px; height: 10px; overflow: hidden; }
.progress-row__fill { background: var(--forest); height: 100%; border-radius: 999px; }
.progress-row__val { width: 64px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); }

/* ---------- Programme stat pairs ---------- */
.stat-pairs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.stat-pair { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.stat-pair__val { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--teal); }
.stat-pair__label { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

/* ---------- Forms (contact, auth) ---------- */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; color: var(--ink-soft); }
.form-field input[type="text"], .form-field input[type="email"], .form-field input[type="tel"],
.form-field input[type="password"], .form-field input[type="date"], .form-field input[type="number"],
.form-field select, .form-field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--white); font-size: 0.95rem;
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--forest); }
.form-hint { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.form-error { font-size: 0.8rem; color: var(--danger); margin-top: 4px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--forest-deep); padding: 24px; }
.auth-card { background: var(--white); border-radius: var(--radius-lg); padding: 40px 36px; max-width: 420px; width: 100%; box-shadow: var(--shadow-lifted); }
.auth-card__crest { display: block; margin: 0 auto 18px; }
.auth-card h1 { text-align: center; font-size: 1.4rem; margin-bottom: 6px; }
.auth-card p.lede { text-align: center; margin: 0 auto 24px; font-size: 0.92rem; }
.pw-strength { height: 5px; border-radius: 999px; background: var(--sand-deep); overflow: hidden; margin-top: 8px; }
.pw-strength__fill { height: 100%; width: 0%; background: var(--danger); transition: width .2s, background .2s; }

/* ---------- Toasts ---------- */
.toast-stack { position: fixed; bottom: 18px; right: 18px; left: 18px; z-index: 400; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast {
  background: var(--ink); color: var(--white); padding: 13px 18px; border-radius: var(--radius-sm);
  font-size: 0.88rem; box-shadow: var(--shadow-lifted); max-width: 360px; pointer-events: auto;
  animation: toast-in .22s var(--ease);
}
.toast--success { background: var(--forest-dark); }
.toast--error { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest-deep); color: var(--sand); margin-top: 80px; }
.site-footer__inner { display: grid; grid-template-columns: 1fr; gap: 32px; padding: 56px 20px 36px; }
.site-footer h3 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gold); margin-bottom: 12px; font-family: var(--font-body); }
.site-footer__col { display: flex; flex-direction: column; gap: 9px; font-size: 0.9rem; }
.site-footer__col a { color: rgba(245,242,232,0.82); }
.site-footer__col a:hover { color: var(--white); }
.site-footer__tagline { color: rgba(245,242,232,0.65); font-size: 0.86rem; margin-top: 14px; max-width: 34ch; }
.brand--footer .brand__name { color: var(--sand); }
.brand--footer .brand__sub { color: rgba(245,242,232,0.6); }
.site-footer__bottom { border-top: 1px solid rgba(245,242,232,0.15); padding: 16px 20px; font-size: 0.8rem; color: rgba(245,242,232,0.6); }
@media (min-width: 760px) { .site-footer__inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

/* ---------- 404 / error page ---------- */
.error-page { text-align: center; padding: 100px 20px; }
.error-page__code { font-family: var(--font-display); font-size: 5rem; color: var(--gold); font-weight: 700; }

/* ---------- Announcements strip ---------- */
.announce-strip { background: var(--gold-light); border-bottom: 1px solid var(--border); padding: 10px 0; font-size: 0.86rem; text-align: center; color: var(--forest-dark); }

/* ---------- Leadership spotlight ---------- */
.leadership-spotlight { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 48px 0; }
.leadership-spotlight__inner { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.leadership-spotlight__photo { flex-shrink: 0; }
.leadership-spotlight__photo img {
  width: 128px; height: 128px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--forest-light); box-shadow: var(--shadow-card);
}
.leadership-spotlight__name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--ink); margin-top: 2px; }
.leadership-spotlight__title { color: var(--teal); font-weight: 600; font-size: 0.95rem; margin-top: 2px; }
.leadership-spotlight__message { font-family: var(--font-display); font-style: italic; color: var(--ink-soft); max-width: 56ch; margin: 14px auto 0; font-size: 1.05rem; line-height: 1.6; }
@media (min-width: 760px) {
  .leadership-spotlight__inner { flex-direction: row; text-align: left; gap: 32px; }
}

/* ---------- Press / "In the News" ---------- */
.press-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 640px) { .press-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .press-grid { grid-template-columns: repeat(3, 1fr); } }

.press-card {
  display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden; transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.press-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.press-card__media { aspect-ratio: 16/9; background: var(--forest-light); overflow: hidden; }
.press-card__media img { width: 100%; height: 100%; object-fit: cover; }
.press-card.no-image .press-card__media { display: none; }
.press-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.press-card__source { font-size: 0.74rem; font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: 0.03em; }
.press-card__title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; line-height: 1.3; color: var(--ink); }
.press-card__snippet { font-size: 0.86rem; color: var(--muted); line-height: 1.5; flex: 1; }
.press-card__link { font-size: 0.82rem; font-weight: 600; color: var(--forest); margin-top: 4px; }
