/* ==========================================================================
   CLERO prototype — site.css
   Tokens are sampled from the CLERO logo mark. No framework, no CDN.
   ========================================================================== */

@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-grotesque-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-grotesque-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "SourceSans"; src: url("../fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "SourceSans"; src: url("../fonts/source-sans-3-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "SourceSans"; src: url("../fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "SourceSans"; src: url("../fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* from the logo */
  --plum:   #602080;
  --indigo: #282078;
  --cobalt: #0050A0;
  --sky:    #0098D8;
  --orchid: #904890;
  /* derived */
  --ink:    #1E1B4B;
  --ink-2:  #4A4770;
  --paper:  #FAF9FC;
  --lilac:  #EFE7F6;
  --lilac-2:#E2D6EE;
  --rule:   #D9D6E6;
  --white:  #FFFFFF;
  --focus:  #0098D8;

  --display: "Bricolage", "Segoe UI", system-ui, sans-serif;
  --body: "SourceSans", "Segoe UI", system-ui, sans-serif;

  --max: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(3.5rem, 8vw, 6.5rem);
  --r: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--plum); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--indigo); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 { font-family: var(--display); color: var(--indigo); line-height: 1.1; margin: 0 0 0.6em; letter-spacing: -0.015em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1.1em; }
.lead { font-size: 1.3rem; line-height: 1.5; color: var(--ink-2); max-width: 36em; }
.measure { max-width: 66ch; }
.muted { color: var(--ink-2); }
.small { font-size: 0.95rem; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.35em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.section--tight { padding: calc(var(--section) * 0.6) 0; }
.band--lilac { background: var(--lilac); }
.band--plum { background: var(--plum); color: var(--white); }
.band--plum h1, .band--plum h2, .band--plum h3, .band--plum a { color: var(--white); }
.band--plum .btn-light, .band--indigo .btn-light { color: var(--plum); }
.band--plum .btn-light:hover, .band--indigo .btn-light:hover { color: var(--indigo); }
.band--indigo { background: var(--indigo); color: var(--white); }
.band--indigo h2, .band--indigo h3, .band--indigo a { color: var(--white); }

.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; } }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--display); font-weight: 600; font-size: 1.05rem;
  padding: 0.85rem 1.4rem; border-radius: var(--r); border: 2px solid transparent;
  text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--plum); color: var(--white); }
.btn-primary:hover { background: var(--indigo); color: var(--white); }
.btn-secondary { background: transparent; color: var(--plum); border-color: var(--plum); }
.btn-secondary:hover { background: var(--lilac); color: var(--indigo); border-color: var(--indigo); }
.btn-light { background: var(--white); color: var(--plum); }
.btn-light:hover { background: var(--lilac); color: var(--indigo); }
.btn-ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.6); }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); color: var(--white); border-color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Header ----------------------------------------------------------------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 104px; padding-top: 0.6rem; padding-bottom: 0.6rem; }
.brand img { height: 75px; width: auto; }
@media (max-width: 600px) { .brand img { height: 58px; } .site-header .wrap { min-height: 84px; } }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a { font-family: var(--display); font-weight: 600; font-size: 1rem; color: var(--indigo); text-decoration: none; padding: 0.35rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--plum); color: var(--plum); }
.nav .btn { padding: 0.6rem 1.1rem; font-size: 0.98rem; border-bottom: 2px solid transparent; color: var(--white); }
.nav .btn:hover { color: var(--white); }
.nav .btn:hover { border-bottom-color: transparent; }
.nav-toggle { display: none; background: none; border: 2px solid var(--indigo); border-radius: var(--r); padding: 0.45rem 0.7rem; font-family: var(--display); font-weight: 600; color: var(--indigo); cursor: pointer; }
@media (max-width: 1000px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--rule); flex-direction: column; align-items: stretch; padding: 1rem var(--gutter) 1.5rem; gap: 0.2rem; }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
  .nav .btn { margin-top: 0.8rem; justify-content: center; }
}

/* Hero ------------------------------------------------------------------- */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.5rem, 6vw, 5rem); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center; }
.hero h1 { margin-bottom: 0.5em; }
.hero .lead { margin-bottom: 1.8rem; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero .pinwheel { max-width: 320px; margin: 0 auto; } }

/* The pinwheel — five blades, one per CHIME domain ----------------------- */
.pinwheel { width: 100%; max-width: 460px; margin-left: auto; }
.pinwheel svg { overflow: visible; }
.blade { cursor: pointer; text-decoration: none; outline-offset: 6px; transition: transform .25s ease, opacity .25s; transform-origin: 200px 200px; }
.blade text { font-family: var(--display); font-weight: 800; font-size: 34px; fill: var(--white); pointer-events: none; }
.pinwheel:hover .blade { opacity: .55; }
.pinwheel .blade:hover, .pinwheel .blade:focus-within { opacity: 1; transform: scale(1.06); }
.pinwheel-caption { text-align: right; margin-top: 0.75rem; font-family: var(--display); font-weight: 600; color: var(--ink-2); min-height: 1.6em; }
.pinwheel-caption strong { color: var(--plum); }
@media (max-width: 860px) { .pinwheel-caption { text-align: center; } }

/* Page heads --------------------------------------------------------------- */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--rule); }
.page-head .lead { margin-bottom: 0; }

/* Content blocks ----------------------------------------------------------- */
.feature { border-top: 3px solid var(--plum); padding-top: 1.2rem; }
.feature:nth-child(2) { border-top-color: var(--cobalt); }
.feature:nth-child(3) { border-top-color: var(--sky); }
.feature h3 { margin-bottom: 0.4em; }
.feature .fact { font-family: var(--display); font-weight: 700; color: var(--plum); font-size: 1rem; display: block; margin-bottom: 0.4rem; }

.chime-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; }
.chime-row > div { border-left: 4px solid; padding-left: 1rem; }
.chime-row .letter { font-family: var(--display); font-weight: 800; font-size: 3rem; line-height: 1; display: block; }
.chime-row h3 { font-size: 1.1rem; margin: 0.3rem 0; }
.chime-row p { font-size: 1rem; color: var(--ink-2); margin: 0; }
@media (max-width: 900px) { .chime-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .chime-row { grid-template-columns: 1fr; } }
.c-plum { border-color: var(--plum); color: var(--plum); }
.c-orchid { border-color: var(--orchid); color: var(--orchid); }
.c-cobalt { border-color: var(--cobalt); color: var(--cobalt); }
.c-sky { border-color: var(--sky); color: var(--sky); }
.c-indigo { border-color: var(--indigo); color: var(--indigo); }

.post-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.post-list li { display: grid; grid-template-columns: 9rem 1fr; gap: 1.5rem; padding: 1.4rem 0; border-bottom: 1px solid var(--rule); margin: 0; }
.post-list time { color: var(--ink-2); font-size: 0.98rem; padding-top: 0.25rem; }
.post-list h3 { margin: 0 0 0.3rem; }
.post-list h3 a { text-decoration: none; color: var(--indigo); }
.post-list h3 a:hover { color: var(--plum); text-decoration: underline; }
.post-list p { margin: 0; color: var(--ink-2); font-size: 1.02rem; }
@media (max-width: 600px) { .post-list li { grid-template-columns: 1fr; gap: 0.3rem; } }

.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem 2rem; }
@media (max-width: 900px) { .people { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .people { grid-template-columns: 1fr; } }
.person .photo { aspect-ratio: 1 / 1; background: var(--lilac-2); border-radius: var(--r); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 3rem; color: var(--plum); margin-bottom: 1rem; }
.person h3 { margin-bottom: 0.15rem; font-size: 1.25rem; }
.person .role { color: var(--plum); font-weight: 600; margin-bottom: 0.5rem; display: block; }
.person p { font-size: 1.02rem; color: var(--ink-2); }

.tier { background: var(--white); border: 1px solid var(--rule); border-radius: var(--r); padding: 1.6rem; }
.tier h3 { margin-bottom: 0.4rem; }
.tier .who { color: var(--plum); font-weight: 600; display: block; margin-bottom: 0.8rem; }
.tier ul { padding-left: 1.2em; font-size: 1.02rem; }

.resource { padding: 1.4rem 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: start; }
.resource:last-child { border-bottom: 1px solid var(--rule); }
.resource h3 { margin-bottom: 0.3rem; }
.resource p { margin: 0; color: var(--ink-2); font-size: 1.02rem; }
.resource .src { font-size: 0.92rem; color: var(--ink-2); display: block; margin-top: 0.4rem; }
@media (max-width: 600px) { .resource { grid-template-columns: 1fr; } }

.video { display: block; text-decoration: none; color: var(--ink); }
.video .thumb { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--indigo), var(--plum)); border-radius: var(--r); display: grid; place-items: center; margin-bottom: 0.7rem; position: relative; }
.video .thumb::after { content: ""; width: 0; height: 0; border-left: 22px solid var(--white); border-top: 13px solid transparent; border-bottom: 13px solid transparent; margin-left: 5px; }
.video .thumb span { position: absolute; left: 0.8rem; bottom: 0.6rem; color: rgba(255,255,255,.85); font-family: var(--display); font-weight: 600; font-size: 0.9rem; }
.video h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.video p { font-size: 0.98rem; color: var(--ink-2); margin: 0; }
.video:hover h3 { color: var(--plum); text-decoration: underline; }

/* Accordion ----------------------------------------------------------------- */
.acc { border-top: 1px solid var(--rule); }
.acc details { border-bottom: 1px solid var(--rule); scroll-margin-top: 130px; transition: background-color .4s; }
.acc details.is-target { background: var(--white); box-shadow: inset 4px 0 0 var(--plum); padding-left: 1.2rem; margin-left: -1.2rem; padding-right: 1.2rem; margin-right: -1.2rem; border-radius: var(--r); }
.acc summary { list-style: none; cursor: pointer; padding: 1.2rem 0; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; font-family: var(--display); font-weight: 700; font-size: 1.25rem; color: var(--indigo); }
.acc summary::-webkit-details-marker { display: none; }
.acc summary .count { font-weight: 600; font-size: 0.98rem; color: var(--ink-2); white-space: nowrap; }
.acc summary::after { content: "+"; font-weight: 500; font-size: 1.6rem; line-height: 1; color: var(--plum); margin-left: auto; }
.acc details[open] summary::after { content: "–"; }
.acc .acc-body { padding: 0 0 1.5rem; }
.acc ol { padding-left: 1.4em; }
.acc ol li { margin-bottom: 0.6em; }

/* Forms --------------------------------------------------------------------- */
.form { display: grid; gap: 1.1rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 1rem; }
label .opt { font-weight: 400; color: var(--ink-2); }
input[type=text], input[type=email], input[type=tel], select, textarea {
  width: 100%; font: inherit; font-size: 1.05rem; padding: 0.7rem 0.85rem; border: 1.5px solid var(--rule); border-radius: var(--r); background: var(--white); color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--sky); outline: 3px solid rgba(0,152,216,.25); outline-offset: 0; }
textarea { min-height: 8rem; resize: vertical; }
.check { display: flex; gap: 0.7rem; align-items: flex-start; font-weight: 400; font-size: 1.02rem; }
.check input { margin-top: 0.35rem; width: 1.1rem; height: 1.1rem; flex: none; }
.help { font-size: 0.95rem; color: var(--ink-2); margin: 0.3rem 0 0; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-family: var(--display); font-weight: 700; font-size: 1.25rem; color: var(--indigo); margin-bottom: 0.8rem; }

/* Notes / callouts -------------------------------------------------------- */
.note { border-left: 4px solid var(--sky); background: var(--white); padding: 1rem 1.2rem; border-radius: 0 var(--r) var(--r) 0; font-size: 1.02rem; }
.note--proto { border-left-color: var(--orchid); background: #FCF4FB; }
.note p:last-child { margin: 0; }

.stat-line { display: flex; flex-wrap: wrap; gap: 1.5rem 2.2rem; justify-content: space-between; padding: 1.4rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stat-line div { display: flex; align-items: baseline; gap: 0.6rem; }
.stat-line b { font-family: var(--display); font-weight: 800; font-size: 1.8rem; color: var(--plum); line-height: 1; }
.stat-line span { color: var(--ink-2); }

/* Map page ----------------------------------------------------------------- */
.finder { display: grid; grid-template-columns: 380px 1fr; min-height: 640px; border-top: 1px solid var(--rule); }
.finder-side { border-right: 1px solid var(--rule); background: var(--white); display: flex; flex-direction: column; }
.finder-filters { padding: 1.2rem; border-bottom: 1px solid var(--rule); display: grid; gap: 0.8rem; }
.finder-list { overflow: auto; flex: 1; max-height: 640px; }
.finder-list button { all: unset; display: block; width: 100%; box-sizing: border-box; padding: 1rem 1.2rem; border-bottom: 1px solid var(--rule); cursor: pointer; }
.finder-list button:hover, .finder-list button.is-active { background: var(--lilac); }
.finder-list b { font-family: var(--display); font-weight: 700; color: var(--indigo); display: block; }
.finder-list span { color: var(--ink-2); font-size: 0.98rem; }
#map { min-height: 640px; background: #e8ecf3; }
@media (max-width: 860px) { .finder { grid-template-columns: 1fr; } .finder-side { border-right: 0; border-bottom: 1px solid var(--rule); } .finder-list { max-height: 260px; } #map { min-height: 460px; } }
.leaflet-container { font-family: var(--body); }
.leaflet-popup-content b { font-family: var(--display); color: var(--indigo); }

/* Article ------------------------------------------------------------------ */
.article { max-width: 72ch; }
.article p { font-size: 1.15rem; }
.article .meta { color: var(--ink-2); margin-bottom: 1.5rem; }
.article blockquote { margin: 1.5rem 0; padding-left: 1.2rem; border-left: 4px solid var(--orchid); font-family: var(--display); font-weight: 500; font-size: 1.3rem; color: var(--indigo); }

/* Footer ------------------------------------------------------------------- */
.site-footer { background: var(--indigo); color: rgba(255,255,255,.85); padding: 3.5rem 0 2rem; margin-top: 0; }
.site-footer a { color: var(--white); }
.site-footer .cols { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr; gap: 3rem; }
@media (max-width: 860px) { .site-footer .cols { grid-template-columns: 1fr; gap: 2rem; } }
.site-footer img { height: 56px; margin-bottom: 1rem; }
.site-footer h4 { color: var(--white); margin-bottom: 0.8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer .legal { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.2); font-size: 0.92rem; color: rgba(255,255,255,.7); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer input, .site-footer select { border-color: transparent; }
.site-footer .form { gap: 0.7rem; }
.site-footer .btn-light { justify-self: start; color: var(--plum); }
.social { display: flex; gap: 0.8rem; margin-top: 1rem; }
.social a { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1.5px solid rgba(255,255,255,.4); border-radius: 50%; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 0.9rem; }
.social a:hover { background: rgba(255,255,255,.12); }

/* Utilities --------------------------------------------------------------- */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; } .mb-3 { margin-bottom: 3rem; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.inline-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; }
.inline-list li { margin: 0; }
.eyebrow-link { font-family: var(--display); font-weight: 600; }
