/* ============================================
   Rachel Bowen Campaign — "Olympic Grandeur"
   ============================================ */

:root {
  --forest: #1B3A2D;
  --navy: #1C2841;
  --gold: #C5953B;
  --gold-glow: #D4A94E;
  --warm-white: #F5F1EB;
  --mist: #EDE9E1;
  --mist-darker: #DDD8CE;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;

  --max-width: 1140px;
  --section-pad: clamp(60px, 8vw, 100px);
  --section-pad-x: clamp(20px, 5vw, 60px);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.7;
  color: var(--navy);
  background: var(--mist);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ===== TOPO PATTERN (shared) ===== */
.hero__topo-overlay,
.signup__topo-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='%23F5F1EB' stroke-width='1'%3E%3Cellipse cx='200' cy='200' rx='180' ry='120'/%3E%3Cellipse cx='200' cy='200' rx='155' ry='100'/%3E%3Cellipse cx='200' cy='200' rx='130' ry='82'/%3E%3Cellipse cx='200' cy='200' rx='105' ry='65'/%3E%3Cellipse cx='200' cy='200' rx='80' ry='48'/%3E%3Cellipse cx='200' cy='200' rx='55' ry='32'/%3E%3Cellipse cx='200' cy='200' rx='30' ry='18'/%3E%3Cellipse cx='140' cy='140' rx='90' ry='70' transform='rotate(-15 140 140)'/%3E%3Cellipse cx='140' cy='140' rx='65' ry='50' transform='rotate(-15 140 140)'/%3E%3Cellipse cx='140' cy='140' rx='40' ry='30' transform='rotate(-15 140 140)'/%3E%3Cellipse cx='280' cy='280' rx='85' ry='60' transform='rotate(25 280 280)'/%3E%3Cellipse cx='280' cy='280' rx='60' ry='40' transform='rotate(25 280 280)'/%3E%3Cellipse cx='280' cy='280' rx='35' ry='22' transform='rotate(25 280 280)'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 400px 400px;
}

/* ===== SECTION HEADER ===== */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--navy);
  margin-bottom: 16px;
  letter-spacing: 0.01em;
}

.section-title--light {
  color: var(--warm-white);
}

/* ===== STAR DIVIDER ===== */
.star-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.star-divider__line {
  display: block;
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.star-divider__line--light {
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, #1a3035 40%, var(--forest) 100%);
  overflow: hidden;
  padding: 80px var(--section-pad-x) 0;
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(30px, 6vw, 80px);
  max-width: var(--max-width);
  width: 100%;
}

.hero__text {
  flex: 1;
  min-width: 0;
}

.hero__preheading {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(16px, 2vw, 22px);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease-out 0.2s forwards;
}

.hero__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(52px, 8vw, 96px);
  line-height: 0.95;
  color: var(--warm-white);
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease-out 0.4s forwards;
}

.hero__gold-rule {
  width: clamp(60px, 10vw, 120px);
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-glow));
  margin-bottom: 20px;
  border-radius: 2px;
  opacity: 0;
  animation: fadeSlideUp 0.6s ease-out 0.6s forwards;
}

.hero__title {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(16px, 2vw, 22px);
  color: var(--warm-white);
  opacity: 0;
  animation: fadeSlideUp 0.6s ease-out 0.7s forwards;
}

.hero__divider-pip {
  color: var(--gold);
  margin: 0 2px;
}

.hero__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(16px, 2vw, 20px);
  color: var(--gold);
  margin-top: 24px;
  opacity: 0;
  animation: fadeSlideUp 0.6s ease-out 0.9s forwards;
}

/* Portrait */
.hero__portrait-wrap {
  flex: 0 0 auto;
  position: relative;
  opacity: 0;
  animation: fadeScale 1s ease-out 0.5s forwards;
}

.hero__portrait-frame {
  width: clamp(240px, 30vw, 400px);
  aspect-ratio: 0.9;
  border-radius: 42% 58% 55% 45% / 50% 45% 55% 50%;
  overflow: hidden;
  border: 3px solid rgba(197, 149, 59, 0.4);
  box-shadow:
    0 0 0 6px rgba(27, 58, 45, 0.3),
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 80px rgba(197, 149, 59, 0.08);
}

.hero__portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}

/* Trees */
.hero__trees {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 3;
  line-height: 0;
}

.hero__trees svg {
  width: 100%;
  height: clamp(80px, 12vw, 180px);
}

/* ===== ISSUES ===== */
.issues {
  position: relative;
  background: var(--mist);
  padding: var(--section-pad) var(--section-pad-x);
}

.issues__container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.issues__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.issue-card {
  background: var(--warm-white);
  border-left: 4px solid var(--gold);
  border-radius: 2px 8px 8px 2px;
  padding: 36px 32px;
  box-shadow:
    0 2px 8px rgba(28, 40, 65, 0.06),
    0 8px 24px rgba(28, 40, 65, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.issue-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 4px 12px rgba(28, 40, 65, 0.1),
    0 16px 40px rgba(28, 40, 65, 0.08);
}

.issue-card__icon {
  margin-bottom: 20px;
}

.issue-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--forest);
  margin-bottom: 12px;
  line-height: 1.3;
}

.issue-card__text {
  font-size: 16px;
  line-height: 1.7;
  color: #3a3f4a;
}

/* ===== ABOUT ===== */
.about {
  background: var(--mist);
  padding: 0 var(--section-pad-x) var(--section-pad);
}

.about__container {
  max-width: 720px;
  margin: 0 auto;
}

.about__text {
  font-size: clamp(18px, 2.2vw, 21px);
  line-height: 1.8;
  color: #3a3f4a;
  text-align: center;
  font-weight: 300;
}

/* ===== SIGNUP ===== */
.signup {
  position: relative;
  background: var(--forest);
  padding: var(--section-pad) var(--section-pad-x);
  overflow: hidden;
}

.signup__container {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.signup__subtitle {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(245, 241, 235, 0.8);
  margin-bottom: 36px;
}

.signup__form {
  width: 100%;
}

.signup__fields {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.signup__field {
  flex: 1;
}

.signup__input {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--navy);
  background: var(--warm-white);
  border: 2px solid transparent;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.signup__input::placeholder {
  color: #8a8578;
}

.signup__input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197, 149, 59, 0.2);
}

.signup__button {
  flex-shrink: 0;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold), var(--gold-glow));
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  position: relative;
  letter-spacing: 0.02em;
}

.signup__button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(197, 149, 59, 0.35);
}

.signup__button:active {
  transform: translateY(0);
}

.signup__button[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.signup__button-spinner {
  display: none;
}

.signup__button[disabled] .signup__button-text {
  visibility: hidden;
}

.signup__button[disabled] .signup__button-spinner {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(28, 40, 65, 0.3);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.signup__error {
  font-size: 14px;
  color: #e8735a;
  min-height: 22px;
  margin-top: 4px;
}

.signup__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: fadeSlideUp 0.5s ease-out;
}

.signup__success-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--warm-white);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--navy);
  padding: 40px var(--section-pad-x);
  text-align: center;
}

.footer__container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--warm-white);
  margin-bottom: 8px;
}

.footer__brand-accent {
  font-weight: 400;
  font-style: italic;
  color: var(--gold);
}

.footer__disclaimer {
  font-size: 13px;
  color: rgba(245, 241, 235, 0.5);
  margin-bottom: 4px;
}

.footer__district {
  font-size: 13px;
  color: rgba(245, 241, 235, 0.35);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeScale {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Fade-in on scroll */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.2s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .issues__grid {
    grid-template-columns: 1fr 1fr;
  }
  .issues__grid .issue-card:last-child {
    grid-column: 1 / -1;
    max-width: 480px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 60px var(--section-pad-x) 0;
  }

  .hero__content {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero__gold-rule {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__portrait-frame {
    width: clamp(200px, 55vw, 300px);
  }

  .issues__grid {
    grid-template-columns: 1fr;
  }

  .issues__grid .issue-card:last-child {
    max-width: none;
  }

  .signup__fields {
    flex-direction: column;
  }

  .signup__button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero__name {
    font-size: 48px;
  }
}
