/*
 * Homepage-specific styles
 */

/* ==========================================================
   Hero
   ========================================================== */

.page--home {
  overflow-x: hidden;
}

.home-hero {
  min-height: clamp(
    42rem,
    78svh,
    50rem
  );

  overflow: hidden;

  background: linear-gradient(
    100deg,
    #2A2A2C 0%,
    #1F2024 46%,
    #111216 100%
  );
}

.home-hero__layout {
  position: relative;

  display: grid;
  grid-template-columns:
    minmax(0, 11fr)
    minmax(0, 9fr);
  gap: clamp(
    2rem,
    calc(1rem + 2vw),
    4rem
  );

  min-height: inherit;
}

/* ==========================================================
   Hero visual
   ========================================================== */

.home-hero__visual {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-width: 0;
  padding-block: clamp(
    2rem,
    calc(1rem + 2vw),
    3rem
  );
  overflow: hidden;

  pointer-events: none;
}

.home-hero__video {
  display: block;
  flex-shrink: 0;

  width: clamp(
    38rem,
    44vw,
    42rem
  );
  max-width: none;
  height: auto;
  object-fit: contain;

  transform:
    translateX(clamp(0.5rem, 1vw, 1rem))
    scale(1.4);
  transform-origin: center center;
}

.home-hero__poster {
  display: none;

  flex-shrink: 0;

  width: clamp(
    48rem,
    62vw,
    56rem
  );
  max-width: none;
  height: auto;
  object-fit: contain;

  transform: translateX(
    clamp(0.5rem, 1vw, 1rem)
  );
}

.home-hero__toggle {
  position: absolute;
  right: 1rem;
  bottom: 1rem;

  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0.5em;

  border: 0.0625rem solid var(--color-border);
  border-radius: var(--radius-small);
  color: var(--color-text-secondary);
  background: transparent;
  font-size: 1rem;
  line-height: 1;
  pointer-events: auto;
}

.home-hero__toggle:not([hidden]) {
  display: grid;
}

.home-hero__toggle::before {
  content: "";
  width: 0.5em;
  height: 0.7em;
  border-inline: 0.15em solid currentColor;
}

.home-hero__toggle[data-paused="true"]::before {
  width: 0;
  height: 0;
  border: 0.35em solid transparent;
  border-right: 0;
  border-left: 0.55em solid currentColor;
}

.home-hero__toggle:hover,
.home-hero__toggle:focus-visible {
  color: var(--color-text);
  border-color: currentColor;
}

/* ==========================================================
   Hero content
   ========================================================== */

.home-hero__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  justify-items: start;

  gap: clamp(
    1rem,
    calc(0.75rem + 0.75vw),
    1.75rem
  );

  min-width: 0;

  padding-block: clamp(
    4rem,
    calc(2.5rem + 4vw),
    7rem
  );
}

.home-hero__content > * {
  min-width: 0;
}

.home-hero__eyebrow {
  width: 100%;
  max-width: 100%;

  color: var(--color-gold-light);

  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
  padding-bottom: 0.5rem;
}

.home-hero__title {
  width: 100%;
  max-width: 17ch;

  color: var(--color-text);

  font-size: clamp(
    3rem,
    calc(2rem + 2.6vw),
    4.5rem
  );

  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.025em;

  text-wrap: balance;
}

.home-hero__text {
  width: 100%;
  max-width: min(38rem, 100%);

  color: var(--color-text-secondary);

  font-size: var(--text-lead);
  line-height: 1.55;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;

  width: 100%;
  max-width: 100%;
  gap: 1em 1.75em;
  padding-top: 2rem;
}

.home-hero__actions .button,
.home-hero__actions .text-link {
  min-height: 2.75rem;
}

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

@media (max-width: 56em) {
  .home-hero {
    min-height: auto;
  }

  .home-hero__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .home-hero__content {
    padding-top: clamp(
      4rem,
      calc(2rem + 6vw),
      6rem
    );
    padding-bottom: clamp(
      2.5rem,
      calc(2rem + 2vw),
      3.5rem
    );
  }

  .home-hero__visual {
    padding-block: 0 clamp(
      2.5rem,
      calc(1.5rem + 4vw),
      4.5rem
    );
  }

  .home-hero__video {
    width: min(68vw, 24rem);
    transform: translateX(0.5rem) scale(1.2);
  }

  .home-hero__poster {
    width: min(100vw, 40rem);
    transform: none;
  }
}

@media (max-width: 42em) {
  .home-hero__title {
    max-width: min(12ch, 100%);
  }

  .home-hero__actions {
    flex-direction: row;
    align-items: center;
  }

  .home-hero__video {
    width: min(72vw, 20rem);
    transform: none;
  }

  .home-hero__poster {
    width: min(145vw, 34rem);
  }
}

@media (max-width: 28em) {
  .home-hero__title {
    max-width: 100%;
    font-size: clamp(
      2.125rem,
      calc((100vw - 2 * var(--page-padding)) / 8.3),
      3rem
    );
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__video,
  .home-hero__toggle {
    display: none;
  }

  .home-hero__poster {
    display: block;
  }
}

/* ==========================================================
   Clinical education
   ========================================================== */

.home-education {
  padding-block: var(--section-spacing);
  border-top: 0.0625rem solid var(--color-border);
}

.home-education__header {
  max-width: 44rem;
}

.home-education__eyebrow {
  color: var(--color-gold-light);
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.5;
}

.home-education__title {
  max-width: 24ch;
  margin-top: 0.5em;
  font-size: var(--text-heading);
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.home-education__intro {
  margin-top: 1.25em;
  color: var(--color-text-secondary);
  font-size: var(--text-lead);
}

.home-education__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2em;
  margin-top: clamp(3rem, calc(2rem + 3vw), 5rem);
  list-style: none;
}

.home-education__step {
  min-width: 0;
  padding-top: 1.5em;
  border-top: 0.0625rem solid var(--color-border);
}

.home-education__number {
  display: block;
  margin-bottom: 1.5em;
  color: var(--color-gold-light);
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.12em;
}

.home-education__step h3 {
  font-size: clamp(1.25rem, calc(1rem + 0.5vw), 1.5rem);
  font-weight: 600;
  line-height: 1.35;
  text-wrap: balance;
}

.home-education__step p {
  max-width: 60ch;
  margin-top: 1em;
  color: var(--color-text-secondary);
}

.home-education__planning {
  display: grid;
  justify-items: start;
  gap: 1.5em;
  margin-top: clamp(3rem, calc(2rem + 3vw), 5rem);
  padding-top: 2em;
  border-top: 0.0625rem solid var(--color-border);
}

.home-education__planning p {
  max-width: 65ch;
  color: var(--color-text-secondary);
}

.home-education__planning .text-link {
  min-height: 2.75rem;
}

@media (max-width: 56em) {
  .home-education__steps {
    grid-template-columns: minmax(0, 1fr);
  }
}
