/* RIB360-HOMEPAGE-HERO-STORY-TEXT-ZOOM-CORRECTION-HR1-HM1-R4 */

/*
 * Stable permanent headline and supporting-story typography.
 * The story stage is measured after Poppins is ready so every message shares
 * one fixed height without clipping or page movement.
 */
body.rib360-home-hr1 .rib360-hr1-hero h1 {
  max-width: 660px;
  margin-top: 18px;
  margin-bottom: 18px;
  font-family: "Poppins", sans-serif;
  font-size: clamp(42px, 4.4vw, 52px) !important;
  font-weight: 400 !important;
  line-height: 1.08 !important;
  letter-spacing: -0.025em !important;
}

body.rib360-home-hr1 .rib360-hr1-hero-story,
body.rib360-home-hr1 .rib360-hr1-hero-story-static {
  width: 100%;
  max-width: 620px;
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-size: clamp(19px, 1.8vw, 23px);
  font-weight: 300;
  line-height: 1.4;
}

body.rib360-home-hr1 .rib360-hr1-hero-story {
  --rib360-story-stage-height: 4.3em;
  position: relative;
  height: var(--rib360-story-stage-height);
  min-height: 4.3em;
  overflow: hidden;
  isolation: isolate;
}

body.rib360-home-hr1 .rib360-hr1-hero-story-message {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
  margin: 0;
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  transform: scale(.94);
  transform-origin: left center;
  transition:
    opacity 620ms ease-out,
    transform 920ms cubic-bezier(.22, 1, .36, 1);
  will-change: opacity, transform;
}

body.rib360-home-hr1 .rib360-hr1-hero-story-message.is-active {
  opacity: 1;
  z-index: 3;
  transform: scale(1);
}

body.rib360-home-hr1 .rib360-hr1-hero-story-message.is-leaving {
  opacity: 0;
  z-index: 2;
  transform: scale(1);
  transition: opacity 480ms ease-in;
}

body.rib360-home-hr1 .rib360-hr1-story-default { color: #475467; }
body.rib360-home-hr1 .rib360-hr1-story-discovery { color: #4056a1; }
body.rib360-home-hr1 .rib360-hr1-story-experience { color: #9a5a12; }
body.rib360-home-hr1 .rib360-hr1-story-community { color: #28765a; }

body.rib360-home-hr1 .rib360-hr1-hero-story-static {
  min-height: 1.4em;
  color: #3f4650;
}

@media (max-width: 1080px) {
  body.rib360-home-hr1 .rib360-hr1-hero h1 { font-size: 42px !important; }
}

@media (max-width: 720px) {
  body.rib360-home-hr1 .rib360-hr1-hero h1 {
    max-width: 100%;
    font-size: 32px !important;
    line-height: 1.1 !important;
  }

  body.rib360-home-hr1 .rib360-hr1-hero-story,
  body.rib360-home-hr1 .rib360-hr1-hero-story-static {
    max-width: 100%;
    font-size: 17px;
    line-height: 1.4;
  }

  body.rib360-home-hr1 .rib360-hr1-hero-story {
    --rib360-story-stage-height: 5.8em;
    min-height: 5.8em;
  }
}

@media (max-width: 360px) {
  body.rib360-home-hr1 .rib360-hr1-hero h1 { font-size: 29px !important; }

  body.rib360-home-hr1 .rib360-hr1-hero-story,
  body.rib360-home-hr1 .rib360-hr1-hero-story-static { font-size: 16px; }

  body.rib360-home-hr1 .rib360-hr1-hero-story {
    --rib360-story-stage-height: 6.6em;
    min-height: 6.6em;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.rib360-home-hr1 .rib360-hr1-hero-story-message {
    transition: none !important;
    transform: none !important;
  }
}

/* Premium action scale and Contact action alignment retained from HM1-R2. */
body.rib360-home-hr1 .rib360-hr1-hero-actions {
  gap: 14px;
  margin-top: 26px;
}
body.rib360-home-hr1 .rib360-hr1-hero-actions .rib360-hr1-btn {
  width: auto !important;
  min-width: 0 !important;
  min-height: 54px !important;
  padding: 0 26px !important;
  border-radius: 16px !important;
  font-size: 17px !important;
  line-height: 1.1 !important;
}
body.rib360-home-hr1 .rib360-hr1-contact-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
body.rib360-home-hr1 .rib360-hr1-contact-actions .rib360-hr1-btn {
  width: auto !important;
  min-width: 0 !important;
  min-height: 52px !important;
  margin: 0 !important;
  padding: 0 24px !important;
  border-radius: 16px !important;
  font-size: 17px !important;
  line-height: 1.1 !important;
}
body.rib360-home-hr1 .rib360-hr1-contact-actions .rib360-hr1-contact-doodle {
  position: static !important;
  inset: auto !important;
  flex: 0 0 52px;
  width: 52px !important;
  height: 52px !important;
  margin: 0 !important;
  border-radius: 16px !important;
  font-size: 20px !important;
  transform: none !important;
}

@media (max-width: 720px) {
  body.rib360-home-hr1 .rib360-hr1-hero-actions .rib360-hr1-btn,
  body.rib360-home-hr1 .rib360-hr1-contact-actions .rib360-hr1-btn {
    min-height: 50px !important;
    padding: 0 20px !important;
    font-size: 16px !important;
  }
  body.rib360-home-hr1 .rib360-hr1-contact-actions {
    gap: 10px;
    margin-top: 18px;
  }
  body.rib360-home-hr1 .rib360-hr1-contact-actions .rib360-hr1-contact-doodle {
    flex-basis: 48px;
    width: 48px !important;
    height: 48px !important;
    border-radius: 14px !important;
    font-size: 18px !important;
  }
}
