/* ─── HOME PAGE SECTIONS ─────────────────────────────────────────────────
   Hero · Steps (B) · Benefits band · Features (C) · Social proof (D) · CTA
   Desktop sizes follow the Canva design (1366 px wide frame); clamp() scales
   them down, and the breakpoints at 1100 / 900 / 600 px restack the grids.
   ───────────────────────────────────────────────────────────────────── */

/* ─── HERO ─── */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--bg-soft) 100%);
  padding-block: clamp(32px, 5vw, 64px) clamp(56px, 7vw, 96px);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 50fr) minmax(0, 50fr);
  align-items: center;
  gap: clamp(16px, 2vw, 32px);
  max-width: 1440px;
  padding-left: clamp(16px, 5.5vw, 80px);
  padding-right: clamp(16px, 3.5vw, 56px);
}

.hero__title {
  max-width: 600px;
  font-weight: 700;
  font-size: clamp(36px, 4.6vw, 66px);
  line-height: 1.38;
  letter-spacing: -0.01em;
  color: var(--text-strong);
  padding-left: clamp(0px, 0.9vw, 12px);
}

/* Rotating first line (funcs/heroRotator.js): every phrase shares one grid
   cell, so the title keeps the size of the longest phrase while it rotates */
.hero__rotator { display: grid; }
.hero__phrase {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(0.35em);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.hero__phrase.is-active { opacity: 1; transform: none; }
/* Words drawn from attributes (not page text): "Todo el " + teal "control" + "" */
.hero__phrase::before { content: attr(data-pre); }
.hero__phrase::after { content: attr(data-word); color: var(--text-header); }
.hero__phrase[data-post]:not([data-post=""])::after { content: attr(data-word) attr(data-post); }
.hero__phrase.is-leaving { opacity: 0; transform: translateY(-0.35em); }
@media (min-width: 601px) { .hero__phrase { white-space: nowrap; } }

.hero__desc {
  max-width: 600px;
  margin-top: clamp(20px, 2.6vw, 36px);
  font-weight: 400;
  font-size: clamp(17px, 1.65vw, 22px);
  line-height: 1.5;
  color: var(--text-regular);
}

.hero__actions {
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(10px, 1.5vw, 20px);
  margin-top: clamp(28px, 3.4vw, 48px);
}

.hero__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  margin-top: 28px;
  padding-left: 14px;
  color: #2F4A55;
  font-size: clamp(15px, 1.5vw, 20px);
  font-weight: 400;
}
.hero__checks li { display: flex; align-items: center; gap: 12px; }
.hero__checks .check-ico { color: var(--text-muted); }

.hero__media { align-self: center; }
.hero__media img { width: 100%; }

/* Side-by-side action pairs (hero + CTA): never stack, shrink instead */
.hero__actions .btn,
.cta-card__actions .btn {
  flex: 0 1 auto;
  min-width: 0;
  height: auto;
  min-height: var(--btn-height-xl);
  padding-block: 10px;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}

/* ─── STEPS ("Mucho más que asistencia.") ─── */
.steps {
  background: var(--bg-soft);
  padding-bottom: clamp(56px, 7vw, 100px);
}

.steps__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 36px);
  margin-top: clamp(72px, 8vw, 100px);
}

/* Track joining the three step icons (desktop): a dashed line that draws
   itself left → right when in view (funcs/reveal.js adds .is-drawn to
   [data-draw]), then its dashes keep flowing, with chevrons lighting up in
   sequence between the steps to show the direction */
.steps__track {
  position: relative;
  margin-top: clamp(72px, 8vw, 100px);
}
.steps__track .steps__grid { margin-top: 0; }
.steps__flow {
  position: absolute;
  top: -15px;
  left: 16.67%;
  right: 16.67%;
  height: 3px;
  pointer-events: none;
}
.steps__line {
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, var(--border-light-blue) 0 12px, transparent 12px 20px);
  transform-origin: left center;
  transition: transform 1.4s ease 0.35s;
  animation: steps-flow 1.1s linear infinite;   /* dashes flow from Paso 1 to Paso 3 */
}
@keyframes steps-flow {
  from { background-position: 0 0; }
  to { background-position: 20px 0; }        /* one dash + gap */
}
/* › › › between Paso 1–2 and Paso 2–3 (the line runs icon to icon, so the
   midpoints are 25% and 75% of it) */
.steps__arrows {
  position: absolute;
  top: 50%;
  display: flex;
  padding: 0 6px;
  background: var(--bg-soft);   /* hides the dashes behind the chevrons */
  transform: translate(-50%, -50%);
  transition: opacity 0.5s ease 1.4s;
}
.steps__arrows--a { left: 25%; }
.steps__arrows--b { left: 75%; }
.steps__arrows svg {
  width: 22px;
  height: 22px;
  margin-inline: -5px;
  fill: none;
  stroke: var(--app-theme);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.2;
  animation: steps-chevron 1.2s ease-in-out infinite;
}
.steps__arrows svg:nth-child(2) { animation-delay: 0.2s; }
.steps__arrows svg:nth-child(3) { animation-delay: 0.4s; }
@keyframes steps-chevron {
  0%, 100% { opacity: 0.2; }
  40% { opacity: 1; }
}
.js-reveal .steps__track:not(.is-drawn) .steps__line { transform: scaleX(0); }
.js-reveal .steps__track:not(.is-drawn) .steps__arrows { opacity: 0; transition-delay: 0s; }
.step-card__icon { z-index: 1; }

.step-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 42px clamp(20px, 2.2vw, 32px) 44px;
  background: var(--white);
  border: 3px solid var(--white);
  border-radius: var(--radius-card);
  box-shadow: 0 8px 28px rgba(51, 180, 220, 0.18);
  text-align: center;
}

.step-card__icon {
  position: absolute;
  top: 0;
  left: 50%;
  width: clamp(58px, 5vw, 66px);
  transform: translate(-50%, -72%);
}

.step-card__label {
  color: var(--text-step);
  font-weight: 700;
  font-size: 18px;
}

.step-card__title {
  margin-top: 14px;
  color: var(--text-header);
  font-weight: 700;
  font-size: clamp(19px, 1.65vw, 22px);
  line-height: 1.3;
}

.step-card__desc {
  max-width: 300px;
  margin-top: 16px;
  color: var(--text-muted);
  font-weight: 400;
  font-size: clamp(15px, 1.25vw, 17px);
  line-height: 1.5;
}

.step-card__img {
  width: 100%;
  max-width: 340px;
  margin-top: auto;
  padding-top: 36px;
}

/* ─── BENEFITS (arched band) ─── */
.benefits {
  --arch-depth: clamp(70px, 14vw, 200px);
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
  padding-top: calc(var(--arch-depth) + clamp(32px, 4vw, 56px));
  padding-bottom: clamp(72px, 13vw, 200px);
  isolation: isolate;
}

.benefits__arch {
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: -22%;
  width: 144%;
  border-radius: 50% 50% 0 0 / var(--arch-depth) var(--arch-depth) 0 0;
  background: linear-gradient(180deg, var(--band-top) 0%, #1B6C85 45%, var(--band-bottom) 100%);
}

.benefits__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3.4vw, 46px);
  margin-top: clamp(48px, 6.5vw, 90px);
}

.benefit-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px clamp(14px, 1.5vw, 22px) 38px;
  background: var(--white);
  border: 3px solid var(--white);
  border-radius: var(--radius-card);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  text-align: center;
}


/* ─── SELECTABLE CARDS (funcs/cards.js): float on hover, clicked one stays highlighted ─── */
.selectable {
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.35s ease, border-color 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.js-reveal .selectable.is-visible {
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.35s ease, border-color 0.25s ease, opacity 0.6s ease;
}
.selectable:focus-visible { outline: none; }
.selectable.is-selected,
.selectable:focus-visible { border-color: var(--border-highlight); }

/* The clicked card stays raised (same lift and shadow as hover) */
.selectable.is-selected,
.js-reveal .selectable.is-selected.is-visible {
  transform: translateY(-10px);
}
.step-card.selectable.is-selected { box-shadow: 0 22px 44px rgba(51, 180, 220, 0.28); }
.benefit-card.selectable.is-selected { box-shadow: 0 26px 48px rgba(0, 0, 0, 0.28); }

@media (hover: hover) {
  .selectable:hover,
  .js-reveal .selectable.is-visible:hover {
    transform: translateY(-10px);
  }
  .step-card.selectable:hover { box-shadow: 0 22px 44px rgba(51, 180, 220, 0.28); }
  .benefit-card.selectable:hover { box-shadow: 0 26px 48px rgba(0, 0, 0, 0.28); }
}
.selectable:active,
.js-reveal .selectable.is-visible:active { transform: translateY(-4px) scale(0.99); }

.benefit-card__tile {
  display: grid;
  place-items: center;
  width: 70px;
  height: 64px;
  border-radius: 14px;
}
.benefit-card__tile svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--white);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.benefit-card__tile--green { background: var(--tile-green); }
.benefit-card__tile--periwinkle { background: var(--tile-periwinkle); }
.benefit-card__tile--mauve { background: var(--tile-mauve); }

.benefit-card__title {
  margin-top: 22px;
  color: var(--text-header-dark);
  font-weight: 700;
  font-size: clamp(20px, 1.7vw, 24px);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.benefit-card__desc {
  max-width: 330px;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.4;
}

.chips {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-self: stretch;
  margin-inline: -8px;
  gap: 6px;
  margin-top: auto;
  padding-top: 40px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 8px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--text-header-dark);
  font-weight: 700;
  font-size: clamp(11.5px, 0.95vw, 14px);
  line-height: 1.2;
  text-align: left;
  min-width: 0;
}

/* ─── FEATURES ("Un sistema completo…") ─── */
.features { background: var(--white); }

.features .section-title { max-width: 820px; margin-inline: auto; }

.features__layout {
  display: grid;
  grid-template-columns: minmax(0, 560fr) minmax(0, 660fr);
  align-items: start;
  gap: clamp(28px, 4.6vw, 64px);
  margin-top: clamp(44px, 6vw, 88px);
}

.features__tabs {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.2vw, 30px);
}

.feature-tab {
  display: block;
  width: 100%;
  padding: clamp(18px, 1.8vw, 24px) clamp(18px, 1.8vw, 25px) clamp(20px, 2vw, 28px);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.feature-tab:hover { border-color: var(--border-light-blue); }

/* Float on hover, like the step and benefit cards (smaller lift: the cards are stacked) */
.feature-tab { transition: border-color 0.2s, background-color 0.2s, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1); }
@media (hover: hover) {
  .feature-tab:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(51, 180, 220, 0.2);
  }
}

/* Autoplay progress bar (funcs/features.js): fills along the bottom of the
   active card; when the animation ends the next feature opens */
.features__layout.is-autoplay .feature-tab { position: relative; overflow: hidden; }
.feature-tab.is-timing::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--app-theme);
  transform-origin: left center;
  animation: feature-progress var(--autoplay-ms, 6000ms) linear forwards;
}
.features__layout.is-paused .feature-tab.is-timing::after { animation-play-state: paused; }
@keyframes feature-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.feature-tab.is-active {
  border: 2px solid var(--border-light-blue);
  background: var(--bg-soft-2);
  box-shadow: 0 6px 18px rgba(51, 180, 220, 0.12);
}

.feature-tab__title {
  display: block;
  color: var(--text-strong);
  font-weight: 700;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.3;
}

.feature-tab__desc {
  display: block;
  margin-top: 10px;
  color: var(--text-muted);
  font-weight: 400;
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.4;
}

.feature-panel {
  position: sticky;
  top: calc(var(--top-bar-height) + 24px);
  padding: clamp(24px, 3.2vw, 44px) clamp(16px, 2.4vw, 40px) clamp(28px, 3.4vw, 50px);
  border: 2px solid var(--border-light-blue);
  border-radius: var(--radius-panel);
  background: linear-gradient(180deg, var(--bg-soft-2) 0%, #FFFFFF 100%);
  text-align: center;
}

.feature-panel__caption {
  min-height: 2.6em;
  color: var(--text-muted);
  font-size: clamp(16px, 1.45vw, 20px);
  line-height: 1.3;
  text-wrap: balance;
}

.feature-panel__media {
  display: grid;
  margin-top: clamp(14px, 2vw, 28px);
}
/* All images share one grid cell so switching never changes the panel height */
.feature-panel__img {
  grid-area: 1 / 1;
  width: 100%;
  max-height: 440px;
  object-fit: contain;
  align-self: center;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.985);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
}
.feature-panel__img.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* ─── SOCIAL PROOF ─── */
.proof { background: var(--bg-soft); }

.proof .section-title {
  max-width: 1000px;
  margin-inline: auto;
  font-size: clamp(28px, 3.7vw, 50px);
}

.proof__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  margin-top: clamp(32px, 5vw, 70px);
}

.proof__stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(36px, 6vw, 80px);
  text-align: center;
}

.stat__value {
  font-variant-numeric: tabular-nums;
  color: var(--text-header);
  font-weight: 700;
  font-size: clamp(42px, 4.8vw, 66px);
  line-height: 1.1;
  white-space: nowrap;
}

.stat__label {
  margin-top: clamp(10px, 1.6vw, 20px);
  color: #3E6170;
  font-weight: 300;
  font-size: clamp(20px, 2.4vw, 33px);
  line-height: 1.25;
}

/* ─── GLOBE (funcs/globe.js) ─── */
.globe {
  position: relative;
  width: 100%;
  max-width: 580px;
  margin-inline: auto;
  aspect-ratio: 1000 / 1054;
  container-type: inline-size;   /* pins are sized from the globe width (cqw) */
}
.globe__land { width: 100%; height: 100%; }
.globe__pins { position: absolute; inset: 0; }

/* Each <li> is a fixed hit area whose bottom-centre is the location, so the
   marker can lift on hover without slipping out from under the cursor */
.globe-pin {
  position: absolute;
  width: 8.3cqw;
  height: calc(8.3cqw * 1.5);
  transform: translate(-50%, -100%);
  cursor: default;
}

.globe-pin__shadow {
  position: absolute;
  left: 50%;
  top: 100%;
  width: 6.5cqw;
  height: 1.6cqw;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(40, 60, 70, 0.38), rgba(40, 60, 70, 0));
  transform: translate(-50%, -40%);
}
/* Soft ring that pulses after the pin lands */
.globe-pin__shadow::after {
  content: "";
  position: absolute;
  inset: -30%;
  border-radius: 50%;
  border: 2px solid rgba(7, 106, 137, 0.35);
  opacity: 0;
}

.globe-pin__marker {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  aspect-ratio: 100 / 150;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  transition: transform 0.25s ease;
}
.globe-pin__marker svg { width: 100%; height: 100%; fill: var(--app-theme); }
.globe-pin__logo {
  position: absolute;
  left: 50%;
  top: 33%;
  width: 72%;
  transform: translate(-50%, -50%);
  filter: brightness(0) invert(1);   /* white Danti logo */
}

/* Country name, shown only while hovering the pin, on the side set per
   location in Constants/Globe.js */
.globe-pin__label {
  position: absolute;
  top: 100%;
  padding: 0.5cqw 1.6cqw;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-header-dark);
  font-size: clamp(10px, 2.5cqw, 14px);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(7, 106, 137, 0.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.globe-pin--label-right .globe-pin__label { left: calc(50% + 4.6cqw); transform: translateY(-50%); }
.globe-pin--label-left .globe-pin__label { right: calc(50% + 4.6cqw); transform: translateY(-50%); }
.globe-pin--label-above .globe-pin__label { left: 50%; top: auto; bottom: calc(100% + 0.8cqw); transform: translateX(-50%); }
.globe-pin--label-below .globe-pin__label { left: 50%; top: calc(100% + 1.8cqw); transform: translateX(-50%); }

.globe-pin:hover { z-index: 2; }
.globe-pin:hover .globe-pin__marker { transform: translateX(-50%) translateY(-6%) scale(1.06); }
.globe-pin:hover .globe-pin__label { opacity: 1; }

/* Drop-in: armed = waiting above, animated = falls with a small bounce */
.globe.is-armed .globe-pin__marker { opacity: 0; transform: translateX(-50%) translateY(-90%); }
.globe.is-armed .globe-pin__shadow { opacity: 0; }
.globe.is-animated .globe-pin__marker {
  animation: pin-drop 0.75s cubic-bezier(0.25, 1.35, 0.5, 1) both;
  animation-delay: calc(var(--i) * 220ms);
}
.globe.is-animated .globe-pin__shadow {
  animation: pin-shadow 0.75s ease-out both;
  animation-delay: calc(var(--i) * 220ms);
}
/* Landed (funcs/globe.js, after the last drop): pins rest, rings pulse */
.globe.is-landed .globe-pin__shadow::after {
  animation: pin-pulse 2.4s ease-out infinite;
  animation-delay: calc(var(--i) * 300ms);
}

@keyframes pin-drop {
  0% { opacity: 0; transform: translateX(-50%) translateY(-90%); }
  40% { opacity: 1; }
  100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes pin-shadow {
  from { opacity: 0; transform: translate(-50%, -40%) scale(0.2); }
  to { opacity: 1; transform: translate(-50%, -40%) scale(1); }
}
@keyframes pin-pulse {
  0% { opacity: 0.9; transform: scale(0.6); }
  70%, 100% { opacity: 0; transform: scale(1.8); }
}

.clients__title { margin-top: clamp(56px, 8vw, 110px); }

/* Auto-scrolling logo strip (funcs/clients.js). The track holds the list
   twice; moving it by -50% lands exactly on the start of the copy. */
.clients {
  position: relative;
  overflow: hidden;
  margin-top: clamp(36px, 5vw, 76px);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}

.clients__track {
  display: flex;
  align-items: center;
  width: max-content;
}

.clients__item {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(150px, 17vw, 230px);
  height: 120px;
  padding-inline: clamp(14px, 1.8vw, 26px);
}
.clients__item img {
  max-width: 100%;
  max-height: 100px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.92;
  transition: filter 0.25s, opacity 0.25s, transform 0.25s;
}
.clients__item:hover img { filter: none; opacity: 1; transform: scale(1.05); }

.clients.is-animated .clients__track {
  animation: clients-marquee var(--marquee-duration, 20s) linear infinite;
}
.clients.is-animated:hover .clients__track { animation-play-state: paused; }

@keyframes clients-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Reduced motion: plain centred, wrapping row */
.clients.is-static { -webkit-mask-image: none; mask-image: none; }
.clients.is-static .clients__track { width: auto; flex-wrap: wrap; justify-content: center; }

/* ─── FAQ (funcs/faq.js) ─── */
.faq { background: var(--white); padding-bottom: clamp(24px, 4vw, 48px); }
.faq__inner { max-width: 940px; }

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: clamp(32px, 5vw, 56px);
}

.faq-item {
  border: 1.5px solid var(--border-soft);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.faq-item:hover { border-color: var(--border-light-blue); }
.faq-item.is-open {
  border: 1.5px solid var(--border-light-blue);
  background: var(--bg-soft-2);
  box-shadow: 0 6px 18px rgba(51, 180, 220, 0.12);
}

.faq-item__heading { margin: 0; }
.faq-item__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: clamp(16px, 2vw, 22px) clamp(18px, 2.4vw, 26px);
  border: 0;
  border-radius: 18px;
  background: none;
  color: var(--text-strong);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

/* + that turns into − */
.faq-item__icon {
  position: relative;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--chip-bg);
}
.faq-item__icon::before,
.faq-item__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-header-dark);
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease;
}
.faq-item__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item.is-open .faq-item__icon::after { transform: translate(-50%, -50%) rotate(0deg); }

/* Height animation: grid rows 0fr → 1fr */
.faq-item__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}
.faq-item.is-open .faq-item__panel { grid-template-rows: 1fr; }
.faq-item__answer { overflow: hidden; }
.faq-item__answer p {
  padding: 0 clamp(18px, 2.4vw, 26px) clamp(18px, 2vw, 24px);
  color: var(--text-muted);
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.6;
}

/* ─── FLOATING WHATSAPP (funcs/whatsappFloat.js) ─── */
.wa-float {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 90;   /* under the top bar and its mobile menu (100) */
  display: flex;
  align-items: center;
  gap: 12px;
}
body.menu-open .wa-float { display: none; }

.wa-float__btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wa-float__btn svg { width: 30px; height: 30px; fill: currentColor; }
.wa-float__btn:hover { transform: scale(1.07); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28); }
/* A few soft pulses when the page opens, then it stays quiet */
.wa-float__btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #25D366;
  animation: wa-pulse 2s ease-out 1.5s 3;
  opacity: 0;
}
@keyframes wa-pulse {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.6); }
}

.wa-float__bubble {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(260px, calc(100vw - 110px));
  padding: 10px 10px 10px 16px;
  border-radius: 14px;
  background: var(--white);
  color: var(--text-header-dark);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  box-shadow: 0 8px 24px rgba(7, 106, 137, 0.2);
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.wa-float__bubble.is-visible { opacity: 1; transform: none; }
/* Little tail pointing at the button */
.wa-float__bubble::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  width: 12px;
  height: 12px;
  background: var(--white);
  transform: translateY(-50%) rotate(45deg);
}
.wa-float__close {
  position: relative;
  z-index: 1;
  flex: none;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: #EEF3F5;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.wa-float__close:hover { background: var(--chip-bg); }

@media (max-width: 600px) {
  .wa-float__btn { width: 54px; height: 54px; }
  .wa-float__btn svg { width: 28px; height: 28px; }
}

/* ─── CTA ─── */
.cta-section {
  background: var(--white);
  padding-block: clamp(48px, 7vw, 96px) clamp(48px, 6vw, 88px);
}

.cta-card {
  max-width: 1170px;
  margin-inline: auto;
  padding: clamp(48px, 6.4vw, 88px) clamp(20px, 5vw, 80px);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--cta-top) 0%, #17627B 50%, var(--cta-bottom) 100%);
  box-shadow: 0 18px 40px rgba(7, 62, 79, 0.18);
  text-align: center;
}

.cta-card__title {
  max-width: 860px;
  margin-inline: auto;
  color: var(--text-white);
  font-weight: 700;
  font-size: clamp(30px, 4.1vw, 56px);
  line-height: 1.4;
  text-wrap: balance;
}

.cta-card__desc {
  max-width: 920px;
  margin: clamp(20px, 3vw, 44px) auto 0;
  color: var(--text-white);
  font-weight: 300;
  font-size: clamp(17px, 1.95vw, 26px);
  line-height: 1.5;
  text-wrap: balance;
}

.cta-card__actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 20px;
  margin-top: clamp(32px, 5.4vw, 80px);
}

/* Design line breaks in titles: only where there is room for them */
.br-wide { display: none; }
@media (min-width: 1101px) { .br-wide { display: inline; } }

/* ─── HERO BENEFIT STRIP (key benefits in the first screen) ─── */
.hero-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(36px, 4.5vw, 64px);
  padding: clamp(16px, 1.8vw, 22px) clamp(16px, 2vw, 28px);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #DCEFF6;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(7, 106, 137, 0.08);
}
.hero-strip__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px clamp(10px, 1.6vw, 24px);
}
.hero-strip__item + .hero-strip__item { border-left: 1px solid #E3EEF2; }
.hero-strip__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
}
.hero-strip__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--white);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero-strip__icon--green { background: var(--tile-green); }
.hero-strip__icon--periwinkle { background: var(--tile-periwinkle); }
.hero-strip__icon--mauve { background: var(--tile-mauve); }
.hero-strip__item strong {
  display: block;
  color: var(--text-header-dark);
  font-weight: 700;
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.25;
}
.hero-strip__desc {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: clamp(13px, 1.05vw, 15px);
  line-height: 1.35;
}

/* ─── BEFORE → WITH DANTI (inside the benefits band) ───
   One white row card per change, in the same language as the rest of the
   page (white rounded cards, pastel icon tiles, teal accents): the old way
   in a muted left half, a teal arrow where the halves meet, and the Danti
   way on the right. */
.compare {
  --before-share: 44%;          /* width of the muted "before" half */
  max-width: 980px;
  margin: clamp(56px, 7vw, 96px) auto 0;
}
.compare__title {
  color: var(--text-white);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.25;
  text-align: center;
}
.compare__head {
  display: grid;
  grid-template-columns: var(--before-share) 1fr;
  margin-top: clamp(24px, 3vw, 36px);
  padding-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.compare__head span:first-child { padding-left: 24px; color: rgba(255, 255, 255, 0.7); }
.compare__head span:last-child { padding-left: 48px; color: #BFEFFF; }

.compare__rows { display: flex; flex-direction: column; gap: 12px; }

.compare-row {
  position: relative;
  display: grid;
  grid-template-columns: var(--before-share) 1fr;
  align-items: stretch;
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}
.compare-row__before {
  display: flex;
  align-items: center;
  padding: 18px 34px 18px 24px;
  background: #EAF2F5;
  color: #5D7682;
  font-size: clamp(14.5px, 1.15vw, 16px);
  line-height: 1.45;
}
.compare-row__arrow {
  position: absolute;
  top: 50%;
  left: var(--before-share);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--app-theme);
  box-shadow: 0 0 0 4px var(--white);
  transform: translate(-50%, -50%);
}
.compare-row__arrow svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--white);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.compare-row__after {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px 16px 40px;
  color: var(--text-header-dark);
  font-size: clamp(15px, 1.2vw, 16.5px);
  font-weight: 600;
  line-height: 1.4;
}
.compare-row__tile {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
}
.compare-row__tile svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--white);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.compare-row__tile--green { background: var(--tile-green); }
.compare-row__tile--periwinkle { background: var(--tile-periwinkle); }
.compare-row__tile--mauve { background: var(--tile-mauve); }
.compare-row__tile--sky { background: #7CC6DE; }

/* ─── STICKY CALL-TO-ACTION (phones / small tablets, funcs/stickyCta.js) ─── */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 89;   /* under the WhatsApp button (90), which sits inside it on the right */
  display: flex;
  padding: 12px 88px calc(12px + env(safe-area-inset-bottom)) 16px;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  box-shadow: 0 -6px 20px rgba(7, 106, 137, 0.12);
  transform: translateY(110%);
  transition: transform 0.3s ease;
}
.sticky-cta.is-visible { transform: none; }
.sticky-cta__btn { flex: 1; height: 50px; font-size: 16px; }
@media (min-width: 901px) { .sticky-cta { display: none; } }
/* WhatsApp button lines up inside the bar; its bubble would cover the button */
body.has-sticky-cta .wa-float { bottom: calc(10px + env(safe-area-inset-bottom)); }
body.has-sticky-cta .wa-float__bubble { display: none; }

/* ─── CONTACT FORM (funcs/leadForm.js) ─── */
.lead { background: var(--bg-soft); }
.lead[hidden] { display: none; }
.lead__inner { max-width: 940px; }
.lead-form {
  margin-top: clamp(28px, 4.5vw, 52px);
  padding: clamp(20px, 3.4vw, 40px);
  border: 1px solid var(--border-light-blue);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(7, 62, 79, 0.08);
}
.lead-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}
.lead-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lead-field--wide { grid-column: 1 / -1; }
.lead-field__label { font-size: 15px; font-weight: 600; color: var(--text-header-dark); }
.lead-field__input {
  width: 100%;
  box-sizing: border-box;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--white);
  color: var(--text-strong);
  font-family: var(--font-main);
  font-size: 16px;
}
.lead-field__input--area { height: auto; padding: 12px 14px; resize: vertical; min-height: 96px; }
.lead-field__input:focus-visible { outline: none; border-color: var(--border-highlight); box-shadow: var(--btn-focus-ring, 0 0 0 3px rgba(51, 180, 220, 0.45)); }
/* Bots fill every field: this one is off-screen for people (not display:none, which some bots skip). */
.lead-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead-form__note { margin: 14px 0 0; font-size: 13px; color: var(--text-muted); }
.lead-form__note--captcha a { color: var(--text-header); }
.lead-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
}
.lead-consent input { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--app-theme); }
.lead-consent__link { color: var(--text-header); font-weight: 600; }
.lead-form__status { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; font-size: 15px; line-height: 1.4; }
.lead-form__status[hidden] { display: none; }
.lead-form__status.is-info { background: var(--bg-soft); color: var(--text-muted); }
.lead-form__status.is-ok { background: #E3F4EC; color: #14532D; }
.lead-form__status.is-error { background: #FDECEC; color: #8A1C1C; }
.lead-form__submit { margin-top: 22px; width: 100%; }
.lead-form__submit:disabled { opacity: 0.6; cursor: default; }
@media (max-width: 700px) {
  .lead-form__grid { grid-template-columns: 1fr; }
}

/* ─── LARGE TABLET ─── */
@media (max-width: 1100px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .benefits__grid { gap: 16px; }
  .benefit-card { padding-inline: 12px; }
}

/* ─── TABLET ─── */
@media (max-width: 900px) {
  .steps__flow { display: none; }
  .hero-strip { grid-template-columns: minmax(0, 1fr); gap: 6px; text-align: left; }
  .hero-strip__item { padding: 8px 4px; }
  .hero-strip__item + .hero-strip__item { border-left: 0; border-top: 1px solid #E3EEF2; }
  .compare__head { display: none; }
  .compare-row { grid-template-columns: minmax(0, 1fr); }
  .compare-row__before { padding: 14px 20px 22px; }
  .compare-row__arrow { display: none; }
  .compare-row__after { padding: 16px 20px; border-top: 3px solid var(--chip-bg); }
  /* the hidden "Sin Danti:" / "Con Danti:" labels become small visible labels */
  .compare-row__before, .compare-row__after p { flex-direction: column; align-items: flex-start; }
  .compare-row__before { display: flex; }
  .compare-row .sr-only {
    position: static; width: auto; height: auto; margin: 0 0 4px; overflow: visible; clip: auto;
    display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  }
  .compare-row__before .sr-only { color: #7C929C; }
  .compare-row__after .sr-only { color: var(--text-header); }
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: var(--gutter);
    text-align: center;
  }
  .hero__title, .hero__desc { max-width: 640px; margin-inline: auto; padding-left: 0; }
  .hero__rotator { justify-items: center; }
  .hero__actions, .hero__checks { justify-content: center; padding-left: 0; }
  .hero__media { margin: 8px auto 0; max-width: 680px; }

  .steps__grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 480px;
    margin-inline: auto;
    row-gap: 76px;
  }

  .benefits__grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 480px;
    margin-inline: auto;
  }
  .benefits__arch { left: -60%; width: 220%; }

  /* Tabs stack; features.js moves the panel right under the selected card */
  .features__layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .features__tabs { gap: 16px; }
  .feature-panel { position: static; margin-top: 4px; }
  .feature-panel__img { max-height: 360px; }

  .proof__grid { grid-template-columns: minmax(0, 1fr); }
  .proof__stats { flex-direction: row; justify-content: center; gap: 24px 64px; flex-wrap: wrap; }
  .proof__map img { max-width: 440px; }
}

/* ─── MOBILE ─── */
@media (max-width: 600px) {
  .hero__actions .btn,
  .cta-card__actions .btn {
    flex: 1 1 0;
    min-height: 56px;
    padding-inline: 12px;
    font-size: 15px;
  }
  .hero__checks { flex-direction: column; align-items: center; gap: 10px; }

  .step-card { padding-top: 40px; }

  .proof__stats { flex-direction: column; gap: 36px; }

  .clients__item { height: 96px; }
  .clients__item img { max-height: 76px; }

  .cta-card { border-radius: 16px; }
  .cta-card__actions { gap: 10px; }
}
