
:root {
  color-scheme: dark;
  --bg: #0B1220;
  --bg-deep: #070D17;
  --surface: #111A2E;
  --surface-2: #16213A;
  --hairline: #22304A;
  --text: #E8EEF9;
  --muted: #A6B6CF;
  --muted-2: #7C90AE;
  --green: #16A34A;
  --green-bright: #34D399;
  --green-dim: #123326;
  --green-line: #1F5C43;
  --amber: #F59E0B;
  --red: #F87171;
  --display: "Bahnschrift", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --body: "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(420px, 0.94fr);
}
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .stage { min-height: 38vh; }
}

/* ---------------- panel izquierdo: el campo ---------------- */
.stage {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(80% 60% at 18% 12%, rgba(52, 211, 153, 0.10), transparent 60%),
    linear-gradient(160deg, #0A1526 0%, #0B1220 55%, #070D17 100%);
  border-right: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(24px, 4vw, 56px);
}
.pitch {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, rgba(232, 238, 249, 0.045) 0 1px, transparent 1px 84px),
    repeating-linear-gradient(0deg, rgba(232, 238, 249, 0.03) 0 1px, transparent 1px 84px);
  mask-image: radial-gradient(120% 100% at 20% 40%, #000 30%, transparent 78%);
}
.pitch::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 240px;
  top: -240px;
  background: linear-gradient(180deg, transparent, rgba(52, 211, 153, 0.10), transparent);
  animation: sweep 14s linear infinite;
}
.pitch::before {
  content: "";
  position: absolute;
  width: 520px; height: 520px;
  border: 1px solid rgba(232, 238, 249, 0.10);
  border-radius: 50%;
  right: -160px; top: 50%;
  transform: translateY(-50%);
}
@keyframes sweep {
  from { transform: translateY(0); }
  to { transform: translateY(140vh); }
}
@media (prefers-reduced-motion: reduce) {
  .pitch::after { animation: none; opacity: 0; }
}


.stage-inner { position: relative; z-index: 1; display: grid; gap: clamp(18px, 4vh, 36px); }
.brand { display: flex; align-items: center; gap: 12px; }
img.monogram {
  border: 0;
  background: transparent;
  object-fit: cover;
  padding: 0;
  display: block;
}
.monogram {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid var(--green-line);
  border-radius: 12px;
  background: var(--green-dim);
  color: var(--green-bright);
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.04em;
}
.brand-copy strong {
  display: block;
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: 0.01em;
}
.brand-copy span { color: var(--muted-2); font-size: 12px; }

.stage h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 0.92;
  letter-spacing: -0.015em;
  font-weight: 600;
}
.stage h1 em {
  color: var(--green-bright);
  font-style: normal;
}
.lede {
  margin: 0;
  max-width: 42ch;
  color: var(--muted);
  font-size: clamp(14px, 1.3vw, 16px);
  line-height: 1.6;
}
.facts {
  margin: 0; padding: 0; list-style: none;
  display: grid; gap: 12px;
  max-width: 46ch;
}
.facts li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}
.facts svg { margin-top: 2px; color: var(--green-bright); }
.stage-foot {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--muted-2);
  font-size: 12px;
}
.stage-foot .sep { width: 1px; height: 12px; background: var(--hairline); }

/* ---------------- panel derecho: acceso ---------------- */
.access {
  display: grid;
  place-items: center;
  padding: clamp(22px, 4vw, 60px);
  background:
    radial-gradient(70% 50% at 90% 0%, rgba(52, 211, 153, 0.05), transparent 60%),
    var(--bg);
}
.card {
  width: min(430px, 100%);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: clamp(24px, 3vw, 34px);
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.9);
}
.card > .kicker {
  margin: 0 0 10px;
  color: var(--muted-2);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.card h2 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: clamp(24px, 2.4vw, 30px);
  letter-spacing: -0.01em;
  font-weight: 600;
}
.card .sub {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.field { margin-bottom: 14px; }
.field > label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 600;
}
.input-wrap { position: relative; display: flex; align-items: center; }
input[type="text"], input[type="password"] {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 14px;
  border: 1px solid var(--hairline);
  border-radius: 11px;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type="text"]:focus, input[type="password"]:focus {
  border-color: var(--green-line);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12);
}
input::placeholder { color: var(--muted-2); }
.eye {
  position: absolute;
  right: 8px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
}
.eye:hover { color: var(--text); background: var(--surface-2); }

/* código de 6 dígitos */
.otp {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.otp input {
  width: 100%;
  height: 54px;
  padding: 0;
  text-align: center;
  border: 1px solid var(--hairline);
  border-radius: 11px;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--mono);
  font-size: 21px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.otp input:focus {
  border-color: var(--green-bright);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.14);
  transform: translateY(-1px);
}
.otp input.filled { border-color: var(--green-line); }

.hint { margin: 7px 0 0; color: var(--muted-2); font-size: 12px; line-height: 1.5; }

button.submit {
  width: 100%;
  height: 48px;
  margin-top: 20px;
  border: 0;
  border-radius: 11px;
  background: var(--green);
  color: #F2FDF7;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
}
button.submit:hover { background: #15803D; }
button.submit:active { transform: translateY(1px); }
button.submit:focus-visible { outline: 2px solid var(--green-bright); outline-offset: 2px; }

.alert {
  display: flex;
  gap: 10px;
  align-items: start;
  margin: 0 0 16px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(58, 23, 27, 0.55);
  color: #FCA5A5;
  font-size: 13px;
  line-height: 1.45;
}
.alert svg { flex: 0 0 auto; margin-top: 1px; }
.alert.ok {
  border-color: var(--green-line);
  background: var(--green-dim);
  color: var(--green-bright);
}

/* pasos del setup */
.steps {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.steps li {
  flex: 1;
  padding-top: 8px;
  border-top: 2px solid var(--hairline);
  color: var(--muted-2);
  font-size: 11.5px;
}
.steps li.done { border-color: var(--green-line); color: var(--text); }
.qr-frame {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--bg-deep);
  margin-bottom: 18px;
}
.qr-frame img {
  width: 190px;
  height: 190px;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
}
.qr-frame p { margin: 0; color: var(--muted-2); font-size: 12px; text-align: center; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

.foot-note {
  margin: 18px 0 0;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.55;
  text-align: center;
}
.page-foot {
  margin: 22px 0 0;
  color: var(--muted-2);
  font-size: 11.5px;
  text-align: center;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* móvil primero: una columna, cabecera compacta y formulario a pantalla */
@media (max-width: 979px) {
  .shell {
    grid-template-columns: 1fr;
    min-height: 100dvh;
  }
  .stage {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
    padding: max(18px, env(safe-area-inset-top)) 20px 18px;
    gap: 14px;
  }
  .stage-inner { gap: 14px; }
  .brand .monogram { width: 36px; height: 36px; border-radius: 10px; }
  .brand-copy strong { font-size: 15px; }
  .brand-copy span { font-size: 11px; }
  .stage h1 {
    font-size: clamp(30px, 8.4vw, 44px);
    line-height: 0.98;
  }
  .lede { font-size: 13.5px; max-width: 46ch; }
  .facts, .stage-foot { display: none; }
  .access {
    padding: 18px 14px max(22px, env(safe-area-inset-bottom));
    place-items: start center;
  }
  .card {
    width: 100%;
    max-width: 520px;
    padding: 20px 18px;
    border-radius: 16px;
  }
  .card h2 { font-size: clamp(23px, 6.4vw, 28px); }
  .card .sub { margin-bottom: 18px; }
  input[type="text"], input[type="password"] { height: 48px; font-size: 16px; }
  .otp { gap: 6px; }
  .otp input { height: 50px; font-size: 19px; }
  button.submit { height: 52px; margin-top: 18px; }
  .qr-frame img { width: 168px; height: 168px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .page-foot { margin-top: 16px; }
}

@media (max-width: 380px) {
  .stage h1 { font-size: 29px; }
  .otp input { height: 46px; font-size: 17px; }
  .card { padding: 18px 14px; }
}

@media (min-width: 980px) {
  .shell { grid-template-columns: minmax(0, 1.06fr) minmax(420px, 0.94fr); }
}
