﻿/* =========================================================
   ESSP Login — Modern Blue Theme (consolidated)
   Fits every screen: 4K → laptop → short laptop → tablet →
   phone portrait → phone landscape. CSS only, markup untouched.
   ========================================================= */

:root {
    --navy: #071A45;
    --blue: #1D4ED8;
    --blue-dark: #1E40AF;
    --blue-light: #7DB4FF;
    --bg: #EEF3FF;
    --ink: #0B1B3F;
    --ink-2: #22314F;
    --muted: #4A5878;
    --line: #D5DFF3;
    --field: #F7F9FE;
    --error: #C62828;
    --radius: 14px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    /* one control height used by every input/button, scales with screen height */
    --ctl: clamp(38px, 5.4vh, 48px);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    height: 100%;
}

html, body {
    margin: 0;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto; /* never clip: if a screen is too small, it scrolls instead of cutting the form */
    background: var(--navy);
}

body {
    font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

svg {
    display: block;
    flex-shrink: 0;
}

/* =========================================================
   LAYOUT
   ========================================================= */
.page {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: center;
    background: var(--navy);
}

/* ---------- Decorative background ---------- */
.orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.orb-a {
    width: clamp(220px, 32vw, 460px);
    aspect-ratio: 1;
    top: -12%;
    right: -10%;
    background: radial-gradient(circle, rgba(59,130,246,.55), rgba(59,130,246,0) 70%);
    animation: drift 14s ease-in-out infinite;
}

.orb-b {
    width: clamp(200px, 28vw, 380px);
    aspect-ratio: 1;
    bottom: -12%;
    left: -8%;
    background: radial-gradient(circle, rgba(14,165,233,.45), rgba(14,165,233,0) 70%);
    animation: drift2 18s ease-in-out infinite;
}

.ring {
    position: absolute;
    width: clamp(280px, 40vw, 560px);
    height: auto;
    right: -14%;
    bottom: -16%;
    opacity: .35;
    pointer-events: none;
    z-index: -1;
    animation: spin 40s linear infinite;
}

.grid-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: linear-gradient(rgba(147,197,253,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(147,197,253,.07) 1px, transparent 1px);
    background-size: 48px 48px;
}

.scan {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 120px;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(96,165,250,0), rgba(96,165,250,.12), rgba(96,165,250,0));
    animation: scan 7s linear infinite;
}

/* =========================================================
   LEFT HERO
   ========================================================= */
.hero {
    position: relative;
    min-width: 0;
    color: #E6EEFF;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(12px, 3vh, 36px);
    padding: clamp(16px, 4vh, 56px) clamp(24px, 5vw, 88px) clamp(48px, 7vh, 72px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #2563EB;
    display: grid;
    place-items: center;
    transition: transform .4s var(--ease);
}

    .brand-logo svg {
        width: 24px;
        height: 24px;
    }

.brand:hover .brand-logo {
    transform: rotate(-8deg) scale(1.06);
}

.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-name {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: .06em;
}

.brand-sub {
    font-size: 12px;
    color: #A9BEEB;
    letter-spacing: .04em;
}

.hero-body {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 2vh, 26px);
    max-width: 560px;
    min-height: 0;
}

.hero h1 {
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: clamp(24px, min(4vw, 6.4vh), 58px);
    line-height: 1.08;
    letter-spacing: -.02em;
    color: #fff;
}

.headline {
    perspective: 800px;
}

    .headline .line1,
    .headline .hl {
        display: block;
    }

    .headline .hl {
        position: relative;
        width: max-content;
        max-width: 100%;
        color: transparent;
        background: linear-gradient(100deg, #7DB4FF 0%, #7DB4FF 35%, #FFFFFF 50%, #7DB4FF 65%, #7DB4FF 100%);
        background-size: 250% 100%;
        -webkit-background-clip: text;
        background-clip: text;
        animation: sheen 4s linear 1.8s infinite;
    }

.lead {
    margin: 0;
    font-size: clamp(13px, min(1.25vw, 2vh), 17px);
    line-height: 1.55;
    color: #B9CAEE;
}

    .lead.reveal {
        -webkit-mask-image: linear-gradient(90deg, #000 45%, rgba(0,0,0,.25) 55%);
        mask-image: linear-gradient(90deg, #000 45%, rgba(0,0,0,.25) 55%);
        -webkit-mask-size: 250% 100%;
        mask-size: 250% 100%;
        -webkit-mask-position: 100% 0;
        mask-position: 100% 0;
        animation: rise .8s var(--ease) .75s forwards, maskSweep 2.2s ease 1.1s forwards;
    }

.copy {
    position: absolute;
    left: clamp(24px, 5vw, 88px);
    bottom: clamp(12px, 2.5vh, 28px);
    margin: 0;
    font-size: 13px;
    color: #8FA6D6;
}

/* ---------- Illustration ---------- */
.illus {
    /* width is limited by height too, so it never pushes the page taller than the screen */
    width: min(100%, 480px, 46vh);
}

    .illus svg {
        width: 100%;
        height: auto;
        overflow: visible;
    }

    .illus g, .illus .bar, .illus .spark, .illus .trend-dot, .illus .fill-line {
        transform-box: fill-box;
    }

.float-main {
    animation: bob 6s ease-in-out infinite;
}

.float-a {
    animation: bob 5s ease-in-out -1s infinite;
}

.float-b {
    animation: bob 5.5s ease-in-out -2.5s infinite;
}

.float-c {
    animation: bob 6.5s ease-in-out -.5s infinite;
}

.bar {
    transform-origin: 50% 100%;
    animation: grow 3.2s var(--ease) infinite alternate;
}

.b2 {
    animation-delay: .2s;
}

.b3 {
    animation-delay: .4s;
}

.b4 {
    animation-delay: .6s;
}

.b5 {
    animation-delay: .8s;
}

.trend {
    stroke-dasharray: 320;
    stroke-dashoffset: 320;
    animation: draw 3.2s var(--ease) 1s infinite alternate;
}

.trend-dot {
    transform-origin: center;
    animation: blink 1.6s ease-in-out infinite;
}

.illus .check {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: draw 2.4s var(--ease) 1.2s infinite alternate;
}

.fill-line {
    transform-origin: 0 50%;
    animation: fillx 3s var(--ease) infinite alternate;
}

.shimmer {
    animation: fade 2.4s ease-in-out infinite;
}

.hand-m, .hand-h {
    transform-box: view-box;
    transform-origin: 410px 250px;
}

.hand-m {
    animation: spin 6s linear infinite;
}

.hand-h {
    animation: spin 36s linear infinite;
}

.dash {
    animation: dashmove 1.4s linear infinite;
}

.spark {
    transform-origin: center;
    animation: twinkle 3s ease-in-out infinite;
}

.s2 {
    animation-delay: .8s;
}

.s3 {
    animation-delay: 1.6s;
}

.s4 {
    animation-delay: 2.2s;
}

.illus:hover .float-a {
    animation-duration: 2.5s;
}

.illus:hover .float-b {
    animation-duration: 2.8s;
}

.illus:hover .bar {
    animation-duration: 1.4s;
}

/* =========================================================
   RIGHT AUTH CARD
   ========================================================= */
.auth {
    position: relative;
    z-index: 2;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 3vh, 48px) clamp(16px, 3vw, 48px);
}

.card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border: 0;
    border-radius: 22px;
    padding: clamp(16px, 3.2vh, 34px) clamp(18px, 2.6vw, 32px);
    box-shadow: 0 40px 80px -30px rgba(0,0,0,.55), 0 0 0 1px rgba(147,197,253,.15);
    animation: slideIn .9s var(--ease) .2s both;
    transition: box-shadow .4s ease;
}

    .card:hover {
        box-shadow: 0 50px 90px -30px rgba(0,0,0,.6), 0 0 0 1px rgba(147,197,253,.35), 0 0 60px -10px rgba(59,130,246,.45);
    }

.card-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: clamp(2px, .6vh, 6px);
    margin-bottom: clamp(10px, 2.4vh, 24px);
}

    .card-head h2 {
        margin: 0;
        font-family: 'Sora', sans-serif;
        font-size: clamp(18px, min(1.8vw, 3vh), 24px);
        font-weight: 700;
        letter-spacing: -.01em;
        color: var(--ink);
    }

    .card-head p {
        margin: 0;
        font-size: 14px;
        color: var(--muted);
    }

.card-logo {
    display: block;
    height: clamp(40px, 9vh, 96px);
    width: auto;
    max-width: 80%;
    object-fit: contain;
    margin: 0 auto clamp(2px, 1vh, 10px);
    filter: drop-shadow(0 6px 14px rgba(29,78,216,.12));
    animation: rise .8s var(--ease) .5s both;
    transition: transform .35s var(--ease);
}

.card:hover .card-logo {
    transform: scale(1.06) rotate(-1.5deg);
}

/* ---------- Form ---------- */
.card .form {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1.6vh, 15px);
    margin: 0;
}

.card .group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.card .field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    height: var(--ctl);
    padding: 0 4px 0 8px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    background: var(--field);
    color: #5B6B8F;
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

    .card .field:hover {
        border-color: #93B4F5;
    }

    .card .field:focus-within {
        border-color: var(--blue);
        background: #fff;
        box-shadow: 0 0 0 4px rgba(29,78,216,.14);
    }

.f-ic {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 9px;
    background: #E3ECFF;
    color: var(--blue);
    display: grid;
    place-items: center;
    transition: background .25s ease, color .25s ease, transform .3s var(--ease);
}

    .f-ic svg {
        width: 17px;
        height: 17px;
    }

.card .field:focus-within .f-ic {
    background: var(--blue);
    color: #fff;
    transform: scale(1.06);
}

/* Neutralise the Bootstrap/Metronic classes the Razor helpers add
   (form-control h-auto py-4 px-8 mb-5 mt-3 placeholder-white) */
.card .field input,
.card .field .form-control {
    flex: 1 1 auto;
    width: auto !important;
    min-width: 0;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0;
    background: transparent !important;
    box-shadow: none !important;
    font: inherit;
    font-size: 15px;
    line-height: normal;
    color: var(--ink) !important;
}

    .card .field input::placeholder,
    .card .field .form-control::placeholder,
    .card .field .placeholder-white::placeholder {
        color: #7A88A8 !important;
        opacity: 1;
    }

    .card .field input:focus-visible {
        outline: none;
    }

    /* Captcha field invalid state */
    .card .field.captchavalidate:has(.is-invalid),
    .card .field .form-control.is-invalid ~ .error-message {
        border-color: #F64E60;
    }

/* ---------- Password eye (the <a class="passwordeye">) ---------- */
.card .passwordeye {
    flex-shrink: 0;
    width: 38px;
    height: calc(var(--ctl) - 10px);
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #5B6B8F;
    cursor: pointer;
    text-decoration: none;
    transition: color .2s ease, background .2s ease;
}

    .card .passwordeye:hover {
        color: var(--blue);
        background: #E3ECFF;
    }

    .card .passwordeye i {
        font-size: 16px;
        line-height: 1;
    }

/* ---------- Captcha ---------- */
.captcha-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.card .cap-field {
    padding: 0 8px 0 12px;
}

.cap-box {
    height: var(--ctl);
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 2px 0 10px;
    border: 1.5px dashed #B8CAF0;
    border-radius: var(--radius);
    background: #F8F8FF;
    overflow: hidden;
}

.cap-code {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 100%;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .08em;
    color: #1E3A8A;
    user-select: none;
    white-space: nowrap;
}

    /* whatever _Captcha renders (image / text / its own refresh link) stays inside the box */
    .cap-code img {
        display: block;
        height: calc(var(--ctl) - 12px);
        width: auto;
        max-width: 120px;
        object-fit: contain;
    }

    .cap-code a,
    .cap-code button {
        line-height: 1;
    }

    .cap-code.pop {
        animation: capPop .45s var(--ease);
    }

.cap-refresh {
    width: 30px;
    height: calc(var(--ctl) - 12px);
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #5B6B8F;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
    transition: color .2s ease, background .2s ease, transform .5s var(--ease);
}

    .cap-refresh svg {
        width: 16px;
        height: 16px;
    }

    .cap-refresh:hover {
        color: var(--blue);
        background: #fff;
        transform: rotate(180deg);
    }

.captchavalidate {
    position: relative;
}

.error-message {
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: -26px;
    padding: 2px 7px;
    border-radius: 4px;
    background: #FFE1E0;
    color: #CB0804;
    font-size: 11px;
    line-height: 16px;
    white-space: nowrap;
}

    .error-message::before {
        content: "";
        position: absolute;
        top: -7px;
        right: 18px;
        border-style: solid;
        border-width: 0 7px 7px;
        border-color: #FFE1E0 transparent;
    }

/* leave room for the tooltip so it doesn't sit on the LOGIN button */
.card .group:has(.error-message) {
    margin-bottom: 14px;
}

/* ---------- Primary button ---------- */
.card .btn {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: var(--ctl);
    margin: 0;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: var(--blue);
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform .2s ease, box-shadow .3s ease, background .3s ease;
}

    .card .btn .btn-text {
        letter-spacing: .08em;
    }

    .card .btn .arrow {
        width: 18px;
        height: 18px;
        transition: transform .3s var(--ease);
    }

    .card .btn::after {
        content: "";
        position: absolute;
        top: 0;
        left: -60%;
        width: 40%;
        height: 100%;
        background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
        transform: skewX(-20deg);
    }

    .card .btn:hover {
        transform: translateY(-2px);
        background: var(--blue-dark);
        color: #fff;
        box-shadow: 0 14px 30px -10px rgba(29,78,216,.7);
    }

        .card .btn:hover::after {
            animation: shine .8s ease;
        }

        .card .btn:hover .arrow {
            transform: translateX(4px);
        }

    .card .btn:active {
        transform: translateY(0);
    }

    .card .btn:disabled {
        cursor: progress;
    }

.spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

.btn.loading .spinner {
    display: block;
}

.btn.loading .arrow {
    display: none;
}

/* ---------- Forgot password / version row ---------- */
.card .form > div[style*="space-between"] {
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
}

.help {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.link {
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
    transition: background-size .3s ease, color .2s ease;
}

    .link:hover {
        color: #0B2A8A;
        text-decoration: none;
        background-size: 100% 2px;
    }

.version label {
    width: auto !important;
    margin: 0;
    font-size: 12px;
    white-space: nowrap;
}

/* TempData message: no huge Bootstrap margin, hidden when empty */
.card .form .form-group {
    margin: 0 !important;
    font-size: 13px;
}

    .card .form .form-group:has(> span:empty) {
        display: none;
    }

:focus-visible {
    outline: 3px solid #60A5FA;
    outline-offset: 2px;
    border-radius: 6px;
}

/* ---------- Entrance helpers ---------- */
.rise {
    opacity: 0;
    animation: rise .8s var(--ease) forwards;
}

.d1 {
    animation-delay: .1s;
}

.d2 {
    animation-delay: .25s;
}

.d3 {
    animation-delay: .4s;
}

.d4 {
    animation-delay: .55s;
}

.d5 {
    animation-delay: .7s;
}

.d6 {
    animation-delay: .85s;
}

/* =========================================================
   KEYFRAMES
   ========================================================= */
@keyframes bob {
    0%,100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes grow {
    from {
        transform: scaleY(.35);
    }

    to {
        transform: scaleY(1);
    }
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fillx {
    from {
        transform: scaleX(.15);
    }

    to {
        transform: scaleX(1);
    }
}

@keyframes fade {
    0%,100% {
        opacity: .8;
    }

    50% {
        opacity: .35;
    }
}

@keyframes blink {
    0%,100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.6);
        opacity: .5;
    }
}

@keyframes dashmove {
    to {
        stroke-dashoffset: -24;
    }
}

@keyframes twinkle {
    0%,100% {
        opacity: .2;
        transform: scale(.7);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes sheen {
    from {
        background-position: 150% 0;
    }

    to {
        background-position: -100% 0;
    }
}

@keyframes maskSweep {
    to {
        -webkit-mask-position: 0 0;
        mask-position: 0 0;
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes drift {
    0%,100% {
        transform: translate(0,0) scale(1);
    }

    50% {
        transform: translate(30px,-40px) scale(1.08);
    }
}

@keyframes drift2 {
    0%,100% {
        transform: translate(0,0);
    }

    50% {
        transform: translate(-40px,30px);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes scan {
    from {
        transform: translateY(-120px);
    }

    to {
        transform: translateY(110vh);
    }
}

@keyframes shine {
    from {
        left: -60%;
    }

    to {
        left: 130%;
    }
}

@keyframes capPop {
    0% {
        transform: scale(.6);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* =========================================================
   RESPONSIVE — WIDTH
   ========================================================= */

/* Large / 4K screens */
@media (min-width: 1600px) {
    .card {
        max-width: 430px;
    }

    .hero-body {
        max-width: 640px;
    }
}

/* Laptops */
@media (max-width: 1200px) {
    .page {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

/* Small laptops / large tablets landscape */
@media (max-width: 1100px) and (min-width: 961px) {
    .hero {
        padding-left: 32px;
        padding-right: 24px;
    }

    .card {
        max-width: 370px;
    }
}

/* Tablets & phones portrait: stack — compact header on top, card below */
@media (max-width: 960px) {
    .page {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        align-items: stretch;
    }

    .hero {
        justify-content: flex-start;
        gap: clamp(10px, 2vh, 18px);
        padding: clamp(16px, 3vh, 32px) clamp(18px, 5vw, 40px) clamp(4px, 1vh, 12px);
    }

    .hero-body {
        max-width: 680px;
        gap: clamp(6px, 1.2vh, 12px);
    }

    .hero h1 {
        font-size: clamp(22px, min(6vw, 4vh), 40px);
    }

    .illus, .copy {
        display: none;
    }

    .lead {
        font-size: 14px;
    }

    .auth {
        align-items: flex-start;
        padding: clamp(10px, 2vh, 24px) 16px clamp(16px, 3vh, 32px);
    }

    .card {
        max-width: 440px;
        animation-name: rise;
    }
}

/* Large phones */
@media (max-width: 640px) {
    /* 16px stops iOS zooming into inputs */
    .card .field input,
    .card .field .form-control {
        font-size: 16px;
    }

    .lead {
        display: none;
    }

    .card {
        border-radius: 20px;
    }

    .card-logo {
        height: clamp(44px, 8vh, 68px);
    }

    .brand-sub {
        font-size: 11px;
    }
}

/* Small phones */
@media (max-width: 420px) {
    .hero {
        padding: 16px 16px 4px;
    }

    .auth {
        padding-left: 12px;
        padding-right: 12px;
    }

    .card {
        padding: 18px 16px;
        border-radius: 18px;
    }

    .card-head p {
        font-size: 13px;
    }

    .brand-logo {
        width: 38px;
        height: 38px;
    }

    .brand-name {
        font-size: 20px;
    }
}

/* Very small phones (≤ 360px) */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 22px;
    }

    .captcha-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .cap-box {
        justify-content: space-between;
    }

    .f-ic {
        width: 26px;
        height: 26px;
    }

    .card .field {
        gap: 8px;
    }
}

/* =========================================================
   RESPONSIVE — HEIGHT (desktop / laptop, side by side)
   ========================================================= */

/* 1366×768, 1280×720 etc. */
@media (min-width: 961px) and (max-height: 760px) {
    :root {
        --ctl: clamp(36px, 5.6vh, 42px);
    }

    .hero {
        gap: 16px;
    }

    .hero-body {
        gap: 12px;
    }

    .hero h1 {
        font-size: clamp(26px, min(3.4vw, 6vh), 44px);
    }

    .illus {
        width: min(100%, 380px, 40vh);
    }

    .card-logo {
        height: clamp(40px, 8vh, 58px);
    }

    .card-head {
        margin-bottom: 12px;
    }
}

/* very short desktop windows: drop the illustration */
@media (min-width: 961px) and (max-height: 600px) {
    .illus {
        display: none;
    }

    .card-head p {
        display: none;
    }
}

/* =========================================================
   RESPONSIVE — HEIGHT (stacked portrait)
   ========================================================= */
@media (max-width: 960px) and (max-height: 700px) {
    .lead {
        display: none;
    }
}

@media (max-width: 960px) and (max-height: 600px) {
    .hero-body {
        display: none;
    }

    .card-head p {
        display: none;
    }
}

/* =========================================================
   PHONES IN LANDSCAPE: side by side, very compact
   ========================================================= */
@media (orientation: landscape) and (max-height: 560px) {
    :root {
        --ctl: 36px;
    }

    .page {
        grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
        grid-template-rows: 1fr;
        align-items: center;
    }

    .hero {
        justify-content: center;
        padding: 12px 20px;
        gap: 10px;
    }

    .hero-body {
        display: flex;
        gap: 6px;
    }

    .hero h1 {
        font-size: clamp(18px, 6vh, 30px);
    }

    .illus, .lead, .copy {
        display: none;
    }

    .auth {
        align-items: center;
        padding: 8px 12px;
    }

    .card {
        max-width: 360px;
        padding: 10px 16px;
        border-radius: 16px;
    }

    .card-logo {
        height: 30px;
        margin-bottom: 0;
    }

    .card-head {
        margin-bottom: 6px;
    }

        .card-head h2 {
            font-size: 16px;
        }

        .card-head p {
            display: none;
        }

    .card .form {
        gap: 6px;
    }

    .f-ic {
        width: 24px;
        height: 24px;
    }

        .f-ic svg {
            width: 14px;
            height: 14px;
        }

    .card .field input,
    .card .field .form-control {
        font-size: 14px;
    }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }

    .rise, .card, .card-logo {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }

    .headline .hl {
        color: #7DB4FF;
        background: none;
    }

    .lead.reveal {
        -webkit-mask-image: none;
        mask-image: none;
    }
}
