/* ==========================================================================
   BRESA - stylesheet
   Brand colours live in :root. Change them once and the whole site follows.
   ========================================================================== */

:root {
  /* Sampled from the BRESA logo: teal globe, orange swoosh, yellow book. */
  --brand:        #0d5f57;
  --brand-dark:   #094440;
  --brand-light:  #e6f1ef;
  --gold:         #e0590f;
  --gold-light:   #fdefe5;

  --ink:          #14201d;
  --ink-soft:     #4a5854;
  --ink-faint:    #7b8783;
  --line:         #dfe5e3;
  --paper:        #ffffff;
  --paper-alt:    #f6f8f7;

  --radius:       10px;
  --radius-lg:    16px;
  --shadow:       0 0 2px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.12);
  --shadow-lift:  0 10px 30px rgba(13,95,87,.12);

  --font:  "Segoe UI", Aptos, Calibri, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:  Consolas, "Courier New", Courier, monospace;

  --wrap:  1140px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.15rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.18rem; }
p  { margin: 0 0 1.1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 .8em;
}

.lede { font-size: 1.13rem; color: var(--ink-soft); max-width: 62ch; }

.muted { color: var(--ink-faint); }

/* ---- Skip link --------------------------------------------------------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--brand); color: #fff; padding: 12px 18px;
  border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; color: #fff; }

/* ---- Header ------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 20px;
  min-height: 68px;
}

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); flex: none; }
.brand-mark {
  width: 42px; height: 42px; flex: none;
  display: block;
  object-fit: contain;
}
.site-footer .brand-mark { filter: drop-shadow(0 0 1px rgba(255,255,255,.35)); }
.brand-name  { font-weight: 700; font-size: 1.06rem; letter-spacing: -.01em; }
.brand-sub   { font-size: .72rem; color: var(--ink-faint); letter-spacing: .04em; }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 1px; }
.site-nav a {
  text-decoration: none; color: var(--ink-soft);
  padding: 8px 8px; border-radius: 8px;
  font-size: .88rem; font-weight: 500;
  white-space: nowrap;
}
.site-nav a:hover { background: var(--brand-light); color: var(--brand-dark); }
.site-nav a[aria-current="page"] { color: var(--brand-dark); font-weight: 650; background: var(--brand-light); }

.btn {
  display: inline-block;
  background: var(--brand); color: #fff !important;
  padding: 11px 20px; border-radius: var(--radius);
  text-decoration: none; font-weight: 600; font-size: .95rem;
  border: 1px solid var(--brand);
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--brand) !important;
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--brand-light); border-color: var(--brand); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #1d1502 !important; }
.btn-gold:hover { background: #b3831f; border-color: #b3831f; }

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 11px;
  font-size: 1.1rem; cursor: pointer; color: var(--ink);
}

/* ---- Hero -------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(201,150,43,.16), transparent 62%),
    linear-gradient(160deg, var(--brand-dark), var(--brand) 62%, #14705a);
  color: #fff;
  padding: 84px 0 76px;
}
.hero h1 { color: #fff; max-width: 16ch; }
.hero p  { color: rgba(255,255,255,.86); font-size: 1.14rem; max-width: 58ch; }
.hero .eyebrow { color: #f0cd82; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero .btn-ghost { color: #fff !important; border-color: rgba(255,255,255,.42); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* ---- Page head (inner pages) ------------------------------------------ */
.page-head {
  background: var(--paper-alt);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 48px;
}
.page-head h1 { margin-bottom: .35em; }

/* ---- Sections ---------------------------------------------------------- */
.section { padding: 68px 0; }
.section-alt { background: var(--paper-alt); border-block: 1px solid var(--line); }
.section-head { max-width: 66ch; margin-bottom: 34px; }

/* ---- Grid & cards ------------------------------------------------------ */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .45em; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--brand-light); color: var(--brand);
  display: grid; place-items: center;
  font-size: 1.25rem; margin-bottom: 16px;
}

.card-link {
  display: block; text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--brand); color: inherit; }

/* ---- Stats ------------------------------------------------------------- */
.stat { text-align: center; padding: 22px 10px; }
.stat-value { font-size: 2.3rem; font-weight: 700; color: var(--brand); line-height: 1; }
.stat-label { font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-top: 8px; }

/* ---- People ------------------------------------------------------------ */
.person {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.avatar {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-weight: 650; font-size: .92rem; letter-spacing: .02em;
  position: relative; overflow: hidden;
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--brand-light);
}
/* The monogram sits underneath; the generated portrait covers it when it
   loads. Missing file removes itself, so the initials remain visible. */
.avatar > span { grid-area: 1 / 1; }
.avatar > img {
  grid-area: 1 / 1;
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 32%;
  display: block;
}
.person-name { font-weight: 600; }
.person-role { font-size: .87rem; color: var(--ink-faint); }

/* ---- Portrait row (founders, patrons) ---------------------------------- */
.avatar-xl {
  width: 100%; height: auto; aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  font-size: 1.9rem; letter-spacing: .04em;
  box-shadow: 0 0 0 1px var(--line), var(--shadow-lift);
}
.avatar-xl > img { object-position: center center; }

.face-row {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.face { margin: 0; }
.face figcaption {
  display: block; margin-top: 12px; line-height: 1.4;
}
.face figcaption strong { display: block; font-size: .97rem; }
.face figcaption span {
  display: block; font-size: .82rem; color: var(--ink-faint);
  letter-spacing: .04em; text-transform: uppercase; margin-top: 2px;
}

/* ---- Section artwork --------------------------------------------------- */
.art {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
}
.art-split {
  display: grid; gap: 34px; align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ---- Numbered list ----------------------------------------------------- */
.numbered { list-style: none; margin: 0; padding: 0; counter-reset: n; }
.numbered li {
  counter-increment: n;
  position: relative;
  padding: 13px 0 13px 46px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}
.numbered li:last-child { border-bottom: 0; }
.numbered li::before {
  content: counter(n);
  position: absolute; left: 0; top: 12px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--gold-light); color: #8a6a12;
  display: grid; place-items: center;
  font-size: .82rem; font-weight: 700;
}

.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 7px 0 7px 28px; color: var(--ink-soft); }
.ticks li::before { content: "\2713"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }

/* ---- Table ------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--paper); }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); }
th { background: var(--paper-alt); font-weight: 650; font-size: .8rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--brand-light); }

/* ---- Empty state ------------------------------------------------------- */
.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: 44px 28px;
  text-align: center;
  color: var(--ink-faint);
  background: var(--paper-alt);
}
.empty strong { display: block; color: var(--ink-soft); margin-bottom: 6px; font-size: 1.02rem; }

/* ---- Forms ------------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .87rem; font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; font-size: .96rem; color: var(--ink);
  background: var(--paper);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: .86rem; color: var(--ink-faint); }

.notice {
  border-left: 3px solid var(--gold);
  background: var(--gold-light);
  padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .93rem; color: #6d5410;
}

/* ---- CTA band ---------------------------------------------------------- */
.band {
  background: linear-gradient(160deg, var(--brand-dark), var(--brand));
  color: #fff; padding: 58px 0; text-align: center;
}
.band h2 { color: #fff; }
.band p { color: rgba(255,255,255,.85); max-width: 56ch; margin-inline: auto; }
.band .btn-ghost { color: #fff !important; border-color: rgba(255,255,255,.45); }
.band .btn-ghost:hover { background: rgba(255,255,255,.12); }

/* ---- Footer ------------------------------------------------------------ */
.site-footer { background: #0b1a17; color: #9fb3ad; padding: 54px 0 26px; font-size: .93rem; }
.site-footer h4 { color: #fff; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer a { color: #c3d4cf; text-decoration: none; display: block; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 30px; grid-template-columns: 1.6fr repeat(3, 1fr); }
.footer-bottom {
  margin-top: 38px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: .86rem; color: #7b918b;
}

/* ---- Portal ------------------------------------------------------------ */
.portal-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--paper-alt); }
.portal-bar {
  background: var(--brand-dark); color: #fff;
  padding: 13px 0;
}
.portal-bar .wrap { display: flex; align-items: center; gap: 16px; }
.portal-bar a { color: rgba(255,255,255,.85); text-decoration: none; font-size: .92rem; }
.portal-bar a:hover { color: #fff; }
.portal-bar .brand-name { color: #fff; }
.portal-bar .brand-sub  { color: rgba(255,255,255,.6); }

.portal-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); background: var(--paper); overflow-x: auto; }
.portal-tabs button {
  background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 14px 18px; font: inherit; font-size: .94rem; font-weight: 550;
  color: var(--ink-soft); cursor: pointer; white-space: nowrap;
}
.portal-tabs button:hover { color: var(--brand); }
.portal-tabs button.active { color: var(--brand-dark); border-bottom-color: var(--brand); font-weight: 650; }

.panel { display: none; padding: 32px 0 60px; }
.panel.active { display: block; }

.login-box {
  max-width: 400px; margin: 8vh auto; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 34px; box-shadow: var(--shadow-lift);
}

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 650; }
.pill-ok   { background: #e3f5ea; color: #14663a; }
.pill-wait { background: var(--gold-light); color: #8a6a12; }
.pill-off  { background: #f0f1f1; color: #6b7370; }

/* ---- Responsive -------------------------------------------------------- */
@media (max-width: 1150px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch;
    padding: 10px 24px 18px; gap: 2px;
    box-shadow: var(--shadow-lift);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 10px; font-size: 1rem; }
  .site-nav .btn { text-align: center; margin-top: 8px; }
  .site-header .wrap { position: relative; flex-wrap: wrap; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 60px 0 54px; }
  .section { padding: 50px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .card { padding: 22px; }
  .wrap { padding: 0 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
