/* DECEN REMAKE 0.4.21 — CANONICAL HOME HERO
   Single source of truth. No priority override. No fixed overlay. No legacy geometry. */

.home-page {
  position: relative;
  min-height: 0;
  margin-top: calc(-84px - var(--safe-top));
  padding: 0;
  overflow: visible;
}

.home-page > .motion-hero {
  --decen-hero-full-height: clamp(620px, 82svh, 940px);
  --decen-hero-current-height: var(--decen-hero-full-height);
  --decen-hero-media-shift: 0px;
  --decen-hero-copy-shift: 0px;
  position: relative;
  width: calc(100vw - var(--frame-left) - var(--frame-right));
  max-width: none;
  height: var(--decen-hero-current-height);
  min-height: 0;
  margin: 0 0 0 50%;
  padding: 0;
  transform: translateX(-50%);
  border-radius: 0 0 30px 30px;
  overflow: hidden;
  background: #d9d5cf;
  transition: none;
  will-change: height;
  overflow-anchor: none;
}

.home-page > .motion-hero .motion-hero-stage {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: var(--decen-hero-full-height);
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border-radius: inherit;
  isolation: isolate;
}

.home-page > .motion-hero .motion-hero-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
}

.home-page > .motion-hero .motion-hero-frame {
  display: block;
  object-fit: cover;
  object-position: center center;
  border-radius: inherit;
  background: #d9d5cf;
  transform: translate3d(0,var(--decen-hero-media-shift),0) scale(1.012);
  transform-origin: center center;
  will-change: transform;
}

.home-page > .motion-hero .motion-story {
  transform: translate3d(0,var(--decen-hero-copy-shift),0);
  will-change: transform;
}

.home-page > .motion-hero .motion-hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10,12,10,.10), rgba(10,12,10,.01) 31%, rgba(10,12,10,.02) 57%, rgba(10,12,10,.58));
}

.home-page > .motion-hero.local-scrub-ready {
  touch-action: pan-y;
  overscroll-behavior-y: auto;
}

.home-page > .motion-hero.local-scrub-ready.is-complete {
  touch-action: pan-y;
  overscroll-behavior-y: auto;
}

.home-page > .motion-hero.is-page-collapsed {
  height: 0;
  pointer-events: none;
  border-radius: 0;
}

.home-page > [data-home-sections] {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  padding-top: 1px;
  background: var(--bg);
  overflow-anchor: none;
}

.home-page > [data-home-sections] > .section:first-child {
  margin-top: 24px;
}

/* 0.4.33 — entrance trial: stage slides in from the top while the first story
   line resolves from soft blur. Scrub geometry and story timing stay untouched. */
.home-page > .motion-hero .motion-hero-stage{
  opacity:1;
  transform:translate3d(0,0,0);
  transition:opacity .54s ease,transform .72s cubic-bezier(.2,.72,.2,1);
}
.home-page > .motion-hero.is-entering .motion-hero-stage{
  opacity:.28;
  transform:translate3d(0,-34px,0);
}
.home-page > .motion-hero.is-entered .motion-hero-stage{
  opacity:1;
  transform:translate3d(0,0,0);
}
.home-page > .motion-hero .motion-beat:first-child .eyebrow,
.home-page > .motion-hero .motion-beat:first-child h1,
.home-page > .motion-hero .motion-beat:first-child h2,
.home-page > .motion-hero .motion-beat:first-child p,
.home-page > .motion-hero .motion-beat:first-child .button-row{
  opacity:1;
  filter:blur(0);
  transform:translate3d(0,0,0);
  transition:opacity .62s ease .12s,filter .72s ease .12s,transform .72s cubic-bezier(.2,.72,.2,1) .12s;
}
.home-page > .motion-hero.is-entering .motion-beat:first-child .eyebrow,
.home-page > .motion-hero.is-entering .motion-beat:first-child h1,
.home-page > .motion-hero.is-entering .motion-beat:first-child h2,
.home-page > .motion-hero.is-entering .motion-beat:first-child p,
.home-page > .motion-hero.is-entering .motion-beat:first-child .button-row{
  opacity:0;
  filter:blur(10px);
  transform:translate3d(0,-12px,0);
}
.home-page > .motion-hero.is-entering .motion-progress,
.home-page > .motion-hero.is-entering .motion-hint{opacity:0;}
.home-page > .motion-hero .motion-progress,
.home-page > .motion-hero .motion-hint{transition:opacity .42s ease .22s;}

@media (max-width: 900px) {
  .home-page {
    margin-top: calc(-76px - var(--safe-top));
  }

  /* The mobile scroll host (.app-view) is narrower than the frame and clips
     x-overflow, so a frame-wide hero lost its rounded bottom corners. Fill the
     host exactly instead; it also lines up with the floating header. */
  .home-page > .motion-hero {
    --decen-hero-full-height: clamp(430px, 66svh, 650px);
    width: 100%;
    margin-left: 0;
    transform: none;
    border-radius: 0 0 24px 24px;
  }

  .home-page > [data-home-sections] > .section:first-child {
    margin-top: 20px;
  }

  /* Mobile scroll stays geometrically flat: no internal parallax competes with
     Safari's native pan while the physical Hero height expands/collapses. */
  .home-page > .motion-hero .motion-hero-frame,
  .home-page > .motion-hero .motion-story {
    transform: none;
    will-change: auto;
  }
}


@media (prefers-reduced-motion: reduce) {
  .home-page > .motion-hero .motion-hero-stage{transition:none;opacity:1;clip-path:none;}
  .home-page > .motion-hero .motion-hero-frame,
  .home-page > .motion-hero .motion-story {
    transform: none;
  }
}

/* 0.4.36 — cinematic first beat: depth settles before the story starts. */
.home-page > .motion-hero .motion-hero-frame{
  transform:translate3d(0,var(--decen-hero-media-shift,0),0) scale(1);
  filter:saturate(1) contrast(1);
  transition:transform .95s cubic-bezier(.16,.78,.18,1),filter .9s ease;
}
.home-page > .motion-hero.is-entering .motion-hero-frame{
  transform:translate3d(0,calc(var(--decen-hero-media-shift,0) - 22px),0) scale(1.045);
  filter:saturate(.84) contrast(.94) blur(3px);
}
.home-page > .motion-hero.is-entering .motion-beat:first-child h1,
.home-page > .motion-hero.is-entering .motion-beat:first-child h2{
  transform:translate3d(0,-22px,0) scale(.985);
  filter:blur(14px);
}
.home-page > .motion-hero .motion-beat:first-child h1,
.home-page > .motion-hero .motion-beat:first-child h2{
  transition:opacity .68s ease .14s,filter .9s ease .14s,transform .9s cubic-bezier(.16,.78,.18,1) .14s;
}


/* 0.4.39 — editorial depth pass. Scroll/scrub remains the proven native engine;
   only visual depth is enriched, so Safari gesture ownership is unchanged. */
.home-page>.motion-hero{--decen-hero-story-scale:1.028;--decen-hero-story-blur:1.6px;--decen-hero-story-veil:.58}
.home-page>.motion-hero .motion-hero-frame{transform:translate3d(0,var(--decen-hero-media-shift,0),0) scale(var(--decen-hero-story-scale));filter:blur(var(--decen-hero-story-blur)) saturate(1.02) contrast(1.015);transition:transform .18s linear,filter .18s linear}
.home-page>.motion-hero .motion-hero-veil{background:linear-gradient(180deg,rgba(10,12,10,.08),rgba(10,12,10,.01) 30%,rgba(10,12,10,.03) 58%,rgba(10,12,10,var(--decen-hero-story-veil)))}
.home-page>.motion-hero .motion-beat h1,.home-page>.motion-hero .motion-beat h2{letter-spacing:-.055em;text-wrap:balance}
.home-page>.motion-hero .motion-beat p{max-width:680px;text-wrap:pretty}
@media(max-width:900px){.home-page>.motion-hero .motion-hero-frame{transform:scale(var(--decen-hero-story-scale));filter:blur(var(--decen-hero-story-blur)) saturate(1.01)}}
@media(prefers-reduced-motion:reduce){.home-page>.motion-hero .motion-hero-frame{transform:none;filter:none}}

/* 0.5.31 — mobile hero: a square card that starts below the floating header
   (it used to slide under it, which ate the empty-wall area), paired with the
   720x720 mobile video (crib smaller, more wall above it). Compact copy sits on
   the wall with a diffuse shadow, as if cast on it. */
@media (max-width: 767px) {
  .home-page { margin-top: 0; }
  .home-page > .motion-hero { --decen-hero-full-height: clamp(320px, calc(100vw - 38px), 460px); border-radius: 24px; }
  .home-page > .motion-hero .motion-beat,
  .home-page > .motion-hero .motion-beat.beat-two,
  .home-page > .motion-hero .motion-beat.beat-three { left: 16px; right: 16px; top: 16px; bottom: auto; width: auto; max-width: 70%; text-align: left; }
  .home-page > .motion-hero .motion-beat.beat-three { max-width: 78%; }
  .home-page > .motion-hero .motion-beat .eyebrow { font-size: 8px; letter-spacing: .16em; margin-bottom: 6px; }
  .home-page > .motion-hero .motion-beat h1,
  .home-page > .motion-hero .motion-beat h2 { font-size: clamp(19px, 5.6vw, 24px); line-height: 1; letter-spacing: -.04em; }
  .home-page > .motion-hero .motion-beat p { font-size: 10.5px; line-height: 1.34; margin-top: 6px; max-width: 100%; }
  .home-page > .motion-hero .motion-beat.beat-three p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .home-page > .motion-hero .motion-beat .button-row { margin-top: 8px; gap: 6px; }
  .home-page > .motion-hero .motion-beat .btn { min-height: 30px; padding: 6px 10px; font-size: 10px; }
  .home-page > .motion-hero .motion-beat .eyebrow,
  .home-page > .motion-hero .motion-beat h1,
  .home-page > .motion-hero .motion-beat h2,
  .home-page > .motion-hero .motion-beat p { text-shadow: 0 2px 14px rgba(38,28,18,.34), 0 1px 3px rgba(38,28,18,.22); }
  .home-page > .motion-hero .motion-hint { bottom: 10px; font-size: 9px; padding: 6px 9px; }
  .home-page > .motion-hero:not(.is-at-start) .motion-hint { opacity: 0; transition: opacity .25s ease; }
}

/* 0.5.32 — end-of-story CTA: a white rounded "Diseño de interiores" button that
   fades in at the lower corner once the scrub completes (is-complete). Heroes
   that do not scrub show it from the start. */
.home-page > .motion-hero .motion-hero-cta {
  position: absolute; z-index: 5; right: 18px; bottom: 18px;
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 10px 16px;
  border-radius: 999px; background: #fff; color: #171717; text-decoration: none;
  font: 800 12px/1 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: -.01em;
  box-shadow: 0 14px 34px rgba(20,18,15,.22), 0 2px 6px rgba(20,18,15,.12);
  opacity: 0; transform: translate3d(0,10px,0) scale(.96); pointer-events: none;
  transition: opacity .45s ease, transform .55s cubic-bezier(.2,.8,.2,1);
}
.home-page > .motion-hero .motion-hero-cta::after { content: "→"; font-weight: 700; }
.home-page > .motion-hero.is-complete .motion-hero-cta,
.home-page > .motion-hero[data-hero-scroll-scrub="0"] .motion-hero-cta { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 767px) { .home-page > .motion-hero .motion-hero-cta { right: 12px; bottom: 12px; min-height: 36px; padding: 9px 14px; font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .home-page > .motion-hero .motion-hero-cta { transition: none; } }

/* 0.5.34 — scroll cue: SVG (no emoji glyph) with a dot that rolls down and a
   gentle nudge of the whole chip, so it invites the scrub without shouting. */
.home-page > .motion-hero .motion-hint{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;animation:decenHintNudge 2.6s cubic-bezier(.45,0,.3,1) 1.2s infinite}
.motion-hint-icon{flex:none;display:block;overflow:visible}
.motion-hint-icon rect{fill:none;stroke:currentColor;stroke-width:1.6}
.motion-hint-dot{fill:currentColor;transform-box:fill-box;transform-origin:center;animation:decenHintDot 1.6s cubic-bezier(.5,0,.3,1) infinite}
@keyframes decenHintDot{0%{transform:translateY(0);opacity:0}18%{opacity:1}68%{transform:translateY(7px);opacity:0}100%{transform:translateY(7px);opacity:0}}
@keyframes decenHintNudge{0%,55%,100%{transform:translate(-50%,0)}70%{transform:translate(-50%,3px)}82%{transform:translate(-50%,0)}90%{transform:translate(-50%,1.5px)}}
@media (max-width: 767px){.home-page > .motion-hero .motion-hint{gap:6px}.motion-hint-icon{width:10px;height:14px}}
@media (prefers-reduced-motion: reduce){.home-page > .motion-hero .motion-hint,.motion-hint-dot{animation:none}.motion-hint-dot{opacity:1}}
.motion-hint .motion-hint-text{margin-left:0}
/* 0.5.36 — mobile copy fills the empty wall up to the inner corner (~55% of
   the square hero): larger type, two-line title, proportionate body. */
@media (max-width: 767px){
  .home-page > .motion-hero .motion-beat,
  .home-page > .motion-hero .motion-beat.beat-two,
  .home-page > .motion-hero .motion-beat.beat-three{max-width:calc(55% - 20px)}
  .home-page > .motion-hero .motion-beat h1,
  .home-page > .motion-hero .motion-beat h2{font-size:clamp(19px,5.85vw,26px);line-height:1;letter-spacing:-.045em}
  .home-page > .motion-hero .motion-beat p{font-size:clamp(11px,3.15vw,13px);line-height:1.34;margin-top:7px}
  .home-page > .motion-hero .motion-beat.beat-three p{-webkit-line-clamp:4}
  .home-page > .motion-hero .motion-beat .eyebrow{font-size:8.5px;letter-spacing:.15em;margin-bottom:7px}
}
/* 0.5.38 — scroll cue + progress in one chip: "Desliza para transformar" at
   rest; once the scrub starts the text gives way to the progress bar and
   percentage; the chip fades out as the "Diseño de interiores" CTA arrives. */
.home-page > .motion-hero .motion-progress{display:none!important}
.home-page > .motion-hero .motion-hint .motion-hint-progress{display:none;margin-left:0;align-items:center;gap:8px;font:750 11px/1 Arial,sans-serif;font-variant-numeric:tabular-nums}
.motion-hint-progress i{display:block;width:92px;height:4px;overflow:hidden;border-radius:99px;background:rgba(255,255,255,.28)}
.motion-hint-progress b{display:block;width:100%;height:100%;transform:scaleX(0);transform-origin:left center;background:#fff;border-radius:inherit}
.home-page > .motion-hero .motion-hint .motion-hint-progress span{display:inline;margin-left:0;min-width:3ch;text-align:right}
.home-page > .motion-hero:not(.is-at-start) .motion-hint{animation:none;opacity:1}
.home-page > .motion-hero:not(.is-at-start) .motion-hint .motion-hint-text{display:none}
.home-page > .motion-hero:not(.is-at-start) .motion-hint .motion-hint-progress{display:inline-flex}
.home-page > .motion-hero.is-near-end:not(.is-at-start) .motion-hint,
.home-page > .motion-hero.is-complete:not(.is-at-start) .motion-hint{opacity:0!important;transition:opacity .35s ease}
@media (max-width: 767px){
  .home-page > .motion-hero:not(.is-at-start) .motion-hint{opacity:1}
  .home-page > .motion-hero .motion-hint .motion-hint-progress{gap:6px;font-size:9px}
  .motion-hint-progress i{width:64px;height:3px}
}
/* CTA arrives a little before the last frame (is-near-end = 82%); larger on desktop. */
.home-page > .motion-hero.is-near-end .motion-hero-cta{opacity:1;transform:none;pointer-events:auto}
@media (min-width: 768px){
  .home-page > .motion-hero .motion-hero-cta{right:28px;bottom:26px;min-height:54px;padding:15px 26px;gap:12px;font-size:16px}
  .home-page > .motion-hero .motion-hero-cta::after{font-size:18px}
}
/* 0.5.38 — desktop copy stays on the empty wall (upper left), like mobile:
   every beat top-left, narrower column and smaller type, so it never covers
   the crib or the furniture that appears during the scrub. */
@media (min-width: 768px){
  .home-page > .motion-hero .motion-beat,
  .home-page > .motion-hero .motion-beat.beat-two,
  .home-page > .motion-hero .motion-beat.beat-three{left:clamp(24px,4.2vw,64px);right:auto;top:clamp(96px,14vh,140px);bottom:auto;width:auto;max-width:min(31%,500px);text-align:left}
  .home-page > .motion-hero .motion-beat.beat-two p{margin-left:0}
  .home-page > .motion-hero .motion-beat h1,
  .home-page > .motion-hero .motion-beat h2{font-size:clamp(30px,3.15vw,50px);line-height:.98;letter-spacing:-.05em}
  .home-page > .motion-hero .motion-beat p{font-size:clamp(14px,1.08vw,17px);line-height:1.42;margin-top:12px;max-width:100%}
  .home-page > .motion-hero .motion-beat .eyebrow{font-size:10px;letter-spacing:.17em;margin-bottom:10px}
  .home-page > .motion-hero .motion-beat .button-row{margin-top:16px}
  .home-page > .motion-hero .motion-beat .eyebrow,
  .home-page > .motion-hero .motion-beat h1,
  .home-page > .motion-hero .motion-beat h2,
  .home-page > .motion-hero .motion-beat p{text-shadow:0 2px 18px rgba(38,28,18,.32),0 1px 3px rgba(38,28,18,.2)}
}
/* 1.1.565 — Celular: hero más bajo (4:3) para que el video muestre la cuna, el carrito y la mecedora completos
   (video de celular 800 × 600 recortado del de escritorio); el texto se reduce para quedarse sobre el muro,
   arriba a la izquierda, sin tapar los cuadros ni la cuna. */
@media (max-width: 767px){
  .home-page > .motion-hero{--decen-hero-full-height:calc(clamp(320px, calc(100vw - 38px), 460px) * .75)}
  .home-page > .motion-hero .motion-beat,
  .home-page > .motion-hero .motion-beat.beat-two,
  .home-page > .motion-hero .motion-beat.beat-three{inset:12px auto auto 13px;max-width:37%}
  .home-page > .motion-hero .motion-beat h1,
  .home-page > .motion-hero .motion-beat h2{font-size:clamp(15px,4.3vw,19px);line-height:1;letter-spacing:-.04em}
  .home-page > .motion-hero .motion-beat p{font-size:clamp(8px,2.3vw,10px);line-height:1.28;margin-top:4px}
  .home-page > .motion-hero .motion-beat .eyebrow{font-size:6.5px;letter-spacing:.14em;margin-bottom:4px}
  .home-page > .motion-hero .motion-beat .button-row{margin-top:6px}
  .home-page > .motion-hero .motion-hero-cta{right:10px;bottom:10px;min-height:30px;padding:7px 12px;font-size:10px}
}
