:root {
  --azul-900: #050d1a;
  --azul-800: #0a1830;
  --azul-600: #123258;
  --azul-400: #3e5f94;
  --rojo: #c8122f;
  --rojo-claro: #e63b4c;
  --vino: #6e1230;
  --verde: #2ea06e;
  --blanco: #ffffff;
  --tinta: #0c1524;
  --gris: #66748a;
  --borde: #e2e6ec;
  --ui: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --sal: cubic-bezier(.22, 1, .36, 1);
}

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

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--ui);
  color: var(--tinta);
  background: var(--azul-900);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

:where(a, button, input):focus-visible {
  outline: 2px solid var(--rojo);
  outline-offset: 3px;
  border-radius: 6px;
}

.pantalla {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.rev {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(6px);
  animation: revelar .9s var(--sal) forwards;
}

@keyframes revelar {
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

.marca-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 46px 56px 38px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 30px;
  background: linear-gradient(158deg, #08132a 0%, #050d1a 52%, #140710 100%);
}

.marca-panel::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -3;
  background:
    radial-gradient(38% 34% at 22% 18%, rgba(24, 84, 160, .75), transparent 62%),
    radial-gradient(42% 38% at 6% 96%, rgba(200, 18, 47, .5), transparent 64%),
    radial-gradient(30% 26% at 78% 62%, rgba(62, 95, 148, .35), transparent 66%);
  filter: blur(14px);
  animation: respirar 18s ease-in-out infinite alternate;
}

@keyframes respirar {
  0% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.08) translate(2%, -2%); }
  100% { transform: scale(1.03) translate(-2%, 1.5%); }
}

.marca-panel::after {
  content: "";
  position: absolute;
  inset: -60px;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(120% 100% at 22% 34%, #000 0%, transparent 74%);
  -webkit-mask-image: radial-gradient(120% 100% at 22% 34%, #000 0%, transparent 74%);
  animation: derivar 26s linear infinite;
}

@keyframes derivar {
  to { background-position: 62px 62px; }
}

#malla {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

.foco {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(220px 220px at var(--mx, 50%) var(--my, 50%), rgba(200, 18, 47, .16), transparent 70%);
  opacity: 0;
  transition: opacity .5s ease;
}

.marca-panel:hover .foco {
  opacity: 1;
}

.orbita {
  position: absolute;
  left: -16%;
  top: 46%;
  translate: 0 -50%;
  width: min(780px, 88%);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px dashed rgba(200, 18, 47, .26);
  z-index: -1;
  animation: girar 100s linear infinite;
}

.orbita.b {
  width: min(580px, 66%);
  border: 1px solid rgba(255, 255, 255, .07);
  animation-duration: 150s;
  animation-direction: reverse;
}

.orbita.c {
  width: min(390px, 45%);
  border: 1px solid rgba(62, 95, 148, .3);
  animation-duration: 70s;
}

@keyframes girar {
  to { transform: rotate(360deg); }
}

.tope {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.lockup {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lockup__marca {
  position: relative;
  display: block;
  width: min(260px, 34vw);
  min-width: 190px;
  filter: brightness(0) invert(1) drop-shadow(0 0 18px rgba(200, 18, 47, .28));
  animation: halo 5s ease-in-out infinite;
}

.lockup__marca img {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes halo {
  0%, 100% { filter: brightness(0) invert(1) drop-shadow(0 0 12px rgba(200, 18, 47, .22)); }
  50% { filter: brightness(0) invert(1) drop-shadow(0 0 24px rgba(200, 18, 47, .45)); }
}

.lockup__sub {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: #7e93b2;
}

.lockup__sub + .lockup__sub {
  margin-top: 5px;
}

.panel-card {
  position: relative;
  z-index: 1;
  max-width: 560px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .012));
  box-shadow: 0 30px 60px -40px #000;
}

.card__enc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #8da1be;
}

.vivo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.punto {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rojo-claro);
  animation: latir 2.2s ease-in-out infinite;
}

@keyframes latir {
  0%, 100% { box-shadow: 0 0 0 0 rgba(230, 59, 76, .55); }
  70% { box-shadow: 0 0 0 8px rgba(230, 59, 76, 0); }
}

.reloj-card {
  margin-top: auto;
  margin-bottom: auto;
  padding: 18px 22px;
}

.hora {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
}

.hora__hm {
  font-family: var(--mono);
  font-size: clamp(46px, 5.4vw, 62px);
  font-weight: 600;
  line-height: .92;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}

.hora__dp {
  opacity: .35;
  animation: parpadeo 2s steps(1) infinite;
}

@keyframes parpadeo {
  0%, 49% { opacity: .85; }
  50%, 100% { opacity: .25; }
}

.hora__s {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 500;
  color: var(--rojo-claro);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  padding-top: 5px;
  text-shadow: 0 0 16px rgba(230, 59, 76, .5);
}

.hora__zona {
  margin-left: auto;
  text-align: right;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #6f82a0;
  line-height: 1.9;
  padding-top: 6px;
}

.fecha-larga {
  margin-top: 14px;
  font-size: 15px;
  font-weight: 500;
  color: #c3d0e2;
  text-transform: capitalize;
}

.segundos {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  margin-top: 18px;
}

.segundos i {
  flex: 1;
  height: 9px;
  border-radius: 1px;
  background: rgba(255, 255, 255, .09);
  transition: background .35s ease, height .35s var(--sal);
}

.segundos i.on {
  background: rgba(62, 95, 148, .75);
}

.segundos i.on:nth-child(5n+1) {
  background: rgba(255, 255, 255, .4);
}

.segundos i.borde {
  height: 15px;
  background: var(--rojo);
  box-shadow: 0 0 12px rgba(230, 59, 76, .75);
}

.segundos__pie {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #6f82a0;
}

.cinta {
  position: relative;
  z-index: 1;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.cinta__via {
  display: flex;
  gap: 38px;
  width: max-content;
  animation: correr 26s linear infinite;
}

.cinta span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #5d6e88;
  white-space: nowrap;
}

@keyframes correr {
  to { transform: translateX(-50%); }
}

.creditos {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #5d6e88;
}

.creditos img {
  display: block;
  width: 94px;
  height: auto;
  opacity: .58;
  filter: brightness(0) invert(1);
}

.forma-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 46px 54px;
  background: var(--blanco);
}

.forma-panel::before {
  content: "";
  position: absolute;
  inset: -18%;
  pointer-events: none;
  background:
    radial-gradient(34% 30% at 88% 8%, rgba(18, 50, 88, .11), transparent 64%),
    radial-gradient(30% 28% at 6% 92%, rgba(200, 18, 47, .10), transparent 62%),
    radial-gradient(26% 24% at 72% 78%, rgba(62, 95, 148, .07), transparent 66%);
  animation: deriva-clara 24s ease-in-out infinite alternate;
}

@keyframes deriva-clara {
  0% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.07) translate(-1.6%, 1.4%); }
  100% { transform: scale(1.03) translate(1.8%, -1.2%); }
}

.forma-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(12, 21, 36, .16) 1px, transparent 1.4px);
  background-size: 22px 22px;
  mask-image: radial-gradient(64% 54% at 50% 50%, transparent 12%, #000 82%);
  -webkit-mask-image: radial-gradient(64% 54% at 50% 50%, transparent 12%, #000 82%);
}

.lupa {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s ease;
  background-image: radial-gradient(circle, rgba(200, 18, 47, .30) 2.2px, transparent 2.7px);
  background-size: 22px 22px;
  mask-image: radial-gradient(115px 115px at var(--lx, -500px) var(--ly, -500px), #000 0%, rgba(0, 0, 0, .6) 42%, transparent 72%);
  -webkit-mask-image: radial-gradient(115px 115px at var(--lx, -500px) var(--ly, -500px), #000 0%, rgba(0, 0, 0, .6) 42%, transparent 72%);
}

@media (hover: hover) and (pointer: fine) {
  .forma-panel:hover .lupa {
    opacity: 1;
  }
}

.agua {
  position: absolute;
  right: -140px;
  bottom: -150px;
  width: 520px;
  pointer-events: none;
  color: rgba(200, 18, 47, .075);
  animation: girar 180s linear infinite;
}

.agua img {
  display: block;
  width: 100%;
  height: auto;
  opacity: .55;
  filter: grayscale(1);
}

.grano {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.forma {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 396px;
}

.encabezado {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}

.volver {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--borde);
  background: #fff;
  border-radius: 100px;
  padding: 9px 16px 9px 12px;
  text-decoration: none;
  color: var(--tinta);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: border-color .25s, box-shadow .25s;
}

.volver:hover {
  border-color: var(--tinta);
  box-shadow: 0 6px 18px -12px #000;
}

.volver svg {
  transition: transform .25s var(--sal);
}

.volver:hover svg {
  transform: translateX(-4px);
}

.sello {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(200, 18, 47, .3);
  background: rgba(200, 18, 47, .05);
  color: var(--rojo);
  border-radius: 100px;
  padding: 9px 15px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.sello::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(200, 18, 47, .18) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: barrer 4.5s ease-in-out 1.6s infinite;
}

@keyframes barrer {
  0% { transform: translateX(-120%); }
  35%, 100% { transform: translateX(120%); }
}

h1 {
  margin: 0;
  font-size: clamp(34px, 3.6vw, 42px);
  font-weight: 800;
  letter-spacing: -.038em;
  line-height: 1;
}

h1 span {
  display: inline-block;
  opacity: 0;
  transform: translateY(22px);
  animation: subir .8s var(--sal) forwards;
}

@keyframes subir {
  to {
    opacity: 1;
    transform: none;
  }
}

.bajada {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--gris);
  max-width: 33ch;
}

.campos {
  margin-top: 32px;
}

.campo {
  margin-bottom: 18px;
}

.campo__tope {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.campo label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--tinta);
}

.caja {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--borde);
  border-radius: 11px;
  background: #fff;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}

.caja::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--vino), var(--rojo), var(--rojo-claro));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--sal);
}

.caja:focus-within {
  border-color: #c9d2de;
  box-shadow: 0 14px 30px -22px rgba(12, 21, 36, .55);
}

.caja:focus-within::after {
  transform: scaleX(1);
}

.caja__icono {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 46px;
  height: 53px;
  color: #9aa6b8;
  transition: color .25s, transform .3s var(--sal);
}

.caja:focus-within .caja__icono {
  color: var(--rojo);
  transform: scale(1.08);
}

.caja input {
  flex: 1 1 auto;
  min-width: 0;
  height: 53px;
  border: 0;
  background: transparent;
  outline: none;
  padding: 0 8px 0 0;
  font-family: var(--ui);
  font-size: 15.5px;
  color: var(--tinta);
}

.caja input::placeholder {
  color: #aeb8c6;
  transition: opacity .25s, transform .3s var(--sal);
}

.caja input:focus::placeholder {
  opacity: .45;
  transform: translateX(4px);
}

.ojo {
  flex: 0 0 auto;
  border: 0;
  background: none;
  cursor: pointer;
  width: 48px;
  height: 53px;
  display: grid;
  place-items: center;
  color: #9aa6b8;
  transition: color .2s;
}

.ojo::after {
  content: "";
  position: absolute;
  width: 21px;
  height: 1.6px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-28deg) scaleX(0);
  opacity: 0;
  transition: transform .22s var(--sal), opacity .18s ease;
}

.ojo.is-hidden::after {
  opacity: 1;
  transform: rotate(-28deg) scaleX(1);
}

.ojo:hover {
  color: var(--tinta);
}

.caja--error {
  border-color: var(--rojo);
}

.caja--mal {
  border-color: var(--rojo);
  animation: sacudir .5s cubic-bezier(.36, .07, .19, .97);
}

@keyframes sacudir {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}

.mayus {
  display: none;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: #b4762a;
  animation: revelar .4s var(--sal);
}

.mayus.on {
  display: block;
}

.medidor {
  display: flex;
  gap: 5px;
  margin-top: 9px;
}

.medidor i {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: #e7ebf1;
  transition: background .35s, transform .35s var(--sal);
  transform-origin: left;
}

.medidor.n1 i:nth-child(1) { background: var(--rojo); }
.medidor.n2 i:nth-child(-n+2) { background: #d98324; }
.medidor.n3 i:nth-child(-n+3) { background: #c2a21b; }
.medidor.n4 i { background: var(--verde); }

.recordar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--gris);
  cursor: pointer;
  margin-top: 6px;
}

.recordar input {
  width: 16px;
  height: 16px;
  accent-color: var(--rojo);
  margin: 0;
}

.entrar {
  position: relative;
  overflow: hidden;
  margin-top: 24px;
  width: 100%;
  height: 57px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  color: #fff;
  font-family: var(--ui);
  font-size: 16px;
  font-weight: 600;
  background: linear-gradient(103deg, var(--azul-800) 0%, var(--vino) 46%, var(--rojo) 82%, var(--rojo-claro) 100%);
  background-size: 180% 100%;
  background-position: 0% 0%;
  box-shadow: 0 14px 30px -16px rgba(200, 18, 47, .7);
  transition: background-position .7s var(--sal), box-shadow .3s, transform .18s var(--sal), opacity .18s;
}

.entrar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, .28) 50%, transparent 68%);
  transform: translateX(-115%);
  transition: transform .6s ease;
}

.entrar:hover:not(:disabled) {
  background-position: 100% 0%;
  box-shadow: 0 18px 38px -16px rgba(200, 18, 47, .85);
}

.entrar:hover:not(:disabled)::after {
  transform: translateX(115%);
}

.entrar:active:not(:disabled) {
  transform: scale(.985);
}

.entrar:disabled {
  cursor: progress;
  opacity: .86;
}

.entrar svg.flecha {
  transition: transform .25s var(--sal);
}

.entrar:hover:not(:disabled) svg.flecha {
  transform: translateX(5px);
}

.entrar-cont {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.giro {
  width: 19px;
  height: 19px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rodar .7s linear infinite;
}

@keyframes rodar {
  to { transform: rotate(360deg); }
}

.aviso {
  margin: 13px 0 0;
  min-height: 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--rojo);
}

.aviso.on,
.aviso:not(:empty) {
  animation: revelar .45s var(--sal);
}

.pie {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--borde);
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: #8b97a8;
}

@media (max-width: 1100px) {
  .marca-panel {
    padding: 38px 36px 30px;
    gap: 22px;
  }

  .forma-panel {
    padding: 40px 32px;
  }

  h1 {
    font-size: clamp(32px, 3.4vw, 38px);
  }

  .hora__hm {
    font-size: 44px;
  }
}

@media (max-width: 900px) {
  .pantalla {
    grid-template-columns: 1fr;
  }

  .marca-panel {
    padding: 22px;
    gap: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .panel-card,
  .cinta,
  .orbita,
  .creditos {
    display: none;
  }

  .lockup__marca {
    width: 170px;
    min-width: 0;
  }

  .forma-panel {
    padding: 32px 22px 40px;
    align-items: flex-start;
  }

  .agua {
    width: 300px;
    right: -90px;
    bottom: -95px;
  }

  .forma {
    max-width: none;
  }
}

@media (max-width: 440px) {
  h1 {
    font-size: 32px;
  }

  .encabezado {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .rev,
  h1 span {
    opacity: 1;
    transform: none;
    filter: none;
  }

  #malla {
    display: none;
  }
}
