@font-face { font-family: 'Hanken Grotesk'; src: url('fonts/hanken-grotesk-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Hanken Grotesk'; src: url('fonts/hanken-grotesk-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Hanken Grotesk'; src: url('fonts/hanken-grotesk-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Hanken Grotesk'; src: url('fonts/hanken-grotesk-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

.rec {
  --papel:        #f2f3f0;
  --superficie:   #ffffff;
  --superficie-2: #f7f8f6;
  --tinta-panel:  #1c1e27;
  --tinta:        #14161c;
  --tinta-2:      #4d5361;
  --tinta-3:      #6b7280;
  --tinta-inv:    #f4f5f2;
  --verde:        #00ffbe;
  --verde-tenue:  #d9fff4;
  --verde-borde:  #7fe9c8;
  --verde-tinta:  #00875f;
  --linea:        #e3e5e0;
  --linea-fuerte: #c9ccc5;
  --fuente: 'Hanken Grotesk', 'Segoe UI', system-ui, sans-serif;
  --r-pill: 100px;  --r-panel: 20px;  --r-control: 10px;  --r-chip: 8px;
  --sombra-1: 0 1px 2px rgba(20, 22, 28, 0.05), 0 4px 14px rgba(20, 22, 28, 0.06);
  --sombra-2: 0 2px 6px rgba(20, 22, 28, 0.07), 0 12px 32px rgba(20, 22, 28, 0.09);
  --ease-salida: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-suave:  cubic-bezier(0.65, 0, 0.35, 1);

  --rec-aspecto: 16 / 10;
  --rec-alto-max: 78dvh;
  --rec-hot: 26px;

  display: block;
  font-family: var(--fuente);
  color: var(--tinta);
  -webkit-font-smoothing: antialiased;
}

.rec *, .rec *::before, .rec *::after { box-sizing: border-box; }

.rec [hidden] { display: none !important; }

.rec__marco {
  position: relative;
  aspect-ratio: var(--rec-aspecto);
  width: 100%;
  max-height: var(--rec-alto-max, none);
  overflow: hidden;
  border: 1px solid var(--linea);
  border-radius: var(--r-panel);
  background: var(--superficie-2);
  box-shadow: var(--sombra-1);
  isolation: isolate;
}
.rec__marco:focus-visible { outline: 2px solid var(--verde-tinta); outline-offset: 3px; }

.rec__capa { position: absolute; inset: 0; }

.rec__shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transform: scale(1.012);
  transition: opacity 0.42s var(--ease-salida), transform 0.6s var(--ease-salida);
  user-select: none;
  -webkit-user-drag: none;
}
.rec__shot--activa { opacity: 1; transform: none; }

.rec__error {
  position: absolute; inset: 0;
  display: grid; place-content: center; gap: 6px;
  padding: 24px; text-align: center;
  font-size: 0.875rem; color: var(--tinta-2);
}

.rec__hotspot {
  position: absolute;
  z-index: 3;
  width: var(--rec-hot);
  height: var(--rec-hot);
  margin: 0;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: transform 0.18s var(--ease-salida);
}
.rec__hotspot::before {
  content: '';
  position: absolute;
  inset: 50%;
  width: 44px; height: 44px;
  transform: translate(-50%, -50%);
}
.rec__hotspot:hover  { transform: translate(-50%, -50%) scale(1.14); }
.rec__hotspot:active { transform: translate(-50%, -50%) scale(0.96); }
.rec__hotspot:focus-visible { outline: 2px solid var(--verde); outline-offset: 6px; border-radius: 50%; }

.rec__hotspot-centro {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--verde);
  box-shadow: 0 0 0 3px rgba(0, 255, 190, 0.22), 0 2px 8px rgba(0, 0, 0, 0.35);
}
.rec__hotspot-centro::after {
  content: '';
  position: absolute;
  inset: 50%;
  width: 7px; height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: var(--tinta-panel);
}

.rec__hotspot-anillo {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid var(--verde);
  opacity: 0;
  pointer-events: none;
}
.rec__hotspot--pulso .rec__hotspot-anillo    { animation: rec-pulso 2.1s var(--ease-suave) infinite; }
.rec__hotspot--pulso .rec__hotspot-anillo--2 { animation-delay: 0.7s; }

@keyframes rec-pulso {
  0%   { transform: scale(1);   opacity: 0.75; }
  70%  { transform: scale(2.7); opacity: 0; }
  100% { transform: scale(2.7); opacity: 0; }
}

.rec__tooltip {
  position: absolute;
  z-index: 4;
  width: min(330px, 74%);
  padding: 15px 17px 16px;
  border: 1px solid var(--linea);
  border-radius: var(--r-panel);
  background: var(--superficie);
  box-shadow: var(--sombra-2);
  animation: rec-entra 0.34s var(--ease-salida) both;
}
@keyframes rec-entra {
  from { opacity: 0; transform: translateY(6px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.rec__tt-flecha {
  position: absolute;
  width: 11px; height: 11px;
  background: var(--superficie);
  border: 1px solid var(--linea);
  transform: rotate(45deg);
}
.rec__tooltip[data-lado="abajo"]      .rec__tt-flecha { top: -6.5px; margin-left: -5.5px; border-right: 0; border-bottom: 0; }
.rec__tooltip[data-lado="arriba"]     .rec__tt-flecha { bottom: -6.5px; margin-left: -5.5px; border-left: 0; border-top: 0; }
.rec__tooltip[data-lado="derecha"]    .rec__tt-flecha { left: -6.5px; margin-top: -5.5px; border-right: 0; border-top: 0; }
.rec__tooltip[data-lado="izquierda"]  .rec__tt-flecha { right: -6.5px; margin-top: -5.5px; border-left: 0; border-bottom: 0; }

.rec__tt-num {
  margin: 0 0 7px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--verde-tinta);
  font-variant-numeric: tabular-nums;
}
.rec__tt-titulo {
  margin: 0 0 6px;
  font-size: 1.0625rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.015em;
  color: var(--tinta);
}
.rec__tt-texto {
  margin: 0 0 14px;
  font-size: 0.875rem; line-height: 1.5;
  color: var(--tinta-2);
  text-wrap: pretty;
}
.rec__tt-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 17px;
  border: 0; border-radius: var(--r-pill);
  background: var(--tinta-panel);
  color: var(--tinta-inv);
  font-family: inherit; font-size: 0.8125rem; font-weight: 600;
  cursor: pointer;
  transition: background 0.18s var(--ease-suave), transform 0.12s var(--ease-suave);
}
.rec__tt-btn::after { content: '→'; font-size: 0.9375rem; line-height: 1; }
.rec__tt-btn:hover  { background: #2a2d3a; }
.rec__tt-btn:active { transform: scale(0.97); }
.rec__tt-btn:focus-visible { outline: 2px solid var(--verde-tinta); outline-offset: 2px; }

.rec--compacto .rec__tooltip {
  position: static;
  width: auto;
  margin-top: 12px;
  animation: none;
  box-shadow: var(--sombra-1);
}
.rec--compacto .rec__tt-flecha { display: none; }

.rec__overlay {
  position: absolute; inset: 0; z-index: 5;
  display: grid; place-items: center;
  padding: 24px;
  background: rgba(15, 17, 22, 0.72);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: rec-fundido 0.32s var(--ease-salida) both;
}
@keyframes rec-fundido { from { opacity: 0; } to { opacity: 1; } }

.rec__overlay-caja {
  width: min(470px, 100%);
  padding: 26px 28px 24px;
  border: 1px solid var(--linea);
  border-radius: var(--r-panel);
  background: var(--superficie);
  box-shadow: var(--sombra-2);
  text-align: center;
}
.rec__eyebrow {
  margin: 0 0 9px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--verde-tinta);
}
.rec__overlay-titulo {
  margin: 0 0 9px;
  font-size: 1.75rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em;
  color: var(--tinta);
  text-wrap: balance;
}
.rec__overlay-texto {
  margin: 0 0 18px;
  font-size: 0.9375rem; line-height: 1.5;
  color: var(--tinta-2);
  text-wrap: pretty;
}
.rec__overlay-acciones { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.rec__overlay-pie {
  margin: 13px 0 0;
  font-size: 0.75rem; color: var(--tinta-3);
}

.rec__btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  font-family: inherit; font-size: 0.8125rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: background 0.18s var(--ease-suave), border-color 0.18s var(--ease-suave),
              box-shadow 0.18s var(--ease-suave), transform 0.12s var(--ease-suave);
}
.rec__btn--primario  { background: var(--verde); color: #000; }
.rec__btn--primario:hover { background: #00ecb0; box-shadow: var(--sombra-2); }
.rec__btn--secundario { background: var(--superficie); color: var(--tinta); border-color: var(--linea-fuerte); }
.rec__btn--secundario:hover { border-color: var(--tinta-3); }
.rec__btn:active { transform: scale(0.97); }
.rec__btn:focus-visible { outline: 2px solid var(--verde-tinta); outline-offset: 2px; }

.rec__barra {
  display: flex; align-items: flex-end; gap: 18px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--linea);
  border-radius: var(--r-panel);
  background: var(--superficie);
  box-shadow: var(--sombra-1);
}

.rec__caps { display: flex; flex: 1; gap: 10px; min-width: 0; }

.rec__cap {
  display: flex; flex-direction: column; gap: 6px;
  min-width: 0; padding: 0;
  border: 0; background: none;
  font-family: inherit; text-align: left; cursor: pointer;
}
.rec__cap-pista {
  display: block; height: 4px;
  border-radius: 4px;
  background: var(--linea);
  overflow: hidden;
}
.rec__cap-relleno {
  display: block; height: 100%; width: 0;
  border-radius: 4px;
  background: var(--verde-tinta);
  transition: width 0.4s var(--ease-salida);
}
.rec__cap-nombre {
  font-size: 0.75rem; font-weight: 500;
  color: var(--tinta-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.18s var(--ease-suave);
}
.rec__cap:hover .rec__cap-nombre { color: var(--tinta-2); }
.rec__cap--activo .rec__cap-nombre { color: var(--tinta); font-weight: 600; }
.rec__cap:focus-visible { outline: 2px solid var(--verde-tinta); outline-offset: 3px; border-radius: 6px; }

.rec__mandos { display: flex; align-items: center; gap: 6px; flex: none; }

.rec__mando {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px;
  border: 1px solid var(--linea-fuerte); border-radius: var(--r-control);
  background: var(--superficie);
  color: var(--tinta-2);
  cursor: pointer;
  transition: border-color 0.18s var(--ease-suave), color 0.18s var(--ease-suave),
              background 0.18s var(--ease-suave), transform 0.12s var(--ease-suave);
}
.rec__mando svg { pointer-events: none; }
.rec__mando:hover:not(:disabled) { border-color: var(--tinta-3); color: var(--tinta); background: var(--superficie-2); }
.rec__mando:active:not(:disabled) { transform: scale(0.94); }
.rec__mando:disabled { opacity: 0.4; cursor: not-allowed; }
.rec__mando:focus-visible { outline: 2px solid var(--verde-tinta); outline-offset: 2px; }
.rec__mando--full { margin-left: 6px; }

.rec__voz {
  display: none;
  flex-direction: column; align-items: center; gap: 4px;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--linea);
}
.rec--con-voz .rec__voz { display: flex; }

.rec__mando--voz { position: relative; }
.rec--voz-on .rec__mando--voz {
  border-color: var(--verde-tinta);
  color: var(--verde-tinta);
}

.rec__voz-pista {
  display: block; width: 30px; height: 3px;
  border-radius: 3px;
  background: var(--linea);
  overflow: hidden;
}
.rec__voz-relleno {
  display: block; height: 100%; width: 0;
  border-radius: 3px;
  background: var(--tinta-3);
  transition: width 0.2s linear;
}
.rec--voz-on .rec__voz-relleno { background: var(--verde-tinta); }

.rec--sonando .rec__mando--voz::after {
  content: ''; position: absolute; inset: -3px;
  border-radius: inherit;
  border: 1px solid var(--verde-tinta);
  opacity: 0;
  animation: rec-voz-pulso 1.8s var(--ease-suave) infinite;
}
@keyframes rec-voz-pulso {
  0%   { opacity: 0.5; transform: scale(1); }
  70%  { opacity: 0;   transform: scale(1.28); }
  100% { opacity: 0;   transform: scale(1.28); }
}

.rec--voz-espera .rec__mando--voz { border-style: dashed; color: var(--tinta-3); }

.rec__contador {
  min-width: 44px; text-align: center;
  font-size: 0.8125rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--tinta-2);
}

.rec__sr {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.rec--full {
  display: flex; flex-direction: column; gap: 0;
  padding: 18px 20px 16px;
  background: var(--papel);
}
.rec--full .rec__marco {
  flex: 1; min-height: 0;
  aspect-ratio: auto;
  max-height: none;
  border-radius: var(--r-panel);
}
.rec--full .rec__barra { margin-top: 14px; }

@media (max-width: 720px) {
  .rec__tooltip { width: min(300px, 86%); padding: 13px 15px 14px; }
  .rec__tt-titulo { font-size: 1rem; }
  .rec__tt-texto { font-size: 0.8125rem; margin-bottom: 12px; }
  .rec__barra { flex-direction: column; align-items: stretch; gap: 12px; }
  .rec__mandos { justify-content: center; }
  .rec__overlay-caja { padding: 20px 18px 18px; }
  .rec__overlay-titulo { font-size: 1.375rem; }
}
@media (max-width: 520px) {
  .rec { --rec-hot: 22px; }
  .rec__cap-nombre { display: none; }
  .rec__caps { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .rec *, .rec *::before, .rec *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .rec__hotspot-anillo { opacity: 0.55; transform: scale(1.5); }
}
