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

:root {
  --ink:     #0B0C10;
  --ink-soft:#1A1C23;
  --paper:   #FFFFFF;
  --muted:   #6B7280;
  --off:     #F7F8FA;
  --talent:  #FB7185;
  --academy: #2563EB;
  --digital: #10B981;
  --border:  #E5E7EB;
  --ff-display: 'Fraunces', Georgia, serif;
  --ff-body:    'DM Sans', system-ui, sans-serif;
  --ff-mono:    'DM Mono', 'Courier New', monospace;
}

html, body {
  height: 100%;
  font-family: var(--ff-body);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}

/* ── Background canvas ─────────────────────── */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

/* Grid lines */
.bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* Color glows */
.glow-talent {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251,113,133,.18) 0%, transparent 70%);
  top: -200px; left: -200px;
  pointer-events: none;
}
.glow-academy {
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.15) 0%, transparent 70%);
  bottom: -150px; right: -100px;
  pointer-events: none;
}
.glow-digital {
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,.1) 0%, transparent 70%);
  top: 60%; left: 60%;
  pointer-events: none;
}

/* ── Layout ────────────────────────────────── */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 480px 1fr;
  grid-template-rows: auto 1fr auto;
  align-items: center;
}

/* ── Header ───────────────────────────────── */
.header {
  grid-column: 1 / -1;
  padding: 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--ff-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--paper);
}
.logo span { color: var(--talent); }

.brand-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.brand-dots i {
  display: block;
  width: 8px; height: 8px;
  border-radius: 50%;
}
.brand-dots i:nth-child(1) { background: var(--talent); }
.brand-dots i:nth-child(2) { background: var(--academy); }
.brand-dots i:nth-child(3) { background: var(--digital); }

/* ── Left — decorative copy ───────────────── */
.side-left {
  grid-column: 1;
  padding: 0 48px 0 64px;
  align-self: center;
}

.side-tag {
  font-family: var(--ff-mono);
  font-size: 0.6rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.side-headline {
  font-family: var(--ff-display);
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--paper);
  margin-bottom: 16px;
}
.side-headline em {
  font-style: italic;
  color: var(--digital);
}

.side-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.75;
  max-width: 280px;
}

.side-units {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.unit-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .2s;
}
.unit-pill::before {
  content: '';
  display: block;
  width: 24px; height: 1px;
}
.unit-pill.talent  { --c: var(--talent);  }
.unit-pill.academy { --c: var(--academy); }
.unit-pill.digital { --c: var(--digital); }
.unit-pill::before { background: var(--c); }
.unit-pill:hover { color: var(--c); }

/* ── Card ─────────────────────────────────── */
.card-wrap {
  grid-column: 2;
  padding: 0 24px;
}

.card {
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 48px 40px;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

/* Top color accent bar */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--talent) 0%, var(--academy) 50%, var(--digital) 100%);
}

.card-label {
  font-family: var(--ff-mono);
  font-size: 0.62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}

.card-title {
  font-family: var(--ff-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--paper);
  line-height: 1.2;
  margin-bottom: 8px;
}

.card-sub {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 36px;
}

/* ── Form ──────────────────────────────────── */
.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  margin-bottom: 8px;
  letter-spacing: .01em;
}

.field input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 13px 16px;
  font-family: var(--ff-body);
  font-size: 0.9375rem;
  color: var(--paper);
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
  -webkit-appearance: none;
}

.field input::placeholder { color: rgba(255,255,255,0.2); }

.field input:focus {
  border-color: var(--digital);
  background: rgba(16,185,129,0.05);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}

.field input:hover:not(:focus) {
  border-color: rgba(255,255,255,0.2);
}

/* Error state */
.field.error input {
  border-color: var(--talent);
  background: rgba(251,113,133,0.05);
}
.field-error {
  font-size: 0.75rem;
  color: var(--talent);
  margin-top: 6px;
  display: none;
}
.field.error .field-error { display: block; }

/* Password wrapper */
.pw-wrap {
  position: relative;
}
.pw-wrap input { padding-right: 44px; }
.pw-toggle {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: rgba(255,255,255,0.3);
  transition: color .2s;
  display: flex; align-items: center;
}
.pw-toggle:hover { color: rgba(255,255,255,0.6); }
.pw-toggle svg { width: 18px; height: 18px; }

/* ── Options row ──────────────────────────── */
.options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  user-select: none;
}
.remember input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--digital);
  cursor: pointer;
}

.forgot {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  transition: color .2s;
  font-family: var(--ff-mono);
  letter-spacing: .02em;
}
.forgot:hover { color: var(--digital); }

/* ── Alert ───────────────────────────────── */
.alert {
  display: none;
  background: rgba(251,113,133,0.1);
  border: 1px solid rgba(251,113,133,0.3);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.8125rem;
  color: #FCA5A5;
  margin-bottom: 20px;
}
.alert.visible { display: flex; gap: 8px; align-items: flex-start; }

/* ── Submit button ───────────────────────── */
.btn-submit {
  width: 100%;
  padding: 14px 24px;
  background: var(--digital);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--ff-body);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .15s, box-shadow .2s, background .2s;
}

.btn-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background .2s;
}

.btn-submit:hover {
  background: #0EA572;
  box-shadow: 0 0 32px rgba(16,185,129,0.3);
  transform: translateY(-1px);
}
.btn-submit:hover::before { background: rgba(255,255,255,0.06); }
.btn-submit:active { transform: translateY(0); }

.btn-text  { display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-loading { display: none; align-items: center; justify-content: center; gap: 10px; }

.btn-submit.loading .btn-text    { display: none; }
.btn-submit.loading .btn-loading { display: flex; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer strip ───────────────────────── */
.footer-strip {
  grid-column: 1 / -1;
  padding: 20px 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-copy {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  color: rgba(255,255,255,0.18);
  letter-spacing: .06em;
}

.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  color: rgba(255,255,255,0.2);
  text-decoration: none;
  letter-spacing: .06em;
  transition: color .2s;
}
.footer-links a:hover { color: rgba(255,255,255,0.5); }

/* ── Animations ─────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.header     { animation: fadeUp .5s ease both; }
.side-left  { animation: fadeUp .55s .1s ease both; }
.card-wrap  { animation: fadeUp .55s .15s ease both; }
.footer-strip { animation: fadeUp .5s .25s ease both; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

/* ── Responsive ─────────────────────────── */
@media (max-width: 900px) {
  body { overflow: auto; }
  .page {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto;
    min-height: 100vh;
  }
  .header { padding: 24px 28px; }
  .side-left { display: none; }
  .card-wrap {
    grid-column: 1;
    padding: 16px 24px;
  }
  .footer-strip { padding: 16px 28px; }

  /* "¿Olvidaste tu contraseña?" se envolvía en dos líneas y quedaba apretado
     contra "Recordarme" — ambos compitiendo por la misma fila angosta. */
  .options {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
