/* MEASCNA Civic — Shared Styles
   Navy + white + slate · institutional clean · responsive
   ========================================================= */

/* ── Config ── */
:root {
  --bg: #ffffff;
  --ink: #0a2540;
  --muted: #5f6b7a;
  --accent: #003366;
  --accent-light: #e8f0fa;
  --line: #e3e8ef;
  --card: #f7f9fc;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Inter Tight", system-ui, sans-serif;
  --mono: "JetBrains Mono", monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --max-w: 1200px;
  --gutter: 56px;
}
@media (max-width: 768px) {
  :root { --gutter: 20px; }
}

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

/* ── Layout ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }

/* ── Header ── */
.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.brand svg { width: 34px; height: 34px; }
.brand-text { line-height: 1.15; }
.brand-text small {
  display: block;
  font-size: 10px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-top: 1px;
}
.main-nav {
  display: flex;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
  flex: 1;
  align-items: center;
}
.main-nav a {
  color: var(--ink);
  opacity: 0.65;
  transition: opacity 0.2s var(--ease);
  padding: 4px 0;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { opacity: 1; }
.main-nav a[aria-current="page"] { font-weight: 600; }
.main-nav a.nav-highlight {
  opacity: 0.85;
  color: #b8860b;
  font-weight: 600;
}
.main-nav a.nav-highlight:hover { opacity: 1; }
.main-nav a.nav-highlight[aria-current="page"] { opacity: 1; color: var(--accent); }

/* Members dropdown */
.nav-dropdown {
  position: relative;
  width: fit-content;
}
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  opacity: 0.65;
  font-size: 14px;
  font-weight: 500;
  padding: 4px 0;
  transition: opacity 0.2s var(--ease);
  cursor: pointer;
}
.nav-dropdown-toggle:hover { opacity: 1; }
.nav-dropdown-toggle svg { width: 12px; height: 12px; }
.nav-dropdown.active .nav-dropdown-toggle { opacity: 1; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  z-index: 200;
}
.nav-dropdown.active .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  opacity: 1;
  color: var(--ink);
  transition: background 0.15s var(--ease);
}
.nav-dropdown-menu a:hover { background: var(--card); }
.nav-dropdown-menu a[aria-current="page"] { color: var(--accent); }

.header-helpline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
}
.header-helpline::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: 8px;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 20px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
  transition: 0.2s;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0; width: 100%;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); background: var(--ink); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); background: var(--ink); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 16px var(--gutter);
    gap: 12px;
    font-size: 16px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
  }
  .main-nav.open { display: flex; }
  .header-helpline { display: none; }
  .site-header .container { position: relative; }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding: 0 0 0 12px;
    min-width: 0;
  }
  .nav-dropdown.active .nav-dropdown-menu { display: block; }
  .nav-dropdown-menu a { padding: 8px 10px; }
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 40px;
  color: var(--muted);
  font-size: 13px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--ink); font-weight: 600; }
.footer-brand svg { width: 22px; height: 22px; }
.site-footer h4 {
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 14px;
}
.site-footer ul { display: grid; gap: 8px; }
.site-footer a:hover { color: var(--ink); }
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: all 0.2s var(--ease);
  text-align: center;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); }
.btn-white { background: #fff; color: var(--accent); }
.btn-white:hover { background: #f0f4f8; }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
}
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #00264d; }

/* ── Eyebrow ── */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ── Cards ── */
.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  overflow: hidden;
  transition: border-color 0.2s var(--ease);
}
.card:hover { border-color: color-mix(in oklch, var(--ink) 25%, var(--line)); }

/* ── Tag / Pill ── */
.tag {
  font-size: 10px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--card);
  color: var(--ink);
  font-weight: 500;
  display: inline-block;
}
.tag-accent {
  background: var(--accent-light);
  color: var(--accent);
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.pill:hover, .pill.active { border-color: var(--ink); color: var(--ink); }

/* ── Hero (accent bg) ── */
.hero-accent {
  background: var(--accent);
  color: #fff;
  padding: 72px 0;
}
.hero-accent .eyebrow { color: #bcd1ed; }
.hero-accent h1 {
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin-bottom: 22px;
}
.hero-accent p { color: #cfdcef; font-size: 18px; line-height: 1.55; max-width: 620px; }
.hero-btns { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

@media (max-width: 768px) {
  .hero-accent { padding: 40px 0; }
  .hero-accent p { font-size: 15px; }
}

/* ── Meeting finder bar ── */
.finder {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  overflow: hidden;
  align-items: stretch;
}
.finder-field {
  padding: 10px 18px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.finder-field:last-of-type { border-right: none; }
.finder-field label {
  font-size: 10px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.finder-field input,
.finder-field select {
  border: none; background: none; outline: none;
  font-size: 14px; color: var(--ink); font-weight: 500;
  padding: 2px 0; width: 100%;
}
.finder button[type="submit"] {
  background: var(--ink);
  color: var(--bg);
  padding: 0 24px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
}
.finder button[type="submit"]:hover { background: var(--accent); }

@media (max-width: 768px) {
  .finder { grid-template-columns: 1fr; }
  .finder-field { border-right: none; border-bottom: 1px solid var(--line); padding: 12px 16px; }
  .finder-field:last-of-type { border-bottom: none; }
  .finder button[type="submit"] { padding: 14px; }
}

/* ── Meeting list rows ── */
.meeting-row {
  display: grid;
  grid-template-columns: 90px 1.2fr 1fr 0.8fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s var(--ease);
}
.meeting-row:last-child { border-bottom: none; }
.meeting-row:hover { background: var(--card); }
.meeting-row .time {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
.meeting-row .time small { display: block; opacity: 0.6; font-size: 11px; }
.meeting-row .name { font-weight: 600; font-size: 15px; }
.meeting-row .name small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 2px; }
.meeting-row .where { font-size: 13px; color: var(--muted); }
.meeting-row .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.meeting-row .detail-link { font-size: 13px; font-weight: 500; opacity: 0.7; }

@media (max-width: 900px) {
  .meeting-row {
    grid-template-columns: 60px 1fr;
    grid-template-areas: "time name" "time where" ". tags";
    gap: 4px 14px;
    padding: 14px 16px;
  }
  .meeting-row .time { grid-area: time; }
  .meeting-row .name { grid-area: name; font-size: 14px; }
  .meeting-row .where { grid-area: where; font-size: 12px; }
  .meeting-row .tags { grid-area: tags; }
  .meeting-row .detail-link { display: none; }
}

/* ── Quick-nav tiles ── */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tiles .card { padding: 24px; }
.tiles h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.tiles p { font-size: 13px; line-height: 1.55; color: var(--muted); margin-bottom: 14px; }
.tiles .cta { font-size: 13px; font-weight: 500; color: var(--accent); }

@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .tiles { grid-template-columns: 1fr; } }

/* ── Newcomer steps ── */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.steps .step-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.steps h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.steps p { font-size: 14px; line-height: 1.55; color: var(--muted); }

@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* ── Day chips ── */
.day-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.day-chip {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  background: var(--card);
  transition: all 0.15s var(--ease);
  cursor: pointer;
}
.day-chip:hover { border-color: var(--ink); }
.day-chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ── Event cards ── */
.event-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s var(--ease);
}
.event-card:hover { border-color: color-mix(in oklch, var(--ink) 25%, var(--line)); }
.event-card-img {
  height: 170px;
  background: linear-gradient(135deg, var(--accent) 0%, #00264d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.2);
  font-size: 48px;
}
.event-card-body { padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.event-card .when {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.event-card h3 { font-size: 19px; font-weight: 600; line-height: 1.25; }
.event-card .where { font-size: 13px; color: var(--muted); }

/* ── Section spacing ── */
.section { padding: 60px 0; }
.section-alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-header { margin-bottom: 28px; }
.section-header h2 { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; }
.section-header p { color: var(--muted); font-size: 15px; margin-top: 8px; max-width: 600px; }
.section-row { display: flex; justify-content: space-between; align-items: end; margin-bottom: 18px; }
.section-row h2 { font-size: 26px; font-weight: 600; }
.section-row a { font-size: 14px; font-weight: 500; color: var(--accent); }

@media (max-width: 768px) {
  .section { padding: 40px 0; }
  .section-header h2 { font-size: 26px; }
}

/* ── Event mini-card (sidebar) ── */
.event-mini {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px;
}
.event-mini-date {
  width: 64px;
  text-align: center;
  padding: 5px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1;
}
.event-mini-date .mo {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.event-mini-date .num { font-weight: 700; font-size: 19px; margin: 3px 0; }
.event-mini-date .dow {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.event-mini h4 { font-weight: 600; font-size: 14px; }
.event-mini .loc { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── ASC card ── */
.asc-card {
  padding: 18px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
}
.asc-card .eyebrow { color: #bcd1ed; margin-bottom: 8px; }
.asc-card .time { font-size: 17px; font-weight: 600; }
.asc-card .loc { font-size: 13px; opacity: 0.9; margin-top: 4px; }

/* ── Map placeholder ── */
.map-placeholder {
  background:
    radial-gradient(ellipse at 30% 40%, color-mix(in oklch, var(--accent) 8%, transparent), transparent 50%),
    radial-gradient(ellipse at 70% 60%, color-mix(in oklch, var(--accent) 5%, transparent), transparent 50%),
    var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

/* ── Helpline banner (accent, mobile-friendly) ── */
.helpline-card {
  padding: 18px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
}
.helpline-card .eyebrow { color: #bcd1ed; margin-bottom: 6px; }
.helpline-card .phone { font-family: var(--mono); font-size: 22px; }

/* ── Utilities ── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.mt-0 { margin-top: 0; }
.mb-sm { margin-bottom: 12px; }

/* ── Photo placeholder ── */
.photo-placeholder {
  background: linear-gradient(135deg, var(--accent) 0%, #00264d 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.15);
  font-size: 64px;
  overflow: hidden;
}

/* ── Two-col main+sidebar ── */
.two-col { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; }
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ── CroutonJS overrides ── */
#bmlt-tabs { font-family: var(--sans) !important; }
