/* TIB · Panel
   Sistema visual según CLAUDE.md y _panel-diseno/referencias/ (medidas tomadas a 390 px). */

/* ---------- Tipografías (servidas desde el sitio; solo caracteres latinos) ---------- */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(assets/fonts/dm-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo Black';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/archivo-black-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Variables ---------- */
:root {
  /* Paleta */
  --marfil: #f6f5ef;
  --negro: #1a1a18;
  --rojo: #7a0000;
  --rojo-luz: #c9443a;
  --rosa-luz: #e48f7b;
  --gris-oscuro: #262522;
  --gris-calido: #a8a193;

  /* Texto */
  --texto: var(--marfil);
  --texto-2: rgba(246, 245, 239, 0.6);

  /* Tipografía */
  --fuente: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fuente-marca: 'Archivo Black', var(--fuente);

  /* Superficies de vidrio oscuro */
  --vidrio-fondo: linear-gradient(180deg, rgba(38, 37, 34, 0.62), rgba(26, 26, 24, 0.72));
  --vidrio-blur: blur(22px) saturate(1.3);
  --vidrio-borde: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  --sombra-tarjeta: 0 24px 40px -28px rgba(0, 0, 0, 0.8);

  /* Radios */
  --r-tarjeta: 26px;
  --r-placa: 30px;
  --r-placa-grande: 36px;
  --r-pildora: 999px;

  /* Layout */
  --ancho-panel: 420px;
  --margen: 20px;
  --dock-alto: 52px;
  --dock-abajo: calc(22px + env(safe-area-inset-bottom, 0px));

  /* Movimiento */
  --ease-salida: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  /* Fondo estático parecido al shader: se ve mientras arranca y si no hay WebGL acelerado */
  background:
    radial-gradient(60% 45% at 85% 12%, rgba(246, 245, 239, 0.16), rgba(246, 245, 239, 0) 70%),
    radial-gradient(70% 50% at 8% 70%, rgba(179, 175, 163, 0.10), rgba(179, 175, 163, 0) 70%),
    var(--negro);
  background-attachment: fixed;
  color: var(--texto);
  font-family: var(--fuente);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
}

a { color: inherit; text-decoration: none; }
img, svg, video, canvas { display: block; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--marfil);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Fondo: shader Mesh drift + velo de lectura ---------- */
.fondo {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0;
  transition: opacity .8s ease;
}
.fondo.listo { opacity: 1; }

/* Mismo oscurecido que la referencia: arriba suave, abajo más denso para leer las tarjetas */
.fondo-velo {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(26, 26, 24, 0.7) 0%,
    rgba(26, 26, 24, 0) 15%,
    rgba(26, 26, 24, 0) 17%,
    rgba(26, 26, 24, 0.75) 42%,
    rgba(26, 26, 24, 0.9) 100%);
}

/* ---------- Columna del panel ---------- */
.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--ancho-panel);
  /* svh = alto visible con las barras del navegador a la vista: Inicio entra sin scroll.
     Alto fijo (no mínimo) para que la grilla se ajuste; en pantallas muy chicas el contenido
     desborda y la página se puede desplazar. */
  height: 100vh;
  height: 100svh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding:
    calc(26px + env(safe-area-inset-top, 0px))
    var(--margen)
    calc(16px + env(safe-area-inset-bottom, 0px));
}

/* ---------- Dock fijo ---------- */
.dock {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: var(--dock-abajo);
  transform: translateX(-50%);
  width: min(calc(100% - 2 * var(--margen)), calc(var(--ancho-panel) - 2 * var(--margen)));
  display: flex;
  gap: 8px;
  /* Oculto en Inicio; aparece cuando hay una hoja abierta */
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 16px);
  transition: opacity .3s ease, transform .4s var(--ease-salida), visibility 0s linear .4s;
}
html.hoja-abierta .dock {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%);
  transition: opacity .35s ease .1s, transform .5s var(--ease-salida) .1s, visibility 0s;
}

.dock-btn {
  height: var(--dock-alto);
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pildora);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform .25s ease;
}

.dock-btn-principal {
  flex: 1.2;
  gap: 8px;
  background: var(--marfil);
  color: var(--negro);
  box-shadow: 0 18px 34px -14px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(26, 26, 24, 0.1);
}

.dock-btn-secundario {
  flex: 1;
  gap: 7px;
  background: rgba(38, 37, 34, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  color: var(--marfil);
  box-shadow: 0 18px 34px -14px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(246, 245, 239, 0.16);
}

@media (hover: hover) {
  .dock-btn:hover { transform: translateY(-2px); }
}
.dock-btn:active { transform: scale(.97); }

/* Pantallas muy angostas (≤ 340 px): que los textos del dock entren */
@media (max-width: 340px) {
  .dock-btn { font-size: 14px; }
  .dock-btn-principal svg { display: none; }
}

/* =========================================================
   INICIO
   ========================================================= */

/* Entrada escalonada (referencia: tib-up 1s) */
@keyframes tib-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
/* "backwards" (no "both") para que, al terminar, el :active de las tarjetas pueda escalar */
.up { animation: tib-up 1s var(--ease-salida) backwards; animation-delay: var(--d, 0s); }

/* ---------- Cabecera: logo + acciones ---------- */
.inicio {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;   /* en pantallas altas (escritorio) el conjunto queda centrado */
  container-type: inline-size;
}
.cabecera {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.acciones {
  align-self: stretch;
  margin-top: 22px;
  display: flex;
  gap: 8px;
}

/* ---------- Grilla de tarjetas ---------- */
.grilla {
  flex: 1 1 auto;
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(140px, 252fr) minmax(92px, 104fr) minmax(92px, 104fr);
  gap: 10px;
  min-height: 0;            /* deja que la grilla se achique hasta los mínimos de las filas */
  max-height: calc((100cqw - 10px) / 2 * 460 / 170 + 20px);
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 0;
  border-radius: var(--r-tarjeta);
  overflow: hidden;
  text-align: left;
  color: var(--marfil);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--sombra-tarjeta);
  transition: transform .25s var(--ease-salida);
}
.tile:active { transform: scale(.97); }
.tile:focus-visible { outline-offset: 2px; }

/* El alto de cada tarjeta lo da la fila de la grilla */
.tile-ancha { grid-column: 1 / -1; }

.tile-vidrio {
  background: var(--vidrio-fondo);
  -webkit-backdrop-filter: var(--vidrio-blur);
  backdrop-filter: var(--vidrio-blur);
  box-shadow: var(--vidrio-borde), var(--sombra-tarjeta);
}

/* Texto inferior común */
.tile-texto {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 0 16px 15px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tile-titulo {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.tile-titulo-justo {
  font-size: 16.5px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.tile-sub {
  font-size: 13px;
  line-height: 1.25;
  color: var(--texto-2);
}

/* Flecha arriba a la derecha */
.tile-flecha {
  position: absolute;
  z-index: 3;
  right: 14px;
  top: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--marfil);
  background: rgba(246, 245, 239, 0.12);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* Marca de agua: B espejada */
.marca-b {
  position: absolute;
  -webkit-mask: url(assets/b-mark.png) 0 0 / contain no-repeat;
  mask: url(assets/b-mark.png) 0 0 / contain no-repeat;
  pointer-events: none;
}

/* ---------- Trabajos: pila de capturas ---------- */
.trabajos-luz {
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 60% at 50% 30%, rgba(246, 245, 239, 0.10), rgba(246, 245, 239, 0) 70%);
}

/* La pila se mide con la tarjeta (container size): a 252 px de alto queda como la referencia
   (138 × 89 a 62 px del borde); si la tarjeta es más baja, se achica para no pisar el texto */
.tile-trabajos { container-type: size; }
.pila {
  position: absolute;
  left: 50%;
  top: 24.6cqh;        /* 62 / 252 */
  width: min(calc(100cqw - 32px), calc((52cqh - 24px) * 138 / 89));
  aspect-ratio: 138 / 89;
  transform: translateX(-50%);
}

@keyframes stk {
  0%, 20%  { transform: none; opacity: 1; z-index: 4; }
  25%      { transform: translate(-14px, -30px) rotate(-8deg) scale(.82); opacity: 0; z-index: 1; }
  45%      { transform: translate(-14px, -30px) rotate(-8deg) scale(.82); opacity: 0; z-index: 1; }
  50%, 70% { transform: translate(-10px, -22px) rotate(-6deg) scale(.86); opacity: .55; z-index: 2; }
  75%, 95% { transform: translate(10px, -12px) rotate(5deg) scale(.93); opacity: .85; z-index: 3; }
  100%     { transform: none; opacity: 1; z-index: 4; }
}
.pila-item {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 18px 30px -12px rgba(0, 0, 0, 0.85);
  transform-origin: 50% 100%;
  animation: stk 12s cubic-bezier(.4, 0, .2, 1) infinite;
  animation-delay: var(--sd, 0s);
}
.pila-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Por qué funciona: tarjeta roja ---------- */
.tile-roja {
  background: #3a0503;
}
.roja-fondo {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #8e0f0a 0%, #5c0606 45%, #2a0302 100%);
}
.roja-luz {
  position: absolute;
  left: -30px;
  top: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(closest-side, rgba(232, 96, 74, 0.55), rgba(232, 96, 74, 0));
}
.roja-b {
  right: -22px;
  top: -18px;
  width: 104px;
  height: 108px;
  background: rgba(255, 255, 255, 0.05);
}
.roja-borde {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.tile-roja { container-type: size; }
.roja-num {
  position: relative;
  z-index: 2;
  margin: clamp(12px, 20.6cqh, 52px) 0 0 16px;   /* 52 px a 252 de alto, como la referencia */
  display: flex;
  align-items: baseline;
  font-size: clamp(38px, min(22.2cqh, 33cqw), 56px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
}
.roja-tilde {
  font-size: 0.54em;
  font-weight: 400;
  margin-right: 3px;
  color: rgba(255, 255, 255, 0.7);
}
.roja-pct {
  font-size: 0.57em;
  font-weight: 500;
}

.barras {
  position: relative;
  z-index: 2;
  margin: clamp(8px, 7cqh, 18px) 16px 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.6);
}
/* Tarjeta roja muy baja (pantallas chicas como el iPhone SE): sin mini barras, así entran
   el número y el texto completos */
@container (max-height: 200px) {
  .barras { display: none; }
}
.barra {
  display: flex;
  align-items: center;
  gap: 8px;
}
.barra-label { width: 36px; flex: none; }
.barra-ahora .barra-label { color: #fff; }
.barra-pista { flex: 1; display: flex; }
.barra-antes,
.barra-nueva {
  height: 4px;
  border-radius: 2px;
}
.barra-antes { width: 100%; background: rgba(255, 255, 255, 0.28); }
.barra-nueva { width: 11%; background: #fff; box-shadow: 0 0 8px rgba(255, 255, 255, 0.8); }

/* ---------- Qué hacemos ---------- */
.etiquetas {
  position: relative;
  z-index: 2;
  margin: 16px 0 0 16px;
  display: flex;
  gap: 6px;
}
.etiquetas span {
  height: 24px;
  padding: 0 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  box-shadow: inset 0 0 0 1px rgba(246, 245, 239, 0.18);
  font-size: 12px;
  font-weight: 500;
  color: rgba(246, 245, 239, 0.85);
}

/* ---------- Nosotros: T y B espejada ---------- */
.iniciales {
  position: relative;
  z-index: 2;
  margin: 16px 0 0 16px;
  display: flex;
}
.iniciales span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(170deg, #ffffff, #d8d1c1);
  box-shadow: 0 0 0 2px var(--gris-oscuro);
  font-family: var(--fuente-marca);
  font-size: 14px;
  color: var(--negro);
}
.iniciales span + span { margin-left: -8px; }
.b-espejada { transform: scaleX(-1); }

/* ---------- Cómo trabajamos: 4 pasos ---------- */
.pasos {
  position: relative;
  z-index: 2;
  margin: 24px 58px 0 16px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pasos i {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(246, 245, 239, 0.4);
}
.pasos .paso-activo {
  background: var(--marfil);
  box-shadow: inset 0 0 0 1.5px rgba(246, 245, 239, 0.95);
}
.pasos b {
  flex: 1;
  height: 1.5px;
  background: rgba(246, 245, 239, 0.22);
}

/* =========================================================
   HOJAS (bottom sheets)
   ========================================================= */

.hojas-velo {
  position: fixed;
  inset: 0;
  z-index: 14;
  background: rgba(10, 10, 9, 0.55);
  opacity: 0;
  visibility: hidden;
  touch-action: none;
  transition: opacity .3s ease, visibility 0s linear .3s;
}
.hojas-velo.visible {
  opacity: 1;
  visibility: visible;
  transition: opacity .35s ease, visibility 0s;
}

.hoja {
  position: fixed;
  z-index: 15;
  top: calc(56px + env(safe-area-inset-top, 0px));
  bottom: 0;
  left: 0;
  right: 0;
  width: min(100%, var(--ancho-panel));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border-radius: 28px 28px 0 0;
  background: #1f1e1c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 -20px 40px -20px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  outline: none;
  /* Cerrada: abajo, fuera de pantalla e invisible (pero ya calculada, sin trabajo al abrir) */
  visibility: hidden;
  transform: translate3d(0, 105%, 0);
  transition: transform .34s cubic-bezier(.4, 0, .2, 1), visibility 0s linear .34s;
}
/* Abierta: la curva rápida al empezar y suave al llegar de las hojas de iOS */
.hoja.abierta {
  visibility: visible;
  transform: translate3d(0, 0, 0);
  transition: transform .5s cubic-bezier(.32, .72, 0, 1), visibility 0s;
}

/* Zona de agarre: barrita + X. Se puede arrastrar para cerrar. */
.hoja-agarre {
  position: relative;
  flex: none;
  height: 34px;
  display: flex;
  justify-content: center;
  z-index: 1;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: grab;
}
.hoja-agarre:active { cursor: grabbing; }
.hoja-barrita {
  margin-top: 8px;
  width: 38px;
  height: 5px;
  border-radius: 3px;
  background: rgba(246, 245, 239, 0.3);
}
.hoja-cerrar {
  position: absolute;
  right: 16px;
  top: 14px;
  z-index: 2;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(246, 245, 239, 0.12);
  color: var(--marfil);
  cursor: pointer;
}
@media (hover: hover) {
  .hoja-cerrar:hover { background: rgba(246, 245, 239, 0.18); }
}

/* Contenido con scroll interno solo si hace falta; abajo deja lugar para el dock */
.hoja-cuerpo {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(246, 245, 239, 0.2) transparent;
  overflow-x: hidden; /* el halo de las placas se recorta en los bordes, como en la referencia */
  position: relative;
  z-index: 1;
  padding: 10px 20px calc(var(--dock-abajo) + var(--dock-alto) + 28px);
}

.hoja-titulo {
  margin: 0;
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-weight: 600;
}
/* Etiqueta de sección con degradado gris cálido (referencias 02 y 03) */
.hoja-eyebrow {
  align-self: flex-start;
  display: inline-block;
  padding-bottom: 0.06em;
  font-size: 17px;
  letter-spacing: -0.015em;
  line-height: 1.1;
  background-image: linear-gradient(176deg, #ffffff 0%, #f1ede1 24%, #a8a193 47%, #6f695e 56%, #d8d2c2 74%, #f6f5ef 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.hoja-frase {
  font-size: min(33px, 8.5vw);
  line-height: 1.07;
  letter-spacing: -0.032em;
  color: var(--marfil);
}

/* Hoja con el fondo animado propio (referencia 02) */
.hoja-con-fondo { background: var(--negro); }
.hoja-shader {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hoja-shader-velo {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 334px;
  pointer-events: none;
  background: linear-gradient(180deg, #1a1a18 0%, rgba(26, 26, 24, 0.92) 40%, rgba(26, 26, 24, 0) 100%);
}

/* =========================================================
   HOJA · POR QUÉ FUNCIONA (placas de datos)
   ========================================================= */
.placas {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.placa {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-placa);
  box-shadow: 0 30px 56px -34px rgba(0, 0, 0, 0.75);
  color: #fff;
  -webkit-user-select: none;
  user-select: none;
}
.placa > :not(.placa-canvas):not(.placa-borde) { position: relative; }
.placa-canvas { position: absolute; left: 0; top: 0; pointer-events: none; }
.placa-borde {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  pointer-events: none;
}
/* Color base mientras se calcula el fondo de cada placa */
.placa-a { background: #3d3c38; padding: 28px 28px 22px; }
.placa-b { background: #a3150e; padding: 30px 28px 13px; border-radius: var(--r-placa-grande); box-shadow: 0 40px 70px -40px rgba(0, 0, 0, 0.75); }
.placa-c { background: #5c0a0a; padding: 28px 28px 6px; }

/* --- Placa 90 % --- */
.placa-cap {
  margin-left: 2px;
  font-size: 15px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.72);
}
.placa-num {
  margin-top: 6px;
  display: flex;
  align-items: baseline;
  font-size: min(100px, 25.6vw);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.05em;
  white-space: nowrap;
}
.placa-tilde {
  font-size: 0.5em;
  font-weight: 400;
  margin-right: 6px;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.7);
}
.placa-digitos {
  position: relative;
  display: inline-block;
  font-variant-numeric: tabular-nums;
}
.placa-digitos-molde { visibility: hidden; }
.placa-digitos [data-placa-digitos] { position: absolute; right: 0; top: 0; }
.placa-pct {
  font-size: 0.58em;
  font-weight: 500;
  margin-left: 2px;
  letter-spacing: -1px;
}
.placa-menos {
  margin: 10px 0 0 2px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.015em;
}

/* Zona del gráfico Antes/Ahora: el canvas dibuja columnas y curva; acá van los textos */
.comparar {
  margin-top: 25px;
  height: 224px;
}
.comparar-dato,
.comparar-eje {
  position: absolute;
  left: var(--x);
  transform: translateX(-50%);
  white-space: nowrap;
  text-align: center;
}
.comparar-dato { font-size: 14px; font-weight: 600; line-height: 16px; }
.comparar-eje { top: 205px; font-size: 13px; line-height: 15px; color: rgba(255, 255, 255, 0.7); }

.placa-nota {
  margin: 12px 2px 0;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.5);
}

/* --- Placas chicas: título en dos tonos --- */
.placa-titulo {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.028em;
  color: rgba(255, 255, 255, 0.58);
}
.placa-titulo span { color: #fff; }

/* De 3 pasos a 1 */
.flujo {
  margin-top: 65px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.flujo-pasos { display: flex; gap: 10px; }
.flujo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.flujo-icono {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.92);
}
.flujo-label {
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.65);
}
.flujo-flecha {
  flex: 1;
  min-width: 24px;
  height: 44px;
  position: relative;
}
.flujo-flecha::before {
  content: "";
  position: absolute;
  left: 0;
  right: 1px;
  top: 21.35px;
  height: 1.3px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.4);
}
.flujo-flecha::after {
  content: "";
  position: absolute;
  right: 1px;
  top: 17.5px;
  width: 7px;
  height: 7px;
  border-top: 1.3px solid rgba(255, 255, 255, 0.4);
  border-right: 1.3px solid rgba(255, 255, 255, 0.4);
  transform: rotate(45deg);
  transform-origin: 100% 0;
}
.flujo-pildora {
  width: 86px;
  height: 44px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--marfil);
  color: var(--negro);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  box-shadow: 0 10px 22px -12px rgba(0, 0, 0, 0.7);
}

/* Cargás una vez */
.hub-pildora {
  align-self: flex-start;
  margin-top: 15px;
  height: 32px;
  padding: 0 14px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  background: var(--marfil);
  color: var(--negro);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.hub-flecha {
  margin: 8px 0 0 26px;
  height: 24px;
}
.hub-grilla {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 0;
}
.hub-item {
  min-height: 72px;
  border-radius: 18px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  line-height: 1.15;
}
.hub-item span { color: #fff; }

/* =========================================================
   HOJA · TRABAJOS (carrusel de videos)
   ========================================================= */
.hoja-lisa { background: var(--negro); }

.hoja-bajada {
  margin: 14px 0 0;
  padding: 0 8px;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--texto-2);
}

/* Ancho de cada tarjeta: 286 px a 390 de pantalla, proporcional hasta el ancho máximo del panel */
.webs {
  --web-ancho: calc(min(100vw, var(--ancho-panel)) * 0.7333);
  position: relative;
  margin: 28px -20px 0;
  padding: 0 28px 4px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 28px;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.webs::-webkit-scrollbar { display: none; }
.webs:focus-visible { outline-offset: -2px; }

.web {
  margin: 0;
  flex: none;
  width: var(--web-ancho);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.web-video {
  position: relative;
  aspect-ratio: 286 / 358;
  border-radius: 28px;
  overflow: hidden;
  background: var(--gris-oscuro);
  box-shadow: 0 30px 50px -32px rgba(0, 0, 0, 0.8);
}
.web-video::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.web-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.web figcaption {
  padding: 0 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.web-nombre {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--marfil);
}
.web-desc {
  font-size: 14px;
  letter-spacing: -0.005em;
  color: rgba(246, 245, 239, 0.55);
}
.webs-fin { flex: none; width: 16px; }

.webs-puntos {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.webs-puntos span {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgba(246, 245, 239, 0.28);
  transition: width .3s ease, background .3s ease;
}
.webs-puntos span.activo {
  width: 18px;
  background: rgba(246, 245, 239, 0.9);
}

/* =========================================================
   HOJAS · QUÉ HACEMOS, NOSOTROS, CÓMO TRABAJAMOS
   ========================================================= */

/* Placa de vidrio dentro de una hoja */
.servicio,
.pago {
  border-radius: var(--r-placa);
  background: linear-gradient(180deg, rgba(246, 245, 239, 0.055), rgba(246, 245, 239, 0.025));
  box-shadow: var(--vidrio-borde), 0 24px 40px -30px rgba(0, 0, 0, 0.8);
}

/* --- Qué hacemos --- */
.hoja-bloques {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.servicio { padding: 24px 24px 22px; }
.servicio-nombre {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.028em;
}
.servicio-linea {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--texto-2);
}
.servicio-lista {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  line-height: 1.35;
  color: rgba(246, 245, 239, 0.88);
}
.servicio-link {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--marfil);
}
@media (hover: hover) {
  .servicio-link:hover { opacity: .8; }
}

/* --- Nosotros --- */
.equipo {
  margin: 24px 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.equipo-video {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-placa);
  overflow: hidden;
  background: var(--gris-oscuro);
  box-shadow: 0 30px 50px -32px rgba(0, 0, 0, 0.8);
}
.equipo-video::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.equipo-video video { width: 100%; height: 100%; object-fit: cover; }
.equipo figcaption {
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.paso-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.paso-nombre {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.paso-texto {
  font-size: 15px;
  line-height: 1.4;
  color: var(--texto-2);
}

/* --- Cómo trabajamos: la línea de 4 pasos de la tarjeta, en vertical --- */
.proceso {
  margin: 28px 0 0;
  padding: 0 8px;
  list-style: none;
}
.paso-item {
  position: relative;
  padding: 0 0 26px 30px;
}
.paso-item:last-child { padding-bottom: 0; }
.paso-punto {
  position: absolute;
  left: 0;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(246, 245, 239, 0.4);
}
.paso-item:first-child .paso-punto {
  background: var(--marfil);
  box-shadow: inset 0 0 0 1.5px rgba(246, 245, 239, 0.95);
}
/* tramo de línea hasta el punto siguiente */
.paso-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 4.25px;
  top: 21px;
  bottom: 5px;
  width: 1.5px;
  background: rgba(246, 245, 239, 0.22);
}

.pago {
  margin-top: 30px;
  padding: 20px 22px;
}
.pago p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--texto-2);
}
.pago strong { color: var(--marfil); font-weight: 600; }

/* ---------- Teléfonos angostos (< 360 px) ---------- */
@media (max-width: 359px) {
  .tile-titulo { font-size: 15.5px; }
  .tile-titulo-justo { white-space: normal; }
  .tile-sub { font-size: 12px; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  .up, .pila-item { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* =========================================================
   TEMA CLARO · identidad de Instagram (@tib.arg)
   Crema y blanco cálido con superficies en relieve (sombras tibias), texto carbón,
   rojo TIB como acento. Las letras se desvanecen de arriba hacia abajo en los colores
   de la marca. Esta capa pisa los colores de la base oscura sin tocar medidas ni layout.
   ========================================================= */

:root {
  --crema: #f4f1eb;
  --blanco-calido: #fbfaf7;
  --carbon: #1d1a17;
  --sombra-tibia: #d0cec8;
  --texto: var(--carbon);
  --texto-2: rgba(29, 26, 23, 0.64);
  --linea: rgba(29, 26, 23, 0.12);

  /* Letras premium (port del texto del componente Shine Border, con colores de marca) */
  --letra-titulo: linear-gradient(180deg, #1d1a17 0%, #1d1a17 45%, #6e655a 100%);
  --letra-chica: linear-gradient(180deg, #1d1a17 0%, #3a342e 60%, #6e655a 100%);

  /* Superficie en relieve: blanco cálido con luz arriba y sombra tibia abajo */
  --relieve-fondo: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(251, 250, 247, 0.84) 100%);
  --relieve-sombra:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(208, 206, 200, 0.45),
    0 1px 2px rgba(74, 62, 44, 0.08),
    0 12px 26px -14px rgba(74, 62, 44, 0.22),
    0 30px 50px -30px rgba(74, 62, 44, 0.28);
  --borde-luz: linear-gradient(160deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.5) 30%,
    rgba(208, 206, 200, 0.35) 70%,
    rgba(190, 184, 172, 0.5) 100%);
}

/* ---------- Base ---------- */
html {
  background:
    radial-gradient(60% 45% at 85% 10%, #ffffff, rgba(255, 255, 255, 0) 70%),
    radial-gradient(70% 50% at 8% 75%, rgba(220, 213, 199, 0.55), rgba(220, 213, 199, 0) 70%),
    var(--crema);
  background-attachment: fixed;
  color: var(--texto);
}
:focus-visible { outline-color: var(--carbon); }

/* Velo de lectura en crema, liviano para que se vea la seda del fondo (Silk):
   apenas arriba (título) y abajo (dock) */
.fondo-velo {
  background: linear-gradient(180deg,
    rgba(244, 241, 235, 0.35) 0%,
    rgba(244, 241, 235, 0) 18%,
    rgba(244, 241, 235, 0) 60%,
    rgba(244, 241, 235, 0.4) 100%);
}

/* ---------- Letras ---------- */
.texto-degradado,
.tile-titulo,
.hoja-frase,
.servicio-nombre,
.web-nombre,
.paso-nombre {
  background-image: var(--letra-chica);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.hoja-frase,
.servicio-nombre {
  background-image: var(--letra-titulo);
  padding-bottom: 0.06em;
}

/* Logo protagonista: el logo marfil con su relieve y sombra incluidos (como la foto de perfil de
   Instagram). Crece con el alto de la pantalla; la imagen trae aire alrededor, por eso los
   márgenes negativos. */
.logo-principal {
  display: block;
  width: clamp(124px, 25svh, 200px);
  height: auto;
  margin: -12px 0 -8px;
}

/* ---------- Tarjetas en relieve ---------- */
.tile { color: var(--carbon); }
.tile-vidrio {
  background: var(--relieve-fondo);
  /* Sin backdrop-filter: sobre el fondo animado el celular recalculaba el desenfoque en cada
     cuadro y las animaciones se trababan. En claro, con fondo casi opaco, no se nota. */
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: var(--relieve-sombra);
}
/* Borde de 1 px con luz (blanco arriba, sombra tibia abajo) */
/* (el borde de luz con máscara se reemplazó por un anillo interior en la capa de identidad:
   las máscaras con composición son caras de pintar en Safari y trababan las animaciones) */
@media (hover: hover) {
  .tile:hover { transform: translateY(-2px); }
  .tile:active { transform: scale(.97); }
}
.tile-sub { color: var(--texto-2); }

.tile-flecha,
.hoja-cerrar {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: var(--carbon);
  background: linear-gradient(180deg, #ffffff, #f1ede5);
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 0 0 1px rgba(29, 26, 23, 0.06),
    0 2px 6px -2px rgba(74, 62, 44, 0.25);
}
@media (hover: hover) {
  .hoja-cerrar:hover { background: #ffffff; }
}


/* Trabajos: luz cálida y capturas con sombra tibia */
.trabajos-luz { background: radial-gradient(90% 60% at 50% 30%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 70%); }
.pila-item {
  background: #e9e4da;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9),
    0 0 0 1.5px rgba(29, 26, 23, 0.06),
    0 16px 26px -12px rgba(60, 46, 28, 0.38);
}

/* Etiquetas */
.etiquetas span {
  color: rgba(29, 26, 23, 0.78);
  background: linear-gradient(180deg, #ffffff, rgba(244, 241, 235, 0.7));
  box-shadow: inset 0 0 0 1px rgba(29, 26, 23, 0.10), 0 1px 2px rgba(74, 62, 44, 0.08);
}

/* Iniciales T y B: discos blancos en relieve, letras carbón */
.iniciales span {
  background: linear-gradient(170deg, #ffffff, #ece7dd);
  color: var(--carbon);
  box-shadow:
    0 0 0 2px #fbfaf7,
    inset 0 -1px 2px rgba(74, 62, 44, 0.15),
    0 3px 8px -3px rgba(74, 62, 44, 0.4);
}

/* Línea de 4 pasos */
.pasos i { box-shadow: inset 0 0 0 1.5px rgba(29, 26, 23, 0.32); }
.pasos .paso-activo { background: var(--carbon); box-shadow: none; }
.pasos b { background: rgba(29, 26, 23, 0.16); }

/* Tarjeta roja: acento de marca, con sombra tibia rojiza */
.tile-roja {
  box-shadow:
    0 1px 2px rgba(58, 5, 3, 0.25),
    0 14px 28px -14px rgba(122, 0, 0, 0.45),
    0 34px 54px -32px rgba(58, 5, 3, 0.5);
}
.roja-borde {
  box-shadow:
    inset 0 1px 0 rgba(255, 228, 214, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.10);
}
.tile-roja .tile-titulo {
  background-image: linear-gradient(180deg, #ffffff 0%, #ffffff 50%, #f4c9bd 100%);
}
.tile-roja { color: #ffffff; }
.tile-roja .tile-sub { color: rgba(255, 255, 255, 0.72); }
.tile-roja .tile-flecha {
  color: #ffffff;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.10));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 6px -2px rgba(40, 0, 0, 0.4);
}

/* ---------- Dock ---------- */
/* Principal: carbón con borde de brillo animado (port de Shine Border, colores de marca) */
.dock-btn-principal {
  position: relative;
  background: linear-gradient(180deg, #2c2824 0%, #1d1a17 100%);
  color: var(--blanco-calido);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 1px 2px rgba(29, 26, 23, 0.3),
    0 14px 28px -12px rgba(29, 26, 23, 0.55);
}
.dock-btn-secundario {
  position: relative;
  background: var(--relieve-fondo);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: var(--carbon);
  box-shadow: var(--relieve-sombra);
}

/* Shine Border (de magicui) en CSS: borde de 1.5 px con un brillo que recorre el contorno */
@keyframes brillo-borde {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}
.brillo-borde::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background-image: radial-gradient(transparent, transparent, #e48f7b, #f6f5ef, #c9443a, transparent, transparent);
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box exclude, linear-gradient(#fff 0 0);
  animation: brillo-borde 14s linear infinite;
  pointer-events: none;
}

/* ---------- Hojas ---------- */
.hojas-velo { background: rgba(40, 33, 24, 0.28); }
.hoja,
.hoja:not(.hoja-con-fondo):not(.hoja-lisa) {
  background:
    radial-gradient(120% 40% at 50% 0%, #ffffff, rgba(255, 255, 255, 0) 70%),
    var(--blanco-calido);
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 -18px 40px -18px rgba(74, 62, 44, 0.35);
}
.hoja-lisa { background: var(--blanco-calido); }
.hoja-con-fondo { background: var(--crema); }
.hoja-shader-velo {
  background: linear-gradient(180deg, var(--crema) 0%, rgba(244, 241, 235, 0.92) 40%, rgba(244, 241, 235, 0) 100%);
}
.hoja-barrita { background: rgba(29, 26, 23, 0.18); }
.hoja-eyebrow {
  background-image: linear-gradient(176deg, #1d1a17 0%, #4a433b 45%, #8a8174 100%);
}
.hoja-bajada { color: var(--texto-2); }
.hoja-cuerpo { scrollbar-color: rgba(29, 26, 23, 0.2) transparent; }

/* Placas de "Por qué funciona": objetos de color (rojo, grafito, bordó); solo se suaviza la sombra */
.placa { box-shadow: 0 26px 50px -30px rgba(58, 30, 20, 0.55); }
.placa-b { box-shadow: 0 34px 64px -36px rgba(90, 10, 5, 0.6); }

/* Trabajos */
.web-video,
.equipo-video {
  background: #e9e4da;
  box-shadow:
    0 1px 2px rgba(74, 62, 44, 0.1),
    0 22px 40px -24px rgba(60, 46, 28, 0.45);
}
.web-video::after,
.equipo-video::after { box-shadow: inset 0 0 0 1px rgba(29, 26, 23, 0.06); }
.web-desc { color: rgba(29, 26, 23, 0.66); }
.webs-puntos span { background: rgba(29, 26, 23, 0.2); }
.webs-puntos span.activo { background: var(--carbon); }

/* Qué hacemos / Cómo trabajamos: placas en relieve */
.servicio,
.pago {
  position: relative;
  background: var(--relieve-fondo);
  box-shadow: var(--relieve-sombra);
}
.servicio-linea { color: var(--texto-2); }
.servicio-lista { color: rgba(29, 26, 23, 0.84); }
.servicio-link { color: #7a0000; }
.pago p { color: var(--texto-2); }
.pago strong { color: var(--carbon); }

.paso-texto { color: var(--texto-2); }
.paso-punto { box-shadow: inset 0 0 0 1.5px rgba(29, 26, 23, 0.32); }
.paso-item:first-child .paso-punto { background: var(--carbon); box-shadow: none; }
.paso-item:not(:last-child)::before { background: rgba(29, 26, 23, 0.16); }

/* Placas de "Por qué funciona" en tema claro: la del 90 % en rojo TIB, las chicas en porcelana */
.placa-a { background: #f6f3ed; }
.placa-c { background: #f8efe9; }
.placa-a,
.placa-c { color: var(--carbon); }
.placa-a .placa-borde,
.placa-c .placa-borde {
  box-shadow: inset 0 1px 0 #ffffff, inset 0 0 0 1px rgba(29, 26, 23, 0.06);
}
.placa-a .placa-titulo,
.placa-c .placa-titulo { color: rgba(29, 26, 23, 0.45); }
.placa-a .placa-titulo span,
.placa-c .placa-titulo span { color: var(--carbon); }
.flujo-icono {
  background: linear-gradient(180deg, #ffffff, #f1ede5);
  color: var(--carbon);
  box-shadow: inset 0 0 0 1px rgba(29, 26, 23, 0.06), 0 2px 6px -2px rgba(74, 62, 44, 0.2);
}
.flujo-label { color: rgba(29, 26, 23, 0.6); }
.flujo-flecha::before { background: rgba(29, 26, 23, 0.3); }
.flujo-flecha::after { border-color: rgba(29, 26, 23, 0.3); }
.flujo-pildora,
.hub-pildora {
  background: linear-gradient(180deg, #2c2824, #1d1a17);
  color: var(--blanco-calido);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 18px -10px rgba(29, 26, 23, 0.6);
}
.hub-flecha path { stroke: rgba(29, 26, 23, 0.35); }
.hub-item {
  background: rgba(255, 255, 255, 0.72);
  color: var(--carbon);
  box-shadow: inset 0 0 0 1px rgba(29, 26, 23, 0.05), 0 2px 8px -4px rgba(74, 62, 44, 0.2);
}
.hub-item span { color: var(--carbon); }
.hub-grilla { gap: 8px; }

/* Póster encima del video: se desvanece cuando el video ya muestra su primer cuadro (sin parpadeo) */
.video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: opacity .35s ease;
}
.reproduciendo .video-poster { opacity: 0; }

/* Explicación breve debajo del título de las placas chicas */
.placa-texto {
  margin: 12px 0 0;
  max-width: 34ch;
  font-size: 13.5px;
  line-height: 1.42;
  color: rgba(255, 255, 255, 0.6);
}
.placa-a .placa-texto,
.placa-c .placa-texto { color: rgba(29, 26, 23, 0.62); }
.placa-a .flujo { margin-top: 22px; }
.placa-c .hub-pildora { margin-top: 18px; }

/* X de las hojas: siempre por encima del contenido que se desliza (antes lo cortaba por abajo)
   y con un aro de foco chico, solo para teclado */
.hoja-agarre { z-index: 3; }
.hoja:focus, .hoja:focus-visible { outline: none; }
.hoja-cerrar:focus { outline: none; }
.hoja-cerrar:focus-visible { outline: 2px solid var(--carbon); outline-offset: 2px; }

/* Pie de la hoja "Nosotros": contacto y política de privacidad */
.pie-legal {
  margin-top: 28px;
  padding: 18px 8px 0;
  border-top: 1px solid rgba(29, 26, 23, 0.1);
  text-align: center;
  font-size: 13px;
  line-height: 1.7;
  color: var(--texto-2);
}
.pie-legal p { margin: 0; }
.pie-legal a { color: var(--carbon); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(29, 26, 23, 0.3); }
.pie-legal span[aria-hidden] { margin: 0 6px; }

/* ---------- Rendimiento: con una hoja abierta, Inicio queda tapado y deja de animarse ---------- */
html.hoja-abierta .pila-item,
html.hoja-abierta .brillo-borde::after {
  animation-play-state: paused;
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  .brillo-borde::after { animation: none; }
}


/* =========================================================
   IDENTIDAD TIB · tarjetas y botones
   Porcelana con espesor (el relieve del logo de Instagram), la B espejada grabada en relieve
   y el rojo TIB como único color de acento. Sin glows ni adornos nuevos.
   ========================================================= */

:root {
  --rojo-tib: #7a0000;
  --porcelana-card: linear-gradient(165deg, #ffffff 0%, #faf8f3 55%, #f2eee5 100%);
  /* Espesor: luz arriba, sombra interior abajo, caída larga y cálida */
  --espesor:
    inset 0 1px 0 #ffffff,
    inset 0 -12px 20px -14px rgba(120, 104, 80, 0.22),
    0 1px 2px rgba(74, 62, 44, 0.10),
    0 14px 26px -16px rgba(74, 62, 44, 0.30),
    0 34px 52px -32px rgba(74, 62, 44, 0.34);
  --espesor-presionado:
    inset 0 2px 6px rgba(74, 62, 44, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.8),
    0 6px 12px -8px rgba(74, 62, 44, 0.25);
}

/* ---------- Tarjetas ---------- */
.tile-vidrio {
  background: var(--porcelana-card);
  box-shadow: var(--espesor);
  transition: transform .3s var(--ease-salida), box-shadow .3s ease;
}
.tile-vidrio:active {
  transform: scale(.975);
  box-shadow: var(--espesor-presionado);
}


/* Flechas: discos de porcelana con la flecha en rojo TIB */
.tile-flecha {
  color: var(--rojo-tib);
  background: linear-gradient(180deg, #ffffff 0%, #efeae0 100%);
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 2px rgba(120, 104, 80, 0.16),
    0 0 0 1px rgba(74, 62, 44, 0.06),
    0 4px 8px -3px rgba(74, 62, 44, 0.32);
}
.tile-roja .tile-flecha {
  color: #ffffff;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.10));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 3px 8px -3px rgba(40, 0, 0, 0.5);
}

/* Títulos de tarjeta: un poco más de presencia */
.tile-titulo { font-size: 17.5px; letter-spacing: -0.02em; }

/* Etiquetas (Webs · Microapps · IA): porcelana mínima */
.etiquetas span {
  background: linear-gradient(180deg, #ffffff, #f3efe6);
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 0 0 1px rgba(74, 62, 44, 0.11),
    0 1px 2px rgba(74, 62, 44, 0.08);
}

/* Iniciales T y B: discos de porcelana, letras estampadas */
.iniciales span {
  background: linear-gradient(165deg, #ffffff, #ebe6db);
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -2px 3px rgba(120, 104, 80, 0.2),
    0 0 0 2px #fbfaf7,
    0 4px 8px -3px rgba(74, 62, 44, 0.45);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Paso activo de "Cómo trabajamos": rojo TIB */
.pasos .paso-activo,
.paso-item:first-child .paso-punto {
  background: var(--rojo-tib);
  box-shadow: 0 0 0 3px rgba(122, 0, 0, 0.12);
}

/* Tarjeta roja: esmalte con más profundidad */
.tile-roja {
  box-shadow:
    0 1px 2px rgba(58, 5, 3, 0.35),
    0 16px 28px -14px rgba(122, 0, 0, 0.5),
    0 36px 56px -32px rgba(58, 5, 3, 0.55);
}
.tile-roja:active { transform: scale(.975); }

/* ---------- Botones ---------- */
.dock-btn { height: 54px; font-size: 15.5px; letter-spacing: -0.015em; }

/* Principal: carbón con luz arriba y el ícono en rojo cálido */
.dock-btn-principal {
  background: linear-gradient(180deg, #38332e 0%, #25211d 48%, #181513 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 1px 2px rgba(29, 26, 23, 0.35),
    0 16px 28px -12px rgba(29, 26, 23, 0.6);
}
.dock-btn-principal svg { color: #e48f7b; }
.dock-btn-principal:active {
  transform: scale(.975);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.55), 0 6px 12px -8px rgba(29, 26, 23, 0.5);
}

/* Secundario: la misma porcelana de las tarjetas, con flecha en rojo TIB */
.dock-btn-secundario {
  background: var(--porcelana-card);
  box-shadow: var(--espesor);
}
.dock-btn-secundario svg { color: var(--rojo-tib); }
.dock-btn-secundario:active {
  transform: scale(.975);
  box-shadow: var(--espesor-presionado);
}

/* X de las hojas: mismo disco de porcelana */
.hoja-cerrar {
  background: linear-gradient(180deg, #ffffff 0%, #efeae0 100%);
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 2px rgba(120, 104, 80, 0.16),
    0 0 0 1px rgba(74, 62, 44, 0.06),
    0 4px 8px -3px rgba(74, 62, 44, 0.32);
}

/* Placas de las hojas (servicios, pago): mismo espesor */
.servicio,
.pago {
  background: var(--porcelana-card);
  box-shadow: var(--espesor);
}

@media (hover: hover) {
  .tile-vidrio:hover { transform: translateY(-2px); }
}


/* ---------- Fluidez ---------- */
/* Anillo interior simple (reemplaza al borde de luz con máscara) */
.tile-vidrio,
.servicio,
.pago,
.dock-btn-secundario {
  box-shadow: var(--espesor), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}
.tile-vidrio:active,
.dock-btn-secundario:active {
  box-shadow: var(--espesor-presionado);
}

/* Video con esquinas redondeadas: en Safari el recorte (overflow + radius) saca al video de la GPU
   salvo que el contenedor tenga su propia capa. */
.web-video,
.equipo-video {
  transform: translateZ(0);
  isolation: isolate;
}


/* ---------- Contacto: Agendar llamada + WhatsApp (Tomás / Bruno) ---------- */
/* Inicio: "Agendar llamada" ocupa el ancho y debajo van los dos WhatsApp, más bajos */
.acciones { flex-wrap: wrap; }
.acciones .dock-btn-principal { flex: 1 1 100%; }
.acciones .dock-btn-wa { flex: 1 1 0; height: 48px; font-size: 14.5px; }
.dock-btn-wa { gap: 7px; }
.dock-btn-wa svg { flex: none; }

/* Dock (dentro de las hojas): tres botones en una fila, con nombres cortos */
.dock .dock-btn-principal { flex: 1.1; }
.dock .dock-btn-wa { flex: 1; font-size: 14.5px; gap: 6px; }
.dock .dock-btn-principal span { overflow: hidden; text-overflow: ellipsis; }

/* Pantallas bajas (iPhone SE): logo y espacios más compactos para que Inicio siga entrando sin scroll */
@media (max-height: 620px) {
  .logo-principal { width: clamp(96px, 19svh, 200px); }
  .acciones { margin-top: 14px; gap: 7px; }
  .acciones .dock-btn { height: 46px; }
  .acciones .dock-btn-wa { height: 42px; font-size: 14px; }
  .grilla { margin-top: 12px; }
}
