/* ==========================================================================
   Re-Elect Frank Rego — Ward 1, East Providence
   ========================================================================== */

/* ---- Fonts ----
   Body & headings come from Adobe Fonts (Museo Sans / Museo Slab Rounded).
   Roboto Slab is kept self-hosted only as an offline fallback for headings. */
@font-face {
  font-family: 'Roboto Slab';
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url('../assets/fonts/roboto-slab-700-900-latin.woff2') format('woff2');
}

/* ---- Design tokens ---- */
:root {
  --navy: #1B2A6B;
  --navy-deep: #141F52;
  --navy-darkest: #12194A;
  --red: #E8232A;
  --red-hover: #FF5C5C;
  --bg-light: #F5F6FA;
  --ink: #2B2B2B;
  --muted: #5A5F6B;
  --hero-pill: #9FB0E8;
  --hero-sub: #DCE2F7;
  --cta-sub: #C7D0EE;
  --footer-text: #A9B4DC;
  --serif: 'museo-slab-rounded', 'Roboto Slab', Georgia, serif;
  --sans: 'museo-sans', -apple-system, 'Segoe UI', Arial, sans-serif;
  --container: 1200px;
}

/* ---- Base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--navy); }
a:hover { color: var(--red); }
h1, h2, h3 { font-family: var(--serif); color: var(--navy); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute;
  left: -9999px;
  background: #fff;
  color: var(--navy);
  padding: 10px 18px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  padding: 16px 32px;
  font-size: 17px;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-hover); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.4); }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-lg { font-size: 18px; padding: 18px 40px; }
.btn-shadow { box-shadow: 0 8px 24px rgba(232,35,42,.35); }

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #E2E4EC;
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}
.brand {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 20px;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand span { color: var(--red); }
.brand:hover { color: var(--navy); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  font-weight: 700;
  font-size: 15px;
}
.nav-links a { color: var(--navy); text-decoration: none; }
.nav-links a:hover { color: var(--red); }
.nav-cta {
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 999px;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--navy); }

@media (max-width: 620px) {
  .nav-inner { padding: 10px 16px; }
  .nav-cta { margin-left: auto; }
  .nav-links {
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: center;
  }
}

/* ---- Hero ---- */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 70%, var(--navy-darkest) 100%);
  color: #fff;
  overflow: hidden;
}
.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 72px 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 40px 64px;
  align-items: flex-end;
}
.hero-copy { flex: 1 1 480px; min-width: 300px; padding-bottom: 72px; }
.hero-pill {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--hero-pill);
  margin: 0 0 24px;
  border: 1px solid rgba(159,176,232,.35);
  padding: 8px 16px;
  border-radius: 999px;
}
.hero h1 {
  font-weight: 800;
  line-height: 0.90;
  letter-spacing: -0.02em;
  font-size: clamp(48px, 8.5vw, 96px);
  color: #fff;
  margin: 0;
  text-wrap: balance;
}
.hero h1 span { color: var(--red); }
.hero-sub {
  margin: 28px 0 36px;
  font-size: clamp(21px, 2.5vw, 27px);
  font-weight: 700;
  color: var(--hero-sub);
  display: block;
}
.hero-sub span { white-space: nowrap; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-logo { display: none; }

@media (max-width: 620px) {
  /* Halve the space above "The Job Isn't Finished." */
  .hero-inner { padding-top: 36px; }

  /* Smaller election-date bar (div.vote-bar raises specificity over the later base rule) */
  div.vote-bar p { font-size: 19px; }

  /* Center headline-level content (cards, bullet lists & their subheads keep their own alignment) */
  .hero h1 { text-align: center; }
  .hero-sub { display: block; text-align: center; }
  .hero-sub span { display: block; }
  .hero-actions { justify-content: center; }
  .section-head { justify-content: center; text-align: center; }

  /* Drop the hero pill; show the campaign logo under the tagline instead */
  .hero-pill { display: none; }
  .hero-logo { display: block; width: 75vw; height: auto; margin: 4px auto 32px; }

  /* Match the lower CTA logo to 75% viewport width (raised specificity to beat the later base rule) */
  section.cta img { width: 75vw; }

  /* Hide the photo caption */
  .record-banner-caption { display: none; }

  /* 25% less padding above "A Record of Results." (raised specificity to beat the later base rule) */
  section.record .container { padding-top: 54px; }

  /* Slightly smaller "Paid for by…" disclaimer (raised specificity to beat the later base rule) */
  footer.footer { font-size: 11px; }
}
.hero-photo { flex: 0 1 400px; min-width: 275px; align-self: flex-end; }
.hero-photo img { display: block; width: 100%; border-radius: 16px 16px 0 0; }

.vote-bar { background: var(--red); color: #fff; padding: 16px 24px; text-align: center; }
.vote-bar p {
  margin: 0 auto;
  max-width: var(--container);
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(24px, 3.6vw, 38px);
}

/* ---- Sections ---- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 48px;
  align-items: baseline;
  align-items: last baseline;
  margin-bottom: 48px;
}
.section-head h2 {
  font-weight: 900;
  line-height: 1.05;
  font-size: clamp(34px, 5vw, 56px);
  margin: 0;
  letter-spacing: -0.02em;
}
.section-head h2 span { color: var(--red); }
.section-head p {
  color: var(--muted);
  flex: 1 1 320px;
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  text-wrap: pretty;
}

/* ---- Record ---- */
.record { background: var(--bg-light); padding: 0 0 88px; }
.record-banner { position: relative; }
.record-banner img {
  display: block;
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  object-position: center 40%;
}
.record-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(18,25,74,.75), rgba(18,25,74,0) 60%);
}
.record-banner-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 28px;
  color: #fff;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
.record .container { padding-top: 72px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.card {
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 2px 20px rgba(27,42,107,.08);
  display: grid;
  gap: 18px;
  align-content: start;
}
.card h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 22px;
  margin: 0;
}
.check {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 18px;
  flex: 0 0 auto;
}

.bullet-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.bullet-list li { position: relative; padding-left: 22px; font-size: 15px; }
.bullet-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
}

/* ---- Priorities ---- */
.priorities { padding: 88px 0; }
.priority-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.priority-grid li {
  display: flex;
  gap: 18px;
  align-items: center;
  background: var(--bg-light);
  border-radius: 12px;
  padding: 20px 24px;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}
.check-red {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 22px;
  color: var(--red);
  flex: 0 0 auto;
}

/* ---- About ---- */
.about { background: var(--bg-light); padding: 88px 0; }
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.about-card { background: #fff; border-radius: 12px; padding: 22px 26px; }
.about-card h3 {
  font-family: var(--sans);
  font-weight: 700;
  -webkit-text-stroke: 0.03em currentColor;
  font-size: 18px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 6px;
}
.about-card p { margin: 0; }
.about-civic h3 { margin-bottom: 10px; }
.civic-list {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px 28px;
}
.civic-list li { padding-left: 18px; }
.civic-list li::before {
  top: 10px;
  width: 7px;
  height: 7px;
  background: var(--navy);
}

/* ---- CTA ---- */
.cta {
  background: linear-gradient(160deg, var(--navy), var(--navy-darkest));
  color: #fff;
  padding: 59px 24px 88px;
  text-align: center;
}
.cta img { display: block; width: 100%; max-width: 510px; margin: 0 auto 32px; }
.cta h2 {
  font-weight: 700;
  line-height: 1.05;
  color: #fff;
  font-size: clamp(30px, 4.5vw, 48px);
  margin: 0;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.cta p { color: var(--cta-sub); margin: 16px auto 21px; max-width: 520px; font-size: 18px; }

/* ---- Footer ---- */
.footer {
  background: var(--navy-darkest);
  color: var(--footer-text);
  font-size: 13px;
  padding: 28px 24px 36px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.08);
}
.footer p { margin: 0; }
