/* The per-line sizing keeps the lettering and its flourish in scale together. */
#inicio .copy {
  container-type: inline-size;
}

#inicio h1 {
  font-size: min(5.43vw, 6.5rem, 17cqi);
  line-height: .94;
  margin-block: 0 clamp(1.5rem, 2.25vw, 2.65rem);
}

#inicio h1 > .hero-title-pearl:nth-of-type(2) {
  font-size: .955em;
}

h2.section-hero-title {
  line-height: var(--section-title-line-height, .94);
}

@media (forced-colors: none) {
  :root {
    --renduva-title-pearl: linear-gradient(180deg, #fdfdfe 24%, #fafbfd 45%, #f0f4fa 59%, #dce6f5 78%, #d5e1ef 100%);
    --renduva-title-shadow: drop-shadow(0 1px 0 #92c3ff30) drop-shadow(0 .055em .075em #000a2380);
  }

  :is(#inicio h1, .section-hero-title) {
    filter: var(--renduva-title-shadow);
  }

  :is(#inicio h1, .section-hero-title) > .hero-title-pearl,
  .services-listing-description h4 > .hero-title-pearl {
    background-image: var(--renduva-title-pearl);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .section-hero-title > .hero-title-pearl,
  .services-listing-description h4 > .hero-title-pearl {
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
  }

  .services-listing-description h4 > .hero-title-pearl {
    padding-inline-end: .06em;
    margin-inline-end: -.06em;
    filter: drop-shadow(0 .035em .045em #000a234d);
  }

  #booking-title > .hero-title-pearl {
    padding-inline-end: .1em;
    margin-inline-end: -.1em;
  }

  .hero-accent-ink { filter: saturate(2.1875); }
}

.hero-accent {
  position: relative;
  display: inline-block;
  vertical-align: top;
  margin-block-start: .065em;
  padding-block-end: .295em;
  font-size: 1.145em;
  line-height: 1.02;
}

#inicio .hero-accent { white-space: nowrap; }

@media (min-width: 1001px) and (not ((max-width: 1100px) and (hover: none) and (pointer: coarse))) and (forced-colors: none) {
  #inicio .hero-art {
    container-type: size;
    background-image: none;
  }

  #inicio .hero-crystal {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--hero-crystal-image) right center / contain no-repeat;
    pointer-events: none;
  }

  #inicio .hero-art::before,
  #inicio .hero-art::after {
    /* The R is right-aligned and scales with background-size: contain. */
    --crystal-width: min(100cqw, 95.405cqh);
    --crystal-height: min(104.816cqw, 100cqh);
    --floor-join: calc(.948 * var(--crystal-width));
    content: "";
    position: absolute;
    top: calc(50% + .348 * var(--crystal-height));
    height: calc(.152 * var(--crystal-height));
    background-image: url("/hero/suelo-cristal.webp");
    background-repeat: no-repeat;
    opacity: .8;
    pointer-events: none;
  }

  /* Split the continuous photograph at x=900 so its left side fills the
     available stage while the contact highlights scale with the crystal. */
  #inicio .hero-art::before {
    right: var(--floor-join);
    width: calc(99vw - clamp(0px, (100vw - 1280px) / 6, 105px) - var(--floor-join));
    background-position: left center;
    background-size: 170.66667% 100%;
  }

  #inicio .hero-art::after {
    left: calc(100% - var(--floor-join));
    width: calc(1.134 * var(--crystal-width));
    background-position: right center;
    background-size: 241.50943% 100%;
  }
}

.meeting-title .hero-accent { font-size: 1em; }

.section-hero-title .hero-accent {
  max-inline-size: 100%;
}

.hero-accent-ink {
  display: inline-block;
  padding: .055em .12em .12em .055em;
  margin: -.055em -.12em -.12em -.055em;
  font: inherit;
  font-style: italic;
  font-synthesis: style;
  color: #70c7ff;
}

.section-hero-title .hero-accent-ink {
  max-inline-size: calc(100% + .175em);
  overflow-wrap: anywhere;
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .hero-accent-ink {
    background-image: linear-gradient(103deg, #00d8ff 4%, #09cfff 21%, #44baff 41%, #658cff 57%, #9250ff 74%, #c33bf3 89%, #f13de5 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
  }
}

.hero-accent-stroke {
  position: absolute;
  left: .015em;
  bottom: 0;
  width: 76%;
  height: auto;
  overflow: visible;
  pointer-events: none;
}

#proyectos .section-hero-title .hero-accent-stroke {
  bottom: .06em;
}

.meeting-title .hero-accent-stroke {
  transform: scaleY(.9);
  transform-origin: center bottom;
}

#metodo .creative-method .hero-accent-stroke {
  bottom: .15em;
  transform: scaleY(1.65);
  transform-origin: center bottom;
}

#proyectos .section-hero-title {
  max-inline-size: none;
}

:is(#proyectos, #cifras) .section-hero-title .hero-accent {
  vertical-align: baseline;
  margin-block-start: 0;
}

@media (min-width: 1001px) {
  #dudas .section-hero-title {
    font-size: clamp(2.625rem, 4.35vw, 4.5rem);
  }
}

@media (min-width: 761px) and (max-width: 1000px) {
  #inicio .hero-art { width: 51%; }
}

@media (max-width: 760px) {
  #inicio h1 {
    font-size: min(12.3vw, 4.25rem, 13.5cqi);
    margin-bottom: clamp(1.35rem, 5.4vw, 2rem);
  }
}

@media (forced-colors: active) {
  .hero-accent-ink {
    background: none;
    color: CanvasText;
  }
  #hero-accent-stroke-shape { fill: CanvasText; }
}

#inicio h1 {
  margin-bottom: clamp(1rem, 1.25vw, 1.45rem);
}

#inicio {
  --hero-message-width: min(43vw, 48.75rem);
  --hero-button-width: 391.094px;
}

#inicio .hero-message {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .24em;
  width: var(--hero-message-width);
  aspect-ratio: 11.85;
  margin: 0 0 clamp(1.2rem, 1.55vw, 1.8rem);
  font-size: min(1.55vw, 1.76rem);
  line-height: 1.1;
  letter-spacing: -.047em;
  color: #fcfdff;
}

#inicio .hero-message::before,
#inicio .hero-message::after {
  position: absolute;
  inset: 0 .18em;
  z-index: -1;
  border-radius: .82em;
  transform: skewX(-11deg);
  pointer-events: none;
  content: "";
}

#inicio .hero-message::before {
  border: 1.5px solid transparent;
  background:
    linear-gradient(175deg, #11243c, #0b1930 55%, #0d1b32) padding-box,
    linear-gradient(105deg, #7aeaff, #009eff 12%, #3d84ff 46%, #aa60fa 72%, #ff7cf3 98%) border-box;
  box-shadow: inset 0 1px 0 #cceaff12,
    -3px 1px 10px -3px #008cffb0, 3px 0 11px -4px #ec38dcb0;
}

#inicio .hero-message::after {
  border: 2px solid transparent;
  background:
    radial-gradient(ellipse 12% 16% at 13% 0%, #dbffff, transparent),
    radial-gradient(ellipse 10% 15% at 4% 100%, #d6ffff, transparent),
    radial-gradient(ellipse 12% 20% at 96% 100%, #ffdcff, transparent),
    linear-gradient(110deg, #5be8ff, #009bff 25%, transparent 42%, transparent 72%, #ff8df9) border-box;
  mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: .9;
}

#inicio .hero-message strong {
  font-weight: 800;
  font-style: italic;
  font-synthesis: style;
  white-space: nowrap;
}

#inicio .hero-message strong:last-child {
  position: relative;
  background: linear-gradient(100deg, #00f3ff 6%, #13c7ff 29%, #937bff 51%, #e04dfb 74%, #ff49da 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  padding-inline-end: .12em;
}

#inicio .hero-action {
  width: var(--hero-message-width);
  justify-items: center;
}

#inicio .hero-cta {
  width: min(100%, var(--hero-button-width));
}

@media (max-width: 760px) {
  #inicio {
    --hero-message-width: min(100%, 31rem);
    --hero-button-width: 325.922px;
  }

  #inicio .hero-message {
    min-height: 3.35rem;
    aspect-ratio: auto;
    padding: .6rem .75rem;
    flex-wrap: wrap;
    align-content: center;
    gap: .13em .3em;
    font-size: clamp(.92rem, 4cqi, 1.12rem);
  }
}

@media (forced-colors: active) {
  #inicio .hero-message::before { border-color: CanvasText; }
  #inicio .hero-message strong:last-child { color: CanvasText; }
}
