/* Escenas ligadas al desplazamiento y detalles de interacción. */
.hero-sequence { position: relative; }
.hero-takeover { display: none; }
.features-sticky { position: relative; }
.feature-counter { display: none; }
.motion-ribbon { overflow: clip; background: var(--umami-orange); color: var(--umami-green-deep); padding: 22px 0; }
.motion-ribbon > div { width: max-content; display: flex; transform: translateX(var(--ribbon-travel, 0px)); }
.motion-ribbon span { display: flex; align-items: center; gap: 30px; padding-right: 30px; font: 950 clamp(25px, 3.4vw, 55px)/1 var(--umami-font-display); letter-spacing: -.045em; white-space: nowrap; }
.motion-ribbon .ribbon-mark { display: block; flex: 0 0 auto; width: clamp(40px, 4vw, 56px); height: clamp(40px, 4vw, 56px); object-fit: contain; }
.umi-greeting { position: absolute; z-index: 5; top: 11%; left: 0; max-width: min(320px, calc(100% - 24px)); padding: 12px 18px; border: 1.5px solid var(--umami-green); border-radius: 22px; background: var(--umami-cream); color: var(--umami-green); transform: rotate(-6deg); font: 850 14px/1.45 var(--umami-font-ui); text-align: left; box-shadow: 3px 3px 0 var(--umami-green); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.umi-greeting span { padding-left: 10px; }
.umi-greeting:hover { background: var(--umami-green); color: var(--umami-cream); }
.umi-confetti { pointer-events: none; position: absolute; z-index: 6; left: 50%; top: 35%; width: 10px; height: 16px; background: var(--confetti-color); border-radius: 2px; animation: confetti .85s var(--confetti-delay) cubic-bezier(.12,.6,.3,1) both; }
.umi-confetti:nth-of-type(even) { border-radius: 50%; width: 12px; height: 12px; }
@keyframes confetti { 0% { opacity: 0; transform: translate(0, 0) scale(.4); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--confetti-x), var(--confetti-y)) rotate(var(--confetti-turn)); } }

@media (prefers-reduced-motion: no-preference) {
  .motion-enabled .hero-umi { animation: none; transform: translate(var(--pointer-x, 0px), var(--pointer-y, 0px)) rotate(-5deg); transition: transform .2s ease-out; }
  .motion-enabled .hello-stamp { animation: none; transform: rotate(-6deg); }
  .motion-enabled .underlined path { stroke-dasharray: var(--path-length); animation: underline-in 1.3s .35s cubic-bezier(.2,.8,.2,1) both; }
  @keyframes underline-in { from { stroke-dashoffset: var(--path-length); } to { stroke-dashoffset: 0; } }
  .motion-enabled .hero-copy { animation: hero-copy-in .9s cubic-bezier(.2,.8,.2,1) backwards; }
  @keyframes hero-copy-in { from { opacity: 0; translate: 0 35px; } to { opacity: 1; translate: 0 0; } }
  .motion-enabled .magnetic-button { translate: var(--magnet-x, 0px) var(--magnet-y, 0px); transition: translate .18s ease-out, background .2s, color .2s, box-shadow .2s; }
  .motion-enabled .magnetic-button > span:last-child { display: inline-block; transition: transform .25s cubic-bezier(.2,.8,.2,1); }
  .motion-enabled .magnetic-button:hover > span:last-child { transform: translate(3px, -3px) rotate(10deg); }
  .motion-enabled .chapter-links a { transition: padding .3s, color .2s; }
  .motion-enabled .chapter-links a:hover { padding-left: 20px; }
  .motion-ready.reveal-ready .line-reveal { opacity: 1; transform: none; transition: none; }
  .motion-line { display: inline-block; overflow: clip; padding: .06em .07em .13em .02em; margin: -.06em -.07em -.13em -.02em; vertical-align: top; }
  .motion-line > span { display: inline-block; transform: translateY(115%) rotate(3deg); transition: transform .9s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--line-index) * 90ms); transform-origin: 0 100%; }
  .is-visible .motion-line > span { transform: translateY(0) rotate(0); }
  .motion-enabled .feature-panel:not([hidden]) .feature-copy { animation: feature-copy-in .55s cubic-bezier(.2,.8,.2,1) both; }
  .motion-enabled:not(.feature-story) .feature-panel:not([hidden]) .feature-visual { animation: visual-in .6s cubic-bezier(.2,.8,.2,1) both; }
  @keyframes feature-copy-in { from { opacity: 0; transform: translateY(25px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes visual-in { from { clip-path: inset(0 0 100% 0 round 30%); } to { clip-path: inset(0 0 0 0 round 0); } }
  .motion-enabled .feature-visual > img { translate: var(--pointer-x, 0px) var(--pointer-y, 0px); transition: translate .2s ease-out; }
  .motion-enabled .focus-frame { animation: focus-camera 3s ease-in-out infinite; }
  @keyframes focus-camera { 0%, 100% { transform: rotate(-7deg) scale(1); opacity: .8; } 50% { transform: rotate(-4deg) scale(.94); opacity: 1; } }
  .motion-enabled .umi-portrait > img { transform: translate(var(--pointer-x, 0px), calc(var(--umi-rise, 0px) + var(--pointer-y, 0px))) rotate(var(--umi-turn, 0deg)); transform-origin: 50% 85%; transition: transform .2s ease-out; }
  .motion-enabled .umi-portrait .portrait-shape { transform: rotate(var(--umi-shape-turn, 9deg)); }
  .motion-enabled .umi-portrait.is-waving > img { animation: umi-wave .85s cubic-bezier(.2,.8,.2,1); }
  @keyframes umi-wave { 0%,100% { rotate: 0deg; scale: 1; } 25% { rotate: -9deg; scale: 1.06; } 50% { rotate: 7deg; scale: 1.04; } 75% { rotate: -4deg; scale: 1.02; } }
  .motion-enabled .hand-arrow path { transition: stroke-dashoffset .1s linear; }
  .motion-enabled .footer-wordmark { transform: translateY(var(--wordmark-y, 0px)) rotate(var(--wordmark-turn, 0deg)); transform-origin: 50% 100%; }
  .motion-enabled .menu-dialog[open] { animation: menu-in .4s cubic-bezier(.2,.8,.2,1) both; }
  .motion-enabled .menu-dialog[open] nav a { animation: menu-link-in .5s cubic-bezier(.2,.8,.2,1) both; }
  .motion-enabled .menu-dialog[open] nav a:nth-child(2) { animation-delay: 60ms; }
  .motion-enabled .menu-dialog[open] nav a:nth-child(3) { animation-delay: 120ms; }
  .motion-enabled .menu-dialog[open] nav a:nth-child(4) { animation-delay: 180ms; }
  @keyframes menu-in { from { opacity: 0; transform: translateY(-35px) rotate(-3deg) scale(.96); } to { opacity: 1; transform: translateY(0) rotate(0) scale(1); } }
  @keyframes menu-link-in { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }

  .hero-story .hero-sequence { height: 210svh; }
  .hero-story .hero { position: sticky; top: 0; max-width: none; width: 100%; height: 100svh; min-height: 0; padding: clamp(140px, 14vh, 190px) max(6.5vw, calc((100vw - 1566px) / 2)) 100px; }
  .hero-story .hero-copy { opacity: var(--hero-copy-opacity, 1); transform: translateY(var(--hero-copy-y, 0px)); }
  .hero-story .hero-copy h1 { font-size: clamp(78px, min(8.8vw, 13.8vh), 155px); }
  .hero-story .hero-art { top: 125px; right: max(0px, calc((100vw - 1566px) / 2 - 80px)); height: calc(100% - 220px); width: min(52%, 800px); }
  .hero-story .hero-description { margin-top: 28px; font-size: clamp(14px, 1.2vw, 19px); }
  .hero-story .hero-takeover { display: block; position: absolute; inset: 0; z-index: 4; pointer-events: none; background: var(--umami-yellow); clip-path: ellipse(var(--portal-size, 0%) var(--portal-size, 0%) at 76% 52%); overflow: clip; }
  .takeover-title { position: absolute; top: 50%; left: max(6.5vw, calc((100vw - 1566px) / 2)); width: min(54%, 900px); transform: translateY(-50%); z-index: 2; font: 950 clamp(64px, min(8vw, 14vh), 150px)/.98 var(--umami-font-display); letter-spacing: -.065em; }
  .takeover-title > span { display: block; opacity: var(--portal-copy, 0); transform: translateY(calc((1 - var(--portal-copy, 0)) * 100px)); }
  .takeover-title > span:nth-child(2) { translate: calc((1 - var(--portal-copy, 0)) * 60px) 0; }
  .takeover-title > span:nth-child(3) { translate: calc((1 - var(--portal-copy, 0)) * 120px) 0; }
  .hero-takeover > img { position: absolute; height: 82%; width: min(46%, 780px); max-width: none; right: max(4%, calc((100vw - 1566px) / 2)); bottom: 6%; object-fit: contain; transform: rotate(var(--portal-image-turn, -10deg)) scale(var(--portal-image-scale, .82)); }
  .takeover-orbit { position: absolute; width: 60vw; height: 60vw; max-height: 120vh; right: -10%; top: -15%; border: 1px solid var(--umami-olive-deep); border-radius: 50%; }
  .takeover-note { position: absolute; left: max(6.5vw, calc((100vw - 1566px) / 2)); bottom: 6%; font-size: 10px; font-weight: 850; letter-spacing: .08em; opacity: var(--portal-copy, 0); }

  .feature-story .features { padding: 0; height: 360svh; background: var(--umami-cream); }
  .feature-story .features-sticky { position: sticky; top: 0; height: 100svh; padding: 120px max(6.5vw, calc((100vw - 1566px) / 2)) 30px; overflow: clip; }
  .feature-story .features .section-label { position: relative; z-index: 6; }
  .feature-story .features .section-heading { position: absolute; margin: 0; left: max(6.5vw, calc((100vw - 1566px) / 2)); right: 6.5%; top: 30%; display: block; transform: translateY(var(--feature-travel, 0px)); }
  .feature-story .features .section-heading h2 { font-size: clamp(54px, 5.5vw, 98px); }
  .feature-story .features .section-heading > p { margin-top: 35px; max-width: 250px; font-size: 14px; }
  .feature-story .feature-tabs { position: absolute; z-index: 7; bottom: 28px; left: max(6.5vw, calc((100vw - 1566px) / 2)); right: max(6.5vw, calc((100vw - 1566px) / 2)); background: var(--umami-cream); border-radius: 99px; }
  .feature-story .feature-tabs button { font-size: 17px; padding: 17px 22px; }
  .feature-story .feature-stage { position: absolute; z-index: 4; right: max(5vw, calc((100vw - 1566px) / 2)); top: 22%; width: min(58%, 1020px); height: 62%; max-height: 620px; min-height: 410px; perspective: 1000px; }
  .feature-story .feature-panel { position: absolute; inset: 0; width: 100%; min-height: 0; border: 1.5px solid var(--umami-green); border-radius: 24px; background: var(--umami-cream); box-shadow: 0 12px 35px color-mix(in srgb, var(--umami-brown) 14%, transparent); grid-template-columns: .85fr 1fr; transform: translateY(var(--card-y, 120vh)) rotate(var(--card-turn, 0deg)) scale(var(--card-scale, 1)); visibility: var(--card-visible, hidden); transform-origin: 50% 100%; will-change: transform; }
  .feature-story .feature-panel:nth-child(1) { z-index: 1; }
  .feature-story .feature-panel:nth-child(2) { z-index: 2; }
  .feature-story .feature-panel:nth-child(3) { z-index: 3; }
  .feature-story .feature-panel .feature-copy { padding: clamp(20px, 2.5vw, 44px); animation: none; }
  .feature-story .feature-copy h3 { font-size: clamp(27px, 2.8vw, 48px); margin: 16px 0 18px; }
  .feature-story .feature-copy > p:not(.development-note) { font-size: clamp(12px, 1vw, 15px); line-height: 1.65; }
  .feature-story .feature-list { font-size: clamp(11px, .8vw, 13px); margin: 18px 0; }
  .feature-story .feature-list li { padding-top: 8px; padding-bottom: 8px; }
  .feature-story .development-note { font-size: 9px; }
  .feature-story .feature-visual { height: auto; }
  .feature-story .visual-tag { font-size: 7px; bottom: 15px; }
  .feature-story .pantry-art { width: 80%; }
  .feature-story .pantry-art > div { font-size: clamp(12px, 1vw, 18px); padding: 16px 13px; }
  .feature-story .pantry-art svg { width: 29px; height: 29px; }
  .feature-story .feature-counter { display: flex; align-items: center; gap: 15px; position: absolute; bottom: 15%; left: max(6.5vw, calc((100vw - 1566px) / 2)); font: 850 14px var(--umami-font-ui); }
  .feature-counter-current { font-size: 38px; letter-spacing: -.07em; }
  .feature-counter-line { width: 70px; height: 1px; background: var(--umami-green); }
}
@media (min-width: 1000px) and (min-height: 700px) and (max-height: 800px) and (prefers-reduced-motion: no-preference) {
  .hero-story .hero { padding-top: 112px; }
  .hero-story .eyebrow { margin-bottom: 22px; }
  .hero-story .hero-copy h1 { font-size: clamp(64px, min(8.8vw, 11.4vh), 110px); }
  .hero-story .hero-description { margin-top: 20px; }
  .hero-story .hero-copy .button { padding-top: 14px; padding-bottom: 14px; }
}
@media (max-width: 760px) {
  .motion-ribbon { padding: 18px 0; }
  .motion-ribbon span { gap: 20px; padding-right: 20px; }
  .umi-greeting { top: 12%; left: 2%; font-size: 12px; padding: 11px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-takeover, .feature-counter { display: none; }
  .motion-ribbon > div { transform: none; }
  .motion-line { display: contents; }
  .motion-line > span { display: inline; }
  .umi-confetti { display: none; }
}
