/* Portada animada de TIME BANK: logo + nombre en lugar del fondo de Framer.
   Sólo vive en el inicio. Colores y letra de la marca: naranja #FF3300, negro,
   blanco cálido #FFFAF5; nombre en Inter Bold con -3 % entre letras (como el logo). */

@property --tb-giro { syntax: '<angle>'; inherits: false; initial-value: 360deg; }

/* Mientras la portada nueva llega, la de Framer queda en negro (sin el fondo naranja). */
html[data-tb-inicio] section.framer-9g1nw7[data-framer-name="Section_Hero"] { background: #000; }
html[data-tb-inicio] section.framer-9g1nw7[data-framer-name="Section_Hero"] > [data-framer-name="Image"] { display: none !important; }
/* Lo de los lados de la portada, más chico y discreto para darle el centro al nombre y al logo
   (sólo computadora y tableta; en celular ya caben bien). */
@media (min-width: 810px) {
  html[data-tb-inicio] section.framer-9g1nw7 [data-framer-name="text-left-wrapper"] p.framer-text {
    --framer-font-size: clamp(17px, 1.45vw, 24px) !important;
    opacity: .86;
  }
  html[data-tb-inicio] section.framer-9g1nw7 [data-framer-name="project-wrapper"] {
    scale: .62; transform-origin: 100% 100% !important;
  }
  html[data-tb-inicio] section.framer-9g1nw7 [data-framer-name="text-left-wrapper"] [data-framer-name="Button"] {
    scale: .86; transform-origin: 0 100% !important;
  }
}
/* El «TIME BANK®» chico de la barra se esconde en el inicio: el nombre gigante ya está ahí.
   Con el menú del celular abierto («Mobile-Open») sí se ve. */
html[data-tb-inicio] header:is([data-framer-name="Desktop"], [data-framer-name="Tablet"], [data-framer-name="Mobile-Closed"]) [data-framer-name$="Logo-Hero"] {
  visibility: hidden;
}

.tb-portada {
  --tb-naranja: #FF3300;
  --tb-crema: #FFFAF5;
  --tb-t: 1;                         /* multiplica los tiempos (en celular, más corto) */
  --tb-fs: 180px;                    /* tamaño del nombre; lo ajusta portada.js */
  --tb-zona-ini: 160px;              /* debajo de la barra de arriba */
  --tb-zona-alto: 310px;             /* hasta donde empiezan tu texto y tu tarjeta */
  --tb-logo: 1.32em;
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden; pointer-events: none;
  background: #000; color: var(--tb-crema);
  font-family: "Inter", "Inter Placeholder", system-ui, -apple-system, sans-serif;
}
/* Fondo: seda naranja ligera (dos capas que sólo se deslizan; se pintan una vez). */
.tb-seda { position: absolute; inset: -8% -14%; z-index: 0; will-change: transform, opacity; opacity: .92; }
.tb-seda svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tb-seda-1 { animation: tb-deriva-1 15s ease-in-out infinite alternate; }
.tb-seda-2 { opacity: .85; animation: tb-deriva-2 11s ease-in-out infinite alternate, tb-respira 6.5s ease-in-out infinite alternate; }
@keyframes tb-deriva-1 { from { transform: translate3d(-6%, 1%, 0) scale(1.02); } to { transform: translate3d(5%, -2%, 0) scale(1.07); } }
@keyframes tb-deriva-2 { from { transform: translate3d(8%, 1.5%, 0); } to { transform: translate3d(-8%, -1.5%, 0); } }
@keyframes tb-respira { from { opacity: .55; } to { opacity: 1; } }
/* Reflejo de luz que cruza la seda en diagonal cada pocos segundos. */
.tb-reflejo {
  position: absolute; z-index: 0; top: -10%; bottom: -10%; left: -100%; width: 300%;
  background: linear-gradient(59deg, rgba(255, 120, 70, 0) 47.5%, rgba(255, 120, 70, .26) 50%, rgba(255, 120, 70, 0) 52.5%);
  will-change: transform;
  animation: tb-reflejo 8s cubic-bezier(.45, 0, .55, 1) calc(var(--tb-t) * 2.6s) infinite backwards;
}
@keyframes tb-reflejo { 0% { transform: translate3d(-36%, 0, 0); } 65%, 100% { transform: translate3d(36%, 0, 0); } }
/* Sombra suave detrás del nombre para que se lea bien sobre la seda. */
.tb-portada::after {
  content: ""; position: absolute; z-index: 1;
  left: var(--tb-cx, 50%); top: var(--tb-cy, 35%);
  width: min(160vw, 2000px); height: min(80vh, 720px);
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(0, 0, 0, .64), rgba(0, 0, 0, .3) 55%, rgba(0, 0, 0, 0));
}
/* Resplandor naranja detrás del logo (centro lo ajusta portada.js). */
.tb-portada::before {
  content: ""; position: absolute; z-index: 2;
  left: var(--tb-cx, 50%); top: var(--tb-cy, 35%);
  width: min(120vw, 1500px); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 51, 0, .26), rgba(255, 51, 0, .09) 50%, rgba(255, 51, 0, 0) 78%);
}

.tb-escena {
  position: absolute; z-index: 3; left: 0; right: 0;
  top: var(--tb-zona-ini); height: var(--tb-zona-alto);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: calc(var(--tb-fs) * .14);
}
.tb-fila {
  position: relative;
  /* El título completo (de la T a la K) va centrado; el logo queda entre las dos palabras y el ® cuelga arriba. */
  display: flex; align-items: center; justify-content: center;
  font-size: var(--tb-fs); line-height: 1; font-weight: 700;
  letter-spacing: -.03em; font-kerning: none; white-space: nowrap;
}
.tb-palabra {
  position: relative; z-index: 1; display: inline-block;
  top: .05em;
  clip-path: inset(-.6em -.6em 0 -.2em);   /* las letras suben desde abajo de esta línea */
}
.tb-l { display: inline-block; }
.tb-time { justify-self: end; }
.tb-bank { justify-self: start; }
.tb-r {
  position: absolute; left: 100%; top: .02em; margin-left: .03em;
  font-size: .3em; font-weight: 600; letter-spacing: -.06em; line-height: 1;
}
/* Copia naranja del nombre que se ilumina cuando pasa la línea. */
.tb-palabra::after {
  content: attr(data-texto); position: absolute; left: 0; top: 0;
  color: var(--tb-naranja); opacity: 0;
  -webkit-mask-image: linear-gradient(100deg, transparent 38%, #000 50%, transparent 62%);
          mask-image: linear-gradient(100deg, transparent 38%, #000 50%, transparent 62%);
  -webkit-mask-size: 260% 100%; mask-size: 260% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: 130% 0; mask-position: 130% 0;
}
.tb-logo {
  position: relative; z-index: 2; flex: none;
  width: var(--tb-logo); height: var(--tb-logo);
  margin: 0 .07em;
}
.tb-logo svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
/* Las manecillas giran sobre el centro del reloj (558.4, 581.9 en el dibujo). */
.tb-mano { transform-box: view-box; transform-origin: 558.4px 581.9px; }
.tb-segundero { opacity: 0; transition: opacity .5s ease-out; }
.tb-vivo .tb-segundero { opacity: .95; }
.tb-corona { transform-box: view-box; }

/* Línea delgada naranja que cruza detrás del nombre. */
.tb-linea {
  position: absolute; z-index: 0; top: -22%; height: 144%; width: max(2px, .018em);
  left: -4%; opacity: 0;
  background: linear-gradient(to bottom, rgba(255, 51, 0, 0), var(--tb-naranja) 28% 72%, rgba(255, 51, 0, 0));
  transform: rotate(14deg);
  box-shadow: 0 0 .12em rgba(255, 51, 0, .7);
}

.tb-lema {
  margin: 0; font-weight: 500;
  font-size: clamp(13px, calc(var(--tb-fs) * .115), 23px);
  letter-spacing: -.01em; line-height: 1.35; text-align: center; text-wrap: balance;
  color: rgba(255, 250, 245, .7);
}

/* ---------- Apilada (celular y tableta vertical): logo arriba, nombre abajo ----------
   portada.js pone la clase tb-apilado cuando el hueco es más alto que ancho. */
@media (max-width: 809.98px) { .tb-portada { --tb-t: .82; } }
.tb-apilado .tb-fila { display: grid; grid-template-columns: auto auto; column-gap: .26em; row-gap: calc(var(--tb-fs) * .28); }
.tb-apilado .tb-logo { grid-row: 1; grid-column: 1 / -1; justify-self: center; width: var(--tb-logo-px, 150px); height: var(--tb-logo-px, 150px); margin: 0; }
.tb-apilado .tb-palabra { top: 0; }
.tb-apilado .tb-time { grid-row: 2; grid-column: 1; justify-self: end; }
.tb-apilado .tb-bank { grid-row: 2; grid-column: 2; justify-self: start; }
.tb-apilado .tb-lema { max-width: 17em; }

/* ---------- La animación de entrada ---------- */
.tb-intro .tb-seda svg { animation: tb-aparece calc(var(--tb-t) * 2s) ease-out calc(var(--tb-t) * .2s) both; }
.tb-portada.tb-intro::before { animation: tb-aparece calc(var(--tb-t) * 1.4s) ease-out both; }
.tb-intro .tb-reloj {
  -webkit-mask-image: conic-gradient(from 0deg at 51.67% 53.79%, #000 var(--tb-giro), transparent calc(var(--tb-giro) + .5deg));
          mask-image: conic-gradient(from 0deg at 51.67% 53.79%, #000 var(--tb-giro), transparent calc(var(--tb-giro) + .5deg));
  animation: tb-dibuja calc(var(--tb-t) * .95s) cubic-bezier(.45, 0, .25, 1) calc(var(--tb-t) * .1s) both;
}
.tb-intro .tb-raya-arriba { animation: tb-raya calc(var(--tb-t) * .45s) cubic-bezier(.2, .7, .2, 1) calc(var(--tb-t) * (.55s + var(--i) * .06s)) both; }
.tb-intro .tb-flecha-cuerpo { animation: tb-flecha calc(var(--tb-t) * .6s) cubic-bezier(.2, .7, .2, 1) calc(var(--tb-t) * .7s) both; }
.tb-intro .tb-corona { animation: tb-clic calc(var(--tb-t) * .26s) ease-in-out calc(var(--tb-t) * 1.12s) both; }
.tb-intro .tb-l { animation: tb-sube calc(var(--tb-t) * .75s) cubic-bezier(.2, .7, .2, 1) calc(var(--tb-t) * (.32s + var(--i) * .07s)) both; }
.tb-intro .tb-r { animation: tb-aparece calc(var(--tb-t) * .5s) ease-out calc(var(--tb-t) * 1s) both; }
.tb-intro .tb-linea { animation: tb-cruza calc(var(--tb-t) * 1.05s) cubic-bezier(.45, 0, .25, 1) calc(var(--tb-t) * 1.55s) both; }
.tb-intro .tb-palabra::after { opacity: 1; animation: tb-brillo calc(var(--tb-t) * .6s) linear calc(var(--tb-t) * 1.62s) both; }
.tb-intro .tb-bank::after { animation-delay: calc(var(--tb-t) * 2.02s); }
.tb-intro .tb-lema { animation: tb-lema calc(var(--tb-t) * .7s) cubic-bezier(.2, .7, .2, 1) calc(var(--tb-t) * 1.9s) both; }

@keyframes tb-aparece { from { opacity: 0; } to { opacity: 1; } }
@keyframes tb-dibuja { from { --tb-giro: 0deg; } to { --tb-giro: 360deg; } }
@keyframes tb-raya { from { opacity: 0; transform: translate(-70px, -45px); } to { opacity: 1; transform: none; } }
@keyframes tb-flecha {
  from { opacity: 0; transform: translate(-90px, -90px); clip-path: inset(0 100% 100% 0); }
  30% { opacity: 1; }
  to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
}
@keyframes tb-clic { 0%, 100% { transform: none; } 45% { transform: translateY(24px); } }
@keyframes tb-sube { from { transform: translateY(115%); } to { transform: none; } }
@keyframes tb-cruza { 0% { left: -4%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { left: 104%; opacity: 0; } }
@keyframes tb-brillo { from { -webkit-mask-position: 130% 0; mask-position: 130% 0; } to { -webkit-mask-position: -30% 0; mask-position: -30% 0; } }
@keyframes tb-lema { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Si la persona tiene apagadas las animaciones: la portada ya terminada, quieta. */
@media (prefers-reduced-motion: reduce) {
  .tb-portada *, .tb-portada::before, .tb-portada *::after {
    animation: none !important; transition: none !important;
  }
  .tb-reloj { -webkit-mask-image: none !important; mask-image: none !important; }
  .tb-segundero, .tb-reflejo { display: none; }
}
