/* ============================================================
   TOKENIZACIÓN · 01-hero  (#inicio)  — prefijo tkh
   Torre de bloques de oro en WebGL (js/pages/tokenizacion/hero.js) con respaldo en imagen / video.
   Escritorio: texto a la izquierda (≤ 44 %), torre a la derecha saliendo de cuadro abajo,
   franja inferior con los tres «Cero…». Celular: torre arriba (≈ 48svh), texto abajo.
   ============================================================ */
#inicio.tkh{--tkh-stage:100%;position:relative;display:flex;flex-direction:column;min-height:100vh;min-height:100svh;overflow:clip;isolation:isolate;
  background:var(--ink);color:var(--cream);touch-action:pan-y}

/* ---------- Escenario: imagen · video · canvas ---------- */
#inicio .tkh__stage{position:absolute;inset:0;z-index:0;overflow:hidden;background:
  radial-gradient(60% 70% at 70% 62%,rgba(216,166,70,.16) 0%,rgba(167,121,39,.06) 38%,rgba(5,9,15,0) 70%),var(--ink)}
/* el lienzo no termina en una línea dura: se funde a tinta en el 15 % inferior */
@media (min-width:900px){
  #inicio .tkh__stage{-webkit-mask-image:linear-gradient(180deg,#000 88%,rgba(0,0,0,0) 100%);mask-image:linear-gradient(180deg,#000 88%,rgba(0,0,0,0) 100%)}
}
#inicio .tkh__stage picture{display:contents}
#inicio .tkh__img,#inicio .tkh__video{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:cover;object-position:62% 50%;
  user-select:none;-webkit-user-drag:none;pointer-events:none;color:transparent;font-size:0}
#inicio .tkh__img{transition:opacity 1.2s var(--ease),visibility 0s linear 0s}
#inicio .tkh__video{opacity:0;transition:opacity 1.4s var(--ease)}
#inicio.tkh--video .tkh__video{opacity:1}
#inicio .tkh__gl{position:absolute;inset:0;opacity:0;transition:opacity .6s ease;touch-action:pan-y}
#inicio .tkh__gl canvas{position:absolute;inset:0;width:100%!important;height:100%!important;display:block;touch-action:pan-y}
#inicio.tkh--gl .tkh__gl{opacity:1}
/* la foto se funde rápido (la torre se ensambla sobre el escenario ya vacío) */
#inicio.tkh--gl .tkh__img,#inicio.tkh--gl .tkh__video{opacity:0;visibility:hidden;transition:opacity .7s var(--ease),visibility 0s linear .8s}
/* Ambiente (solo escritorio, solo con WebGL): el mismo póster, desenfocado y en penumbra, sin la torre
   (franja enmascarada): árboles, bruma y reflejos quedan detrás de la torre WebGL */
#inicio .tkh__amb{position:absolute;inset:-12px;opacity:0;pointer-events:none;display:none}
@media (min-width:900px){
  #inicio .tkh__amb{display:block;transition:opacity 1.4s var(--ease) .2s;
    -webkit-mask-image:linear-gradient(90deg,#000 0%,#000 55%,rgba(0,0,0,.18) 62%,rgba(0,0,0,.12) 90%,#000 98%);
    mask-image:linear-gradient(90deg,#000 0%,#000 55%,rgba(0,0,0,.18) 62%,rgba(0,0,0,.12) 90%,#000 98%);
    filter:blur(3px) brightness(.78) saturate(.95)}
  #inicio.tkh--gl .tkh__amb{opacity:1;background:url(../../../assets/img/gen/tokenizacion-edificio-fracciones.webp) 62% 50%/cover no-repeat}
  /* bruma dorada baja tras la torre */
  #inicio.tkh--gl .tkh__amb:after{content:"";position:absolute;inset:0;
    background:radial-gradient(42% 30% at 76% 92%,rgba(216,166,70,.22),rgba(216,166,70,0) 70%),radial-gradient(30% 55% at 76% 48%,rgba(244,213,138,.08),rgba(5,9,15,0) 70%)}
}

/* Velo del menú: en escritorio acompaña al scroll (JS) para que la torre nunca brille detrás del menú translúcido */
#inicio .tkh__veil{position:absolute;left:0;right:0;top:0;height:calc(var(--nav-h) + 120px);pointer-events:none;will-change:transform;
  background:linear-gradient(180deg,rgba(5,9,15,.94) 0,rgba(5,9,15,.66) var(--nav-h),rgba(5,9,15,0) 100%)}
/* Velos: lectura del texto (izquierda) y franja (abajo) */
#inicio .tkh__shade{position:absolute;inset:0;pointer-events:none;
  background:
    linear-gradient(0deg,rgba(5,9,15,.92) 0%,rgba(5,9,15,.55) 7%,rgba(5,9,15,.12) 16%,rgba(5,9,15,0) 24%),
    linear-gradient(90deg,rgba(5,9,15,.95) 0%,rgba(5,9,15,.82) 30%,rgba(5,9,15,.4) 46%,rgba(5,9,15,0) 58%)}

/* ---------- Rejilla de contenido ---------- */
#inicio .tkh__grid{position:relative;z-index:2;flex:1 1 auto;display:grid;pointer-events:none;
  grid-template-columns:max-content minmax(0,1fr);grid-template-rows:auto auto auto;
  grid-template-areas:"copy copy" "ceros ceros" "cta scroll";align-content:center;
  padding-top:calc(var(--nav-h) + clamp(18px,3vh,40px));padding-bottom:clamp(30px,5vh,56px)}
#inicio .tkh__grid>*{pointer-events:auto}
#inicio .tkh__copy{grid-area:copy;align-self:end;max-width:min(44vw,780px)}
#inicio .tkh__cta{grid-area:cta}
#inicio .tkh__ceros{grid-area:ceros}
#inicio .tkh__scroll{grid-area:scroll}

/* ---------- Logotipo dorado FITAL con un brillo que lo recorre una vez ---------- */
#inicio .tkh__logo{--sw:-160%;position:relative;display:block;width:120px;aspect-ratio:3048/1016;margin:0 0 clamp(18px,2.6vh,28px);
  filter:drop-shadow(0 10px 28px rgba(216,166,70,.22)) drop-shadow(0 1px 2px rgba(5,9,15,.6))}
#inicio .tkh__logo-m{position:absolute;inset:0;overflow:hidden;display:block;
  -webkit-mask:url(../../../assets/img/brand/fital-logo-mask.svg) center/100% 100% no-repeat;mask:url(../../../assets/img/brand/fital-logo-mask.svg) center/100% 100% no-repeat;
  background:linear-gradient(104deg,#8a6122 0%,#b0843a 12%,#cfa450 24%,#f3dca0 33%,#d9b160 41%,#b0843a 52%,#c79c4c 64%,#ecd08c 74%,#f9e9bb 79%,#d4ad60 87%,#a87c31 100%)}
#inicio .tkh__logo-m:after{content:"";position:absolute;top:-30%;bottom:-30%;left:0;width:34%;transform:translateX(var(--sw)) skewX(-20deg);
  background:linear-gradient(90deg,rgba(255,252,238,0) 0%,rgba(255,252,238,.3) 30%,rgba(255,253,244,.95) 50%,rgba(255,252,238,.3) 70%,rgba(255,252,238,0) 100%)}
#inicio.tkh--shine .tkh__logo-m:after{animation:tkh-shine 1.6s cubic-bezier(.65,0,.35,1) 1 both}
@keyframes tkh-shine{from{transform:translateX(-160%) skewX(-20deg)}to{transform:translateX(420%) skewX(-20deg)}}

/* ---------- Texto ---------- */
#inicio .tkh__eyebrow{margin:0 0 clamp(16px,2.4vh,26px)}
#inicio .tkh__title{font-size:clamp(2.6rem,min(4.6vw,8.6svh),5.4rem);line-height:1;letter-spacing:-.032em;text-wrap:balance}
#inicio .tkh__title .tn-line{padding-bottom:.08em;margin-bottom:-.08em}
#inicio .tkh__ln{font-style:normal}
/* «Tokeniza tu activo:» se llena de oro de izquierda a derecha (JS anima --f; sin JS queda lleno) */
#inicio .tkh__fill{--f:100%;font-style:italic;font-weight:500;letter-spacing:-.02em;padding-right:.08em;color:transparent;
  background-image:linear-gradient(100deg,#C9A050 0%,#F4D58A 32%,#E0B661 55%,#F7E2A8 72%,#C9A050 100%),linear-gradient(rgba(243,234,219,.2),rgba(243,234,219,.2));
  background-size:var(--f) 100%,100% 100%;background-repeat:no-repeat;
  -webkit-background-clip:text;background-clip:text;-webkit-box-decoration-break:clone;box-decoration-break:clone}

/* ---------- Los tres «Cero…»: franja con hilos finos, continuación de los dos puntos ---------- */
#inicio .tkh__ceros{list-style:none;margin:clamp(22px,3.4vh,36px) 0 0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:clamp(18px,2.4vw,40px);max-width:min(52vw,780px)}
#inicio .tkh__cero{--l:1;position:relative;display:flex;align-items:baseline;gap:14px;min-width:0;padding-top:clamp(14px,2vh,20px)}
#inicio .tkh__cero:before{content:"";position:absolute;left:0;right:0;top:0;height:1px;transform:scaleX(var(--l));transform-origin:0 50%;
  background:linear-gradient(90deg,rgba(244,213,138,.8) 0%,rgba(216,166,70,.36) 40%,rgba(243,234,219,.12) 100%)}
#inicio .tkh__cero-n{flex:none;font-size:.78rem;letter-spacing:.14em;color:var(--gold-2)}
#inicio .tkh__cero-t{font:500 clamp(1.02rem,1.25vw,1.22rem)/1.3 var(--sans);color:var(--cream);text-wrap:balance}
#inicio .tkh__cero-t em{font:italic 500 1.24em/1 var(--serif);letter-spacing:-.01em;padding-right:.06em}

/* ---------- Llamada a la acción ---------- */
#inicio .tkh__cta{margin:clamp(26px,4.2vh,44px) 0 0;display:flex;align-self:end}
#inicio .tkh__cta .btn{min-height:56px;padding-inline:1.9em;font-size:1rem}
#inicio .tkh__cta .tkh__wa{width:20px;height:20px}
#inicio .tkh__cta .btn:hover .tkh__wa{transform:none}

/* ---------- Pista «Desliza» ---------- */
#inicio .tkh__scroll{align-self:end;justify-self:start;display:inline-flex;align-items:center;gap:12px;min-height:48px;margin:0 0 4px clamp(20px,2.4vw,40px);padding:0 0 0 4px;border:0;background:none;cursor:pointer;
  font:600 .74rem/1 var(--sans);letter-spacing:.28em;text-transform:uppercase;color:var(--cream-2);transition:color .4s,opacity .6s var(--ease)}
#inicio .tkh__scroll:hover{color:var(--gold-2)}
#inicio .tkh__scroll-a{display:grid;place-items:center;width:46px;height:46px;border-radius:50%;border:1px solid var(--hair);background:rgba(5,9,15,.42);color:var(--gold-2)}
#inicio .tkh__scroll-a svg{width:18px;height:18px;animation:tkh-nudge 2.4s var(--ease-io) infinite}
@keyframes tkh-nudge{0%,100%{transform:translateY(-3px)}50%{transform:translateY(4px)}}
#inicio.tkh--scrolled .tkh__scroll{opacity:0;pointer-events:none}
html.no-js #inicio .tkh__scroll{display:none}
html.reduce #inicio .tkh__scroll-a svg{animation:none}

/* ---------- Escritorio ---------- */
/* Pantallas anchas pero bajas (1280×720 y similares) */
@media (min-width:900px) and (max-height:780px){
  #inicio .tkh__grid{padding-top:calc(var(--nav-h) + 8px)}
  #inicio .tkh__logo{width:100px;margin-bottom:14px}
  #inicio .tkh__eyebrow{margin-bottom:14px}
  #inicio .tkh__title{font-size:clamp(2.4rem,min(4.2vw,8.4svh),4.6rem)}
  #inicio .tkh__ceros{margin-top:24px}
  #inicio .tkh__cta{margin-top:22px}
  #inicio .tkh__cta .btn{min-height:52px}
}

/* ---------- Celular y tableta vertical: torre arriba, texto abajo ---------- */
@media (max-width:899px){
  #inicio.tkh{--tkh-stage:max(48svh,300px)}
  #inicio .tkh__stage{bottom:auto;height:calc(var(--tkh-stage) + 64px);background:
    radial-gradient(70% 60% at 50% 60%,rgba(216,166,70,.16) 0%,rgba(167,121,39,.05) 45%,rgba(5,9,15,0) 75%),var(--ink)}
  /* foto/video del respaldo: la azotea del edificio queda bajo el menú, nunca tapada por él */
  #inicio .tkh__img,#inicio .tkh__video{top:calc(var(--nav-h) - 6px);height:calc(100% - var(--nav-h) + 6px);object-position:50% 0}
  #inicio .tkh__veil{height:calc(var(--nav-h) + 60px);background:linear-gradient(180deg,rgba(5,9,15,.8) 0,rgba(5,9,15,.25) calc(var(--nav-h) + 10px),rgba(5,9,15,0) 100%)}
  #inicio .tkh__shade{background:
    linear-gradient(0deg,rgba(5,9,15,1) 0,rgba(5,9,15,.92) 64px,rgba(5,9,15,.45) 120px,rgba(5,9,15,0) 190px)}
  #inicio .tkh__grid{grid-template-columns:minmax(0,1fr);grid-template-rows:auto;grid-template-areas:"copy" "ceros" "cta";align-content:start;
    padding-top:calc(var(--tkh-stage) - 6px);padding-bottom:22px}
  #inicio .tkh__copy{max-width:none;align-self:start}
  /* el logotipo dorado ya está en el menú: en celular no se repite en el mismo pantallazo */
  #inicio .tkh__logo{display:none}
  #inicio .tkh__eyebrow{margin-bottom:14px;font-size:.78rem;letter-spacing:.24em}
  #inicio .tkh__title{font-size:clamp(2.05rem,9.4vw,3.6rem);line-height:1.02}
  #inicio .tkh__ceros{grid-template-columns:1fr;gap:0;max-width:none;margin-top:14px}
  #inicio .tkh__cero{align-items:center;min-height:40px;padding:7px 0;gap:16px}
  #inicio .tkh__cero:last-child:after{content:"";position:absolute;left:0;right:0;bottom:0;height:1px;background:var(--line)}
  #inicio .tkh__cero-t{font-size:1.04rem}
  #inicio .tkh__cta{margin-top:16px}
  #inicio .tkh__cta .btn{width:100%;min-height:54px}
  /* Pista «Desliza»: riel vertical en el margen derecho, junto a la base de la torre (no tapa la torre ni el texto) */
  #inicio .tkh__scroll{position:absolute;right:var(--gut);top:calc(var(--tkh-stage) - 14px);z-index:3;grid-area:auto;transform:translateY(-100%);margin:0;
    flex-direction:column;gap:10px;width:44px;padding:0;font-size:.8125rem;letter-spacing:.18em;color:var(--cream)}
  /* respaldo sin WebGL: el póster/video de celular (otro edificio, cielo azul) se tiñe a tinta y oro */
  #inicio .tkh__img,#inicio .tkh__video{filter:sepia(.62) saturate(1.3) hue-rotate(-10deg) brightness(.74) contrast(1.08)}
  #inicio .tkh__stage:before{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
    background:linear-gradient(180deg,rgba(5,9,15,.55) 0%,rgba(5,9,15,0) 38%),radial-gradient(80% 50% at 50% 70%,rgba(216,166,70,.14),rgba(216,166,70,0) 70%)}
  #inicio.tkh--gl .tkh__stage:before{opacity:0}
  #inicio .tkh__scroll-t{writing-mode:vertical-rl;text-shadow:0 1px 8px rgba(5,9,15,.9)}
  #inicio .tkh__scroll-a{width:44px;height:44px;background:rgba(5,9,15,.6)}
}
/* Celular bajo (360×640 y similares): torre algo más baja y «Cero…» compactos para que el botón quede en el primer pantallazo */
@media (max-width:899px) and (max-height:700px){
  #inicio.tkh{--tkh-stage:max(44svh,262px)}
  #inicio .tkh__eyebrow{margin-bottom:10px}
  #inicio .tkh__title{font-size:clamp(1.95rem,8.8vw,2.6rem)}
  #inicio .tkh__ceros{margin-top:12px}
  #inicio .tkh__cero{min-height:32px;padding:4px 0;gap:14px}
  #inicio .tkh__cero-t{font-size:1rem}
  #inicio .tkh__cta{margin-top:14px}
  #inicio .tkh__grid{padding-bottom:18px}
}
/* Tableta vertical */
@media (min-width:600px) and (max-width:899px){
  #inicio .tkh__copy{max-width:640px}
  #inicio .tkh__ceros{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
  #inicio .tkh__cero{min-height:0;align-items:baseline;padding-top:14px}
  #inicio .tkh__cero:last-child:after{display:none}
  #inicio .tkh__cta .btn{width:auto;min-width:300px}
}
/* Tableta vertical alta (820×1180, iPad): la torre crece para que no quede un hueco vacío bajo el botón */
@media (min-width:600px) and (max-width:899px) and (min-height:960px){
  #inicio.tkh{--tkh-stage:max(60svh,300px)}
}
/* Celular en horizontal: texto arriba sobre la torre con velo lateral */
@media (max-width:899px) and (max-height:500px) and (orientation:landscape){
  #inicio.tkh{--tkh-stage:0px}
  #inicio .tkh__stage{inset:0;height:auto}
  #inicio .tkh__img,#inicio .tkh__video{object-position:50% 40%}
  #inicio .tkh__shade{background:
    linear-gradient(180deg,rgba(5,9,15,.7) 0%,rgba(5,9,15,0) 26%),
    linear-gradient(90deg,rgba(5,9,15,.94) 0%,rgba(5,9,15,.8) 46%,rgba(5,9,15,.2) 70%,rgba(5,9,15,0) 84%)}
  #inicio .tkh__grid{padding-top:calc(var(--nav-h) + 8px)}
  #inicio .tkh__copy,#inicio .tkh__ceros,#inicio .tkh__cta{max-width:58vw}
  #inicio .tkh__title{font-size:clamp(1.8rem,8vh,2.4rem)}
  #inicio .tkh__scroll{display:none}
}

/* ---------- Táctil: fundido cruzado suave entre foto y torre ---------- */
@media (pointer:coarse){
  #inicio .tkh__gl{transition:opacity 1.2s ease}
}
