/* =================================================================
   Barristers' Benevolent Association of NSW
   Static site stylesheet
   ================================================================= */

:root {
  --bg: #ffffff;
  --paper: #ffffff;
  --mist: #edf4f4;
  --mist-strong: #dce9e8;
  --ink: #172326;
  --ink-soft: #546164;
  --ink-inverse: #f7fbfb;
  --navy: #102a33;
  --teal: #2f6868;
  --teal-dark: #214c4f;
  --copper: #b45d32;
  --copper-dark: #88401f;
  --gold: #e6c75e;
  --border: #d9e2e0;
  --focus: #1d63b7;
  --maxw: 72rem;
  --measure: 44rem;
  --radius: 8px;
  --shadow: 0 18px 50px -36px rgba(16, 42, 51, .65);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a {
  color: var(--teal-dark);
  text-decoration-color: rgba(47, 104, 104, .35);
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}
a:hover { color: var(--copper-dark); text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.12;
}
h1 { margin: 0 0 1rem; font-size: clamp(2.55rem, 6vw, 5.6rem); max-width: 12ch; }
h2 { margin: 0 0 1rem; font-size: clamp(1.75rem, 3vw, 2.45rem); }
h3 { margin: 1.75rem 0 .45rem; font-size: 1.2rem; }
p { margin: 0 0 1.1rem; }
strong { font-weight: 700; }

.container {
  width: min(100%, var(--maxw));
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2rem);
}
.prose { max-width: var(--measure); }
.prose > * + h2 { margin-top: 2.5rem; }
.prose > * + h3 { margin-top: 1.35rem; }
.prose ul { padding-left: 1.15rem; }
.prose li { margin-bottom: .45rem; }
.prose li::marker { color: var(--teal); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: #fff; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid rgba(217, 226, 224, .9);
  backdrop-filter: blur(18px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 1.25rem;
}
.brand { display: flex; align-items: center; flex: none; text-decoration: none; }
.brand__logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 10px 26px -22px rgba(16, 42, 51, .75);
}

.nav-toggle { display: none; }
.nav-toggle-label { display: none; }
.site-nav ul {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: block;
  padding: .52rem .8rem;
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
}
.site-nav a:hover { background: var(--mist); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--navy); color: #fff; }

.hero {
  position: relative;
  overflow: hidden;
  color: var(--ink-inverse);
  background:
    linear-gradient(120deg, rgba(16, 42, 51, .98), rgba(25, 70, 74, .94) 58%, rgba(180, 93, 50, .8)),
    var(--navy);
}
.hero--home {
  min-height: min(760px, calc(100vh - 78px));
  background:
    linear-gradient(90deg, rgba(5, 22, 30, .74), rgba(5, 22, 30, .58) 42%, rgba(5, 22, 30, .36)),
    linear-gradient(0deg, rgba(5, 22, 30, .28), rgba(5, 22, 30, .28)),
    url("hero.jpg") center / cover no-repeat,
    var(--navy);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -20% -45% 38%;
  height: 70%;
  background: radial-gradient(circle, rgba(230, 199, 94, .22), transparent 62%);
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 1;
  padding-block: clamp(4.25rem, 10vw, 8rem);
}
.hero h1, .hero h2, .hero h3 { color: #fff; }
.hero p.lead {
  max-width: 34rem;
  color: rgba(247, 251, 251, .84);
  font-size: clamp(1.13rem, 2vw, 1.45rem);
  line-height: 1.55;
}
.hero__grid {
  display: grid;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  grid-template-columns: minmax(0, 1fr);
}
.hero__text { max-width: 42rem; }
@media (min-width: 880px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero--home .hero__text { max-width: 44rem; }
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 1.7rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .78rem 1.35rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--gold); color: #14282f; }
.btn--primary:hover { background: #f0d87a; color: #14282f; }
.btn--ghost {
  border-color: rgba(255, 255, 255, .65);
  color: #fff;
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, .1);
  border-color: #fff;
  color: #fff;
}
.section { padding-block: clamp(3.25rem, 7vw, 5.75rem); }
.section--compact { padding-block: clamp(2rem, 5vw, 3.25rem); }
.section--alt {
  background:
    linear-gradient(90deg, rgba(237, 244, 244, .95), rgba(255, 255, 255, .95)),
    var(--mist);
  border-block: 1px solid var(--border);
}
.section .prose {
  padding-left: clamp(0rem, 2vw, 2rem);
  border-left: 4px solid var(--gold);
}
.section--alt .prose { border-left-color: var(--teal); }

.callout {
  margin: 1.75rem 0;
  padding: 1.35rem 1.45rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--copper);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.callout h3 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

.committee {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem 1rem;
  max-width: 52rem;
  margin-top: 1.5rem;
}
.committee ul {
  display: grid;
  align-content: start;
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.committee li {
  display: flex;
  align-items: center;
  height: 2.75rem;
  margin: 0;
  padding: .4rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #f8fbfb);
  box-shadow: 0 10px 24px -22px rgba(16, 42, 51, .8);
  overflow: hidden;
  font-size: .96rem;
  line-height: 1.2;
}

.site-footer {
  margin-top: 0;
  color: rgba(247, 251, 251, .78);
  background: var(--navy);
}
.site-footer a { color: #fff; text-decoration-color: rgba(255, 255, 255, .32); }
.site-footer > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding-block: 2.4rem;
}
.footer-brand {
  max-width: 24rem;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .45rem 1rem;
  font-size: .94rem;
  font-weight: 700;
}
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.footer-bottom .container {
  display: block;
  padding-block: 1.05rem;
  color: rgba(247, 251, 251, .62);
  font-size: .86rem;
}
.footer-bottom p { margin: 0; }

@media (max-width: 720px) {
  .site-header .container { min-height: 70px; }
  .brand__logo { width: 48px; height: 48px; }
  .nav-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 2.5rem;
    padding: .5rem .7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    font-size: .9rem;
    font-weight: 800;
  }
  .nav-toggle-label .bars,
  .nav-toggle-label .bars::before,
  .nav-toggle-label .bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--ink);
  }
  .nav-toggle-label .bars { position: relative; }
  .nav-toggle-label .bars::before,
  .nav-toggle-label .bars::after {
    content: "";
    position: absolute;
    left: 0;
  }
  .nav-toggle-label .bars::before { top: -6px; }
  .nav-toggle-label .bars::after { top: 6px; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 1rem;
    left: 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
  .site-nav ul { display: grid; gap: .25rem; padding: .55rem; }
  .site-nav a { padding: .75rem .8rem; }
  .nav-toggle:checked ~ .site-nav { display: block; }
  .site-header .container { position: relative; }
  h1 { max-width: 11ch; }
  .section .prose { padding-left: 1rem; }
  .committee {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem .6rem;
  }
  .committee ul { gap: .45rem; }
  .committee li {
    height: 2.65rem;
    padding-inline: .6rem;
    font-size: .88rem;
  }
  .site-footer > .container {
    display: grid;
    align-items: start;
  }
  .footer-nav { justify-content: flex-start; }
}

@media (max-width: 440px) {
  body { font-size: 1rem; }
  .brand__logo { width: 46px; height: 46px; }
  .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .site-header, .site-footer, .btn-row, .skip-link { display: none; }
  body { background: #fff; color: #000; }
  .section .prose { border-left: 0; padding-left: 0; }
}
