﻿/* =====================================================================
   ERROR HANDLING PAGE  -  /wwwroot/css/errorhandling.css
   Works inside _Layout. Every class starts with "eh-".
   Fixed navbar offset is read from --nav2-h and --nav-h of the layout.
   ===================================================================== */
.eh-page {
    --eh-blue: #2f5bff;
    --eh-blue-d: #1d3fd1;
    --eh-sky: #7fa2ff;
    --eh-ink: #0a1230;
    --eh-muted: #516089;
    --eh-bg: #f6f8ff;
    --eh-tint: #e8eeff;
    --eh-red: #ff5c6c;
    --eh-amber: #ffb020;
    --eh-green: #19c28a;
    --eh-line: rgba(10,18,48,.12);
    --eh-offset: calc(var(--nav2-h,42px) + var(--nav-h,100px));
    --eh-head: 'Bricolage Grotesque',system-ui,sans-serif;
    --eh-body: 'Instrument Sans',system-ui,sans-serif;
    --eh-mono: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
    font-family: var(--eh-body);
    color: var(--eh-ink);
    background: var(--eh-bg);
    line-height: 1.65;
    overflow-x: hidden;
}

    .eh-page *, .eh-page *::before, .eh-page *::after {
        box-sizing: border-box
    }

    .eh-page img {
        max-width: 100%;
        display: block
    }

    .eh-page a {
        text-decoration: none;
        color: inherit
    }

    .eh-page h1, .eh-page h2, .eh-page h3 {
        font-family: var(--eh-head);
        font-weight: 800;
        letter-spacing: -.03em;
        line-height: 1.1;
        margin: 0;
        color: var(--eh-ink)
    }

    .eh-page p {
        margin: 0
    }

    .eh-page :focus-visible {
        outline: 2px solid var(--eh-blue);
        outline-offset: 3px
    }

.eh-wrap {
    width: min(1180px,100% - 2.5rem);
    margin-inline: auto
}

.eh-section {
    padding: clamp(3.5rem,9vw,7rem) 0
}

.eh-alt {
    background: var(--eh-tint)
}

.eh-white {
    background: #fff
}

.eh-title {
    font-size: clamp(1.8rem,4.2vw,3.1rem);
    max-width: 19ch
}

.eh-lead {
    color: var(--eh-muted);
    font-size: clamp(1rem,1.4vw,1.15rem);
    max-width: 58ch;
    margin-top: 1rem
}

.eh-head {
    margin-bottom: clamp(2rem,5vw,3.5rem)
}

.eh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .95rem 1.7rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: .95rem;
    border: 1px solid var(--eh-blue);
    transition: transform .3s,background .3s,color .3s,box-shadow .3s;
    cursor: pointer
}

.eh-btn-fill {
    background: var(--eh-blue);
    color: #fff
}

    .eh-btn-fill:hover {
        background: #fff;
        color: var(--eh-blue);
        transform: translateY(-3px);
        box-shadow: 0 10px 24px rgba(47,91,255,.25)
    }

.eh-btn-line {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,.55)
}

    .eh-btn-line:hover {
        background: #fff;
        color: var(--eh-ink);
        transform: translateY(-3px)
    }

/* ================= HERO ================= */
.eh-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    padding: calc(var(--eh-offset) + clamp(2.5rem,6vw,5rem)) 0 clamp(3.5rem,8vw,6rem);
    background: radial-gradient(800px 480px at 10% 90%,rgba(255,92,108,.16),transparent 60%),radial-gradient(900px 500px at 88% 15%,rgba(47,91,255,.55),transparent 60%),linear-gradient(160deg,#0a1230 0%,#12256e 100%);
}

.eh-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem,5vw,4.5rem);
    align-items: center
}

.eh-hero h1 {
    color: #fff;
    font-size: clamp(2.2rem,5.4vw,4.4rem);
    line-height: 1.05
}

    .eh-hero h1 em {
        font-style: normal;
        color: var(--eh-sky)
    }

.eh-hero-p {
    margin-top: 1.4rem;
    max-width: 52ch;
    color: rgba(255,255,255,.82);
    font-size: clamp(1rem,1.5vw,1.15rem)
}

.eh-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
    margin-top: 2rem
}

.eh-hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem 1.6rem;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
    color: rgba(255,255,255,.8);
    font-size: .92rem
}

    .eh-hero-points li::before {
        content: "\2713";
        color: var(--eh-sky);
        margin-right: .5rem;
        font-weight: 700
    }

/* terminal mockup: error -> fixed */
.eh-term {
    position: relative;
    background: #0b1026;
    border: 1px solid rgba(127,162,255,.25);
    border-radius: 14px;
    box-shadow: 0 40px 80px rgba(0,0,0,.5)
}

.eh-term-bar {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .7rem .9rem;
    border-bottom: 1px solid rgba(127,162,255,.15)
}

    .eh-term-bar i {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: var(--eh-red)
    }

        .eh-term-bar i:nth-child(2) {
            background: var(--eh-amber)
        }

        .eh-term-bar i:nth-child(3) {
            background: var(--eh-green)
        }

    .eh-term-bar span {
        margin-left: .6rem;
        font-family: var(--eh-mono);
        font-size: .74rem;
        color: rgba(255,255,255,.55)
    }

.eh-term-body {
    padding: 1.1rem 1.2rem 1.3rem;
    font-family: var(--eh-mono);
    font-size: .8rem;
    line-height: 1.9;
    color: #c9d4ff
}

    .eh-term-body div {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

.eh-term .err {
    color: var(--eh-red)
}

.eh-term .warn {
    color: var(--eh-amber)
}

.eh-term .ok {
    color: var(--eh-green)
}

.eh-term .dim {
    color: rgba(255,255,255,.45)
}

.eh-term-body .eh-line {
    opacity: 0;
    animation: ehType .5s ease forwards
}

    .eh-term-body .eh-line:nth-child(1) {
        animation-delay: .3s
    }

    .eh-term-body .eh-line:nth-child(2) {
        animation-delay: .9s
    }

    .eh-term-body .eh-line:nth-child(3) {
        animation-delay: 1.5s
    }

    .eh-term-body .eh-line:nth-child(4) {
        animation-delay: 2.1s
    }

    .eh-term-body .eh-line:nth-child(5) {
        animation-delay: 2.9s
    }

    .eh-term-body .eh-line:nth-child(6) {
        animation-delay: 3.5s
    }

@keyframes ehType {
    from {
        opacity: 0;
        transform: translateX(-8px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.eh-badge {
    position: absolute;
    right: -4%;
    bottom: -8%;
    display: flex;
    align-items: center;
    gap: .6rem;
    background: #fff;
    color: var(--eh-ink);
    padding: .75rem 1.1rem;
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(10,18,48,.3);
    font-size: .82rem;
    font-weight: 600;
    animation: ehFloat 5s ease-in-out infinite
}

    .eh-badge b {
        display: block;
        font-family: var(--eh-head);
        font-size: 1.1rem;
        line-height: 1;
        color: var(--eh-green)
    }

@keyframes ehFloat {
    0%,100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-10px)
    }
}

/* ================= STRIP ================= */
.eh-strip {
    background: #fff;
    border-bottom: 1px solid var(--eh-line)
}

.eh-strip-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr)
}

.eh-strip-item {
    padding: 1.6rem 1rem;
    text-align: center;
    border-right: 1px solid var(--eh-line)
}

    .eh-strip-item:last-child {
        border-right: 0
    }

    .eh-strip-item b {
        display: block;
        font-family: var(--eh-head);
        font-size: clamp(1.4rem,3vw,2.2rem);
        color: var(--eh-blue);
        line-height: 1
    }

    .eh-strip-item span {
        display: block;
        margin-top: .4rem;
        font-size: .9rem;
        color: var(--eh-muted)
    }

/* ================= CARDS ================= */
.eh-cards {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 1.5rem
}

.eh-card {
    background: #fff;
    border: 1px solid var(--eh-line);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .4s,box-shadow .4s,border-color .4s
}

    .eh-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 22px 44px rgba(47,91,255,.16);
        border-color: rgba(47,91,255,.4)
    }

.eh-card-img {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(160deg,#9db7ff,#dbe5ff)
}

    .eh-card-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .7s
    }

.eh-card:hover .eh-card-img img {
    transform: scale(1.08)
}

.eh-code {
    position: absolute;
    left: 12px;
    top: 12px;
    font-family: var(--eh-mono);
    font-weight: 700;
    font-size: .8rem;
    padding: .25rem .65rem;
    border-radius: 6px;
    background: rgba(10,18,48,.85);
    color: var(--eh-red)
}

.eh-card-body {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    flex: 1
}

.eh-card h3 {
    font-size: 1.25rem
}

.eh-card p {
    color: var(--eh-muted);
    font-size: .95rem
}

.eh-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: auto;
    padding-top: .6rem
}

    .eh-tags span {
        font-size: .78rem;
        padding: .25rem .7rem;
        border-radius: 99px;
        background: var(--eh-tint);
        color: var(--eh-blue-d);
        font-weight: 600
    }

/* ================= SPLIT ================= */
.eh-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem,6vw,5rem);
    align-items: center
}

.eh-photo {
    border-radius: 18px;
    overflow: hidden;
    aspect-ratio: 4/3.4;
    background: linear-gradient(160deg,#9db7ff,#dbe5ff);
    box-shadow: 0 30px 60px rgba(10,18,48,.18)
}

    .eh-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover
    }

.eh-list {
    list-style: none;
    margin: 1.8rem 0 0;
    padding: 0;
    display: grid;
    gap: 1.1rem
}

    .eh-list li {
        display: grid;
        grid-template-columns: 40px 1fr;
        gap: 1rem
    }

    .eh-list .ic {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: var(--eh-blue);
        display: grid;
        place-items: center
    }

        .eh-list .ic svg {
            width: 20px;
            height: 20px;
            stroke: #fff;
            fill: none;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round
        }

    .eh-list h3 {
        font-size: 1.05rem;
        margin-bottom: .15rem
    }

    .eh-list p {
        color: var(--eh-muted);
        font-size: .93rem
    }

/* ================= CHECK GRID ================= */
.eh-grid4 {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 1rem
}

.eh-box {
    background: var(--eh-bg);
    border: 1px solid var(--eh-line);
    border-radius: 14px;
    padding: 1.4rem
}

    .eh-box h3 {
        font-size: 1.05rem;
        color: var(--eh-blue);
        margin-bottom: .9rem
    }

    .eh-box ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: grid;
        gap: .5rem;
        font-size: .94rem
    }

    .eh-box li {
        display: flex;
        align-items: center;
        gap: .6rem
    }

        .eh-box li::before {
            content: "";
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: var(--eh-blue);
            flex: none
        }

/* ================= STEPS ================= */
.eh-steps {
    display: grid;
    grid-template-columns: repeat(5,1fr);
    gap: 1.2rem;
    counter-reset: eh;
    position: relative
}

    .eh-steps::before {
        content: "";
        position: absolute;
        left: 5%;
        right: 5%;
        top: 26px;
        height: 2px;
        background: repeating-linear-gradient(90deg,var(--eh-blue) 0 8px,transparent 8px 16px);
        opacity: .4
    }

.eh-step {
    position: relative;
    text-align: center;
    padding: 0 .4rem
}

    .eh-step::before {
        counter-increment: eh;
        content: counter(eh);
        display: grid;
        place-items: center;
        width: 54px;
        height: 54px;
        margin: 0 auto 1rem;
        border-radius: 50%;
        background: var(--eh-blue);
        color: #fff;
        font-family: var(--eh-head);
        font-weight: 800;
        font-size: 1.2rem;
        box-shadow: 0 0 0 8px var(--eh-tint)
    }

    .eh-step h3 {
        font-size: 1.08rem;
        margin-bottom: .4rem
    }

    .eh-step p {
        color: var(--eh-muted);
        font-size: .92rem
    }

/* ================= FAQ ================= */
.eh-faq {
    max-width: 820px;
    margin-inline: auto
}

    .eh-faq details {
        border-bottom: 1px solid var(--eh-line)
    }

    .eh-faq summary {
        list-style: none;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        padding: 1.3rem 0;
        font-family: var(--eh-head);
        font-weight: 800;
        font-size: clamp(1.02rem,2vw,1.3rem)
    }

        .eh-faq summary::-webkit-details-marker {
            display: none
        }

        .eh-faq summary::after {
            content: "+";
            font-size: 1.6rem;
            line-height: 1;
            color: var(--eh-blue);
            transition: transform .3s
        }

    .eh-faq details[open] summary::after {
        transform: rotate(45deg)
    }

    .eh-faq details p {
        padding: 0 0 1.3rem;
        color: var(--eh-muted);
        max-width: 68ch
    }

/* ================= CTA ================= */
.eh-cta {
    background: linear-gradient(135deg,#0a1230,#1d3fd1);
    color: #fff;
    border-radius: 22px;
    padding: clamp(2.2rem,6vw,4.5rem);
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden
}

    .eh-cta::after {
        content: "";
        position: absolute;
        right: -80px;
        top: -80px;
        width: 280px;
        height: 280px;
        border-radius: 50%;
        border: 2px solid rgba(255,92,108,.4)
    }

    .eh-cta h2 {
        color: #fff;
        font-size: clamp(1.6rem,3.6vw,2.7rem);
        max-width: 20ch
    }

    .eh-cta p {
        color: rgba(255,255,255,.8);
        margin-top: .8rem;
        max-width: 46ch
    }

    .eh-cta .eh-btn-fill {
        background: #fff;
        color: var(--eh-blue);
        border-color: #fff;
        position: relative;
        z-index: 2
    }

        .eh-cta .eh-btn-fill:hover {
            background: transparent;
            color: #fff
        }

/* reveal */
.eh-js .eh-rv {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s ease,transform .8s ease
}

    .eh-js .eh-rv.eh-in {
        opacity: 1;
        transform: none
    }

/* ================= RESPONSIVE ================= */
@media (max-width:1100px) {
    .eh-cards {
        grid-template-columns: repeat(2,1fr)
    }

    .eh-grid4 {
        grid-template-columns: repeat(2,1fr)
    }

    .eh-steps {
        grid-template-columns: repeat(3,1fr);
        row-gap: 2rem
    }

        .eh-steps::before {
            display: none
        }
}

@media (max-width:900px) {
    .eh-hero-grid, .eh-split {
        grid-template-columns: 1fr
    }

    .eh-term {
        max-width: 560px;
        margin-inline: auto
    }

    .eh-badge {
        right: 0
    }

    .eh-split-img {
        max-width: 520px;
        margin-inline: auto;
        width: 100%
    }

    .eh-strip-grid {
        grid-template-columns: repeat(2,1fr)
    }

    .eh-strip-item:nth-child(2) {
        border-right: 0
    }

    .eh-strip-item:nth-child(-n+2) {
        border-bottom: 1px solid var(--eh-line)
    }
}

@media (max-width:767px) {
    .eh-page {
        --eh-offset: calc(var(--nav2-h,38px) + var(--nav-h,64px))
    }

    .eh-hero-cta .eh-btn {
        flex: 1 1 100%
    }

    .eh-cards {
        grid-template-columns: 1fr
    }

    .eh-steps {
        grid-template-columns: 1fr 1fr
    }

    .eh-card-img {
        height: 165px
    }

    .eh-term-body {
        font-size: .72rem
    }

    .eh-cta {
        text-align: center;
        justify-content: center
    }

        .eh-cta .eh-btn {
            width: 100%
        }
}

@media (max-width:480px) {
    .eh-wrap {
        width: min(1180px,100% - 1.6rem)
    }

    .eh-grid4, .eh-steps {
        grid-template-columns: 1fr
    }

    .eh-badge {
        bottom: -12%
    }
}

@media (prefers-reduced-motion:reduce) {
    .eh-page * {
        animation: none !important;
        transition: none !important
    }

    .eh-term-body .eh-line {
        opacity: 1
    }

    .eh-js .eh-rv {
        opacity: 1;
        transform: none
    }
}
