:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-muted: #666666;
  --color-accent: #0047ab;
  --color-accent-hover: #0a5ad6;
  --color-focus: #0b1f44;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Layout ---------- */

.landing {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 3rem 2rem 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.landing__content {
  flex-grow: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5.5rem;
}

/* ---------- Logo ---------- */

.landing__logo {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
}

/* ---------- Botón Enter ---------- */

.landing__enter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 220px;
  height: 52px;
  background-color: var(--color-accent);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.landing__enter:hover {
  background-color: var(--color-accent-hover);
}

.landing__enter:active {
  transform: translateY(1px);
}

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

/* ---------- Lector de QR ---------- */

.scanner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.scanner__frame {
  width: 100%;
  max-width: 236px;
  aspect-ratio: 1 / 1;
  background-color: #000000;
  overflow: hidden;
}

.scanner__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner__status {
  margin: 0;
  min-height: 3em;
  max-width: 320px;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-muted);
  overflow-wrap: anywhere;
}

.scanner__status--ok {
  color: var(--color-text);
  font-weight: 600;
}

.scanner__status--error {
  color: #b3261e;
}

.scanner__again {
  min-height: 44px;
  padding: 0 1.5rem;
  border: 0;
  background-color: var(--color-accent);
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease;
}

.scanner__again:hover {
  background-color: var(--color-accent-hover);
}

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

.scanner__again[hidden] {
  display: none;
}

.scanner__cancel {
  margin-top: 0.5rem;
}

/* ---------- Pie ---------- */

.landing__footer {
  margin-top: 3rem;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-muted);
}

/* ---------- Escritorio ---------- */

@media (min-width: 768px) {
  .landing {
    padding: 6rem 1.5rem 2.25rem;
  }

  .landing__logo {
    max-width: 420px;
  }

  .landing__enter {
    max-width: 280px;
    height: 56px;
    font-size: 16px;
  }

  .scanner__frame {
    max-width: 320px;
  }

  .landing__footer {
    margin-top: 4rem;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing__enter {
    transition: none;
  }
}
