/* ============================================
   Laura Bassett for State Senate - District 38
   Shared Stylesheet
   ============================================ */

/* === VARIABLES === */
:root {
  --navy: #162341;
  --navy-light: #1e3158;
  --green: #7AC143;
  --green-light: #8fd45a;
  --sky: #5bc5e8;
  --sky-light: #a0e0f0;
  --gold: #d4a843;
  --cream: #f8f6f1;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --radius: 8px;
  --transition: all 0.3s ease;
}

/* === RESET === */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--gray-800);
  line-height: 1.7;
  background: var(--white);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }
a { color: inherit; }

/* === NAVIGATION === */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  transition: var(--transition);
}
.nav.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
.nav-bar {
  background: var(--navy);
  position: relative;
  overflow: visible;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 88px;
  position: relative; z-index: 3;
}
/* Two-tone wave bottom edge — sweeping like logo wave */
.nav-wave-stripe {
  position: absolute; bottom: -24px; left: 0; right: 0;
  height: 30px; z-index: 4; pointer-events: none;
}
.nav-wave-stripe svg {
  width: 100%; height: 30px; display: block;
}
.nav-logo {
  display: flex; align-items: center; text-decoration: none;
  position: relative; z-index: 10;
}
.nav-logo-img {
  height: 68px; width: auto;
  display: block;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.25));
}
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  text-decoration: none; color: rgba(255,255,255,0.9);
  font-size: 15px; font-weight: 500; padding: 8px 14px;
  border-radius: 6px; transition: var(--transition);
  letter-spacing: 0.2px;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); background: rgba(255,255,255,0.12); }
.nav-donate {
  background: var(--green) !important; color: var(--white) !important;
  font-weight: 700 !important; letter-spacing: 1px !important;
  text-transform: uppercase; font-size: 13px !important;
  padding: 10px 24px !important; border-radius: 6px !important;
}
.nav-donate:hover { background: var(--green-light) !important; transform: translateY(-1px); }

.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-hamburger span {
  width: 24px; height: 2px; background: var(--white);
  transition: var(--transition); border-radius: 2px;
}
/* Mobile donate button — next to hamburger */
.nav-mobile-donate {
  display: none; background: var(--green); color: var(--white);
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 13px;
  letter-spacing: 1px; text-transform: uppercase; text-decoration: none;
  padding: 8px 16px; border-radius: 6px; transition: var(--transition);
  margin-left: auto; margin-right: 12px;
}
.nav-mobile-donate:hover { background: var(--green-light); }

/* === PAGE HEADER (for inner pages) === */
.page-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 140px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(91,197,232,0.1) 0%, transparent 60%);
}
.page-header .section-label {
  position: relative; z-index: 1;
  color: var(--sky-light);
}
.page-header .section-title {
  position: relative; z-index: 1;
  color: var(--white);
}
.page-header .section-subtitle {
  position: relative; z-index: 1;
  color: rgba(255,255,255,0.7);
  margin-left: auto; margin-right: auto;
}

/* === SECTIONS === */
.section { padding: 100px 24px; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-label {
  font-size: 14px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--green);
  margin-bottom: 12px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 700; color: var(--navy);
  line-height: 1.2; margin-bottom: 20px;
}
.section-subtitle {
  font-size: 18px; color: var(--gray-600);
  max-width: 640px; line-height: 1.8;
  margin-bottom: 48px;
}
.bg-cream { background: var(--cream); }
.bg-navy { background: var(--navy); }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 6px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: var(--transition); cursor: pointer; border: none;
  letter-spacing: 0.3px; font-family: inherit;
}
.btn-primary {
  background: var(--green); color: var(--white);
  box-shadow: 0 4px 16px rgba(122,193,67,0.3);
}
.btn-primary:hover { background: var(--green-light); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(122,193,67,0.4); }
.btn-outline {
  background: transparent; color: var(--white);
  border: 2px solid rgba(255,255,255,0.4);
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.1); }
.btn-outline-dark {
  background: transparent; color: var(--navy);
  border: 2px solid var(--gray-200);
}
.btn-outline-dark:hover { border-color: var(--green); color: var(--green); }

/* === DONATE CTA BANNER === */
.donate-cta {
  background: linear-gradient(135deg, var(--green), #5a9e2e);
  padding: 80px 24px; text-align: center;
}
.donate-cta h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 4vw, 44px);
  color: var(--white); margin-bottom: 16px;
}
.donate-cta p {
  font-size: 18px; color: rgba(255,255,255,0.85);
  max-width: 600px; margin: 0 auto 32px;
  line-height: 1.7;
}
.btn-donate-lg {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 18px 48px; background: var(--white);
  color: var(--green); font-size: 18px; font-weight: 700;
  border-radius: 8px; text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  letter-spacing: 0.5px;
}
.btn-donate-lg:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

/* === FOOTER === */
.footer {
  background: var(--navy); color: rgba(255,255,255,0.7);
  padding: 60px 24px 32px;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
}
.footer-brand .name {
  font-family: 'Playfair Display', serif;
  font-size: 24px; color: var(--white); margin-bottom: 4px;
}
.footer-brand .tagline {
  font-size: 13px; color: var(--green-light);
  font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; margin-bottom: 16px;
}
.footer-brand p { font-size: 14px; line-height: 1.7; max-width: 360px; }
.footer h4 {
  font-size: 13px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--white); margin-bottom: 16px;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  color: rgba(255,255,255,0.6); text-decoration: none;
  font-size: 14px; transition: var(--transition);
}
.footer-links a:hover { color: var(--sky-light); }
.social-links { display: flex; gap: 16px; margin-top: 8px; }
.social-links a {
  color: rgba(255,255,255,0.5); text-decoration: none;
  font-size: 14px; transition: var(--transition);
}
.social-links a:hover { color: var(--sky-light); }
.footer-bottom {
  max-width: 1100px; margin: 40px auto 0;
  text-align: center;
}
.fppc-box {
  display: inline-block;
  padding: 14px 24px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  font-size: 13px; color: rgba(255,255,255,0.6);
  font-weight: 500; letter-spacing: 0.3px;
}
.footer-legal {
  margin-top: 16px;
  font-size: 12px; color: rgba(255,255,255,0.35);
}
.footer-legal a {
  color: rgba(255,255,255,0.4); text-decoration: none;
}
.footer-legal a:hover { color: var(--sky-light); }
.footer-built {
  margin-top: 12px;
  font-size: 11px; color: rgba(255,255,255,0.3);
  letter-spacing: 0.5px;
}
.footer-built a {
  color: rgba(255,255,255,0.4); text-decoration: none;
}
.footer-built a:hover { color: var(--sky-light); }

/* === FORM STYLES === */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: 14px; font-weight: 600;
  color: var(--gray-700); margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius); font-size: 15px;
  font-family: inherit; transition: var(--transition);
  background: var(--gray-50);
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--sky);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(91,197,232,0.15);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.checkbox-group {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 24px;
}
.checkbox-group label {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--gray-700); cursor: pointer;
  font-weight: 400;
}
.checkbox-group input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--green);
}
.form-disclaimer {
  font-size: 13px; color: var(--gray-600);
  line-height: 1.6; margin-top: 16px;
  border: 1px solid var(--gray-200);
  border-radius: 8px; padding: 12px 14px;
  background: var(--gray-50);
}

/* === ANIMATIONS === */
.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-mobile-donate { display: inline-block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 88px; left: 0; right: 0;
    background: var(--navy); padding: 16px 24px;
    border-bottom: 3px solid var(--sky);
    box-shadow: var(--shadow-lg);
    z-index: 100;
  }
  .nav-links.open a { padding: 12px 16px; font-size: 16px; text-align: center; border-radius: 8px; }
  .nav-links.open a:hover, .nav-links.open a.active { background: rgba(255,255,255,0.1); }
  .nav-links.open .nav-donate { display: none; }
  .nav-logo-img { height: 56px; }
  .section { padding: 60px 20px; }
  .footer-inner { grid-template-columns: 1fr; }
  .page-header { padding: 120px 20px 40px; }

  /* Accessibility widget — mobile */
  .a11y-btn {
    width: 40px; height: 40px; bottom: 16px; right: 16px;
  }
  .a11y-btn svg { width: 20px; height: 20px; }
  .a11y-panel {
    bottom: 64px; right: 16px; left: 16px;
    width: auto; max-width: none;
  }
}

/* === COOKIE CONSENT BANNER === */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--navy); color: rgba(255,255,255,0.85);
  padding: 16px 24px; z-index: 9999;
  font-family: 'Inter', sans-serif; font-size: 14px;
  display: none; /* shown via JS */
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  border-top: 2px solid var(--sky);
}
.cookie-banner.show { display: flex; }
.cookie-banner-inner {
  max-width: 1200px; margin: 0 auto; width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.cookie-banner p { margin: 0; line-height: 1.5; flex: 1; }
.cookie-banner a { color: var(--sky); text-decoration: underline; }
.cookie-banner-btns { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-accept {
  padding: 10px 24px; background: var(--green); color: #fff;
  border: none; border-radius: 6px; font-weight: 700;
  font-size: 13px; cursor: pointer; font-family: 'Inter', sans-serif;
  letter-spacing: 0.5px; transition: background 0.3s;
}
.cookie-accept:hover { background: var(--green-light); }
.cookie-decline {
  padding: 10px 24px; background: transparent; color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.2); border-radius: 6px;
  font-weight: 600; font-size: 13px; cursor: pointer;
  font-family: 'Inter', sans-serif; transition: all 0.3s;
}
.cookie-decline:hover { border-color: rgba(255,255,255,0.5); color: #fff; }

/* === ACCESSIBILITY WIDGET === */
.a11y-btn {
  position: fixed; bottom: 24px; right: 24px;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--navy); color: #fff; border: 2px solid var(--sky);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 9998;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: all 0.3s;
}
.a11y-btn:hover { background: var(--navy-light); transform: scale(1.1); }
.a11y-btn svg { width: 24px; height: 24px; fill: currentColor; }
.a11y-panel {
  position: fixed; bottom: 80px; right: 24px;
  background: var(--white); border-radius: 12px;
  padding: 24px; width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  border: 1px solid var(--gray-200);
  z-index: 9998; display: none;
  font-family: 'Inter', sans-serif;
}
.a11y-panel.open { display: block; }
.a11y-panel h3 {
  font-size: 16px; font-weight: 700; color: var(--navy);
  margin-bottom: 16px;
}
.a11y-option {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--gray-100);
  font-size: 14px; color: var(--gray-700);
}
.a11y-option:last-child { border-bottom: none; }
.a11y-toggle {
  width: 44px; height: 24px; background: var(--gray-200);
  border-radius: 12px; border: none; cursor: pointer;
  position: relative; transition: background 0.3s;
}
.a11y-toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; background: #fff;
  border-radius: 50%; transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.a11y-toggle.active { background: var(--green); }
.a11y-toggle.active::after { transform: translateX(20px); }

/* Accessibility: High Contrast Mode */
html.high-contrast body { background: #000; color: #fff; }
html.high-contrast .section,
html.high-contrast .signup-strip,
html.high-contrast .bio-highlight { background: #111; color: #fff; }
html.high-contrast .nav-bar { background: #000; }
html.high-contrast a { color: #ff0; }
html.high-contrast .footer { background: #000; }
html.high-contrast img { filter: contrast(1.2); }

/* Accessibility: Reduce Motion */
html.reduce-motion *,
html.reduce-motion *::before,
html.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

/* Cookie banner adjustment when a11y button present */
.cookie-banner.show ~ .a11y-btn { bottom: 80px; }
