:root {
  --fondo: #060a10;
  --texto: #eef4f8;
  --tenue: #8fa0ae;
  --azul: #46b4ee;
  --azul-marca: #087bb5;
  --linea: rgba(238, 244, 248, 0.22);
  --sans: "Nunito", ui-rounded, system-ui, sans-serif;
}

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

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

#campo {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

main {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 3.5rem 1.25rem 4rem;
}

/* ---------- inicio ---------- */

.vista {
  width: 100%;
  max-width: 44rem;
  text-align: center;
  animation: aparecer 1.1s 0.35s both ease-out;
}

.marca {
  margin: 0;
  font-weight: 900;
  font-size: clamp(4.25rem, 21vw, 12.5rem);
  line-height: 0.82;
  letter-spacing: -0.045em;
}

.marca span {
  display: block;
}

.marca-contorno {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--texto);
  font-size: 0.86em;
  padding-bottom: 0.08em;
}

.lema {
  margin: 1.75rem auto 0;
  max-width: 27rem;
  color: var(--tenue);
  font-size: 1.0625rem;
  text-wrap: balance;
}

.registro {
  margin: 1.75rem auto 0;
  max-width: 27rem;
}

.campo-doble {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: rgba(6, 10, 16, 0.7);
  transition: border-color 0.15s;
}

.campo-doble:focus-within {
  border-color: var(--azul);
}

.campo-doble input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.25rem 0.6rem 1rem;
  border: 0;
  background: none;
  color: var(--texto);
  font: inherit;
  outline: none;
}

.campo-doble input::placeholder {
  color: var(--tenue);
}

.campo-doble button {
  padding: 0.6rem 1.15rem;
  border: 0;
  border-radius: 999px;
  background: var(--texto);
  color: var(--fondo);
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.campo-doble button:hover {
  background: #fff;
}

.campo-doble button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.estado {
  min-height: 1.5rem;
  margin: 0.6rem 0 0;
  font-size: 0.9375rem;
  color: var(--tenue);
}

.estado.error {
  color: #ffb4a8;
}

.hecho {
  margin: 0 0 0.85rem;
  font-weight: 600;
}

.trampa {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.oculto {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.menu {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.15rem 0.5rem;
}

.menu button,
.cerrar {
  padding: 0.55rem 0.6rem;
  border: 0;
  background: none;
  color: var(--tenue);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  cursor: pointer;
}

.menu button:hover,
.cerrar:hover {
  color: var(--texto);
}

/* ---------- paneles ---------- */

.panel {
  width: 100%;
  max-width: 33rem;
  outline: none;
  animation: aparecer 0.3s both ease-out;
}

.panel h2 {
  margin: 1.5rem 0 1rem;
  font-size: clamp(2.25rem, 8vw, 3.25rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
}

.panel p,
.pasos li {
  margin: 0 0 0.9rem;
  font-size: 1.0625rem;
  color: rgba(238, 244, 248, 0.86);
}

.pasos {
  margin: 0;
  padding-left: 1.4rem;
}

.pasos li::marker {
  color: var(--azul);
  font-weight: 900;
}

.cerrar {
  margin-left: -0.6rem;
}

footer {
  position: fixed;
  left: 1.25rem;
  bottom: 1rem;
  font-size: 0.75rem;
  color: var(--tenue);
}

:focus-visible {
  outline: 2px solid var(--azul);
  outline-offset: 3px;
  border-radius: 4px;
}

.campo-doble input:focus-visible {
  outline: none;
}

@keyframes aparecer {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 30rem) {
  .menu {
    gap: 0;
  }

  .menu button {
    padding: 0.55rem 0.4rem;
    letter-spacing: 0.06em;
  }

  .campo-doble {
    flex-direction: column;
    border-radius: 1.25rem;
    gap: 0.25rem;
  }

  .campo-doble input {
    padding: 0.7rem 0.9rem;
    text-align: center;
  }

  .campo-doble button {
    border-radius: 1rem;
    padding: 0.75rem 1rem;
  }
}

@media (max-height: 34rem) {
  footer {
    position: static;
    padding: 0 1.25rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vista,
  .panel {
    animation: none;
  }
}
