/* SFBAYHCC site: tokens (ported from the design system's colors_and_type.css),
   base, and the shared shell (utility bar, header, menus, footer).
   Page bodies carry their own scoped <style> generated by scripts/build_pages.py. */

:root {
  --brand-cyan: #009DD7;
  --brand-cyan-bright: #0098F7;
  --brand-sky: #4FC3E7;
  --brand-navy: #182E45;
  --brand-navy-soft: #2A4257;
  --navy-deep: #0F2236;

  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F2F4F8;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #555555;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  --fg-1: var(--brand-navy);
  --fg-2: #3F5266;
  --fg-3: var(--gray-500);
  --fg-on-color: var(--white);

  --bg-page: var(--white);
  --bg-surface: var(--white);
  --bg-muted: var(--gray-100);
  --bg-inverse: var(--brand-navy);
  --bg-tint: #E6F6FC;

  --accent: var(--brand-cyan);
  --accent-hover: #0089BD;
  --accent-pressed: #00759F;
  --accent-tint: #E6F6FC;
  --link: var(--brand-navy);
  --link-hover: var(--brand-cyan);

  --success: #16A34A;
  --warning: #F59E0B;
  --danger: #DC2626;
  --info: var(--brand-cyan);

  --border-subtle: var(--gray-200);
  --border-default: var(--gray-300);
  --border-strong: var(--brand-navy);

  --font-sans: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --font-heading: var(--font-sans);
  --font-mono: 'Roboto Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --text-xs: 12px; --text-sm: 14px; --text-base: 16px; --text-md: 18px; --text-lg: 20px;
  --text-xl: 24px; --text-2xl: 30px; --text-3xl: 38px; --text-4xl: 48px; --text-5xl: 60px; --text-6xl: 72px;
  --w-light: 300; --w-regular: 400; --w-medium: 500; --w-bold: 700; --w-black: 900;
  --lh-tight: 1.15; --lh-snug: 1.3; --lh-normal: 1.5; --lh-loose: 1.7;
  --tracking-tight: -0.02em; --tracking-normal: 0; --tracking-wide: 0.04em; --tracking-caps: 0.08em;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px;
  --space-8: 32px; --space-10: 40px; --space-12: 48px; --space-16: 64px; --space-20: 80px; --space-24: 96px;

  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 12px; --radius-xl: 16px; --radius-pill: 999px;
  --input-radius: 0 8px 8px 0;

  --shadow-xs: 0 1px 2px rgba(24, 46, 69, 0.06);
  --shadow-sm: 0 2px 6px rgba(24, 46, 69, 0.08);
  --shadow-md: 0 6px 16px rgba(24, 46, 69, 0.10);
  --shadow-lg: 0 16px 40px rgba(24, 46, 69, 0.14);
  --shadow-focus: 0 0 0 3px rgba(0, 157, 215, 0.35);

  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-fast: 120ms; --dur-base: 200ms; --dur-slow: 320ms;

  --container-xl: 1280px;
  --header-h: 76px;
  --nav-bp: 1200px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 8px); }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--lh-normal);
  color: var(--fg-1);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; }
input, select, button, textarea { font-family: inherit; font-size: inherit; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: 4px; }
input:focus, select:focus, textarea:focus { outline: none; }
[id] { scroll-margin-top: calc(var(--header-h) + 8px); }
.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; }
.container { max-width: var(--container-xl); margin: 0 auto; padding: 0 32px; }
@media (max-width: 860px) { .container { padding: 0 20px; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--radius-lg); border: 1px solid transparent;
  font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); color: #fff; }
.btn--navy { background: var(--brand-navy); color: #fff; }
.btn--navy:hover { background: #0F2236; color: #fff; }
.btn--sm { padding: 10px 18px; font-size: 14px; }

/* ---------- utility bar ---------- */
.util { background: var(--navy-deep); color: rgba(255,255,255,0.78); font-size: 13px; }
.util__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.util__group { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.util a { color: rgba(255,255,255,0.85); text-decoration: none; }
.util a:hover { color: #fff; }
.util__talk { display: inline-flex; align-items: center; gap: 6px; color: #fff !important; font-weight: 500; }
.util__talk:hover { color: var(--brand-sky) !important; }
.util__muted { color: rgba(255,255,255,0.6); }
.util__lang { display: flex; align-items: center; gap: 8px; }
.util__lang select { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.3); border-radius: 0 6px 6px 0; padding: 3px 8px; font-size: 13px; }
.util__lang option { color: var(--brand-navy); }

/* ---------- header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--gray-200); position: sticky; top: 0; z-index: 50; overflow-x: clip; }
.site-header__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 40px; width: auto; display: block; }

.nav { display: flex; align-items: center; gap: 4px; height: 100%; font-size: 15px; font-weight: 500; }
.nav__item { position: relative; height: 100%; display: flex; align-items: center; }
.nav__item--mega { position: static; }
.nav__link, .nav__btn {
  display: flex; align-items: center; gap: 6px; height: 100%; padding: 0 12px;
  background: none; border: none; font-size: 15px; font-weight: 500; color: var(--brand-navy);
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.nav__link:hover, .nav__btn:hover, .nav__btn[aria-expanded="true"] { color: var(--brand-cyan); }
.nav__link.is-active, .nav__btn.is-active { color: var(--brand-cyan); font-weight: 700; box-shadow: inset 0 -3px 0 var(--brand-cyan); }
.chev { width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.nav__join { margin-left: 12px; }

/* panels are hidden until the trigger reports expanded */
.panel { display: none; }
.panel.is-open { display: block; }
.panel--drop {
  position: absolute; top: 100%; left: 0; min-width: 240px; background: #fff; border: 1px solid var(--gray-200);
  border-radius: 0 0 12px 12px; box-shadow: var(--shadow-lg); padding: 8px;
}
.panel--drop.is-open { display: flex; flex-direction: column; }
.panel--drop--right { left: auto; right: 0; min-width: 220px; }
.panel--drop a { padding: 10px 14px; border-radius: 8px; text-decoration: none; color: var(--brand-navy); }
.panel--drop a:hover { background: var(--bg-tint); color: var(--accent-pressed); }

.panel--mega {
  position: absolute; top: 100%; left: 0; right: 0; background: #fff;
  border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 24px 40px rgba(24,46,69,0.12);
}
.mega { max-width: var(--container-xl); margin: 0 auto; padding: 32px; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2.4fr); gap: 40px; }
.mega__intro { border-radius: 16px; padding: 28px; }
.mega__intro--navy { background: var(--brand-navy); color: #fff; }
.mega__intro--tint { background: var(--bg-tint); }
.mega__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.mega__intro--navy .mega__eyebrow { color: var(--brand-sky); }
.mega__intro--tint .mega__eyebrow { color: var(--accent-pressed); }
.mega__title { font-size: 22px; font-weight: 900; line-height: 1.2; margin: 10px 0 12px; letter-spacing: -0.01em; }
.mega__intro p { font-size: 15px; line-height: 1.55; margin: 0 0 20px; }
.mega__intro--navy p { color: rgba(255,255,255,0.8); }
.mega__intro--tint p { color: var(--fg-2); }
.mega__links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 20px; align-content: start; }
/* Procurement: links grouped by the program's stages (Find it, Get ready, Win it). A corporate and
   utility opportunities link joins "Find it" once those pages exist; none is shown before then. */
.mega__groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; align-content: start; }
.mega__group { display: flex; flex-direction: column; gap: 2px; }
.mega__head { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray-500); padding: 6px 16px 6px; border-bottom: 1px solid var(--gray-200); margin-bottom: 6px; }
.mega__links a, .mega__group a { padding: 14px 16px; border-radius: 12px; text-decoration: none; color: var(--brand-navy); }
.mega__links a:hover, .mega__group a:hover { background: var(--bg-tint); color: var(--brand-navy); }
.mega__links b, .mega__group b { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.mega__links small, .mega__group small { display: block; font-size: 14px; color: var(--gray-500); margin-top: 4px; line-height: 1.4; }
.tag--live { font-size: 11px; font-weight: 700; color: var(--success); background: #DCFCE7; border-radius: 999px; padding: 2px 8px; }
.tag--date { font-size: 11px; font-weight: 700; color: #164C7E; background: #E6F6FC; border-radius: 999px; padding: 2px 8px; }
.mega__chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 20px; align-content: start; font-size: 15px; }
.mega__chapters a { display: flex; gap: 12px; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--brand-navy); }
.mega__chapters a:hover { background: var(--gray-100); color: var(--brand-navy); }
.mega__chapters span { font-family: var(--font-mono); font-size: 13px; color: var(--brand-cyan); padding-top: 1px; }

/* mobile controls and panel */
.nav-mobile-ctl { display: none; align-items: center; gap: 10px; }
.hamburger {
  width: 44px; height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: var(--gray-100); border: none; border-radius: 12px; cursor: pointer;
}
.hamburger span { width: 20px; height: 2px; background: var(--brand-navy); }
.panel--mobile {
  position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-top: 1px solid var(--gray-200);
  box-shadow: 0 24px 40px rgba(24,46,69,0.14); max-height: calc(100vh - 120px); overflow-y: auto;
  /* the visible height: on iOS Safari 100vh includes the area behind the toolbar, where the last rows sat */
  max-height: calc(100dvh - 120px);
}
.mob { padding: 12px 24px 28px; display: flex; flex-direction: column; }
.mob__row { padding: 14px 0; border-bottom: 1px solid var(--gray-200); text-decoration: none; color: var(--brand-navy); font-weight: 500; font-size: 17px; }
.mob__row:last-child { border-bottom: 0; }
.mob__row.is-active { color: var(--brand-cyan); font-weight: 700; }
.mob__group { padding: 14px 0; border-bottom: 1px solid var(--gray-200); }
.mob__label { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray-500); margin-bottom: 8px; }
.mob__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; font-size: 16px; }
.mob__grid a { padding: 8px 0; text-decoration: none; color: var(--brand-navy); min-height: 44px; display: flex; align-items: center; }

@media (max-width: 1199.98px) {
  .nav { display: none; }
  .nav-mobile-ctl { display: flex; }
  .panel--mega, .panel--drop { display: none !important; }
}
@media (max-width: 480px) {
  /* phone header: the design's listing artboards use a 32px logo and a 64px bar */
  .site-header__row { gap: 12px; height: 64px; }
  /* the logo gives way before Join and the menu button do: at its full 32px it needs 353px of
     screen with them, and below that the menu button was pushed off the edge (2026-10-18 mobile
     audit), so on narrower phones the logo shrinks to the room left */
  .brand { flex-shrink: 1; min-width: 0; }
  .brand img { width: auto; height: auto; max-height: 32px; max-width: 100%; }
}
@media (min-width: 1200px) {
  .panel--mobile { display: none !important; }
}
/* Narrow desktops: the eight menu items plus Join need about 1,340px at full spacing, so between
   1200 and 1399px the menu tightens its spacing and type until Join fits (measured 2026-10-15). */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .site-header__row { gap: 16px; }
  .nav { gap: 0; }
  .nav__link, .nav__btn { padding: 0 8px; font-size: 14px; }
  .nav__join { margin-left: 8px; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--brand-navy); color: #fff; }
.site-footer a { color: rgba(255,255,255,0.85); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.nl { border-bottom: 1px solid rgba(255,255,255,0.12); }
.nl__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 32px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.nl__eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-sky); }
.nl__title { font-size: 28px; font-weight: 900; letter-spacing: -0.02em; line-height: 1.15; margin: 10px 0 8px; }
.nl p { margin: 0; font-size: 16px; line-height: 1.55; color: rgba(255,255,255,0.75); }
.nl__form { display: flex; flex-wrap: wrap; gap: 0; background: #fff; border-radius: var(--input-radius); overflow: hidden; }
.nl__form input { flex: 1 1 220px; min-width: 0; border: none; padding: 18px 20px; font-size: 16px; color: var(--brand-navy); }
.nl__form button { flex: 0 0 auto; background: var(--accent); color: #fff; border: none; padding: 18px 28px; font-weight: 700; font-size: 16px; cursor: pointer; min-height: 44px; }
.nl__form button:hover { background: var(--accent-hover); }
.foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 40px 32px; padding-top: 56px; padding-bottom: 40px; }
.foot__brand { grid-column: span 2; min-width: 0; }
.foot__brand img { height: 42px; width: auto; display: block; margin-bottom: 20px; }
.foot__brand p { margin: 0 0 18px; font-size: 14px; line-height: 1.6; color: rgba(255,255,255,0.75); max-width: 340px; }
.foot__addr { font-size: 14px; line-height: 1.7; color: rgba(255,255,255,0.85); }
.foot__addr a { color: #fff; }
.foot__ask { text-decoration: underline !important; text-underline-offset: 3px; }
.foot__ask:hover { color: var(--brand-sky) !important; }
.foot__social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.foot__social a { font-size: 13px; color: #fff; padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.25); }
.foot__social a:hover { background: rgba(255,255,255,0.1); }
.foot__col { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.foot__head { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-sky); margin-bottom: 4px; }
.foot__cta { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.foot__cta p { margin: 0; font-size: 14px; line-height: 1.55; color: rgba(255,255,255,0.75); }
.foot__cta .btn { font-size: 14px; padding: 12px 20px; }
.legal { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 22px; padding-bottom: 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: rgba(255,255,255,0.6); }
.legal__links { display: flex; gap: 20px; }
.legal__links a { color: rgba(255,255,255,0.7); }
@media (max-width: 640px) { .foot__brand { grid-column: span 1; } }

/* ---------- lite YouTube facade ---------- */
.yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer; background: #000 center / cover no-repeat; }
.yt::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; transform: translate(-50%, -50%);
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 68 48'><path d='M66.5 7.7c-.8-2.9-3-5.2-5.9-6C55.4 0 34 0 34 0S12.6 0 7.4 1.7c-2.9.8-5.1 3.1-5.9 6C0 13 0 24 0 24s0 11 1.5 16.3c.8 2.9 3 5.2 5.9 6C12.6 48 34 48 34 48s21.4 0 26.6-1.7c2.9-.8 5.1-3.1 5.9-6C68 35 68 24 68 24s0-11-1.5-16.3z' fill='%23f00'/><path d='M45 24 27 14v20' fill='%23fff'/></svg>") center / contain no-repeat;
}
.yt:hover::after { filter: brightness(1.1); }
.yt-player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
