/* ==========================================================================
   JeanForCouncil.com
   Global stylesheet — CLEAN CONSOLIDATED VERSION
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "Neue Haas Grotesk Display Pro";
  src: url("/assets/fonts/NeueHaasGroteskDisplayPro-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Grotesk Display Pro";
  src: url("/assets/fonts/NeueHaasGroteskDisplayPro-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Grotesk Display Pro";
  src: url("/assets/fonts/NeueHaasGroteskDisplayPro-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Design Tokens
   -------------------------------------------------------------------------- */

:root {
  --bg: #FEFAF4;        /* paper */
  --ink: #2F3437;       /* charcoal */
  --muted: #5C6166;

  --primary: #8C2F23;   /* oxide red */
  --accent: #CC8764;    /* sandstone */
  --cta: #B66F4F;       /* darker sandstone (CTA) */

  --font: "Neue Haas Grotesk Display Pro", system-ui, -apple-system;

  --fs-sm: 0.875rem;    /* 14 */
  --fs-md: 1rem;        /* 16 */
  --fs-lg: 1.125rem;    /* 18 */

  --lh-tight: 1.05;
  --lh: 1.5;

  --container: 1120px;
  --gutter: 20px;
  --radius: 14px;

  --dur: 160ms;
  --ease: cubic-bezier(.2,.8,.2,1);
}

/* --------------------------------------------------------------------------
   3. Reset / Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: var(--lh);
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }
a:visited { color: inherit; text-decoration: none; }

/* --------------------------------------------------------------------------
   4. Layout Helpers
   -------------------------------------------------------------------------- */

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

.section {
  padding: 64px 0;
}

/* Normal divider (within container) */
.divider {
  display: block;
  height: 4px;
  background-color: rgba(204,135,100,0.65);
  border: 0;
  margin: 28px 0;
  -webkit-appearance: none;
  appearance: none;
}

/* Full-bleed divider (edge-to-edge) */
.divider-full {
  width: 100vw;
  height: 3px;
  background: rgba(204,135,100,.45);
  border: 0;
  margin: 14px 0 6px;

  margin-left: 50%;
  transform: translateX(-50%);

  -webkit-appearance: none;
  appearance: none;
}

/* --------------------------------------------------------------------------
   5. Typography
   -------------------------------------------------------------------------- */

.h1 {
  font-size: clamp(2.2rem, 4.5vw, 3rem);
  line-height: var(--lh-tight);
  margin: 0 0 12px 0;
  letter-spacing: 0.01em;
}

.text-muted { color: var(--muted); }
.text-center { text-align: center; }

/* --------------------------------------------------------------------------
   6. Header / Navigation — STABLE
   -------------------------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 100;
  background: var(--bg);
  border-bottom: 3px solid rgba(204,135,100,.45);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  position: relative;

  /* safe-area + breathing room */
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

@media (min-width: 1024px) {
  .header-inner {
    padding-left: 32px;
    padding-right: 32px;
  }
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-sub {
  font-size: 16px;
  margin-top: 6px;
  font-weight: 500;
}

/* Mobile toggle */
.nav-toggle {
  appearance: none;
  border: 1px solid rgba(47,52,55,.18);
  background: transparent;
  border-radius: 999px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.nav-toggle__label {
  font-size: 16px;
  font-weight: 650;
}

.nav-toggle__icon {
  width: 18px;
  height: 12px;
  position: relative;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ink);
  transition: transform var(--dur) var(--ease), top var(--dur) var(--ease);
}

.nav-toggle__icon::before { top: 0; }
.nav-toggle__icon::after  { top: 10px; }

/* Mobile nav (hidden by default, revealed via .site-header.is-open) */
.nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;

  background: var(--bg);
  padding: 12px 20px 16px;
  border-bottom: 1px solid rgba(204,135,100,.45);

  display: flex;
  flex-direction: column;
  gap: 8px;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);

  transition:
    opacity var(--dur) var(--ease),
    transform var(--dur) var(--ease),
    visibility 0s linear var(--dur);
}

.site-header.is-open .nav {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}

/* Toggle X */
.site-header.is-open .nav-toggle__icon::before { top: 5px; transform: rotate(45deg); }
.site-header.is-open .nav-toggle__icon::after  { top: 5px; transform: rotate(-45deg); }

/* Nav links */
.nav-link {
  padding: 16px 14px;
  font-size: 18px;
  font-weight: 500;
  border-radius: 12px;
  text-align: center;
}

.nav-link:hover {
  background: rgba(140,47,35,.06);
  color: var(--primary);
}

/* Desktop nav */
@media (min-width: 860px) {
  .nav-toggle { display: none; }

  .nav {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    padding: 0;
    border: 0;
    background: transparent;

    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .nav-link {
    padding: 10px 10px;
    font-size: 16px;
    text-align: left;
  }
}

/* --------------------------------------------------------------------------
   7. Buttons — clear hierarchy (NO conflicts)
   -------------------------------------------------------------------------- */

/* Menu/header donate = primary red (smaller) */
.nav-donate {
  display: inline-block;
  text-align: center;
  background: var(--primary);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
}

/* Mobile menu donate should match link sizing */
@media (max-width: 859px) {
  .nav-donate {
    width: 100%;
    padding: 16px 18px;
    font-size: 18px;
    border-radius: 14px;
    margin-top: 10px;
  }
}

.nav-donate:hover { filter: brightness(0.95); }

/* Primary CTA = sandstone + bigger (hero + modal submit) */
.hero-primary,
#donateContinue {
  display: inline-block;
  background: var(--cta);
  color: var(--bg);
  padding: 18px 26px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.01em;
  border: 2px solid transparent;
  cursor: pointer;
}

.hero-primary:hover,
#donateContinue:hover {
  filter: brightness(0.95);
}

/* Secondary CTA */
.hero-secondary {
  display: inline-block;
  padding: 16px 22px;
  border-radius: 999px;
  border: 2px solid rgba(140,47,35,0.35);
  font-weight: 800;
  color: var(--ink);
  background: transparent;
}

.hero-secondary:hover {
  background: rgba(140,47,35,0.06);
  border-color: rgba(140,47,35,0.55);
}

/* Button/link visited colors: keep consistent */
.nav-donate:visited { color: var(--bg); }
.hero-primary:visited { color: var(--bg); }
.hero-secondary:visited { color: var(--ink); }

/* Force correct text colors for CTAs */
.nav-donate,
.nav-donate:visited,
.nav-donate:hover,
.nav-donate:active,
.hero-primary,
.hero-primary:visited,
.hero-primary:hover,
.hero-primary:active,
#donateContinue,
#donateContinue:visited,
#donateContinue:hover,
#donateContinue:active {
  color: var(--bg);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   8. Homepage Hero
   -------------------------------------------------------------------------- */

.hero { padding: 72px 0 64px; }
@media (min-width: 860px) { .hero { padding: 96px 0 80px; } }

.hero-inner { max-width: 780px; }

.kicker {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 14px;
}

.hero-name {
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  line-height: 1.05;
  margin: 0 0 12px 0;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero-statement {
  font-size: 1.4rem;
  font-weight: 500;
  margin: 0 0 16px 0;
}

.hero-subtext {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   9. Homepage Priorities — Full Bleed Bands
   -------------------------------------------------------------------------- */

.priorities {
  padding: 0 0 24px;
  margin: 0;
}

.priority-row {
  padding: 28px 0;
}

@media (min-width: 860px) {
  .priority-row { padding: 34px 0; }
}

.priority-row.tone-a { background: var(--bg); }
.priority-row.tone-b { background: rgba(204,135,100,0.12); }

.priority-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.priority-title {
  font-size: 1.45rem;
  font-weight: 650;
  margin: 0 0 10px 0;
}

.priority-text {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 64ch;
  margin: 0 auto;
}

@media (min-width: 860px) {
  .priority-title { font-size: 1.6rem; }
}

/* --------------------------------------------------------------------------
   10. Priorities Page
   -------------------------------------------------------------------------- */

.priority-detail-inner { max-width: 760px; }

.priority-heading {
  font-size: 1.6rem;
  font-weight: 650;
  margin: 0 0 16px 0;
}

.priority-detail-inner p {
  font-size: 1.1rem;
  line-height: 1.65;
  margin: 0 0 18px 0;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--bg);
  padding: 28px 0 36px;
}

.footer-inner { text-align: center; }

.footer-text {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
}

/* Social (optional) */
.footer-social{
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 0 0 14px 0;
}

.footer-social-link{
  font-size: 0.9rem;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(47,52,55,0.18);
}

.footer-social-link:hover{
  color: var(--primary);
  border-color: rgba(140,47,35,0.35);
  background: rgba(140,47,35,0.06);
}

/* --------------------------------------------------------------------------
   12. Donate Modal
   -------------------------------------------------------------------------- */

.donate-modal{
  position: fixed;
  inset: 0;
  background: rgba(47,52,55,0.55);
  display: none;

  /* Scroll handling */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  /* IMPORTANT: no vertical centering */
  align-items: flex-start;
  justify-content: center;

  padding: 18px;
  z-index: 200;
}

.donate-modal.open{ display: flex; }

.donate-modal-inner{
  width: min(720px, 100%);
  background: var(--bg);
  border-radius: 18px;
  border: 1px solid rgba(204,135,100,.35);
  padding: 18px 18px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);

  /* FORCE top alignment */
  margin: 0 auto;

  /* Scroll safety */
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-close{
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  float: right;
  cursor: pointer;
  color: var(--muted);
}

.modal-title{
  margin: 6px 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
}

.modal-subtext{ margin: 0 0 14px; }

.donate-form{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field span{
  display: block;
  font-size: 0.95rem;
  font-weight: 650;
  margin-bottom: 6px;
}

.field input{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(47,52,55,0.18);
  background: rgba(255,255,255,0.6);
  font: inherit;
}

.grid-2, .grid-3{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 720px){
  .grid-2{ grid-template-columns: 1fr 1fr; }
  .grid-3{ grid-template-columns: 2fr 1fr 1fr; }
}

.check{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.95rem;
  line-height: 1.4;
}

.check input{ margin-top: 4px; }

.form-error{
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(140,47,35,0.08);
  border: 1px solid rgba(140,47,35,0.22);
  color: var(--ink);
}

/* Amount presets */
.amount-block { margin-top: 6px; }

.amount-label{
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.amount-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

@media (min-width: 520px){
  .amount-grid{ grid-template-columns: repeat(5, 1fr); }
}

.amt-btn{
  appearance: none;
  border: 1px solid rgba(47,52,55,0.18);
  background: rgba(255,255,255,0.55);
  border-radius: 999px;
  padding: 12px 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.amt-btn:hover{
  border-color: rgba(140,47,35,0.35);
  transform: translateY(-1px);
}

.amt-btn.is-selected{
  border-color: rgba(140,47,35,0.55);
  background: rgba(140,47,35,0.08);
  color: var(--ink);
}

.amount-hint{
  margin-top: 8px;
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   Buttons — fixed hierarchy
   -------------------------------------------------------------------------- */

.btn{
  display: inline-block;
  padding: 16px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.01em;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

/* Normal primary (for non-donate CTAs like Priorities) */
.btn-primary{
  background: var(--primary);
  color: var(--bg);
}
.btn-primary:hover{ filter: brightness(0.95); }

/* Secondary (About Jean) */
.btn-secondary{
  background: transparent;
  color: var(--ink);
  border-color: rgba(140,47,35,0.35);
}
.btn-secondary:hover{
  background: rgba(140,47,35,0.06);
  border-color: rgba(140,47,35,0.55);
}

/* Special DONATE (bigger + sandstone) */
.btn-donate{
  background: var(--cta); /* #B66F4F */
  color: var(--bg);
  padding: 18px 26px;     /* bigger */
  font-size: 18px;        /* bigger */
}
.btn-donate:hover{ filter: brightness(0.95); }

/* Keep header donate as-is */
.nav-donate{
  display: inline-block;
  background: var(--primary);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
}
.nav-donate:hover{ filter: brightness(0.95); }

/* Modal submit should match Donate CTA */
#donateContinue{
  background: var(--cta);
  color: var(--bg);
  padding: 18px 26px;
  font-size: 18px;
  font-weight: 800;
  border-radius: 999px;
  border: 2px solid transparent;
}
#donateContinue:hover{ filter: brightness(0.95); }

/* Force button text colors for <a> states */
.btn-primary,
.btn-primary:visited,
.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus {
  color: var(--bg);
  text-decoration: none;
}

.btn-donate,
.btn-donate:visited,
.btn-donate:hover,
.btn-donate:active,
.btn-donate:focus {
  color: var(--bg);
  text-decoration: none;
}

.btn-secondary,
.btn-secondary:visited,
.btn-secondary:hover,
.btn-secondary:active,
.btn-secondary:focus {
  color: var(--ink);
  text-decoration: none;
}

/* Emphasize Donate CTA without full-width */
.hero-actions .btn-donate {
  padding: 18px 34px;   /* wider than others */
  font-size: 18px;      /* slightly larger text */
  letter-spacing: 0.015em;
}

/* Keep other hero buttons slightly tighter */
.hero-actions .btn-primary,
.hero-actions .btn-secondary {
  padding: 14px 22px;
  font-size: 16px;
}

/* --------------------------------------------------------------------------
   Page Intro (used on Priorities / About / Thank You)
   -------------------------------------------------------------------------- */

.page-intro {
  padding: 56px 0 48px; /* slightly tighter than .section */
}

.page-intro-inner {
  max-width: 760px;
}

/* Body copy blocks for intro-style pages */
.intro-text {
  font-size: 1.1rem;
  line-height: 1.65;
  margin: 0 0 18px 0;
  color: var(--ink);
}

/* Make thank-you headline area feel balanced on mobile */
@media (max-width: 520px) {
  .page-intro { padding: 44px 0 40px; }
  .intro-text { font-size: 1.05rem; }
}

/* ==========================================================
   BALLOT SIGNATURE BANNER (Temporary Campaign Phase)
   ========================================================== */

.ballot-banner {
  width: 100%;
  background: var(--primary); /* Oxide red */
  color: var(--bg);
  padding: 14px 0;
  position: relative;
  z-index: 500;
}

.ballot-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.ballot-text {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}

.ballot-cta {
  display: inline-block;
  background: var(--bg);
  color: var(--primary) !important;   /* Force override */
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-decoration: none !important;
  transition: all var(--dur) var(--ease);
}

.ballot-cta:hover {
  background: rgba(255,255,255,0.9);
  color: var(--primary) !important;
  transform: translateY(-1px);
}

/* Mobile Layout */
@media (max-width: 859px) {

  .ballot-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .ballot-text {
    font-size: 1rem;
  }

  .ballot-cta {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.05rem;
  }
}