/* bhambo fx — estilos de soporte de las animaciones (no cambian el diseño en reposo) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

/* lienzos de fondo */
.bh-fx-host { position: relative; overflow: hidden; isolation: isolate; }
.bh-fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.bh-fx-host > *:not(.bh-fx-canvas) { position: relative; z-index: 1; }

/* foco de luz tenue que sigue al cursor en secciones oscuras */
.bh-spot::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: var(--bh-so, 0); transition: opacity .5s;
  background: radial-gradient(560px circle at var(--bh-mx, 50%) var(--bh-my, 50%), rgba(143,191,168,.08), transparent 65%); }
.bh-spot { position: relative; }

/* titulares: palabras que suben desde una máscara */
.bh-w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.bh-w > span { display: inline-block; will-change: transform; }

/* terminal */
.bh-caret { display: inline-block; width: .5em; height: 1.05em; margin-left: 2px; vertical-align: -.16em; background: rgba(214,178,124,.8); animation: bh-blink 1s steps(1) infinite; }
@keyframes bh-blink { 50% { opacity: 0; } }

/* logo: LED que respira */
.bh-logo svg { height: 34px; width: auto; display: block; }
.bh-led { animation: bh-led 3.6s ease-in-out infinite; }
@keyframes bh-led { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@media (max-width: 921px) { .bh-logo svg { height: 28px; } }

/* Cómo trabajamos: diagrama + paso activo */
.bh-method-svg { width: 100%; max-width: 480px; height: auto; max-height: 52vh; margin-top: 1.5rem; overflow: visible; }
.bh-method-svg text { font-family: 'IBM Plex Mono', monospace; }
html.bh-fx .bh-step { opacity: .3; transition: opacity .5s; }
html.bh-fx .bh-step.bh-step-on { opacity: 1; }
.bh-flow { stroke-dasharray: 2 6 !important; stroke-dashoffset: 0; animation: bh-flow 1.1s linear infinite; }
@keyframes bh-flow { to { stroke-dashoffset: -8; } }

@media (prefers-reduced-motion: reduce) {
  html.bh-fx-static .bh-caret, html.bh-fx-static .bh-led, html.bh-fx-static .bh-flow { animation: none; }
}

/* ---------- v2: formas y color ---------- */
/* capas: decoración detrás, contenido delante */
.bh-layer { position: relative; isolation: isolate; }
.bh-layer > :not(.bh-deco) { position: relative; z-index: 1; }
.bh-deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; }

/* borde superior curvo: la sección sube sobre la anterior y una máscara recorta la curva (se ve el fondo real de la anterior) */
.bh-curved { --bh-ch: clamp(38px, 5.5vw, 84px); margin-top: calc(-1 * var(--bh-ch)) !important;
  -webkit-mask: var(--bh-cmask) 0 0 / 100% var(--bh-ch) no-repeat, linear-gradient(#000 0 0) 0 calc(var(--bh-ch) - 1px) / 100% calc(100% - var(--bh-ch) + 1px) no-repeat;
          mask: var(--bh-cmask) 0 0 / 100% var(--bh-ch) no-repeat, linear-gradient(#000 0 0) 0 calc(var(--bh-ch) - 1px) / 100% calc(100% - var(--bh-ch) + 1px) no-repeat; }

/* manchas de color: degradados orgánicos que derivan despacio */
.bh-blobs { overflow: hidden; }
.bh-blobs i { position: absolute; border-radius: 50%; will-change: transform; }
.bh-blobs i:nth-child(1) { width: 62vw; height: 48vw; left: -18vw; top: -22%; }
.bh-blobs i:nth-child(2) { width: 54vw; height: 44vw; right: -16vw; bottom: -28%; }
.bh-blobs i:nth-child(3) { width: 34vw; height: 28vw; left: 42%; top: 30%; }
.bh-blobs.is-d i:nth-child(1) { background: radial-gradient(closest-side, rgba(63,122,100,.30), rgba(63,122,100,0)); }
.bh-blobs.is-d i:nth-child(2) { background: radial-gradient(closest-side, rgba(40,74,88,.38), rgba(40,74,88,0)); }
.bh-blobs.is-d i:nth-child(3) { background: radial-gradient(closest-side, rgba(232,163,61,.07), rgba(232,163,61,0)); }
.bh-blobs.is-l i:nth-child(1) { background: radial-gradient(closest-side, rgba(143,191,168,.30), rgba(143,191,168,0)); }
.bh-blobs.is-l i:nth-child(2) { background: radial-gradient(closest-side, rgba(232,190,120,.24), rgba(232,190,120,0)); }
.bh-blobs.is-l i:nth-child(3) { background: radial-gradient(closest-side, rgba(255,255,255,.45), rgba(255,255,255,0)); }
.bh-blobs.is-a i:nth-child(1) { background: radial-gradient(closest-side, rgba(255,226,170,.55), rgba(255,226,170,0)); }
.bh-blobs.is-a i:nth-child(2) { background: radial-gradient(closest-side, rgba(196,112,34,.30), rgba(196,112,34,0)); }
html.bh-fx .bh-blobs i:nth-child(1) { animation: bh-drift 26s ease-in-out infinite alternate; }
html.bh-fx .bh-blobs i:nth-child(2) { animation: bh-drift 32s ease-in-out -9s infinite alternate-reverse; }
html.bh-fx .bh-blobs i:nth-child(3) { animation: bh-drift 21s ease-in-out -4s infinite alternate; }
@keyframes bh-drift { 0% { transform: translate(0, 0) scale(1) rotate(0deg); } 100% { transform: translate(7vw, 5vw) scale(1.18) rotate(24deg); } }

/* marca grande sobre el titular */
.bh-hero-mark { height: 150px; margin-bottom: -.5rem; }
.bh-hero-mark svg { height: 100%; width: auto; display: block; overflow: visible; }
.bh-hero-mark circle { transform-box: fill-box; transform-origin: center; }
.bh-hero-mark .bh-halo.bh-led { animation: bh-halo 3.6s ease-in-out infinite; }
.bh-act { animation: bh-act 2.9s steps(1) infinite; }
.bh-hero-mark circle.bh-act:nth-of-type(n+5) { animation-duration: 3.7s; animation-delay: -1.3s; }
@keyframes bh-halo { 0%, 100% { opacity: .28; } 50% { opacity: .08; } }
@keyframes bh-act { 0%, 100% { opacity: 1; } 31% { opacity: .35; } 34% { opacity: 1; } 71% { opacity: .4; } 73% { opacity: 1; } 76% { opacity: .45; } 78% { opacity: 1; } }
@media (max-width: 921px) { .bh-hero-mark { height: 86px; } }

/* hilo de partículas (lienzo fijo, no captura el ratón) */
.bh-morph { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 40; }
.bh-slot { width: 100%; height: 240px; }

@media (prefers-reduced-motion: reduce) {
  html.bh-fx-static .bh-act, html.bh-fx-static .bh-halo { animation: none; }
}
.bh-blobs { -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
/* variante: curva en el borde inferior (cuando la sección siguiente va fijada con pin) */
.bh-curved-b { --bh-ch: clamp(38px, 5.5vw, 84px); margin-bottom: calc(-1 * var(--bh-ch)) !important; z-index: 2;
  -webkit-mask: linear-gradient(#000 0 0) 0 0 / 100% calc(100% - var(--bh-ch) + 1px) no-repeat, var(--bh-cmask-b) 0 100% / 100% var(--bh-ch) no-repeat;
          mask: linear-gradient(#000 0 0) 0 0 / 100% calc(100% - var(--bh-ch) + 1px) no-repeat, var(--bh-cmask-b) 0 100% / 100% var(--bh-ch) no-repeat; }
/* curva arriba y abajo a la vez: tres capas (curva, cuerpo, curva) */
.bh-curved.bh-curved-b { --bh-mid: calc(100% - 2 * var(--bh-ch) + 2px);
  -webkit-mask: var(--bh-cmask) 0 0 / 100% var(--bh-ch) no-repeat, linear-gradient(#000 0 0) 0 calc(var(--bh-ch) - 1px) / 100% var(--bh-mid) no-repeat, var(--bh-cmask-b) 0 100% / 100% var(--bh-ch) no-repeat;
          mask: var(--bh-cmask) 0 0 / 100% var(--bh-ch) no-repeat, linear-gradient(#000 0 0) 0 calc(var(--bh-ch) - 1px) / 100% var(--bh-mid) no-repeat, var(--bh-cmask-b) 0 100% / 100% var(--bh-ch) no-repeat; }

/* Cómo trabajamos: indicador de fase */
.bh-phase { grid-column: 1 / -1; margin: 0 0 .5rem; font-family: 'IBM Plex Mono', monospace; color: #3F7A64; max-width: 480px; }
.bh-phase-t { display: flex; align-items: baseline; gap: .15rem; margin: 0 0 .6rem; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.bh-phase-t b { font-size: 1.6rem; font-weight: 500; letter-spacing: 0; color: #0F1714; font-family: 'Fraunces', serif; }
.bh-phase-t span { opacity: .6; }
.bh-phase-t em { font-style: normal; margin-left: .9rem; color: #0F1714; }
.bh-phase-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bh-phase-bar i { height: 3px; border-radius: 3px; background: rgba(15,23,20,.12); position: relative; overflow: hidden; }
.bh-phase-bar i::after { content: ""; position: absolute; inset: 0; background: #3F7A64; border-radius: 3px; transform: scaleX(0); transform-origin: left; transition: transform .9s cubic-bezier(.2,.8,.2,1); }
.bh-phase-bar i.on::after { transform: scaleX(1); }
.bh-phase-hint { margin: .5rem 0 0; font-size: .95rem; color: #3F7A64; animation: bh-hint 1.6s ease-in-out infinite; transition: opacity .4s; }
.bh-phase-end .bh-phase-hint { opacity: 0; }
@keyframes bh-hint { 0%, 100% { transform: translateY(0); opacity: .9; } 50% { transform: translateY(5px); opacity: .4; } }
/* paso activo: se enciende con un trazo que crece */
html.bh-fx .bh-step { position: relative; transition: opacity .5s, transform .6s cubic-bezier(.2,.8,.2,1); }
html.bh-fx .bh-step::before { content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 100%; background: #3F7A64; transform: scaleX(0); transform-origin: left; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
html.bh-fx .bh-method .bh-step.bh-step-on { transform: translateY(-4px); }
html.bh-fx .bh-method .bh-step.bh-step-on::before { transform: scaleX(1); }

/* escenario 3D (lienzo fijo, no captura el ratón) */
.bh-stage { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 40; }
