/* Close the floating header top gap so scrolling hero content cannot show through. */
body.imd-core-home-page .imd-ph-shell::before {
  content: ""; position: absolute; top: -4px; left: 0; right: 0; height: 8px;
  background: #fff; pointer-events: none;
}
:is(html[data-theme=dark],html[data-imd-color-scheme=dark],html.inmudescuentos-site-dark,html.imh-site-dark) body.imd-core-home-page .imd-ph-shell::before,
body.imd-core-home-page:is(.dark-mode,.imd-dark-mode) .imd-ph-shell::before { background: #16191c; }

/* The animated brand scene has one layout and one controller in every viewport. */
.imh {
  --hero-link: var(--imd-ui-link,#ac2026); --hero-ink: #182126; --hero-muted: #58666d; --hero-surface: rgba(255,255,255,.82); --hero-line: rgba(255,255,255,.86); --hero-accent: #ef0018;
  --hero-stage-height: clamp(410px, calc(100svh - 258px), 600px);
  --hero-person-height: clamp(210px, 30svh, 280px);
  --hero-person-width: clamp(185px, 19vw, 260px);
  position: relative; isolation: isolate; max-width: 1440px; margin: 0 auto; padding: 10px 24px 0;
  color: var(--hero-ink); font-family: var(--imd-font-body,Aileron,Arial,sans-serif); overflow: clip;
}
.imh * { box-sizing: border-box; }
.imh img { max-width: 100%; display: block; height: auto; }
.imh button, .imh a { font: inherit; }
.imh :is(button,a):focus-visible { outline: 3px solid var(--hero-accent); outline-offset: 4px; }
.imh__copy { position: relative; z-index: 2; text-align: center; max-width: 1100px; margin: 0 auto; }
.imh__eyebrow-line { display: flex; justify-content: center; align-items: center; gap: 4px 12px; flex-wrap: wrap; margin-bottom: 7px; }
.imh__eyebrow { margin: 0; color: var(--hero-link); font-size: 13px; line-height: 1.3; letter-spacing: .04em; font-weight: 800; text-transform: uppercase; }
.imh .imh__audience-change { padding: 4px 2px; border: 0; background: transparent; color: var(--hero-muted); font-size: 12px; line-height: 1.2; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* Reserve the control's footprint before hydration; hidden stays unfocusable. */
.imh .imh__audience-change[hidden] { display: inline-block; visibility: hidden; pointer-events: none; }
.imh__audience-fallback { font-size: 12px; margin: 6px 0; }
.imh__copy h1 { color: var(--hero-ink); font: 600 clamp(40px,4.1vw,58px)/1.01 var(--imd-font-heading,Oduda,Aileron,Arial,sans-serif); letter-spacing: -.025em; max-width: 1060px; margin: 0 auto; }
.imh__subtitle { color: var(--hero-muted); font-size: clamp(17px,1.8vw,23px); line-height: 1.25; margin: 7px 0 0; }
.imh__stage { position: relative; height: auto; min-height: var(--hero-stage-height); max-width: 1180px; margin: 0 auto; }
.imh__camera { position: relative; height: auto; min-height: var(--hero-stage-height); }
.imh__layer { position: absolute; pointer-events: none; }
/* A fixed home and an upright circular arch turn in a shared 3D space.
 * The orbit rotates around the vertical axis; only each tile face counter-rotates. */
.imh__house-layer { width: min(80%,900px); left: 50%; top: 32px; transform: translateX(-50%); }
.imh__house-float { --arch-depth:clamp(10px,2vw,20px); --solar-duration:40s; position:relative; height:clamp(350px,calc(100svh - 300px),510px); perspective:1100px; perspective-origin:50% 60%; transform-style:preserve-3d; }
.imh .imh__house { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; transform:translateZ(0); }
.imh__house-shadow { position:absolute; left:22%; right:22%; bottom:7%; height:5%; border-radius:50%; background:#18212638; filter:blur(12px); }
.imh__turntable { position:absolute; inset:0; transform-origin:50% 50%; transform-style:preserve-3d; animation:imh-solar-turn var(--solar-duration) linear infinite; }
.imh__network-ring { position:absolute; inset:0; transform-style:preserve-3d; }
.imh__network-ring svg { position:absolute; inset:0; display:block; width:100%; height:100%; overflow:visible; transform:translateZ(calc(var(--arch-depth,20px) / 2)); }
.imh__network-ring .imh__arch-back { transform:translateZ(calc(var(--arch-depth,20px) / -2)); }
.imh__arch-edge { position:absolute; height:var(--arch-depth,20px); background:linear-gradient(180deg,#ff3146,#c90019 40%,#a90014); }
.imh__orbit { --orbit-start:-20deg; position:absolute; inset:0; transform:rotateY(var(--orbit-start)); transform-origin:50% 50%; transform-style:preserve-3d; animation:imh-solar-turn var(--solar-duration) linear infinite; }
.imh__orbit--conversation { --orbit-start:100deg; }
.imh__orbit--connection { --orbit-start:220deg; }
.imh__satellite { position:absolute; left:84%; top:28%; width:14%; min-width:54px; max-width:126px; aspect-ratio:1; transform-style:preserve-3d; }
.imh__network-tile { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; width:100%; height:100%; border-radius:23%; background:linear-gradient(135deg,#fffefa,#f4e5da 75%,#e9d0bb); border:1px solid #fffaf5; color:#d80017; box-shadow:inset 3px 3px 5px #fff,inset -3px -4px 7px #c5987945,0 14px 24px #35120d21; font-size:clamp(9px,1.2vw,13px); font-weight:800; line-height:1; transform-origin:0 0; transform:rotateY(calc(-1 * var(--orbit-start))) translate(-50%,-50%); animation:imh-solar-face var(--solar-duration) linear infinite; }
.imh__network-tile svg { width:46%; height:46%; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; filter:drop-shadow(0 2px 1px #b4001420); }
.imh .imh__motion-toggle { position: absolute; right: 0; top: 8px; z-index: 5; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--hero-line); border-radius: 50%; background: var(--hero-surface); color: var(--hero-muted); cursor: pointer; font-size: 15px; box-shadow: none; }
.imh .imh__motion-toggle:hover { color: var(--hero-link); background: var(--hero-surface); }
.imh .imh__motion-toggle[hidden] { display: none; }
.imh__sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.imh__character {
  position: absolute; bottom: 0; left: var(--owner-x); width: var(--hero-person-width); height: var(--hero-person-height);
  padding: 0; border: 0; border-radius: 0; background: transparent !important; box-shadow: none !important;
  color: var(--hero-ink); cursor: pointer; z-index: 3; transform: translateX(-50%);
}
.imh__character--analid, .imh__dialog--register { --owner-x: 16.6667%; }
.imh__character--leslie, .imh__dialog--properties { --owner-x: 50%; }
.imh__character--paola, .imh__dialog--benefits { --owner-x: 83.3333%; }
.imh__character-float { display: block; width: 100%; height: 100%; transition: transform .35s ease, filter .35s ease; }
.imh__character img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 8px 8px #18212618); }
.imh__character[aria-expanded=true] .imh__character-float { animation: imh-person-float 3.2s ease-in-out infinite; filter: drop-shadow(0 3px 9px #ed00181a); }
.imh__hint {
  display: flex; flex-direction: column; justify-content: center; position: absolute; bottom: calc(100% - 5px); left: 50%; transform: translateX(-50%);
  min-height: 56px; width: 205px; max-width: 32vw; padding: 9px 13px; border: 1px solid var(--hero-line);
  border-radius: 14px; background: var(--hero-surface); box-shadow: 0 12px 32px #12171c12; backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); text-align: center;
  transition: opacity .2s ease, transform .2s ease;
}
.imh__hint > span { font: 400 16px/1.05 var(--imd-font-heading,Oduda,Georgia,serif); }
.imh__hint small { font-size: 10px; font-weight: 700; color: var(--hero-muted); margin-top: 3px; }
.imh__character[aria-expanded=true] .imh__hint { visibility: hidden; opacity: 0; }
/* All messages size one shared row even while invisible. The tallest message
 * reserves room from the first paint, including custom editorial copy. */
.imh__dialogs {
  position: relative; display: grid; grid-template-columns: repeat(3,minmax(0,1fr));
  min-height: var(--hero-stage-height); padding: 14px 0 calc(var(--hero-person-height) + 10px);
  align-items: end; pointer-events: none; z-index: 4;
}
.imh__dialog {
  --imd-heading-weight: 400;
  position: relative; grid-row: 1; justify-self: center; width: min(96%,300px); min-width: 0;
  transform: translateY(0); border: 1px solid var(--hero-line); border-radius: 22px;
  background: var(--hero-surface); box-shadow: 0 22px 55px rgba(18,23,28,.14); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); pointer-events: auto;
  opacity: 1; filter: blur(0); visibility: visible; transition: opacity .5s ease, transform .58s cubic-bezier(.2,.8,.2,1), filter .5s ease, visibility .5s;
}
.imh__dialog--register { grid-column: 1; }
.imh__dialog--properties { grid-column: 2; }
.imh__dialog--benefits { grid-column: 3; }
.imh__dialog-body { padding: 19px 20px 18px; border-radius: inherit; }
.imh__dialog[aria-hidden=true] { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(16px) scale(.97); filter: blur(7px); }
.imh__dialog h3 { color: var(--hero-ink); font: 400 22px/1.02 var(--imd-font-heading,Oduda,Georgia,serif); letter-spacing: -.025em; margin: 0 0 10px; }
.imh__dialog p { font-size: 12.5px; line-height: 1.45; margin: 0 0 8px; color: var(--hero-muted); }
.imh__dialog .imh__kicker { text-transform: uppercase; font-size: 10px; letter-spacing: .05em; font-weight: 800; color: var(--hero-link); }
.imh .imh__cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; max-width: 100%; color: var(--hero-link) !important; font-size: 12px; line-height: 1.25; font-weight: 900; text-decoration: none; }
.imh .imh__cta:hover { text-decoration: underline; text-underline-offset: 4px; }
.imh__cta > span:last-child { flex-shrink: 0; }
:is(html[data-theme=dark],html[data-imd-color-scheme=dark],html.inmudescuentos-site-dark,html.imh-site-dark,body.dark-mode,body.imd-dark-mode) .imh {
  --hero-ink: #f4f6f8; --hero-muted: #bac6cc; --hero-surface: rgba(28,34,41,.88); --hero-line: rgba(255,255,255,.13); --hero-accent: #ff4057;
}
.imh:is(:not([data-imh-visible=true]),[data-imh-paused=true]) :is(.imh__character-float,.imh__turntable,.imh__orbit,.imh__network-tile) { animation-play-state: paused; }
@keyframes imh-solar-turn { from { transform:rotateY(var(--orbit-start,0deg)); } to { transform:rotateY(calc(var(--orbit-start,0deg) + 360deg)); } }
@keyframes imh-solar-face { from { transform:rotateY(calc(-1 * var(--orbit-start))) translate(-50%,-50%); } to { transform:rotateY(calc(-1 * var(--orbit-start) - 360deg)) translate(-50%,-50%); } }
@keyframes imh-person-float { 0%,100% { transform: translateY(0) scale(1.015); } 50% { transform: translateY(-5px) scale(1.025); } }
@media(min-width:901px) and (max-height:740px) {
  .imh { --hero-stage-height: 410px; --hero-person-height: 200px; }
  .imh__copy h1 { font-size: 48px; max-width: 1060px; }
  .imh__house-float { height: 360px; }
  .imh__subtitle { font-size: 20px; }
}
@media(min-width:641px) and (max-width:900px) {
  .imh { --hero-stage-height: 510px; --hero-person-height: 220px; --hero-person-width: 210px; padding-inline: 14px; }
  .imh__copy h1 { font-size: 44px; max-width: 760px; }
  .imh__house-layer { width: 86%; }
  .imh__house-float { height: 450px; }
  .imh__dialog-body { padding: 9px 13px; }
  .imh__dialog h3 { font-size: 21px; }
  .imh__hint { width: 190px; font-size: 14px; }
}
@media(max-width:640px) {
  .imh { --hero-stage-height: clamp(385px,52svh,470px); --hero-person-height: 165px; --hero-person-width: 32%; padding: 8px 10px 0; text-align: center; }
  .imh__eyebrow { font-size: 10px; max-width: 350px; margin: 0; }
  .imh .imh__audience-change { font-size: 11px; }
  .imh__copy h1 { font-size: clamp(32px,8.5vw,43px); max-width: 540px; }
  .imh__subtitle { font-size: 16px; margin-top: 7px; }
  .imh__house-layer { width: 100%; top: 18px; }
  .imh__house-float { height: 280px; }
  .imh__network-tile { gap: 5px; font-size: 8px; }
  .imh .imh__motion-toggle { top: 0; width: 32px; height: 32px; }
  .imh__hint { width: 125px; max-width: 31vw; padding: 8px 6px; min-height: 54px; font-size: 12px; border-radius: 13px; }
  .imh__hint > span { font-size: 14px; }
  .imh__hint small { font-size: 10px; }
  .imh:is([data-scene=register],[data-scene=properties],[data-scene=benefits]) .imh__hint { visibility: hidden; opacity: 0; }
  .imh__dialogs { grid-template-columns: minmax(0,1fr); }
  .imh__dialog { grid-column: 1; width: calc(100% - 24px); max-width: 340px; border-radius: 16px; }
  .imh__dialog-body { padding: 14px 16px; }
  .imh__dialog h3 { font-size: 21px; margin-bottom: 7px; }
  .imh .imh__cta { font-size: 13px; }
}
@media(max-width:360px) {
  .imh { --hero-stage-height: 375px; --hero-person-height: 150px; }
  .imh__copy h1 { font-size: 30px; }
  .imh__dialog h3 { font-size: 20px; }
  .imh__dialog-body { padding: 12px 14px; }
}
@media(prefers-reduced-motion:reduce) { .imh .imh__motion-toggle { display: none; } .imh *, .imh *::before, .imh *::after { transition: none !important; animation: none !important; } }
