/* ============================================================
   Easy4 · Páginas de acceso (crear cuenta / iniciar sesión)
   Misma identidad que la portada. Hoja propia: no depende de
   style.css. Rutas relativas: funciona en la raíz o en subcarpeta.
   ============================================================ */
@font-face {
    font-family: 'Bricolage Grotesque';
    src: url('fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2');
    font-weight: 200 800; font-display: swap;
}
@font-face {
    font-family: 'Figtree';
    src: url('fonts/figtree-latin-wght-normal.woff2') format('woff2');
    font-weight: 300 900; font-display: swap;
}

:root {
    --fondo:   #080B10;
    --campo:   #111720;
    --linea:   rgba(255, 255, 255, .14);
    --texto:   #F4F1EB;
    --apagado: #A9B0BC;
    --senal:   #FFB81C;
    --senal-2: #FFD27A;
    --bien:    #3DDC84;
    --mal:     #FF6B5E;
    --h: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
    --b: 'Figtree', 'Segoe UI', system-ui, sans-serif;
    --suave: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fondo); color: var(--texto); font-family: var(--b); font-size: 17px; line-height: 1.55;
       -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--senal); outline-offset: 3px; border-radius: 8px; }

.acceso { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); }

/* ---------- Lado visual ---------- */
.visual { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
          padding: 34px clamp(24px, 4vw, 56px) clamp(32px, 5vw, 60px); }
.visual .foto { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 46%; }
.visual::after { content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(8, 11, 16, .72) 0%, rgba(8, 11, 16, 0) 26%, rgba(8, 11, 16, 0) 52%, rgba(8, 11, 16, .93) 100%),
                linear-gradient(270deg, var(--fondo) 0%, rgba(8, 11, 16, 0) 22%); }
.visual.garaje .foto { object-position: 76% 50%; }   /* inicio de sesión: la puerta queda a la vista */
.logo { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font: 800 1.5rem/1 var(--h); letter-spacing: -.03em; }
.logo img { width: 34px; height: 34px; }
.visual .lema { font: 800 clamp(1.9rem, 3.1vw, 2.9rem)/1.02 var(--h); letter-spacing: -.04em; margin: 0 0 12px; max-width: 11em; text-wrap: balance; }
.visual p { margin: 0; color: rgba(244, 241, 235, .84); max-width: 26em; }

/* ---------- Formulario ---------- */
.panel { display: grid; place-items: center; padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 72px); }
.caja { width: min(440px, 100%); }
.caja h1 { font: 800 clamp(2.1rem, 3.4vw, 2.9rem)/1 var(--h); letter-spacing: -.04em; margin: 0 0 10px; }
.caja .sub { color: var(--apagado); margin: 0 0 30px; }

.aviso { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin: 0 0 22px; border-radius: 14px;
         background: rgba(255, 107, 94, .1); border: 1px solid rgba(255, 107, 94, .45); color: #FFD9D4; font-weight: 600; }
.aviso svg { flex: none; width: 22px; height: 22px; margin-top: 1px; stroke: var(--mal); fill: none; stroke-width: 2; stroke-linecap: round; }

.campo { margin: 0 0 18px; }
.campo label { display: block; font-weight: 700; font-size: .95rem; margin: 0 0 7px; }
.campo .entrada { position: relative; }
.campo input[type="text"], .campo input[type="email"], .campo input[type="password"] {
    width: 100%; min-height: 54px; padding: 0 16px; border-radius: 14px; font: 500 1.02rem var(--b); color: var(--texto);
    background: var(--campo); border: 1px solid var(--linea); transition: border-color .2s, box-shadow .2s, background .2s; }
.campo input::placeholder { color: #6E7785; }
.campo input:hover { border-color: rgba(255, 255, 255, .28); }
.campo input:focus { outline: none; border-color: var(--senal); box-shadow: 0 0 0 4px rgba(255, 184, 28, .18); background: #141B26; }
.campo input:-webkit-autofill { -webkit-text-fill-color: var(--texto); box-shadow: 0 0 0 1000px var(--campo) inset; caret-color: var(--texto); }
.campo .con-ojo input { padding-right: 96px; }
.ojo { position: absolute; right: 6px; top: 6px; bottom: 6px; padding: 0 14px; border: 0; border-radius: 10px; cursor: pointer;
       background: transparent; color: var(--apagado); font: 700 .88rem var(--b); display: none; }
.js .ojo { display: block; }
.ojo:hover { color: var(--texto); background: rgba(255, 255, 255, .07); }
.pista { display: flex; align-items: center; gap: 7px; min-height: 22px; margin: 7px 2px 0; font-size: .88rem; color: var(--apagado); }
.pista::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #566070; flex: none; transition: background .2s; }
.pista[hidden] { display: none; }
.pista.bien { color: #B9F5D2; } .pista.bien::before { background: var(--bien); }
.pista.mal  { color: #FFC9C3; } .pista.mal::before  { background: var(--mal); }

.legal { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 20px; font-size: .93rem; color: var(--apagado); }
.legal input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--senal); flex: none; }
.legal a { color: var(--texto); text-underline-offset: 3px; }

.boton { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; margin-top: 8px; border: 0; border-radius: 999px;
         cursor: pointer; font: 700 1.06rem var(--b); color: #14100A; background: var(--senal);
         box-shadow: 0 14px 36px -14px rgba(255, 184, 28, .8); transition: background .2s, transform .2s var(--suave); }
.boton:hover { background: var(--senal-2); }
.boton:active { transform: scale(.985); }

.info-legal { margin: 16px 2px 0; font-size: .86rem; line-height: 1.5; color: var(--apagado); }
.info-legal a { color: var(--texto); text-underline-offset: 3px; }
.ayuda { margin: 20px 0 0; font-size: .93rem; color: var(--apagado); text-align: center; }
.ayuda a { color: var(--texto); text-underline-offset: 3px; overflow-wrap: anywhere; }
.alt { margin: 26px 0 0; padding-top: 22px; border-top: 1px solid var(--linea); color: var(--apagado); text-align: center; }
.alt a { color: var(--texto); font-weight: 700; text-underline-offset: 4px; }

/* entrada: un único momento al cargar */
.js .caja > * { opacity: 0; transform: translateY(14px); animation: entra .7s var(--suave) forwards; }
.js .caja > *:nth-child(2) { animation-delay: .06s; }
.js .caja > *:nth-child(3) { animation-delay: .12s; }
.js .caja > *:nth-child(4) { animation-delay: .18s; }
@keyframes entra { to { opacity: 1; transform: none; } }

/* ---------- Móvil ---------- */
@media (max-width: 860px) {
    body { font-size: 16px; }
    .acceso { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .visual { min-height: 210px; padding: 22px 20px 24px; }
    .visual .foto { object-position: 50% 40%; }
    .visual.garaje .foto { object-position: 80% 58%; }
    .visual::after { background: linear-gradient(180deg, rgba(8, 11, 16, .7) 0%, rgba(8, 11, 16, .15) 45%, var(--fondo) 100%); }
    .visual .lema, .visual p { display: none; }   /* en móvil manda el título del formulario */
    .panel { place-items: start center; padding: 8px 20px 44px; }
    .campo input[type="text"], .campo input[type="email"], .campo input[type="password"] { font-size: 16px; } /* evita el zoom de iOS */
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .caja > * { opacity: 1; transform: none; }
}
