/* ============================================
   PÁGINA DE ERROR - Plataforma corporativa Leschaco
   Vistas: /Home/Error404 y /Home/Excepcion (layout _LayoutPaginaError)
   Misma identidad que el login
   Prefijo: er-
   ============================================ */

:root {
    --er-navy: #00264d;
    --er-navy-700: #0a3a6e;
    --er-navy-950: #000f22;
    --er-blue: #1f5fbf;
    --er-sky: #9cc3ff;
    --er-ring: rgba(31, 95, 191, .18);
    --er-ink: #0d1b2a;
    --er-ink-2: #475467;
    --er-ink-3: #667085;
    --er-line: #d5dce5;
    --er-line-soft: #e8ecf1;
    --er-surface: #ffffff;
    --er-surface-2: #f5f7fa;
    --er-tint: #eff5ff;
    --er-tint-line: #c7dafc;
    --er-warn: #93370d;
    --er-warn-dot: #dc6803;
    --er-warn-bg: #fffaeb;
    --er-warn-line: #fedf89;
    --er-radius: 10px;
    --er-font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --er-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --er-ease: cubic-bezier(.2, .7, .2, 1);
}

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

html,
body {
    margin: 0;
    min-height: 100%;
}

[hidden] {
    display: none !important;
}

.er-body {
    min-height: 100vh;
    background: var(--er-surface);
    color: var(--er-ink);
    font-family: var(--er-font);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.er-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ============================================
   ESTRUCTURA
   ============================================ */
.er-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}

.er-main {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 36px clamp(24px, 5vw, 80px) 28px;
    background: var(--er-surface);
}

    /* Franja de marca superior */
    .er-main::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--er-navy) 0%, var(--er-blue) 100%);
    }

/* Logo, contenido y pie comparten el mismo eje centrado en la columna */
.er-header,
.er-content,
.er-footer {
    width: 100%;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.er-header {
    display: flex;
    align-items: center;
}

.er-logo-link {
    display: inline-flex;
    border-radius: 6px;
}

    .er-logo-link:focus-visible {
        outline: none;
        box-shadow: 0 0 0 4px var(--er-ring);
    }

.er-logo {
    display: block;
    width: auto;
    height: 36px;
}

.er-content {
    margin-top: auto;
    margin-bottom: auto;
    padding: 48px 0 40px;
    animation: er-rise .6s var(--er-ease) both;
}

.er-footer {
    font-size: 12.5px;
    color: var(--er-ink-3);
}

/* ============================================
   CÓDIGO Y MENSAJE
   ============================================ */
.er-code {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.6vw, 18px);
    margin: 0 0 20px;
    font-family: var(--er-serif);
    font-size: clamp(84px, 10vw, 136px);
    font-weight: 600;
    line-height: .9;
    letter-spacing: -.035em;
    font-variant-numeric: lining-nums tabular-nums;
    color: var(--er-navy);
}

    .er-code span {
        background: linear-gradient(180deg, var(--er-navy) 30%, var(--er-blue) 140%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

/* Líneas de velocidad del isotipo */
.er-lines {
    flex: none;
    width: .42em;
    height: .25em;
    margin-top: .06em;
    color: var(--er-blue);
    overflow: visible;
}

    .er-lines line {
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        transform-box: fill-box;
        transform-origin: right center;
        animation: er-line .9s .15s var(--er-ease) both;
    }

        .er-lines line:nth-child(2) { animation-delay: .21s; }
        .er-lines line:nth-child(3) { animation-delay: .27s; }
        .er-lines line:nth-child(4) { animation-delay: .33s; }
        .er-lines line:nth-child(5) { animation-delay: .39s; }
        .er-lines line:nth-child(6) { animation-delay: .45s; }

.er-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border: 1px solid var(--er-tint-line);
    border-radius: 999px;
    background: var(--er-tint);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--er-navy-700);
}

    .er-eyebrow::before {
        content: "";
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--er-blue);
    }

/* Error del servidor: tono de alerta en lugar del azul de marca */
.er-eyebrow--alerta {
    border-color: var(--er-warn-line);
    background: var(--er-warn-bg);
    color: var(--er-warn);
}

    .er-eyebrow--alerta::before {
        background: var(--er-warn-dot);
    }

.er-title {
    margin: 16px 0 10px;
    font-size: clamp(24px, 2.3vw, 30px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.02em;
    color: var(--er-ink);
    text-wrap: balance;
}

.er-lead {
    margin: 0;
    max-width: 50ch;
    font-size: 16px;
    color: var(--er-ink-2);
}

/* Dato de referencia bajo el mensaje (p. ej. hora del error) */
.er-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 0;
    font-size: 13.5px;
    color: var(--er-ink-3);
}

    .er-meta i {
        --icon-font-size: 16px;
        font-size: 16px;
    }

    .er-meta strong {
        font-weight: 600;
        font-variant-numeric: tabular-nums;
        color: var(--er-ink-2);
    }

/* ============================================
   BOTONES
   ============================================ */
.er-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.er-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: var(--er-radius);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease, color .18s ease;
}

    .er-btn:focus-visible {
        outline: none;
        box-shadow: 0 0 0 4px var(--er-ring);
    }

    .er-btn i {
        --icon-font-size: 18px;
        font-size: 18px;
    }

.er-btn--primary {
    background: var(--er-navy);
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 15, 34, .12), 0 6px 16px -8px rgba(0, 38, 77, .55);
}

    .er-btn--primary:hover {
        background: var(--er-navy-700);
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0, 15, 34, .12), 0 12px 24px -10px rgba(0, 38, 77, .6);
    }

    .er-btn--primary:active {
        transform: translateY(0);
    }

    .er-btn--primary:focus-visible {
        box-shadow: 0 0 0 4px var(--er-ring), 0 6px 16px -8px rgba(0, 38, 77, .55);
    }

.er-btn--outline {
    background: var(--er-surface);
    border-color: var(--er-line);
    color: var(--er-ink);
}

    .er-btn--outline:hover {
        background: var(--er-surface-2);
        border-color: #b9c3cf;
    }

    .er-btn--outline i {
        color: var(--er-ink-3);
    }

.er-btn-arrow {
    opacity: .7;
    transition: transform .2s var(--er-ease), opacity .2s ease;
}

.er-btn:hover .er-btn-arrow {
    opacity: 1;
    transform: translateX(3px);
}

/* ============================================
   SUGERENCIAS
   ============================================ */
.er-tips {
    margin-top: 44px;
    padding-top: 28px;
    border-top: 1px solid var(--er-line-soft);
}

.er-tips-title {
    margin: 0 0 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--er-ink-3);
}

.er-tips-list {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.er-tip {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.er-tip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--er-surface-2);
    border: 1px solid var(--er-line-soft);
    color: var(--er-navy-700);
}

    .er-tip-icon i {
        --icon-font-size: 18px;
        font-size: 18px;
    }

.er-tip-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding-top: 1px;
}

    .er-tip-text strong {
        font-size: 14.5px;
        font-weight: 600;
        color: var(--er-ink);
    }

    .er-tip-text span {
        font-size: 13.5px;
        color: var(--er-ink-2);
    }

/* ============================================
   PANEL DE MARCA (foto)
   ============================================ */
/* Fija al viewport: si el contenido desborda, la foto no se estira con él */
.er-brand {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    isolation: isolate;
    background: var(--er-navy-950);
    color: #fff;
}

.er-brand-photo {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 34% 40%;
    animation: er-zoom 1.8s var(--er-ease) both;
}

.er-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(0deg, rgba(0, 15, 34, .9) 0%, rgba(0, 26, 54, .45) 26%, rgba(0, 38, 77, 0) 52%),
        linear-gradient(90deg, rgba(0, 26, 54, .28) 0%, rgba(0, 26, 54, 0) 40%);
}

.er-brand-copy {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: clamp(28px, 3.5vw, 48px);
}

.er-brand-eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .85);
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes er-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes er-zoom {
    from {
        transform: scale(1.06);
    }

    to {
        transform: scale(1);
    }
}

@keyframes er-line {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .er-content,
    .er-brand-photo,
    .er-lines line {
        animation: none;
    }

    .er-btn,
    .er-btn-arrow {
        transition: none;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1199.98px) {
    .er-shell {
        grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    }
}

/* Pantallas bajas (portátil ≈768 px): ritmo vertical compacto */
@media (max-height: 900px) {
    .er-main {
        padding-top: 28px;
    }

    .er-content {
        padding: 28px 0 24px;
    }

    .er-code {
        margin-bottom: 14px;
        font-size: clamp(76px, 8vw, 104px);
    }

    .er-title {
        margin-top: 12px;
    }

    .er-actions {
        margin-top: 24px;
    }

    .er-tips {
        margin-top: 30px;
        padding-top: 22px;
    }

    .er-tips-title {
        margin-bottom: 12px;
    }

    .er-tips-list {
        gap: 12px;
    }
}

/* Tableta y móvil: sin foto, una sola columna */
@media (max-width: 991.98px) {
    .er-shell {
        display: block;
    }

    .er-brand {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .er-main {
        padding: 28px 20px 24px;
    }

    .er-logo {
        height: 32px;
    }

    .er-content {
        padding: 36px 0 32px;
    }

    .er-code {
        font-size: 84px;
    }

    .er-lead {
        font-size: 15px;
    }

    .er-actions {
        flex-direction: column;
    }

    .er-btn {
        width: 100%;
    }

    .er-tips {
        margin-top: 36px;
    }

    .er-footer {
        text-align: center;
    }
}
