.home .raphia-section {
  scroll-margin-block-start: 90px;
}

.raphia-hero {
  --raphia-hero-overlay: 0.48;
  position: relative;
  isolation: isolate;
  height: min(760px, calc(100svh - 76px));
  min-height: 580px;
  overflow: hidden;
  color: var(--color-ivory);
  background: #24130f;
}

.raphia-hero__slides,
.raphia-hero__slide,
.raphia-hero__background,
.raphia-hero__overlay {
  position: absolute;
  inset: 0;
}

.raphia-hero__slide {
  z-index: 0;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 700ms ease,
    visibility 0s linear 700ms;
}

.raphia-hero__slide.is-active {
  z-index: 1;
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.raphia-hero__background {
  display: block;
  overflow: hidden;
}

.raphia-hero__background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.035);
}

.raphia-hero.is-ready .raphia-hero__slide.is-active .raphia-hero__background img {
  animation: raphia-hero-image-in 8s ease-out both;
}

.raphia-hero__overlay {
  z-index: 1;
  background: rgba(22, 10, 8, var(--raphia-hero-overlay));
}

.raphia-hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  height: 100%;
  min-height: inherit;
  padding-block: 72px 112px;
}

.raphia-hero__content {
  width: min(100%, 900px);
  margin-inline: auto;
  text-align: center;
  text-shadow: 0 2px 20px rgba(18, 7, 5, 0.42);
}

.raphia-hero .raphia-eyebrow {
  margin-block-end: 16px;
  color: var(--color-ivory);
  font-size: 14px;
}

.raphia-hero h1,
.raphia-hero h2 {
  max-width: 900px;
  margin: 0 auto 22px;
  color: var(--color-ivory);
  font-family: var(--font-heading);
  font-size: 66px;
  line-height: 1.02;
}

.raphia-hero__body {
  max-width: 680px;
  margin: 0 auto;
  color: var(--color-ivory);
  font-size: 20px;
  line-height: 1.65;
}

.raphia-hero .raphia-button-row {
  justify-content: center;
  margin-block-start: 30px;
}

.raphia-hero .raphia-button {
  min-width: 190px;
  color: var(--color-primary);
  background: var(--color-ivory);
  border-color: var(--color-ivory);
  box-shadow: 0 10px 30px rgba(21, 8, 6, 0.18);
}

.raphia-hero .raphia-button:hover,
.raphia-hero .raphia-button:focus-visible {
  color: var(--color-ivory);
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.raphia-hero .raphia-button--secondary {
  color: var(--color-ivory);
  background: rgba(22, 10, 8, 0.18);
  border-color: rgba(255, 250, 240, 0.8);
  backdrop-filter: blur(8px);
}

.raphia-hero .raphia-button--secondary:hover,
.raphia-hero .raphia-button--secondary:focus-visible {
  color: var(--color-coffee);
  background: var(--color-ivory);
  border-color: var(--color-ivory);
}

.raphia-hero .raphia-action-proof {
  max-width: 680px;
  margin: 20px auto 0;
  color: rgba(255, 250, 240, 0.9);
  font-size: 15px;
}

.raphia-hero__controls {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 28px;
  z-index: 4;
  display: flex;
  gap: 10px;
  align-items: center;
  width: max-content;
  max-width: calc(100% - 32px);
  margin-inline: auto;
  padding: 7px;
  background: rgba(22, 10, 8, 0.42);
  border: 1px solid rgba(255, 250, 240, 0.28);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(18, 7, 5, 0.2);
  backdrop-filter: blur(10px);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: none;
  transition:
    opacity 220ms ease,
    visibility 0s linear 220ms;
}

.raphia-hero.is-ready .raphia-hero__controls {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0s;
}

.raphia-hero__control,
.raphia-hero__dot {
  flex: 0 0 auto;
  color: var(--color-ivory);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.raphia-hero__control {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
}

.raphia-hero__control:hover,
.raphia-hero__control:focus-visible {
  background: rgba(255, 250, 240, 0.16);
}

.raphia-hero__control svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.raphia-hero__control [data-hero-play-icon] svg {
  fill: currentColor;
  stroke: currentColor;
}

.raphia-hero__dots {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-inline: 2px;
}

.raphia-hero__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  background: rgba(255, 250, 240, 0.48);
  border-radius: 50%;
  transition:
    width 220ms ease,
    background-color 220ms ease;
}

.raphia-hero__dot.is-active {
  width: 24px;
  background: var(--color-ivory);
  border-radius: 999px;
}

.raphia-hero__dot:focus-visible,
.raphia-hero__control:focus-visible {
  outline: 2px solid var(--color-ivory);
  outline-offset: 3px;
}

.raphia-hero.is-ready .raphia-hero__slide [data-hero-reveal] {
  opacity: 0;
  transform: translateY(22px);
}

.raphia-hero.is-ready .raphia-hero__slide.is-active [data-hero-reveal] {
  animation: raphia-hero-reveal 680ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.raphia-hero.is-ready .raphia-hero__slide.is-active [data-hero-reveal]:nth-child(1) {
  animation-delay: 120ms;
}

.raphia-hero.is-ready .raphia-hero__slide.is-active [data-hero-reveal]:nth-child(2) {
  animation-delay: 210ms;
}

.raphia-hero.is-ready .raphia-hero__slide.is-active [data-hero-reveal]:nth-child(3) {
  animation-delay: 300ms;
}

.raphia-hero.is-ready .raphia-hero__slide.is-active [data-hero-reveal]:nth-child(4) {
  animation-delay: 390ms;
}

.raphia-hero.is-ready .raphia-hero__slide.is-active [data-hero-reveal]:nth-child(5) {
  animation-delay: 480ms;
}

@keyframes raphia-hero-reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes raphia-hero-image-in {
  from {
    transform: scale(1.05);
  }

  to {
    transform: scale(1);
  }
}

@media (max-width: 860px) {
  .raphia-hero {
    height: min(700px, calc(100svh - 118px));
    min-height: 580px;
  }

  .raphia-hero__inner {
    padding-block: 64px 104px;
  }

  .raphia-hero h1,
  .raphia-hero h2 {
    max-width: 720px;
    font-size: 52px;
  }
}

@media (max-width: 560px) {
  .raphia-hero {
    height: min(680px, calc(100svh - 128px));
    min-height: 560px;
  }

  .raphia-hero__inner {
    padding: 42px 20px 94px;
  }

  .raphia-hero .raphia-eyebrow {
    margin-block-end: 12px;
    font-size: 12px;
  }

  .raphia-hero h1,
  .raphia-hero h2 {
    max-width: 390px;
    margin-block-end: 16px;
    font-size: 39px;
    line-height: 1.04;
  }

  .raphia-hero__body {
    max-width: 390px;
    font-size: 17px;
    line-height: 1.55;
  }

  .raphia-hero .raphia-button-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    width: min(100%, 340px);
    margin: 24px auto 0;
  }

  .raphia-hero .raphia-button-row .raphia-button {
    width: 100%;
    min-height: 52px;
    padding-inline: 18px;
    text-align: center;
  }

  .raphia-hero .raphia-action-proof {
    display: none;
  }

  .raphia-hero__controls {
    inset-block-end: 18px;
  }
}

@media (max-width: 380px) {
  .raphia-hero h1,
  .raphia-hero h2 {
    font-size: 33px;
  }

  .raphia-hero__body {
    font-size: 16px;
  }

  .raphia-hero__inner {
    padding-inline: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .raphia-hero__slide,
  .raphia-hero__dot,
  .raphia-hero__controls {
    transition: none;
  }

  .raphia-hero.is-ready .raphia-hero__slide.is-active .raphia-hero__background img,
  .raphia-hero.is-ready .raphia-hero__slide.is-active [data-hero-reveal] {
    animation: none;
  }

  .raphia-hero__slide.is-active [data-hero-reveal] {
    opacity: 1;
    transform: none;
  }
}
