@font-face { font-family: Sora; font-weight: 600; font-display: swap; src: url('../fonts/sora-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: Sora; font-weight: 700; font-display: swap; src: url('../fonts/sora-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: Sora; font-weight: 800; font-display: swap; src: url('../fonts/sora-latin-800-normal.woff2') format('woff2'); }

:root {
  --blue: #0095cf;
  --blue-700: #006c9c;
  --blue-900: #04344f;
  --yellow: #f8d340;
  --ink: #0d2433;
  --muted: #5d7584;
  --line: #d9e6ee;
  --field: #f5f9fc;
  --body: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --display: Sora, var(--body);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body.login { margin: 0; font-family: var(--body); color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; }
.icon { width: 18px; height: 18px; flex: none; }
[hidden] { display: none !important; }

.shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(440px, .85fr); }

/* ---------- Marca: foto real de producto con duotono azul ---------- */
.brand {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; padding: clamp(32px, 4.5vw, 64px);
  color: #fff; background: var(--blue-900);
}
.brand::before { /* foto */
  content: ''; position: absolute; inset: 0; z-index: -2;
  background: url('../img/latas-hojalata-1600.webp') center / cover no-repeat;
  filter: grayscale(1) contrast(1.05);
  transform: scale(1.04);
  animation: drift 24s ease-in-out infinite alternate;
}
.brand::after { /* tinte de marca y lectura del texto */
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(4, 52, 79, .15) 0%, rgba(4, 52, 79, .35) 45%, rgba(4, 52, 79, .92) 100%),
    linear-gradient(135deg, rgba(0, 149, 207, .88) 0%, rgba(0, 108, 156, .78) 55%, rgba(4, 52, 79, .85) 100%);
  mix-blend-mode: normal;
}
@keyframes drift { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.1) translate(-1.5%, -1%); } }

.brand-logo { width: clamp(180px, 15vw, 230px); height: auto; filter: drop-shadow(0 6px 20px rgba(0, 30, 50, .35)); }

.brand-copy { margin-top: auto; max-width: 560px; animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
.brand-bars { display: grid; gap: 7px; width: 64px; margin-bottom: 26px; }
.brand-bars i { display: block; height: 7px; border-radius: 2px; background: var(--yellow); }
.brand-bars i:nth-child(2) { width: 62%; } .brand-bars i:nth-child(3) { width: 82%; }
.brand h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(38px, 4.2vw, 62px); line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; }
.brand-copy p { margin: 18px 0 0; max-width: 420px; font-size: clamp(15px, 1.1vw, 17px); line-height: 1.6; color: rgba(255, 255, 255, .82); }
.brand-foot { margin: 44px 0 0; font-size: 12px; color: rgba(255, 255, 255, .6); }

/* ---------- Acceso ---------- */
.access { display: grid; place-items: center; padding: 48px 32px; background: #fff; }
.card { width: min(100%, 380px); animation: rise .6s .05s cubic-bezier(.2, .8, .2, 1) both; }
.card-logo { display: block; width: 172px; height: auto; margin: 0 0 40px -4px; }
.card-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.card-kicker::before { content: ''; width: 18px; height: 3px; border-radius: 3px; background: var(--yellow); }
.card h1 { margin: 0 0 28px; font-family: var(--display); font-weight: 800; font-size: 32px; letter-spacing: -.03em; }

.alert { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; padding: 12px 14px; border-radius: 12px; font-size: 14px; color: #8a2424; background: #fdeeee; border: 1px solid #f5cccc; }
.field { display: block; margin-bottom: 18px; }
.field > span:first-child { display: block; margin-bottom: 8px; font-family: var(--display); font-weight: 600; font-size: 13px; color: #29414f; }
.input { position: relative; display: flex; align-items: center; }
.input > .icon { position: absolute; left: 15px; color: #8aa1af; pointer-events: none; transition: color .2s; }
.input input {
  width: 100%; height: 52px; padding: 0 48px 0 46px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--field);
  font: 500 15px var(--body); color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.input input::placeholder { color: #9bb0bc; }
.input input:hover { border-color: #c3d6e1; }
.input input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(0, 149, 207, .14); }
.input:focus-within > .icon { color: var(--blue); }
.input input[aria-invalid='true'] { border-color: #e2a2a2; }
.reveal { position: absolute; right: 6px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: #7f97a5; cursor: pointer; display: grid; place-items: center; }
.reveal:hover { background: #eaf3f8; color: var(--blue-700); }
.reveal:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.reveal .eye-closed { display: none; } .reveal[aria-pressed='true'] .eye-open { display: none; } .reveal[aria-pressed='true'] .eye-closed { display: inline; }
.caps { display: block; margin-top: 7px; font-size: 12.5px; font-weight: 600; color: #9a6b00; }

.submit {
  width: 100%; height: 54px; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 12px; cursor: pointer;
  font: 700 16px var(--display); color: #fff; letter-spacing: -.01em;
  background: var(--blue);
  box-shadow: 0 12px 26px -14px rgba(0, 108, 156, .9);
  transition: background .2s, transform .15s, box-shadow .2s;
}
.submit:hover { background: #0089bf; box-shadow: 0 16px 30px -14px rgba(0, 108, 156, .95); }
.submit:active { transform: translateY(1px); }
.submit:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.submit .arrow { transition: transform .2s; }
.submit:hover .arrow { transform: translateX(3px); }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite; }
.submit.loading { pointer-events: none; opacity: .9; }
.submit.loading .arrow { display: none; } .submit.loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .brand { min-height: 240px; padding: 24px 20px 28px; }
  .brand-logo { width: 150px; }
  .brand-copy { margin-top: 48px; }
  .brand-bars { margin-bottom: 16px; width: 48px; gap: 5px; } .brand-bars i { height: 5px; }
  .brand h2 { font-size: 30px; }
  .brand-copy p, .brand-foot { display: none; }
  .access { padding: 36px 20px 48px; place-items: start center; }
  .card-logo { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
