/*
  Mobile: one screen tall. The header, an image area that absorbs any leftover or missing height,
  and the text card are stacked in a grid; the strip sits below it.
  ≥ 768px: the strip overlays the bottom of the canvas (both share one grid cell),
  and the doctor photo shares the header + content rows on the right.
*/

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--white);
}

.hero-canvas {
  position: relative;
  isolation: isolate;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: var(--canvas-width);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: calc(1.5rem * var(--k-mobile) + 3.75rem * var(--k-desktop)) var(--section-padding-x);
}

.hero .ticker {
  flex: none;
}

.hero-canvas > picture {
  display: contents;
}

.hero-canvas > picture > source {
  display: none;
}

.hero-bg {
  position: absolute;
  z-index: -1;
  left: -24.5rem;
  top: 6.0625rem;
  width: 124.0625rem;
  height: 59.8125rem;
  max-width: none;
  pointer-events: none;
}

.hero-doctor {
  grid-row: 1 / 3;
  grid-column: 1;
  align-self: stretch;
  justify-self: stretch;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  margin: -0.5rem -0.5625rem -6.0625rem -0.5rem;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
}

.hero .site-header {
  grid-row: 1;
  grid-column: 1;
}

.hero-copy {
  position: relative;
  z-index: 1;
  grid-row: 3;
  grid-column: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(1rem * var(--k-mobile) + 1.9355rem * var(--k-desktop));
  padding: calc(1.25rem * var(--k-fluid));
  border-radius: calc(1.5rem * var(--k-fluid));
  background: var(--white);
  backdrop-filter: blur(1.5625rem);
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: calc(0.75rem * var(--k-mobile) + 1.2903rem * var(--k-desktop));
}

.hero-titles {
  --badge-font-size: calc(1.125rem * var(--k-mobile) + 1.6129rem * var(--k-desktop));
  --badge-padding: calc(0.5rem * var(--k-mobile) + 0.6452rem * var(--k-desktop))
    calc(1rem * var(--k-mobile) + 1.2903rem * var(--k-desktop));

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(0.5rem * var(--k-mobile) + 0.6452rem * var(--k-desktop));
}

.hero-copy h1 {
  color: var(--blue);
  font-size: calc(2.625rem * var(--k-mobile) + 4.5161rem * var(--k-desktop));
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-lead {
  max-width: 39.3125rem;
  color: var(--muted);
  font-size: calc(1.25rem * var(--k-mobile) + 1.9355rem * var(--k-desktop));
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-copy .btn-xl {
  --btn-padding-y: calc(0.625rem * var(--k-mobile) + 0.9677rem * var(--k-desktop));
  --btn-padding-x: calc(1.25rem * var(--k-mobile) + 1.9355rem * var(--k-desktop));
  --btn-font-size: calc(1.375rem * var(--k-mobile) + 2.2581rem * var(--k-desktop));
  --btn-weight: 600;
}

@media (min-width: 480px) {
  .hero {
    height: 53.75rem;
  }
}

/* 480–767: 480 frame, sizes from the scale.css tokens. */
@media (min-width: 480px) and (max-width: 767.98px) {
  .hero-canvas {
    padding: var(--section-padding-x);
  }

  .hero-copy {
    gap: var(--space-4);
    padding: var(--card-pad);
    border-radius: var(--radius-md);
  }

  .hero-text {
    gap: var(--space-3);
  }

  .hero-titles {
    --badge-font-size: var(--text-body);
    --badge-padding: var(--space-2) var(--space-4);
    gap: var(--space-2);
  }

  .hero-copy h1 {
    font-size: var(--text-display);
    line-height: var(--leading-tight);
  }

  .hero-lead {
    font-size: var(--text-body-lg);
    line-height: var(--leading-body);
  }

  .hero-copy .btn-xl {
    --btn-height: var(--btn-h);
    --btn-padding-y: 0;
    --btn-padding-x: var(--space-5);
    --btn-font-size: var(--text-btn-lg);
  }
}

@media (min-width: 768px) {
  .hero {
    display: grid;
    height: auto;
  }

  .hero > * {
    grid-area: 1 / 1;
  }

  .hero .ticker {
    align-self: end;
  }

  .hero-canvas {
    height: 64rem;
    grid-template-rows: auto minmax(0, 1fr);
    row-gap: 0.4844rem;
    padding: 2.9062rem;
  }

  .hero-bg {
    left: -2.6562rem;
    top: -2.0625rem;
    width: 96.125rem;
    height: 66.0625rem;
  }

  .hero-doctor {
    grid-row: 1 / -1;
    justify-self: end;
    align-self: start;
    width: 40.9375rem;
    height: 51.625rem;
    margin: 8.6562rem -12.1875rem 0 0;
  }

  .hero-copy {
    grid-row: 2;
    align-self: center;
    gap: 1.5rem;
    padding: 0;
    border-radius: 0;
    background: none;
    backdrop-filter: none;
  }

  .hero-text {
    gap: 1rem;
  }

  .hero-titles {
    --badge-font-size: 1.25rem;
  }

  .hero-copy h1 {
    font-size: 3.5rem;
    line-height: 4rem;
  }

  .hero-lead {
    font-size: 1.5rem;
  }

  .hero-copy .btn-xl {
    --btn-padding-y: 0.75rem;
    --btn-padding-x: 1.5rem;
    --btn-font-size: 1.75rem;
    --btn-weight: 500;
  }
}

@media (min-width: 992px) {
  .hero-canvas {
    height: 50rem;
    row-gap: 0.625rem;
    padding: 3.75rem;
  }

  .hero-bg {
    left: -3.4375rem;
    top: -2.6875rem;
    width: 124.0625rem;
    height: 59.8125rem;
  }

  .hero-doctor {
    width: 31rem;
    height: 39.125rem;
    margin: 7.75rem -5.375rem 0 0;
  }
}

@media (min-width: 1440px) {
  .hero-canvas {
    height: 56.25rem;
    row-gap: 0;
    padding: 3.75rem 5rem;
  }

  .hero-bg {
    left: 24.625rem;
  }

  .hero-doctor {
    width: 40.625rem;
    height: 51.3125rem;
    margin: 2.0625rem -6.6875rem 0 0;
  }

  .hero-titles {
    --badge-font-size: 1.5rem;
  }

  .hero-copy h1 {
    font-size: 4rem;
  }

  .hero-lead {
    font-size: 2rem;
  }

  .hero-copy .btn-xl {
    --btn-font-size: 2rem;
  }
}
