/* ==========================================================================
   hero.css — full-bleed hero banner and the live response counter
   ========================================================================== */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(30rem, 64vh, 42.5rem);
  padding-block: var(--section-space-l);
  padding-inline: var(--gutter);
  overflow: hidden;
  background: var(--black);
}

/* Absolutely positioned children resolve against the hero's padding box, so
   they span the full viewport width even though the hero has inline padding. */
.hero__media,
.hero__media img,
.hero__scrim {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
}

.hero__scrim {
  pointer-events: none;
  background:
    linear-gradient(
      97deg,
      rgb(19 15 45 / 93%) 0%,
      rgb(19 15 45 / 86%) 26%,
      rgb(19 15 45 / 52%) 54%,
      rgb(19 15 45 / 18%) 78%,
      rgb(19 15 45 / 30%) 100%
    ),
    linear-gradient(
      180deg,
      rgb(19 15 45 / 34%) 0%,
      rgb(19 15 45 / 0%) 32%,
      rgb(19 15 45 / 0%) 62%,
      rgb(19 15 45 / 42%) 100%
    ),
    linear-gradient(
      115deg,
      rgb(31 71 137 / 22%) 0%,
      rgb(117 82 204 / 14%) 55%,
      rgb(87 188 188 / 18%) 100%
    );
}

.hero__rule {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 3;
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--navy) 0%,
    var(--blue) 25%,
    var(--purple) 50%,
    var(--teal) 75%,
    var(--yellow) 100%
  );
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  align-items: flex-start;
  max-width: 42.5rem;
}

/* Eyebrow + title read as one unit, so they get a tighter gap */
.hero__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  align-items: flex-start;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0.5rem 1.125rem 0.5rem 0.75rem;
  background: rgb(255 255 255 / 14%);
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--paper);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero__signal {
  flex-shrink: 0;
  width: 1.625rem;
  height: 1.625rem;
  margin-right: -0.125rem;
}

.hero__title {
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 1.05;
  color: var(--paper);
  text-shadow: 0 2px 28px rgb(19 15 45 / 45%);
}

.hero__title .accent {
  color: var(--blue-light);
}

.hero__title .serif-accent {
  color: var(--purple-light);
}

.hero__lead {
  max-width: 35rem;
  font-size: var(--text-l);
  line-height: 1.55;
  color: rgb(255 255 255 / 90%);
  text-shadow: 0 1px 18px rgb(19 15 45 / 50%);
}

/* The call to action gets a little extra separation from the copy above it */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-s);
  margin-top: var(--space-xs);
}

.hero__meta {
  font-size: var(--text-s);
  color: rgb(255 255 255 / 85%);
  text-shadow: 0 1px 14px rgb(19 15 45 / 55%);
}

.hero__meta strong {
  font-weight: 700;
  color: var(--paper);
}

.hero__tag {
  position: absolute;
  right: 0;
  bottom: calc(var(--space-s) * -1);
  z-index: 2;
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--text-s);
  color: var(--blue-pale);
  text-shadow: 0 1px 14px rgb(19 15 45 / 60%);
}

/* ==========================================================================
   Live counter
   ========================================================================== */

.counter {
  padding-block: var(--section-space-s);
  padding-inline: var(--gutter);
  background: linear-gradient(180deg, var(--paper-soft) 0%, var(--paper) 70%);
}

.counter__card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-xl);
  align-items: center;
  overflow: hidden;
  padding: var(--space-m) var(--space-l);
  background: var(--black);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  color: var(--paper);
}

.counter__card::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--navy) 0%,
    var(--blue) 25%,
    var(--purple) 50%,
    var(--teal) 75%,
    var(--yellow) 100%
  );
}

.counter__total {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

/* Number and target line read as one figure, so they sit tighter than the
   gap between the label and the figure above them. */
.counter__figures {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
}

.counter__label {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--text-2xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--blue);
}

.counter__pulse {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--teal);
  animation: counter-pulse 1.5s infinite;
}

@keyframes counter-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.3);
  }
}

.counter__number {
  font-size: var(--text-counter);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--paper);
}

.counter__target {
  font-size: var(--text-s);
  font-weight: 500;
  color: var(--blue);
}

.counter__progress {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.counter__track {
  height: 0.625rem;
  overflow: hidden;
  background: rgb(255 255 255 / 10%);
  border-radius: var(--radius-pill);
}

.counter__fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--navy) 0%, var(--blue) 50%, var(--teal) 100%);
  border-radius: var(--radius-pill);
  transition: width 800ms var(--ease-out);
}

.counter__stats {
  display: flex;
  justify-content: space-between;
  gap: var(--space-s);
  font-size: var(--text-s);
  color: rgb(255 255 255 / 70%);
}

.counter__stats strong {
  font-weight: 700;
  color: var(--teal);
}

.counter__closing {
  max-width: 12rem;
  padding-left: var(--space-l);
  border-left: 1px solid rgb(255 255 255 / 10%);
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--text-m);
  line-height: 1.5;
  color: rgb(255 255 255 / 90%);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (width <= 60rem) {
  .hero {
    min-height: 0;
  }

  .hero__content {
    max-width: 100%;
  }

  .hero__tag {
    display: none;
  }

  .counter__card {
    grid-template-columns: 1fr;
    gap: var(--space-s);
  }

  .counter__closing {
    max-width: none;
    padding-left: 0;
    padding-top: var(--space-s);
    border-left: none;
    border-top: 1px solid rgb(255 255 255 / 10%);
  }
}

@media (width <= 35rem) {
  /* align-self overrides .hero__content's flex-start, which would otherwise
     shrink the action row to fit-content and leave the button narrow. */
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    align-self: stretch;
  }

  .counter__stats {
    flex-direction: column;
    gap: var(--space-3xs);
  }
}
