/* Mex51.org — campaign stylesheet v3
   Civic palette drawn from the community meeting flyer:
   deep navy, warm gold, cool paper. Red reserved for danger facts.
   Warning yellow appears only inside the corridor diagram. */

:root {
  --navy: #1C2B3A;
  --navy-2: #24364A;
  --navy-3: #33465C;
  --gold: #C9A13B;
  --gold-soft: #E3C878;
  --paper: #F5F7F8;
  --panel: #E9EDF0;
  --ink: #1A1D21;
  --danger: #A32D2D;
  --line: #D3DAE0;
  --muted: #55606B;
  --max: 1100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Barlow', system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

.gold-rule { height: 5px; background: var(--gold); }

/* ---------- header ---------- */

header { background: var(--navy); color: #F5F7F8; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}
.brand { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; }
.brand svg { display: block; }
.brand-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #F5F7F8;
}
.brand-tag {
  display: block;
  font-family: 'Barlow', sans-serif;
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--gold-soft);
}
.header-nav { display: flex; align-items: center; gap: 1.5rem; }
.header-link {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--gold-soft);
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: border-color 140ms ease, color 140ms ease;
}
.header-link:hover { border-bottom-color: var(--gold); color: #F5F7F8; }
.lang-switch {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.95rem;
  text-decoration: none;
  color: #F5F7F8;
  border: 2px solid var(--gold);
  padding: 0.3rem 0.9rem;
  transition: background 140ms ease, color 140ms ease;
}
.lang-switch:hover { background: var(--gold); color: var(--navy); }

/* ---------- hero ---------- */

.hero { padding: 4rem 0 3.5rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.kicker {
  display: inline-block;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.9rem;
  color: var(--navy);
  border-bottom: 3px solid var(--gold);
  padding-bottom: 0.3rem;
  margin-bottom: 1.2rem;
}
h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2.7rem, 6vw, 4.4rem);
  line-height: 0.98;
  color: var(--navy);
}
h1 .accent { color: var(--danger); }
.hero p.lead {
  margin-top: 1.4rem;
  font-size: 1.16rem;
  max-width: 33em;
  color: #2A3138;
}
.cta-row { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1rem; }
.btn {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 1.15rem;
  text-decoration: none;
  padding: 0.8rem 1.7rem;
  display: inline-block;
  border: 2px solid var(--navy);
  transition: transform 120ms ease, background 140ms ease, color 140ms ease;
}
.btn:hover { transform: translateY(2px); }
.btn-primary { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn-primary:hover { background: var(--navy); color: var(--gold-soft); border-color: var(--navy); }
.btn-secondary { background: transparent; color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--paper); }

.diagram-frame {
  border: 2px solid var(--navy);
  background: #FFFFFF;
  box-shadow: 0 10px 24px rgba(28,43,58,0.14);
}
.diagram { width: 100%; height: auto; display: block; }
.diagram-caption {
  margin-top: 0.9rem;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
  font-style: italic;
}

/* ---------- meeting banner ---------- */

.meeting {
  background: var(--navy);
  color: #F5F7F8;
  border-top: 5px solid var(--gold);
  border-bottom: 5px solid var(--gold);
  padding: 2.5rem 0;
}
.meeting-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2.5rem;
  align-items: center;
}
.meeting-date {
  font-family: 'Barlow Condensed', sans-serif;
  text-align: center;
  border: 2px solid var(--gold);
  padding: 0.9rem 1.5rem;
}
.meeting-date .day { display: block; font-size: 3rem; font-weight: 700; line-height: 1; color: var(--gold-soft); }
.meeting-date .month { display: block; font-size: 1.1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }
.meeting-body h2 { color: #F5F7F8; margin-bottom: 0.5rem; }
.meeting-body h2::after { display: none; }
.meeting-body p { color: #C7D0D9; font-size: 1rem; max-width: 44em; }
.meeting-body strong { color: var(--gold-soft); font-weight: 600; }
.meeting-cta { white-space: nowrap; }
.btn-gold-outline {
  border: 2px solid var(--gold);
  color: var(--gold-soft);
  background: transparent;
}
.btn-gold-outline:hover { background: var(--gold); color: var(--navy); }

/* ---------- facts ---------- */

.facts { background: var(--panel); padding: 3.5rem 0; }
.facts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.fact {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-top: 6px solid var(--navy);
  padding: 1.75rem 1.5rem 1.5rem;
}
.fact.fact-danger { border-top-color: var(--danger); }
.fact strong {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  text-transform: uppercase;
  display: block;
  line-height: 1.05;
  margin-bottom: 0.55rem;
  color: var(--navy);
}
.fact.fact-danger strong { color: var(--danger); }
.fact span { color: var(--muted); font-size: 0.98rem; line-height: 1.55; }

/* slim CTA band */
.cta-band {
  background: var(--gold);
  padding: 1.4rem 0;
}
.cta-band .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cta-band p {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.35rem;
  color: var(--navy);
  letter-spacing: 0.04em;
}
.btn-navy { background: var(--navy); color: #F5F7F8; border-color: var(--navy); }
.btn-navy:hover { background: transparent; color: var(--navy); }

/* ---------- sections ---------- */

section { padding: 4rem 0; }
h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1.02;
  margin-bottom: 1.4rem;
  color: var(--navy);
}
h2::after {
  content: "";
  display: block;
  width: 4rem;
  height: 5px;
  background: var(--gold);
  margin-top: 0.6rem;
}
.section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }
.prose p + p { margin-top: 1rem; }
.prose .note {
  margin-top: 1.5rem;
  border: 1px solid var(--line);
  border-left: 6px solid var(--gold);
  padding: 0.85rem 1.1rem;
  background: #FFFFFF;
  font-size: 0.97rem;
}

.asks { list-style: none; counter-reset: ask; }
.asks li {
  counter-increment: ask;
  position: relative;
  padding: 1rem 0 1rem 3.6rem;
  border-bottom: 1px solid var(--line);
}
.asks li:last-child { border-bottom: none; }
.asks li::before {
  content: counter(ask);
  position: absolute;
  left: 0;
  top: 1rem;
  width: 2.3rem;
  height: 2.3rem;
  background: var(--navy);
  color: var(--gold-soft);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.asks strong { display: block; font-size: 1.05rem; }
.asks span { color: var(--muted); font-size: 0.95rem; }

/* coalition */
.communities { background: var(--navy); color: #F5F7F8; }
.communities h2 { color: #F5F7F8; }
.communities p { color: #C7D0D9; max-width: 46em; }
.community-list { display: flex; flex-wrap: wrap; gap: 0.85rem; list-style: none; margin: 1.4rem 0; }
.community-list li {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1.02rem;
  border: 1px solid var(--navy-3);
  border-bottom: 3px solid var(--gold);
  background: var(--navy-2);
  color: #F5F7F8;
  padding: 0.45rem 1.1rem;
}
.coalition-note { font-size: 0.98rem; }
.coalition-note em { color: var(--gold-soft); font-style: normal; font-weight: 600; }

/* help */
.help-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; margin-top: 1.4rem; }
.help-card {
  border: 1px solid var(--line);
  border-top: 6px solid var(--gold);
  padding: 1.6rem 1.5rem;
  background: #FFFFFF;
}
.help-card h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.45rem;
  margin-bottom: 0.5rem;
  color: var(--navy);
}
.help-card p { font-size: 0.98rem; color: #3A424A; }
.help-card a { font-weight: 600; color: var(--navy); }

/* ---------- footer ---------- */

footer { background: var(--navy); color: #C7D0D9; padding: 2.25rem 0; font-size: 0.93rem; border-top: 5px solid var(--gold); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
footer a { color: #F5F7F8; }

/* ---------- petition letter page ---------- */

#peticion-completa, #full-petition { padding: 3rem 0 5rem; }
#peticion-completa .wrap, #full-petition .wrap { max-width: 780px; }
#peticion-completa > .wrap > p:first-child a,
#full-petition > .wrap > p:first-child a {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--navy);
}
.letter {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-top: 6px solid var(--gold);
  padding: 2.5rem clamp(1.5rem, 5vw, 3.5rem);
  margin-top: 1.75rem;
}
.letter h3 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.9rem;
}
.letter h3::after { width: 2.5rem; height: 3px; margin-top: 0.4rem; }
.letter p { margin-bottom: 1rem; }
.letter ul { margin: 0 0 1.25rem 1.4rem; color: var(--ink); }
.letter ul li { margin-bottom: 0.35rem; }
.letter-date { color: var(--muted); }
.letter-address { line-height: 1.5; }
.letter-close { margin-top: 1.5rem; }
.translation-note { margin-top: 2rem; font-size: 0.9rem; color: var(--muted); }

@media print {
  header, footer, .gold-rule, .no-print { display: none !important; }
  body { background: #FFFFFF; }
  .letter { border: none; padding: 0; }
  .wrap { max-width: 100%; padding: 0; }
}

/* ---------- responsive ---------- */

@media (max-width: 880px) {
  .header-inner { flex-wrap: wrap; gap: 0.75rem; }
  .header-nav { gap: 1rem; }
  .header-link { font-size: 0.85rem; }
  .hero-grid, .section-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .facts-grid, .help-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .meeting-grid { grid-template-columns: 1fr; gap: 1.25rem; text-align: left; }
  .meeting-date { display: inline-block; }
  .hero { padding: 2.75rem 0 2.5rem; }
  section { padding: 2.75rem 0; }
  h1 br { display: none; }
}
