/*
  SEIU Rhode Island State Council stylesheet
  Used by index.html and endorsements.html (project root). Not used by w001–w005,
  which keep their own wNNN/assets/base.css.

  This is the simplified two-page site: a short homepage (hero, five unions and affiliates) and a
  Political Endorsements page. One stylesheet covers both pages. No JavaScript is needed.
  WP: this file becomes the theme's global stylesheet (or theme.json tokens + block styles).

  Kept from w005: SEIU purple/gold tokens, Barlow Semi Condensed / Barlow Condensed / Inter,
  pill buttons, 16–20px rounded panels, an in-bounds (never negatively offset) UNITE FIGHT WIN graphic,
  and the stacking mobile footer.
  Removed: sector colors, topbar, nav links, hamburger menu, tags, gradients, CTA bands, modals.
*/

:root {
  --pu:    #6E3DB8; --pu2: #6C419A; --pu3: #56347B; --pu4: #41275C;
  --gold:  #FFCE08; --gold2: #FFC720;
  --white: #FFFFFF; --off: #F2EEE9;
  --ink:   #010203; --ink2: #1A1A1A; --mid: #555555; --light: #888888;
  --rule:  #E3DCEE; --pu-l: #F1EAFB; --pu-m: #DED0F2;
  --gutter: 60px;
  /* Side padding: a 1080px content column centred on wide screens, never less than the gutter.
     (% resolves against the band's width where it is used.) */
  --px: max(var(--gutter), calc((100% - 1080px) / 2));
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; color: var(--ink2); background: var(--white); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: 'Barlow Semi Condensed', sans-serif; text-transform: uppercase; line-height: 1.05; }
p { color: var(--mid); }

/* Keyboard focus: purple ring on light backgrounds, gold ring on dark ones */
:focus-visible { outline: 3px solid var(--pu); outline-offset: 3px; border-radius: 4px; }
.nav :focus-visible, .hero :focus-visible, .footer :focus-visible { outline-color: var(--gold); }

/* ---- Buttons ---- */
.btn { display: inline-block; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 15px; letter-spacing: 1.5px; text-transform: uppercase; text-decoration: none; padding: 13px 28px; border-radius: 999px; white-space: nowrap; }
.btn-gold { background: var(--gold); color: var(--pu3); }
.btn-gold:hover { background: var(--gold2); }

/* ---- Header (WP: header.php). Logo = home link; one button = Political Endorsements ---- */
.nav { position: sticky; top: 0; z-index: 100; background: var(--pu4); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--px); }
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo img { height: 52px; width: auto; } /* height-only sizing keeps the shield's proportions */
.nav-logo .name { display: flex; flex-direction: column; font-family: 'Barlow Semi Condensed', sans-serif; font-weight: 700; font-size: 14px; letter-spacing: 0.3px; color: var(--off); text-transform: uppercase; line-height: 1.2; }

/* ---- Hero / Council introduction ---- */
/* Depth: one faint lift of SEIU purple at the top left, fading to solid --pu4 well before the bottom edge. */
.hero { position: relative; background: radial-gradient(ellipse 75% 100% at 12% 0%, rgba(110,61,184,0.28), rgba(110,61,184,0) 70%), var(--pu4); color: var(--white); padding: 56px var(--px) 56px; overflow: hidden; }
.hero-inner { position: relative; }
/* Ghosted UNITE. FIGHT. WIN. (original letterforms, words regrouped, never redrawn; Warm Stone fill, 8% opacity).
   Two arrangements, swapped by <picture> in the HTML. The art never shrinks gradually: one fixed size, then a jump.
   - Wider than 860px: unite-fight-win-stacked.svg, UNITE. / FIGHT. / WIN. stacked flush left with tight leading,
     always 460px wide (letters 110px tall). Right edge on the content column (the header button's edge), vertically
     centred. From 1200px up it sits clear beside the 580px paragraph; between 861 and 1199px the paragraph runs over
     it on purpose, as a layered effect (Eric, 2026-10-11).
   - 860px and below (mobile): unite-fight-win-line.svg, one tight line (aspect 12:1) across the top of the hero,
     12px wider than the content column on each side; .headline's padding-top tucks ONE COUNCIL. under it.
   All positions come from the hero's own box, so the art always sits fully inside it. */
.hero .ghost { position: absolute; top: 50%; right: var(--px); transform: translateY(-50%); width: 460px; height: auto; max-width: none; opacity: 0.08; pointer-events: none; user-select: none; }
.hero .headline { position: relative; margin-bottom: 22px; }
.hero h1 { position: relative; font-size: clamp(40px, 5.5vw, 66px); font-weight: 900; letter-spacing: -0.5px; line-height: 0.98; }
.hero h1 .accent { color: var(--gold2); }
.hero p.lede { color: rgba(255,255,255,0.84); font-size: 18px; max-width: 580px; }

/* ---- Five affiliates: compact list, identical treatment for every union (WP: affiliate CPT loop) ---- */
.affiliates { background: var(--off); padding: 64px var(--px); }
.affiliates h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 900; color: var(--ink); margin-bottom: 10px; }
.affiliates .intro { font-size: 16px; max-width: 620px; margin-bottom: 28px; }
.aff-list { list-style: none; border-top: 1px solid var(--rule); }
.aff { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--rule); }
.aff-logo { height: 124px; background: var(--white); border: 1px solid var(--rule); border-radius: 16px; padding: 18px; display: flex; align-items: center; justify-content: center; }
.aff-logo img { width: 100%; height: 100%; object-fit: contain; }
.aff h3 { font-size: 24px; font-weight: 800; color: var(--ink); }
.aff .formal { font-weight: 600; font-size: 14px; color: var(--mid); margin-top: 2px; }
.aff p.desc { font-size: 15px; margin-top: 6px; max-width: 560px; }
.aff a.site { display: inline-block; margin-top: 8px; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--pu); text-decoration: none; }
.aff a.site:hover { color: var(--pu3); text-decoration: underline; }

/* ---- Political Endorsements page ---- */
.page-head { background: var(--off); padding: 56px var(--px) 40px; }
.page-head h1 { font-size: clamp(32px, 4.5vw, 52px); font-weight: 900; color: var(--ink); margin-bottom: 14px; }
.page-head p { font-size: 17px; max-width: 640px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Election dates + countdown (assets/election-countdown.js fills .ei-status / .ei-count; no animation) */
.election-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 720px; margin-top: 24px; }
.ei-block { background: var(--white); border: 1px solid var(--rule); border-radius: 16px; padding: 18px 22px; }
.ei-block h3.ei-label { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 13px; letter-spacing: 1.5px; color: var(--pu3); margin-bottom: 6px; }
.election-info .ei-status { font-family: 'Barlow Semi Condensed', sans-serif; font-weight: 800; font-size: 24px; line-height: 1.15; color: var(--ink); margin-bottom: 6px; }
.election-info .ei-date { font-weight: 700; font-size: 16px; color: var(--ink2); }
.election-info .ei-note { font-size: 14px; color: var(--mid); }
/* Election Day countdown to polls opening: days · hours · minutes, numbers over small unit labels, no seconds */
.ei-count { margin-bottom: 8px; }
.election-info .ei-count-units { display: flex; align-items: flex-start; gap: 10px; }
.ei-unit { display: flex; flex-direction: column; min-width: 0; }
.ei-unit .n { font-family: 'Barlow Semi Condensed', sans-serif; font-weight: 800; font-size: 30px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.ei-unit .l { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--pu3); margin-top: 3px; }
.ei-count .sep { font-family: 'Barlow Semi Condensed', sans-serif; font-weight: 800; font-size: 22px; line-height: 30px; color: var(--pu-m); }
.election-info .ei-count-caption { font-size: 13px; color: var(--mid); margin-top: 6px; }

/* Election resource panels (endorsements page, under the countdown). Both panels share one style. */
.resources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 720px; margin: 0; } /* last block on the page */
/* Election lookup links, inside the Voting Resources accordion above How to Vote */
.quick-links { list-style: none; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--rule); }
.quick-links li { font-size: 15px; color: var(--mid); }
.quick-links li + li { margin-top: 6px; }
.quick-links a { color: var(--pu); font-weight: 600; }
.quick-links .keep-together { white-space: nowrap; } /* the link phrase moves to the next line as one unit, never splits */
.res-panel { background: var(--white); border: 1px solid var(--rule); border-radius: 16px; padding: 18px 22px; display: flex; flex-direction: column; }
.res-panel .res-label { font-size: 12px; margin-bottom: 6px; }
.res-panel h3 { font-size: 20px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.res-panel p:not(.res-label) { font-size: 14.5px; line-height: 1.6; color: var(--mid); margin-bottom: 12px; }
.res-panel .res-link { margin-top: auto; align-self: flex-start; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--pu); overflow-wrap: anywhere; }
.res-panel .res-link:hover { color: var(--pu3); }
.res-label { display: block; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--pu3); margin-bottom: 2px; }

.endorse-body { padding: 48px var(--px) 64px; }
.endorse-body h2 { font-size: 24px; font-weight: 800; color: var(--ink); margin: 0 0 14px; }

/* ---- Endorsed candidate roster: one uniform card for all 36 candidates; group headings carry the hierarchy ---- */
.roster-group { margin-bottom: 36px; }
.group-title { display: flex; align-items: baseline; gap: 10px; font-size: 20px; font-weight: 800; color: var(--ink); padding-bottom: 10px; margin-bottom: 16px; border-bottom: 2px solid var(--pu-m); }
.group-count { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: 1px; color: var(--light); }
.cand-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cand-card { width: 100%; height: 100%; display: grid; grid-template-columns: 104px 1fr; align-items: center; gap: 16px; padding: 12px 16px 12px 12px; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--white); border: 1px solid var(--rule); border-radius: 16px; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.cand-card:hover { border-color: var(--pu-m); box-shadow: 0 2px 12px rgba(65, 39, 92, 0.08); }
.cc-photo { display: block; width: 104px; height: 104px; border-radius: 12px; background-repeat: no-repeat; background-color: var(--pu-l); }
.cc-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cand-office { display: block; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 12px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--pu3); }
.cand-name { display: block; font-family: 'Barlow Semi Condensed', sans-serif; font-weight: 800; font-size: 21px; line-height: 1.05; text-transform: uppercase; color: var(--ink); }
.roster-group + .resources { margin-top: 8px; }

/* ---- Inline candidate profile: one shared panel inserted after the clicked card's row, spanning the whole grid ---- */
.cand-profile { grid-column: 1 / -1; }
.cand-profile[hidden] { display: none; }
.cand-profile .cp-inner { cursor: pointer; } /* clicking anywhere on the open profile closes it */
.cp-inner { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; max-width: 900px; margin: 4px auto 6px;
  padding: 28px 32px; background: var(--off); border: 1px solid var(--rule); border-radius: 16px; }
.cand-profile:not([hidden]) .cp-inner { animation: cp-in 0.2s ease-out; }
@keyframes cp-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.cp-photo { display: block; width: 100%; aspect-ratio: 5 / 4; border-radius: 14px; background-repeat: no-repeat; background-color: var(--pu-l); }
.cp-office { display: block; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--pu3); margin-bottom: 4px; }
.cp-name { font-family: 'Barlow Semi Condensed', sans-serif; text-transform: uppercase; font-size: clamp(26px, 2.6vw, 32px); font-weight: 900; color: var(--ink); line-height: 1.02; margin-bottom: 14px; }
.cp-bio { font-size: 16px; line-height: 1.7; color: var(--ink2); }
.cp-site { display: inline-flex; margin-top: 18px; align-items: center; gap: 6px; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 14px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--pu); text-decoration: underline; text-underline-offset: 3px; }
.cp-site:hover { color: var(--pu3); }
.cp-site[hidden] { display: none; }
.cand-card[aria-expanded="true"] { border-color: var(--pu); box-shadow: 0 0 0 1px var(--pu); }
@media (prefers-reduced-motion: reduce) { .cand-profile:not([hidden]) .cp-inner { animation: none; } .cand-card { transition: none; } }

/* Resource panel buttons (same pill style in both panels) */
.btn-purple { background: var(--pu3); color: var(--white); }
.btn-purple:hover { background: var(--pu); }
.res-panel .res-btn { margin-top: auto; align-self: flex-start; font-size: 14px; padding: 11px 22px; }
/* Voting Resources disclosure (native <details>): same white rounded surface as the election blocks */
.voting-resources { max-width: 720px; margin-top: 20px; background: var(--white); border: 1px solid var(--rule); border-radius: 16px; }
.voting-resources summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; color: var(--pu3); border-radius: 16px; }
.vr-text { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 18px; row-gap: 2px; min-width: 0; }
.vr-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 15px; letter-spacing: 1.5px; text-transform: uppercase; white-space: nowrap; }
.vr-sub { font-family: 'Inter', sans-serif; font-weight: 400; font-size: 14px; color: var(--mid); }
.voting-resources summary::-webkit-details-marker { display: none; }
.voting-resources summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.voting-resources[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.voting-resources summary:hover { color: var(--pu); }
.voting-resources summary:hover .vr-sub { color: var(--ink2); }
.voting-resources[open] summary { border-bottom: 1px solid var(--rule); border-radius: 16px 16px 0 0; }
.vr-body { padding: 16px 22px 6px; }
.vr-body h2 { font-size: 20px; font-weight: 800; color: var(--ink); margin-bottom: 4px; }
.vote-info { list-style: none; }
.vote-info li { padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 15px; color: var(--mid); }
.vote-info li:last-child { border-bottom: none; }
.vote-info strong { color: var(--ink); font-weight: 700; }

/* ---- Footer (WP: footer.php, values from Site Settings) ---- */
.footer { background: var(--pu4); color: rgba(255,255,255,0.72); padding: 36px var(--px); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; }
.footer .org { color: var(--white); font-weight: 600; }
.footer p { color: rgba(255,255,255,0.72); }
.footer a { color: var(--white); overflow-wrap: anywhere; }
.footer a:hover { color: var(--gold2); }
.footer .copy { width: 100%; font-size: 12px; color: rgba(255,255,255,0.5); border-top: 1px solid rgba(255,255,255,0.16); padding-top: 16px; }

/* ---- Responsive ---- */
@media (max-width: 1080px) {
  .cand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-inner { grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding: 24px; }
}
@media (max-width: 860px) {
  .hero { padding-top: 28px; }
  .hero .ghost { top: 28px; right: auto; left: 12px; transform: none; width: calc(100% - 24px); }
  /* % padding resolves against the column; the line's height is (column + 24px) / 12.04 */
  .hero .headline { padding-top: calc((100% + 24px) / 12.04 * 0.94 - 0.55vw); }
}
@media (max-width: 860px) {
  :root { --gutter: 24px; }
  .hero { padding-bottom: 44px; }
  .affiliates { padding-top: 48px; padding-bottom: 48px; }
  .aff { grid-template-columns: 180px 1fr; gap: 24px; }
  .aff-logo { height: 108px; }
}
@media (max-width: 600px) {
  .nav { padding-top: 10px; padding-bottom: 10px; }
  .nav-logo img { height: 44px; }
  .nav-logo .name { display: none; }
  .btn { font-size: 13px; letter-spacing: 1px; padding: 11px 18px; }
  .hero p.lede { max-width: none; }
  .aff { grid-template-columns: 1fr; gap: 14px; }
  .aff-logo { width: 100%; max-width: 280px; height: 120px; }
    .election-info, .resources { grid-template-columns: 1fr; gap: 12px; }
  .vr-text { flex-direction: column; align-items: flex-start; }
  .election-info .ei-status { font-size: 22px; }
  .cand-grid { grid-template-columns: 1fr; gap: 12px; }
  .cand-card { grid-template-columns: 88px 1fr; gap: 14px; min-height: 124px; } /* same height for every card, even with two-line names */
  .cc-photo { width: 88px; height: 88px; }
  .cand-name { font-size: 20px; }
  .cp-inner { grid-template-columns: 1fr; gap: 18px; padding: 20px; }
}
@media (max-width: 360px) {
  .cand-name { font-size: 18px; } /* keeps the longest names (e.g. MIGUEL MARTÍNEZ YOUNGS) to two lines so cards stay uniform */
}
