/* ============================================================
   BLDA site styles
   Colors and type follow the Framer "BLDA Home" design.
   ============================================================ */

:root {
  --navy: #002658;
  --gold: #EEC667;
  --coral: #FB8869;
  --mint: #65CDA1;

  /* Soft off-white page; cards stay pure white so they lift off it */
  --bg: #F6F5F1;
  --text: #000000;
  --muted: #333333;
  --card-bg: #FFFFFF;
  --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  --rule: #000000;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Content never grows past this, so zooming out keeps the layout intact */
  --max-width: 75rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --header-h: 5rem;
  /* Vertical rhythm shared by every main section */
  --space-section: clamp(3.5rem, 7vw, 6rem);
  /* Keyboard focus ring: must reach 3:1 against whatever it sits on */
  --focus: var(--navy);

  color-scheme: light;
}

/* Dark theme. The data-theme attribute is set before paint by the inline
   script in each page's <head>: saved choice first, else the system setting. */
:root[data-theme="dark"] {
  color-scheme: dark;
  /* Charcoal rather than pure black; cards one step lighter */
  --bg: #14161A;
  --text: #FFFFFF;
  --muted: #D6D6D6;
  --card-bg: #1D2026;
  --card-shadow: 0 0 0 1px #33373F;
  --rule: #FFFFFF;
  --focus: var(--gold);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Images scale down with their container and never stretch past it */
img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }

.container {
  width: 100%;
  max-width: calc(var(--max-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--gold);
  color: #000;
  font-weight: 700;
  border-radius: 0.5rem;
}
.skip-link:focus { top: 1rem; }

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

/* Gold ring on the navy header/footer, navy ring on gold and white panels */
.site-header :focus-visible,
.site-footer :focus-visible { outline-color: var(--gold); }
.mission :focus-visible,
.cta-box :focus-visible,
.announce :focus-visible { outline-color: var(--navy); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.125rem;
  min-width: 12.5rem;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.12); transform: translateY(-1px); }

.btn-navy { background: var(--navy); color: #FFFFFF; }
/* Navy text on mint for readable contrast (white on mint is too faint) */
.btn-mint { background: var(--mint); color: var(--navy); }

[data-theme="dark"] .hero .btn-navy { box-shadow: inset 0 0 0 1px #FFFFFF; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  color: #FFFFFF;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.brand img {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
}

.site-nav ul {
  display: flex;
  gap: clamp(1.25rem, 3vw, 3.5rem);
}

.site-nav a {
  display: block;
  padding: 0.5rem 0;
  font-size: 1.125rem;
  text-decoration: none;
  white-space: nowrap;
  color: #FFFFFF;
}
.site-nav a:hover { color: var(--gold); }
.site-nav a[aria-current="page"] {
  color: var(--gold);
  font-weight: 700;
}

/* Desktop: centre the nav in the bar, like the design */
@media (min-width: 48rem) {
  .header-inner { position: relative; }
  .site-nav {
    position: absolute;
    left: 50%;
    width: max-content;
    transform: translateX(-50%);
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Light/dark switch: shows the moon in light mode, the sun in dark mode */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: transparent;
  color: #FFFFFF;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { color: var(--gold); border-color: var(--gold); }
.theme-toggle svg { width: 1.25rem; height: 1.25rem; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.nav-toggle {
  display: none;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #FFFFFF;
  cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 1.5rem;
  height: 2px;
  margin-inline: auto;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

/* Mobile: hamburger with a drop-down panel */
@media (max-width: 47.99rem) {
  .nav-toggle { display: block; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: none;
  }
  .site-nav.is-open { display: block; }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--gutter) 1rem;
  }
  .site-nav a {
    padding: 0.875rem 0;
    font-size: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .site-nav li:last-child a { border-bottom: 0; }

  /* Without JS, keep the links visible */
  .no-js .nav-toggle { display: none; }
  .no-js .site-nav { position: static; display: block; }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(3rem, 8vw, 7rem) clamp(3.5rem, 8vw, 7rem);
}

.hero h1 {
  max-width: 14em;
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.hero-sub {
  max-width: 34rem;
  margin-top: 1.5rem;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
}

.hero .btn {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

.hero-inner {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
}

@media (min-width: 62rem) {
  .hero-inner { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
}

/* Decorative infinity loop: scales with its column, never wider than 34rem */
.hero-art {
  position: relative;
  isolation: isolate;
  justify-self: center;
  width: min(85%, 34rem);
}

@media (min-width: 62rem) {
  .hero-art { width: 100%; }
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: -15% 0;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(238, 198, 103, 0.3), transparent);
}

.hero-art svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.hero-art-line,
.hero-art-glow {
  fill: none;
  stroke: url(#inf-grad);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-art-line {
  stroke-width: 26;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-loop 2.4s cubic-bezier(0.65, 0, 0.35, 1) both;
}

.hero-art-glow {
  stroke-width: 40;
  opacity: 0.25;
}

[data-theme="dark"] .hero-art-glow { opacity: 0.45; }
[data-theme="dark"] .hero-art::before { background: radial-gradient(closest-side, rgba(238, 198, 103, 0.14), transparent); }

@keyframes draw-loop {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

.br-desktop { display: none; }
@media (min-width: 48rem) {
  .br-desktop { display: inline; }
}

/* ---------- Mission band ---------- */
.mission {
  background: var(--gold);
  color: #000000;
  border-block: 2px solid #000000;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}

.mission p {
  max-width: 66rem;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  font-weight: 700;
  line-height: 1.45;
}

.mission em {
  font-style: italic;
  color: var(--navy);
}

/* ---------- What we offer ---------- */
.offers {
  padding-block: var(--space-section);
}

.section-title {
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  font-weight: 400;
  line-height: 1.2;
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: clamp(1.5rem, 4vw, 4rem);
  margin-top: clamp(2rem, 4vw, 3.5rem);
  /* Keep the three cards together and centred instead of stretching edge to edge */
  max-width: 67.5rem;
  margin-inline: auto;
}

.offer-card {
  background: var(--navy);
  color: var(--gold);
  padding: 2.25rem 1.875rem;
}

.offer-card h3 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.offer-card p {
  font-size: 1.125rem;
  line-height: 1.45;
}

/* ---------- Our community ---------- */
.community {
  border-block: 1px solid var(--rule);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}

.community-inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 62rem) {
  .community-inner { grid-template-columns: 1fr 1fr; gap: 4rem; }
}

.eyebrow {
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.community-lead {
  margin-top: 1.75rem;
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
}

.community-text p:last-child {
  margin-top: 1rem;
  max-width: 52rem;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pill-list li {
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  background: var(--coral);
  color: var(--navy);
  font-size: 1rem;
  font-weight: 600;
}

/* ---------- Board ---------- */
.board {
  padding-block: var(--space-section) 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: clamp(1.25rem, 3vw, 3rem);
  max-width: 76rem;
  margin-inline: auto;
}

@media (min-width: 62rem) {
  .team-grid { grid-template-columns: repeat(3, 1fr); }
}

.team-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.25rem 1.25rem 2.75rem;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}

/* Fixed-size circular photo: crops instead of stretching at any zoom level */
.team-card img {
  width: 7.5rem;
  height: 7.5rem;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
}

.team-card h3 {
  margin-top: 1.75rem;
  font-size: 1.375rem;
  font-weight: 400;
}

.team-card p {
  margin-top: 0.375rem;
  font-size: 1.0625rem;
  color: var(--muted);
}

.team-linkedin {
  position: absolute;
  right: 1rem;
  bottom: 0.875rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: #0A66C2;
}
.team-linkedin svg { width: 1.125rem; height: 1.125rem; }

/* Dark mode: LinkedIn blue tile with white "in", like LinkedIn's own dark logo.
   The white backing fills the letter cut-outs so they stay readable. */
[data-theme="dark"] .team-linkedin svg {
  border-radius: 2px;
  background: #FFFFFF;
}

/* ---------- Call to action ---------- */
.cta {
  padding-block: var(--space-section);
}

.cta-box {
  max-width: 84rem;
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 5.5rem) clamp(1.25rem, 5vw, 4rem);
  background: var(--gold);
  color: #000000;
  text-align: center;
}

.cta-box h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  font-weight: 400;
  line-height: 1.25;
}

.cta-box p {
  max-width: 58rem;
  margin: 1.5rem auto 0;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem clamp(1.5rem, 8vw, 7rem);
  margin-top: 2rem;
}

/* ============================================================
   Inner pages
   ============================================================ */

/* ---------- Page intro ---------- */
.page-hero {
  padding-block: clamp(3rem, 6vw, 4.5rem) clamp(4rem, 8vw, 7rem);
}

.page-hero h1 {
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.page-hero p {
  max-width: 46rem;
  margin-top: 1.75rem;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
}

/* ---------- Announcement band (Events) ---------- */
/* Stays white in dark mode too, matching the dark mockup */
.announce {
  background: #FFFFFF;
  color: #000000;
  border-block: 1px solid var(--navy);
  padding-block: var(--space-section);
  text-align: center;
}
/* Light band in dark mode too, but softened so it doesn't glare */
[data-theme="dark"] .announce { background: #ECEAE4; }

.tag {
  display: inline-block;
  padding: 0.625rem 2.25rem;
  border-radius: 999px;
  background: var(--navy);
  color: var(--gold);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.announce h2 {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 3rem);
  font-weight: 400;
  line-height: 1.2;
}

.announce h2 + p {
  max-width: 58rem;
  margin: 1.75rem auto 0;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
}

/* ---------- Event cards (Events) ---------- */
.event-list {
  display: grid;
  gap: 1.25rem;
  max-width: 52rem;
  margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
  text-align: left;
}

.event-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: #FFFFFF;
  border: 1px solid #D9DEE6;
  border-left: 6px solid var(--gold);
}

.event-date {
  display: grid;
  place-items: center;
  width: 4.5rem;
  padding: 0.625rem 0;
  background: var(--navy);
  color: #FFFFFF;
  text-align: center;
  line-height: 1.1;
}

.event-month {
  color: var(--gold);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.event-day {
  font-size: 1.75rem;
  font-weight: 700;
}

.event-body h3 {
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  font-weight: 600;
  line-height: 1.25;
}

.event-meta {
  margin-top: 0.375rem;
  color: #4A4A4A;
  font-size: 1rem;
  font-weight: 600;
}

.event-body .event-meta + p {
  margin-top: 0.75rem;
  font-size: 1.0625rem;
}

.event-body .btn {
  margin-top: 1.25rem;
  min-width: 8.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 1.5rem;
  font-size: 1rem;
}

@media (max-width: 30rem) {
  .event-card { grid-template-columns: 1fr; }
}

/* ---------- Areas of programming (Events) ---------- */
.programming {
  padding-block: var(--space-section) 0;
}

.subsection-title {
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);
  font-weight: 400;
  line-height: 1.2;
}

.programming .subsection-title + p {
  margin-top: 0.75rem;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
}

.programming .pill-list {
  margin-top: clamp(2rem, 4vw, 3.5rem);
  gap: 0.75rem;
}

.pill-list--alt li {
  padding: 0.625rem 1.25rem;
  font-size: 1.0625rem;
  font-weight: 400;
}

/* Dark mockup swaps the coral pills for mint */
[data-theme="dark"] .pill-list--alt li { background: var(--mint); }

/* ---------- Team page ---------- */
.board--page {
  padding-top: 0;
}

.board--page .subsection-title {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

/* ---------- Contact page ---------- */
.contact-hero {
  display: grid;
  place-items: center;
  min-height: min(40rem, 70vh);
  padding-block: clamp(4rem, 10vw, 8rem);
  text-align: center;
}

.contact-hero h1 {
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.contact-hero p {
  max-width: 50rem;
  margin: 1.75rem auto 0;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
}

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

.btn-lg {
  min-width: 15rem;
  min-height: 3.5rem;
  font-size: 1.25rem;
  font-weight: 400;
}

.text-link {
  font-size: 1rem;
  text-underline-offset: 0.2em;
}
.text-link:hover { color: var(--navy); }

[data-theme="dark"] .contact-hero .btn-navy { box-shadow: inset 0 0 0 1px #FFFFFF; }

/* Secondary button: outlined, sits under the main Email button */
.btn-outline {
  gap: 0.625rem;
  background: transparent;
  color: var(--navy);
  box-shadow: inset 0 0 0 2px var(--navy);
}
.btn-outline:hover { background: var(--navy); color: #FFFFFF; }
.btn-icon { width: 1.375rem; height: 1.375rem; flex-shrink: 0; }
/* Stacked contact buttons share one width */
.contact-actions .btn-lg { width: 100%; max-width: 19.5rem; }
[data-theme="dark"] .btn-outline { color: #FFFFFF; box-shadow: inset 0 0 0 2px #FFFFFF; }
[data-theme="dark"] .btn-outline:hover { background: #FFFFFF; color: var(--navy); }
[data-theme="dark"] .text-link:hover { color: var(--gold); }

/* 404 page reuses the contact hero layout */
.not-found .tag { margin: 0 auto; }
.not-found h1 { margin-top: 1.5rem; }
.not-found .cta-actions { margin-top: clamp(2rem, 5vw, 3rem); }

.contact-form-section {
  padding-bottom: var(--space-section);
}

.form-card {
  max-width: 45rem;
  margin-inline: auto;
  padding: clamp(1.5rem, 5vw, 3rem);
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}

.form-note {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 1rem;
}

.form-status {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--mint);
  background: rgba(101, 205, 161, 0.15);
  font-weight: 600;
}
.form-status.is-error {
  border-left-color: var(--coral);
  background: rgba(251, 136, 105, 0.15);
}

#contact-form {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.field-row {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 40rem) {
  .field-row { grid-template-columns: 1fr 1fr; }
}

.field {
  display: grid;
  gap: 0.5rem;
}

.field label {
  font-size: 1rem;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid #8A8A8A;
  border-radius: 0.375rem;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.field textarea { resize: vertical; min-height: 8rem; }

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  border-color: var(--navy);
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

#contact-form .btn {
  justify-self: start;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}
#contact-form .btn:disabled { opacity: 0.6; cursor: wait; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #FFFFFF;
  padding-top: clamp(3rem, 6vw, 5rem);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
}

.footer-logo {
  width: clamp(8.5rem, 15vw, 12.5rem);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem clamp(3rem, 8vw, 8rem);
}

.footer-cols h2 {
  color: var(--gold);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-cols nav li + li { margin-top: 0.125rem; }
/* Padding makes each link a comfortable thumb target on phones */
.footer-cols nav a { display: inline-block; padding-block: 0.625rem; text-decoration: none; }
.footer-cols nav a:hover { color: var(--gold); text-decoration: underline; }
.footer-cols nav a[aria-current="page"] { color: var(--gold); font-weight: 700; }

.social { display: flex; flex-direction: column; gap: 0.25rem; }
.social a {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: -0.75rem;
  color: #FFFFFF;
}
.social a:hover { color: var(--gold); }
.social svg { width: 1.25rem; height: 1.25rem; }

.footer-bottom {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-block: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.75);
}

@media (max-width: 35rem) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- Polish details ---------- */

/* Icons on the What We Offer cards */
.offer-icon {
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1.25rem;
  color: var(--gold);
}

/* Gold ring around board photos, with a gap in the page colour */
.team-card img {
  box-shadow: 0 0 0 3px var(--card-bg), 0 0 0 6px var(--gold);
}

/* Gold accent bar under page titles */
.page-hero h1::after,
.contact-hero h1::after {
  content: "";
  display: block;
  width: 4rem;
  height: 6px;
  margin-top: 1.25rem;
  border-radius: 3px;
  background: var(--gold);
}
.contact-hero h1::after { margin-inline: auto; }

/* Faint infinity watermark in the gold call-to-action boxes */
.cta-box {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.cta-box::before {
  content: "";
  position: absolute;
  right: -4rem;
  bottom: -3.5rem;
  z-index: -1;
  width: 24rem;
  aspect-ratio: 400 / 220;
  opacity: 0.09;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 220'%3E%3Cpath d='M200 110 C240 40 350 40 350 110 C350 180 240 180 200 110 C160 40 50 40 50 110 C50 180 160 180 200 110 Z' fill='none' stroke='%23002658' stroke-width='26' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}

/* Footer logo with a one-line description */
.footer-brand {
  display: grid;
  gap: 1.25rem;
  max-width: 17rem;
}
.footer-brand p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Header gains a shadow once the page scrolls under it */
.site-header { transition: box-shadow 0.2s ease; }
.site-header.is-scrolled { box-shadow: 0 2px 14px rgba(0, 0, 0, 0.28); }

/* Jump links land below the sticky header instead of under it */
[id] { scroll-margin-top: calc(var(--header-h) + 1.25rem); }

/* ---------- Section heading row (title + link) ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  max-width: 76rem;
  margin: 0 auto clamp(1.75rem, 3.5vw, 3rem);
}

/* ---------- Hover lift (mouse/trackpad only) ---------- */
.offer-card,
.team-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
  .offer-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0, 38, 88, 0.25); }
  .team-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18); }
  [data-theme="dark"] .team-card:hover { box-shadow: 0 0 0 1px #6A6A6A, 0 10px 24px rgba(255, 255, 255, 0.06); }
}

/* ---------- Accessibility in Tech page ---------- */
.a11y-idea p,
.a11y-example .subsection-title + p {
  max-width: 46rem;
  margin-top: 0.75rem;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
}

.a11y-example,
.a11y-why { padding-top: var(--space-section); }

kbd {
  padding: 0.1em 0.4em;
  border: 1px solid currentColor;
  border-radius: 0.25rem;
  font-family: inherit;
  font-size: 0.9em;
}

.demo-grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}
@media (min-width: 56rem) {
  .demo-grid { grid-template-columns: 1fr 1fr; }
}

.demo-panel {
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}
.demo-panel h3 { margin-top: 1rem; font-size: 1.5rem; }
.demo-panel h4 { margin-top: 1.75rem; font-size: 1.0625rem; }

/* Badges carry an icon and a word, never color alone */
.demo-badge {
  align-self: flex-start;
  display: inline-flex;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  font-weight: 700;
  color: #000000;
}
.demo-badge--bad { background: #F7B8A6; }
.demo-badge--good { background: #A9E4CB; }

.demo-notes {
  display: grid;
  gap: 0.625rem;
  margin-top: 0.75rem;
  padding-left: 1.25rem;
  list-style: disc;
}

/* The intentionally broken form. Low contrast and missing labels are the point. */
.demo-bad {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}
.demo-bad input {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid #DDDDDD;
  border-radius: 0.375rem;
  background: #FFFFFF;
  color: #9A9A9A;
  font: inherit;
}
.demo-bad input::placeholder { color: #C4C4C4; }
.demo-bad input:focus { outline: none; }
.demo-bad input.is-wrong { border-color: #E53935; }
.demo-bad-hint { color: #BDBDBD; font-size: 0.875rem; }
.demo-bad-btn {
  justify-self: start;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  background: #9FB3CF;
  color: #FFFFFF;
  cursor: pointer;
  user-select: none;
}

.demo-good {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}
.demo-good .btn { justify-self: start; border: 0; font-family: inherit; cursor: pointer; }
[data-theme="dark"] .demo-good .btn-navy { box-shadow: inset 0 0 0 1px #FFFFFF; }
.demo-good input[aria-invalid="true"] { border: 2px solid #B3261E; }
[data-theme="dark"] .demo-good input[aria-invalid="true"] { border-color: #FF8A80; }
.demo-error {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-weight: 600;
  color: #B3261E;
}
.demo-error span {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: #B3261E;
  color: #FFFFFF;
  font-size: 0.875rem;
}
.demo-error[hidden] { display: none; }
[data-theme="dark"] .demo-error { color: #FF8A80; }
[data-theme="dark"] .demo-error span { background: #FF8A80; color: #000000; }
.demo-status:empty { display: none; }
.demo-status {
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--mint);
  background: rgba(101, 205, 161, 0.15);
  font-weight: 600;
}

.demo-footnote {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ----- Example tabs ----- */
.demo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: clamp(1.5rem, 3vw, 2rem);
  border-bottom: 2px solid var(--navy);
}
[data-theme="dark"] .demo-tabs { border-bottom-color: #FFFFFF; }
.demo-tabs[hidden] { display: none; }
.demo-tab {
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem;
  border: 2px solid transparent;
  border-bottom: 0;
  border-radius: 0.5rem 0.5rem 0 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.demo-tab:hover { text-decoration: underline; text-underline-offset: 0.2em; }
/* Phones: keep all three tabs on one row */
@media (max-width: 30rem) {
  .demo-tabs { gap: 0.25rem; }
  .demo-tab { padding-inline: 0.75rem; font-size: 1rem; }
}
/* Selected tab: filled, plus a gold underline so it isn't color alone */
.demo-tab[aria-selected="true"] {
  background: var(--navy);
  color: #FFFFFF;
  box-shadow: inset 0 -4px 0 var(--gold);
}
[data-theme="dark"] .demo-tab[aria-selected="true"] { background: #FFFFFF; color: var(--navy); }

.demo-tabpanel { margin-top: clamp(1.5rem, 3vw, 2rem); }
.demo-tabpanel[hidden] { display: none; }
.demo-tabpanel:focus-visible { outline-offset: 6px; }
.demo-intro { max-width: 46rem; }

.demo-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.demo-panel-head .demo-badge { align-self: center; }

.demo-highlight {
  min-height: 2.5rem;
  padding: 0.375rem 1rem;
  border: 2px solid var(--text);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}
.demo-highlight[aria-pressed="true"] { background: var(--text); color: var(--bg); }

/* Numbered issue markers that match the "What goes wrong" list */
.issue { position: relative; }
.issue--inline { display: inline-block; }
.is-highlighting .issue {
  outline: 3px dashed #C2410C;
  outline-offset: 4px;
  border-radius: 2px;
}
.is-highlighting .issue::after {
  content: attr(data-issue);
  position: absolute;
  top: -0.875rem;
  left: -0.875rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #C2410C;
  color: #FFFFFF;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
}
[data-theme="dark"] .is-highlighting .issue { outline-color: #FDBA74; }
[data-theme="dark"] .is-highlighting .issue::after { background: #FDBA74; color: #000000; }
.demo-notes--issues { list-style: decimal; }
.is-highlighting .demo-notes--issues li::marker { color: #C2410C; font-weight: 700; }
[data-theme="dark"] .is-highlighting .demo-notes--issues li::marker { color: #FDBA74; }

/* Per-tab "Why it matters" and sources */
.tab-why {
  margin-top: clamp(1.25rem, 3vw, 2rem);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border-left: 6px solid var(--gold);
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}
.tab-why h3 { font-size: 1.25rem; }
.tab-why > p { max-width: 50rem; margin-top: 0.5rem; }
.tab-why h4 { margin-top: 1.25rem; font-size: 0.9375rem; }
.tab-sources {
  display: grid;
  gap: 0.375rem;
  margin-top: 0.5rem;
  padding-left: 1.25rem;
  list-style: disc;
  color: var(--muted);
  font-size: 0.875rem;
}
.tab-sources a { color: var(--text); text-underline-offset: 0.2em; }

/* ----- Screen reader prototype ----- */
.sr-card {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #D9DEE6;
  border-radius: 0.5rem;
  background: #FFFFFF;
  color: #000000;
}
.sr-card .sr-fake-heading,
.sr-card .sr-title { margin: 0; font-size: 1.25rem; font-weight: 700; }
.sr-img {
  width: 100%;
  height: 7rem;
  object-fit: cover;
  border-radius: 0.375rem;
}
.sr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.sr-icon-btn {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid var(--navy);
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--navy);
  cursor: pointer;
}
.sr-icon-btn svg { width: 1.25rem; height: 1.25rem; }
.sr-link { color: var(--navy); font-weight: 600; text-underline-offset: 0.2em; }
.sr-card :focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

/* The item being "read" gets a visible box */
.is-reading {
  outline: 3px solid var(--mint);
  outline-offset: 3px;
  border-radius: 2px;
  box-shadow: 0 0 0 7px rgba(101, 205, 161, 0.25);
}

.sr-player { margin-top: 1rem; }
.sr-output {
  min-height: 3.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  background: #111418;
  color: #FFFFFF;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.9375rem;
}
.sr-output::before { content: "\1F50A  "; }
.sr-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 0.75rem; }
.sr-btn { min-width: 0; min-height: 2.75rem; padding-inline: 1.25rem; border: 0; font-family: inherit; cursor: pointer; }
[data-theme="dark"] .sr-btn { box-shadow: inset 0 0 0 1px #FFFFFF; }
.sr-reset {
  min-height: 2.75rem;
  padding: 0 0.5rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

/* ----- Keyboard prototype ----- */
.kb-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem;
  min-height: 9rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #D9DEE6;
  border-radius: 0.5rem;
  background: #FFFFFF;
  color: #000000;
}
.kb-btn,
.kb-fake-btn {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.125rem;
  border: 2px solid var(--navy);
  border-radius: 0.375rem;
  background: #FFFFFF;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.kb-btn:focus-visible { outline: 3px solid #C2410C; outline-offset: 3px; }
.kb-btn:hover, .kb-fake-btn:hover { background: #EEF2F8; }
.kb-btn.is-done { background: var(--navy); color: #FFFFFF; }
/* The broken one: focus outline removed, so focus is invisible */
.kb-no-focus:focus, .kb-no-focus:focus-visible { outline: none; }

.kb-hover-menu,
.kb-menu-wrap { position: relative; }
.kb-menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  z-index: 3;
  display: none;
  min-width: 10rem;
  padding: 0.375rem;
  border: 1px solid #C9D1DD;
  border-radius: 0.375rem;
  background: #FFFFFF;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.kb-hover-menu:hover .kb-menu { display: block; }
.kb-menu--good:not([hidden]) { display: block; }
.kb-menu-item {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: #000000;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.kb-menu-item:hover { background: #EEF2F8; }
.kb-menu-item:focus-visible { outline: 3px solid #C2410C; outline-offset: -3px; }

.kb-tracker {
  margin-top: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-left: 4px solid var(--gold);
  background: rgba(238, 198, 103, 0.18);
  font-size: 0.9375rem;
}
.kb-tracker:empty { display: none; }

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}
.why-card {
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--navy);
  color: #FFFFFF;
}
.why-stat {
  color: var(--gold);
  font-size: clamp(2.25rem, 1.8rem + 1.6vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
}
.why-card p + p { margin-top: 0.75rem; }
.why-card .why-source { font-size: 0.875rem; color: #D6DCE6; }
.why-card a { color: #FFFFFF; text-underline-offset: 0.2em; }
.why-card a:hover { color: var(--gold); }
.why-card :focus-visible { outline-color: var(--gold); }

.a11y-callout {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  border-left: 6px solid var(--gold);
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}
.a11y-callout h3 { font-size: 1.375rem; }

.a11y-sources {
  padding-bottom: var(--space-section);
  font-size: 0.9375rem;
}
.a11y-sources h2 { font-size: 1.25rem; }
.a11y-sources ol {
  display: grid;
  gap: 0.5rem;
  max-width: 50rem;
  margin-top: 0.75rem;
  padding-left: 1.25rem;
  list-style: decimal;
  color: var(--muted);
}
.a11y-sources a { color: var(--text); text-underline-offset: 0.2em; overflow-wrap: anywhere; }
.a11y-callout p { max-width: 50rem; margin-top: 0.75rem; }

/* ---------- Scroll reveal ----------
   main.js adds .reveal only when JS runs and motion is allowed,
   so content is always visible without it. */
.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
