/* Homepage — Data Calculator promo + shared image floats */

:root {
  --hdc-navy: #020347;
  --hdc-navy-soft: rgba(2, 3, 71, 0.72);
  --hdc-navy-mute: rgba(2, 3, 71, 0.48);
  --hdc-coral: #ff7f50;
}

/* Match site .pt-150 / .pb-150 rhythm on both sides */
.home-data-calculator {
  padding-top: 80px;
  padding-bottom: 80px;
  overflow: visible;
}

@media screen and (min-width: 768px) {
  .home-data-calculator {
    padding-top: 100px;
    padding-bottom: 100px;
  }
}

@media screen and (min-width: 1280px) {
  .home-data-calculator {
    padding-top: 150px;
    padding-bottom: 150px;
  }
}

.home-data-calculator__row {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr);
  gap: 28px 40px;
  align-items: center;
}

.home-data-calculator__copy {
  position: relative;
  z-index: 2;
  max-width: 36rem;
}

.home-data-calculator__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--hdc-navy-mute);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.home-data-calculator__eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hdc-coral);
  box-shadow: 0 0 0 4px rgba(255, 127, 80, 0.16);
}

/* Match site h2 scale used by other homepage sections */
.home-data-calculator__title {
  margin: 0 0 14px;
  color: var(--hdc-navy);
  letter-spacing: -0.02em;
  font-size: calc(22px + (40 - 22) * ((100vw - 320px) / (1920 - 320)));
  line-height: 1.25;
  font-weight: 600;
}

@media screen and (min-width: 1921px) {
  .home-data-calculator__title {
    font-size: 40px;
  }
}

/* Match site body/paragraph scale */
.home-data-calculator__lead {
  margin: 0 0 22px;
  color: var(--hdc-navy-soft);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
}

@media screen and (min-width: 1280px) {
  .home-data-calculator__lead {
    font-size: 18px;
  }
}

.home-data-calculator__steps {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.home-data-calculator__steps li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  color: var(--hdc-navy-soft);
  font-size: 16px;
  line-height: 1.5;
}

@media screen and (min-width: 1280px) {
  .home-data-calculator__steps li {
    font-size: 18px;
  }
}

.home-data-calculator__step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 127, 80, 0.12);
  color: var(--hdc-coral);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.home-data-calculator__steps strong {
  display: block;
  color: var(--hdc-navy);
  font-weight: 600;
  margin-bottom: 2px;
}

.home-data-calculator__cta {
  display: inline-flex;
}

/* Same frame size as plans / how-to image blocks */
.home-data-calculator__visual {
  position: relative;
  width: min(420px, 100%);
  margin-inline: auto;
  padding-top: 5%;
  padding-right: 6%;
  min-height: 0;
}

.home-data-calculator__visual .home-data-calculator__mask {
  width: 100%;
  max-width: none;
  aspect-ratio: 0.72;
}

.home-data-calculator__visual picture {
  display: contents;
}

.home-data-calculator__image {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: 100%;
  height: 110%;
  display: block;
  object-fit: contain;
  object-position: bottom right;
  background: transparent;
}

.home-data-calculator__image--duo {
  width: 100%;
  height: 102%;
  right: 0;
  bottom: -2%;
  object-position: bottom center;
  /* Soft ground contact on coast mask — avoid hard white plate */
  filter: drop-shadow(0 10px 16px rgba(2, 3, 71, 0.18));
}

/* Keep top tip clear of seated duo faces (zoomed mid-leg crop) */
.home-data-calculator__visual .home-float--top {
  top: 16%;
  left: 0;
}

/* —— Shared floating tip bubbles —— */
.home-float {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
  max-width: 220px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 36px rgba(2, 3, 71, 0.12);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.home-float strong {
  display: block;
  color: var(--hdc-navy);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
}

.home-float span {
  display: block;
  margin-top: 2px;
  color: var(--hdc-navy-mute);
  font-size: 0.74rem;
  font-weight: 400;
  line-height: 1.3;
}

.home-float--top {
  top: 10%;
  left: 0;
  animation: home-float-a 5.5s ease-in-out infinite;
}

.home-float--bottom {
  bottom: 12%;
  right: 0;
  animation: home-float-b 6.5s ease-in-out infinite;
}

.home-float__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--hdc-coral);
  box-shadow: 0 0 0 5px rgba(255, 127, 80, 0.16);
}

.home-float__signal {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  flex-shrink: 0;
  background:
    linear-gradient(135deg, rgba(255, 127, 80, 0.2), rgba(255, 127, 80, 0.05)),
    #fff;
  border: 1px solid rgba(255, 127, 80, 0.25);
  position: relative;
}

.home-float__signal::before {
  content: "";
  position: absolute;
  inset: 7px 8px;
  border-radius: 2px;
  background:
    linear-gradient(
      90deg,
      var(--hdc-coral) 0 18%,
      transparent 18% 28%,
      var(--hdc-coral) 28% 46%,
      transparent 46% 56%,
      var(--hdc-coral) 56% 74%,
      transparent 74% 84%,
      var(--hdc-coral) 84% 100%
    );
  opacity: 0.9;
}

@keyframes home-float-a {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes home-float-b {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(7px);
  }
}

/* Hero float placement (hero-section uses overflow:hidden — keep tips inset) */
.hero-section__image {
  overflow: visible;
}

.hero-section__image .home-float--top {
  top: 12%;
  left: 6%;
}

.hero-section__image .home-float--bottom {
  bottom: 14%;
  right: 4%;
  left: auto;
}

/* Plans / HIW float placement */
.page .temp-block-plans .row,
.page .temp-block-hiw .row {
  overflow: visible;
}

.template-image-block__image-1,
.template-image-block__image-hiw {
  overflow: visible;
}

.template-image-block__image-1 .home-float--top,
.template-image-block__image-hiw .home-float--top {
  top: 8%;
  left: 0;
}

.template-image-block__image-1 .home-float--bottom,
.template-image-block__image-hiw .home-float--bottom {
  bottom: 10%;
  right: 0;
  left: auto;
}

/* Shared homepage portrait frame + person scale */
.page .template-image-block__image-1,
.page .template-image-block__image-2,
.page .template-image-block__image-hiw {
  width: min(420px, 100%);
}

.page .temp-block-1-image,
.page .temp-block-hiw-image {
  width: 100%;
  height: 110%;
}

.page .temp-block-2-image {
  width: 100%;
  height: 100%;
}

/* Phone/tablet: enlarge hero image + hide crowded float tips */
@media (max-width: 767.98px) {
  .hero-section__image {
    width: min(300px, 78vw);
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
  }

  .hero-section__image .masked-image-hero {
    width: 100%;
    max-width: none;
  }

  .home-float {
    display: none !important;
  }

  .home-data-calculator__visual,
  .page .template-image-block__image-1,
  .page .template-image-block__image-2,
  .page .template-image-block__image-hiw {
    width: min(300px, 82%);
  }
}

@media (max-width: 991.98px) {
  .home-data-calculator {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .home-data-calculator__row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .home-data-calculator__visual {
    order: -1;
  }

  .home-data-calculator__visual,
  .page .template-image-block__image-1,
  .page .template-image-block__image-2,
  .page .template-image-block__image-hiw {
    width: min(360px, 88%);
  }
}

@media (max-width: 575.98px) {
  .hero-section__image {
    width: min(280px, 82vw);
  }

  .home-data-calculator__visual,
  .page .template-image-block__image-1,
  .page .template-image-block__image-2,
  .page .template-image-block__image-hiw {
    width: min(280px, 84%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-float--top,
  .home-float--bottom {
    animation: none;
  }
}
