/* ==========================================================================
   Rachel Cuevas Campaign — HOMEPAGE (page-specific styles)
   Requires tokens.css, base.css, layout.css, components.css to be loaded
   first. Only homepage-specific component classes live here; anything
   reusable across pages belongs in components.css instead.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1b. Donate bar — sits above the hero in normal flow, then sticks to the
   viewport top (just beneath the site header) once scrolled past.
   -------------------------------------------------------------------------- */
.donate-bar {
  /* Hidden by default — on small/narrow viewports the headline + lede + six
     donation buttons take up too much vertical space to justify a
     permanently sticky bar. Restored at the 900px breakpoint below, where
     it also switches to its horizontal row layout. */
  display: none;
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background-color: var(--color-navy-primary);
  border-bottom: 3px solid var(--color-red-bright);
}

/* Logged-in admin toolbar sits at the literal viewport top (fixed, 32px
   tall on desktop where this bar is visible), so offset our own sticky
   top by that much when it's showing — otherwise the two overlap. Only
   applies to logged-in admins; regular visitors never have body.admin-bar. */
body.admin-bar .donate-bar {
  top: 32px;
}

.donate-bar__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding-block: var(--space-md);
}

@media (min-width: 900px) {
  .donate-bar {
    display: block;
  }

  .donate-bar__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
  }
}

.donate-bar__headline {
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: var(--font-weight-heading);
  font-size: clamp(1.15rem, 1vw + 1rem, 1.5rem);
  margin-bottom: var(--space-xs);
}

.donate-bar__lede {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  max-width: 40ch;
}

.donate-bar__amounts.donation-amounts {
  margin-inline: 0;
  max-width: none;
  gap: var(--space-xs);
  grid-template-columns: repeat(3, minmax(4.5rem, 1fr));
}

.donate-bar__amounts .donation-amount {
  padding: 0.6em var(--space-sm);
  font-size: 1rem;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   2. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 34rem;
  display: flex;
  align-items: stretch;
  background-color: var(--color-navy-primary);
  background-image: url("../images/hero-flag-bg.jpg");
  background-size: cover;
  background-position: center;
}

/* Darkens the flag background for depth/contrast. Sits at the bottom of
   .hero's stacking context (below .hero__inner's z-index: 1, which holds
   both the text content and her floating cutout photo), so it can only ever
   shadow the flag — never her. */
.hero__shadow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.6) 40%, rgba(0, 0, 0, 0.45) 100%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: var(--container-padding-inline);
  padding-block: var(--space-3xl) var(--space-2xl);
  display: flex;
  align-items: center;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 40rem;
  color: var(--color-white);
}

.hero__eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: var(--font-weight-body-bold);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-sm);
}

.hero__content h1 {
  color: var(--color-white);
  margin-bottom: var(--space-xs);
}

.hero__tagline {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-heading);
  font-size: clamp(1.25rem, 1.5vw + 1rem, 1.75rem);
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.hero__lede {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.92);
  max-width: 38ch;
  margin-bottom: var(--space-lg);
}

.hero__district-badge {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--color-border-on-dark);
  border-radius: var(--radius-full);
  padding: 0.35em 1em;
  font-size: 0.85rem;
  font-weight: var(--font-weight-body-bold);
  letter-spacing: 0.03em;
  margin-bottom: var(--space-md);
}

.hero__cta-row {
  margin-bottom: var(--space-md);
}

.hero__donate-row {
  font-size: 0.95rem;
  padding-block: var(--space-sm);
}

.hero__donate-link {
  color: var(--color-white);
  font-weight: var(--font-weight-body-bold);
  text-decoration-line: underline;
}

/* Floating candidate cutout photo — bottom-aligned on the right, over the
   solid-navy portion of the background image. Hidden on narrow viewports so
   it never crowds the hero copy. */
.hero__photo {
  display: none;
}

@media (min-width: 860px) {
  .hero__photo {
    display: block;
    position: absolute;
    right: 2vw;
    bottom: 0;
    z-index: 1;
    height: 100%;
    max-height: 34rem;
    pointer-events: none;
  }

  .hero__photo img {
    height: 100%;
    max-height: 34rem;
    width: auto;
    object-fit: contain;
    object-position: bottom;
  }
}

/* --------------------------------------------------------------------------
   3. Quick action band
   -------------------------------------------------------------------------- */
.quick-actions {
  padding: 10px 0;
  background-color: var(--color-offwhite);
  border-bottom: 1px solid var(--color-border-light);
}

.quick-actions__grid {
  gap: var(--space-md);
}

@media (max-width: 479px) {
  .quick-actions__grid {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: var(--space-xs);
    margin: 0 calc(var(--space-md) * -1);
    padding-inline: var(--space-md);
  }

  .quick-action {
    flex: 0 0 85%;
    scroll-snap-align: start;
  }
}

.quick-action {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  background-color: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  text-decoration: none;
  color: var(--color-text-dark);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.quick-action:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover-lift);
  color: var(--color-text-dark);
}

.quick-action__icon {
  width: 32px;
  height: 32px;
  color: var(--color-red);
}

.quick-action__label {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-heading);
  font-size: 1.15rem;
}

.quick-action__desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   3b. Chip in — static (non-sticky) persuasive donate band, sits between
   the quick-action band and the campaign introduction.
   -------------------------------------------------------------------------- */
.chip-in__grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

@media (min-width: 900px) {
  .chip-in__grid {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
  }
}

.chip-in__text h2 {
  margin-bottom: var(--space-sm);
}

.chip-in__text p {
  max-width: 46ch;
}

.chip-in__amounts.donation-amounts {
  margin-inline: 0;
  max-width: 26rem;
  gap: var(--space-sm);
  grid-template-columns: repeat(3, minmax(4.5rem, 1fr));
  flex-shrink: 0;
}

/* Bolder, higher-contrast take on .donation-amount for this section only —
   solid navy instead of the translucent-white overlay used on the navy
   donate bar / bottom donation section, since translucent white reads
   lower-contrast against this section's red background. */
.chip-in__amounts .donation-amount {
  background-color: var(--color-navy-primary);
  border-color: var(--color-navy-primary);
}

.chip-in__amounts .donation-amount:hover {
  background-color: var(--color-navy-secondary);
}

/* --------------------------------------------------------------------------
   4. Campaign introduction (split: copy + portrait)
   .intro-grid itself now lives in components.css since it's reused outside
   the homepage (e.g. Meet Rachel's biography sections) — kept here only as
   a section marker.
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   5. Priorities
   -------------------------------------------------------------------------- */
.priority-card__icon {
  width: 32px;
  height: 32px;
  color: var(--color-red-bright);
  margin-bottom: var(--space-sm);
}

.priority-card h3 {
  margin-bottom: var(--space-xs);
}

.priority-card__link {
  display: inline-block;
  margin-top: var(--space-sm);
  font-weight: var(--font-weight-body-bold);
}

/* --------------------------------------------------------------------------
   6. Biographical story (split layout, reuses .intro-grid)
   -------------------------------------------------------------------------- */
.bio-split {
  /* Uses .intro-grid layout defined above; class kept for semantic clarity
     and any future bio-only overrides. */
}

/* --------------------------------------------------------------------------
   7. Community quote
   -------------------------------------------------------------------------- */
.pull-quote {
  position: relative;
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
}

.pull-quote::before {
  content: "\201C";
  display: block;
  font-family: var(--font-heading);
  font-size: 6rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: var(--space-xs);
}

.pull-quote p {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2vw + 1rem, 2.25rem);
  font-weight: var(--font-weight-heading);
  line-height: 1.3;
  max-width: none;
  color: var(--color-white);
}

/* --------------------------------------------------------------------------
   8. Endorsements preview
   -------------------------------------------------------------------------- */
.endorsement-card {
  position: relative;
  text-align: center;
}

.endorsement-card__badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
}

.endorsement-card__avatar {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-full);
  object-fit: cover;
  margin: 0 auto var(--space-sm);
}

.endorsement-card__name {
  display: block;
  font-weight: var(--font-weight-body-bold);
  margin-bottom: 0;
}

.endorsement-card__org {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* See pages.css for the full explanation — cards with a longer sample
   statement render as a <button> so the whole card opens the shared detail
   modal; cards with nothing extra stay plain, non-interactive <div>s. */
.endorsement-card--clickable {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  font: inherit;
  color: inherit;
  text-align: center;
  cursor: pointer;
}

.endorsement-card__cta {
  display: block;
  margin-top: var(--space-sm);
  color: var(--color-red);
  font-weight: var(--font-weight-body-bold);
  font-size: 0.9rem;
}

.endorsements__cta,
.news-cta {
  max-width: none;
  margin-top: var(--space-lg);
}

/* --------------------------------------------------------------------------
   10. Email signup form
   -------------------------------------------------------------------------- */
.signup-form {
  max-width: 40rem;
}

.form-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
  margin-bottom: var(--space-md);
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-field--full {
    grid-column: 1 / -1;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-field label {
  font-weight: var(--font-weight-body-bold);
  font-size: 0.95rem;
}

.form-field input {
  padding: 0.7em 0.9em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-on-dark);
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
}

.form-field input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-field input:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.field-error {
  display: block;
  font-size: 0.85rem;
  color: var(--color-red-bright);
  min-height: 1.1em;
}

.form-status {
  margin-bottom: var(--space-md);
  font-weight: var(--font-weight-body-medium);
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
}

.checkbox-field input[type="checkbox"] {
  margin-top: 0.2em;
}

.signup-form__submit-row {
  margin-top: var(--space-md);
}

/* --------------------------------------------------------------------------
   11. Donation section
   -------------------------------------------------------------------------- */
.donation-amounts {
  display: grid;
  gap: var(--space-sm);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .donation-amounts {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .donation-amounts {
    grid-template-columns: repeat(6, 1fr);
  }
}

.donation-amount {
  display: block;
  text-align: center;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--color-border-on-dark);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: var(--font-weight-heading-black);
  font-size: 1.5rem;
  text-decoration: none;
  transition: transform var(--transition-base), background-color var(--transition-base);
}

.donation-amount:hover {
  transform: translateY(-3px);
  background-color: rgba(255, 255, 255, 0.22);
  color: var(--color-white);
}

