/* VACK Voice authentication: split brand panel and a quiet form panel.
   Colours are the approved brand tokens, nothing else. */

:root {
    --vv-bg: #071426;
    --vv-surface: #0E1C31;
    --vv-raised: #122A48;
    --vv-border: #263A55;
    --vv-hair: #1D2E45;
    --vv-blue: #2588F5;
    --vv-blue-hover: #3E9BFF;
    --vv-ice: #6FB2FF;
    --vv-cyan: #43B8F5;
    --vv-text: #F3F7FC;
    --vv-soft: #D7E6F7;
    --vv-muted: #A8B7CA;
    --vv-dim: #7C8DA4;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body.afbody {
    background: var(--vv-bg);
    color: var(--vv-text);
    font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.authpage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    animation: afFade .5s ease both;
}

@keyframes afFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- brand side */
.afside {
    position: relative;
    overflow: hidden;
    padding: 44px 52px;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(1100px 620px at 12% -10%, rgba(37, 136, 245, .22), transparent 60%),
        radial-gradient(760px 520px at 88% 108%, rgba(67, 184, 245, .16), transparent 62%),
        linear-gradient(155deg, #071426 0%, #0E1C31 46%, #122A48 100%);
}

.afside::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 92%, rgba(7, 20, 38, .55));
    pointer-events: none;
}

.afbrand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    position: relative;
    z-index: 2;
    width: fit-content;
}

.afbrand img { height: 34px; width: auto; display: block; }

.afbrand b {
    font-size: 20px;
    letter-spacing: .2px;
    font-weight: 800;
    color: var(--vv-text);
}

.afbrand b em { font-style: normal; color: var(--vv-ice); }

.afside-body {
    position: relative;
    z-index: 2;
    margin-top: auto;
    margin-bottom: auto;
    padding: 26px 0 8px;
    max-width: 470px;
}

.afside h1 {
    font-size: 40px;
    line-height: 1.12;
    letter-spacing: -.6px;
    margin: 0 0 16px;
    font-weight: 750;
}

.afside h1 span { color: var(--vv-ice); }

.afside .aflead {
    color: var(--vv-soft);
    font-size: 15.5px;
    line-height: 1.65;
    margin: 0 0 22px;
    max-width: 430px;
}

.afstatement {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: var(--vv-ice);
    letter-spacing: .2px;
    font-weight: 600;
    margin-bottom: 20px;
}

.afstatement i {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--vv-cyan);
    box-shadow: 0 0 12px rgba(67, 184, 245, .8);
}

.afcaps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.afcaps li {
    font-size: 12px;
    color: var(--vv-muted);
    border: 1px solid var(--vv-border);
    background: rgba(18, 42, 72, .55);
    padding: 6px 12px;
    border-radius: 999px;
}

/* the four tools, as one connected scene */
.afart {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0 10px;
    max-width: 470px;
}
.afart::before {
    content: "";
    position: absolute;
    left: 4%; right: 4%; top: 6%; bottom: 6%;
    background: radial-gradient(closest-side, rgba(37, 136, 245, .2), transparent 74%);
    filter: blur(20px);
    pointer-events: none;
}

.afcardf {
    position: relative;
    border-radius: 14px;
    border: 1px solid rgba(38, 58, 85, .95);
    background: linear-gradient(160deg, rgba(18, 42, 72, .96), rgba(14, 28, 49, .94));
    box-shadow: 0 18px 40px rgba(3, 9, 20, .5);
    animation: afFloat 7s ease-in-out infinite;
    padding: 12px;
    min-height: 0;
}

.afcardf small {
    display: block;
    font-size: 10.5px;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: #93A6BC;
    margin-bottom: 8px;
}

.af-image { margin-top: 14px; animation-delay: -2.2s; }
.af-video { animation-delay: -3.4s; }
.af-reel { margin-top: 14px; animation-delay: -5s; }

.af-wave { display: flex; align-items: flex-end; gap: 3px; height: 42px; }
.af-wave i {
    flex: 1;
    background: linear-gradient(180deg, var(--vv-cyan), var(--vv-blue));
    border-radius: 3px;
    animation: afWave 1.6s ease-in-out infinite;
    opacity: .9;
}
.af-wave i:nth-child(2n) { animation-delay: .18s; }
.af-wave i:nth-child(3n) { animation-delay: .34s; }
.af-wave i:nth-child(4n) { animation-delay: .5s; }

.af-shot {
    height: 74px;
    border-radius: 10px;
    background:
        radial-gradient(60% 60% at 30% 25%, rgba(255, 255, 255, .35), transparent 60%),
        linear-gradient(140deg, #2588F5, #43B8F5 55%, #6FB2FF);
    position: relative;
    overflow: hidden;
}
.af-shot::after {
    content: "";
    position: absolute;
    left: -30%; top: 55%;
    width: 160%; height: 70%;
    background: linear-gradient(180deg, rgba(7, 20, 38, .15), rgba(7, 20, 38, .55));
    transform: rotate(-8deg);
}

.af-frame {
    height: 74px;
    border-radius: 10px;
    background: linear-gradient(140deg, rgba(37, 136, 245, .35), rgba(67, 184, 245, .18));
    display: grid;
    place-items: center;
    border: 1px solid rgba(111, 178, 255, .28);
}
.af-play {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(243, 247, 252, .95);
    display: grid; place-items: center;
    box-shadow: 0 6px 20px rgba(37, 136, 245, .45);
}
.af-play::after {
    content: "";
    width: 0; height: 0;
    border-left: 11px solid var(--vv-blue);
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    margin-left: 3px;
}

.af-track { display: flex; flex-direction: column; gap: 6px; }
.af-track i {
    height: 13px;
    border-radius: 5px;
    background: linear-gradient(90deg, rgba(37, 136, 245, .85), rgba(67, 184, 245, .35));
}
.af-track i:nth-child(2) { width: 78%; opacity: .8; }
.af-track i:nth-child(3) { width: 56%; opacity: .65; }
.af-track i:nth-child(4) { width: 88%; opacity: .5; }

@keyframes afFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}
@keyframes afWave {
    0%, 100% { height: 30%; }
    50% { height: 96%; }
}

.afside-foot {
    position: relative;
    z-index: 2;
    color: #93A6BC;
    font-size: 12.5px;
    line-height: 1.6;
}
.afside-foot p { margin: 0; }

/* ---------------------------------------------------------------- form side */
.afmain {
    background: var(--vv-surface);
    border-left: 1px solid var(--vv-hair);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
}

.afcard { width: 100%; max-width: 420px; }

.afcard-brand {
    display: none;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 22px;
}
.afcard-brand img { height: 30px; width: auto; }
.afcard-brand b { color: var(--vv-text); font-size: 18px; font-weight: 800; }
.afcard-brand b em { font-style: normal; color: var(--vv-ice); }

.afcard h2 {
    font-size: 27px;
    line-height: 1.22;
    letter-spacing: -.3px;
    margin: 0 0 10px;
    font-weight: 720;
    color: var(--vv-text);
}

.afcard .afsub {
    color: var(--vv-muted);
    font-size: 14.5px;
    line-height: 1.6;
    margin: 0 0 26px;
}

.affield { margin-bottom: 16px; }

.affield label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--vv-soft);
    margin-bottom: 8px;
}

.affield label .afopt { color: var(--vv-dim); font-weight: 500; }

.afinput {
    width: 100%;
    height: 50px;
    border-radius: 10px;
    background: var(--vv-raised);
    border: 1px solid var(--vv-border);
    color: var(--vv-text);
    font: inherit;
    font-size: 15px;
    padding: 0 14px;
    transition: border-color .16s, box-shadow .16s, background .16s;
}

.afinput::placeholder { color: var(--vv-dim); }

.afinput:hover { border-color: #2E4767; }

.afinput:focus {
    outline: none;
    border-color: var(--vv-blue);
    box-shadow: 0 0 0 3px rgba(37, 136, 245, .18);
    background: #142F50;
}

.afinput.is-error { border-color: #E06A6A; }

.afhint { font-size: 12px; color: var(--vv-dim); margin-top: 7px; }
.afhint.is-error { color: #F09696; }

.afpw { position: relative; }
.afpw .afinput { padding-right: 66px; }
.afpw-toggle {
    position: absolute;
    right: 6px; top: 50%;
    transform: translateY(-50%);
    height: 38px;
    min-width: 44px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--vv-ice);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .16s;
}
.afpw-toggle:hover { background: rgba(111, 178, 255, .12); }
.afpw-toggle:focus-visible { outline: 2px solid var(--vv-blue); outline-offset: 2px; }

.afrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 2px 0 22px;
    flex-wrap: wrap;
}

.afcheck {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    color: var(--vv-soft);
    line-height: 1.5;
    cursor: pointer;
    min-height: 24px;
}

.afcheck input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px; height: 20px;
    margin: 0;
    flex: 0 0 20px;
    border-radius: 6px;
    border: 1px solid #3A5578;
    background: #142F50;
    cursor: pointer;
    position: relative;
    transition: background .16s, border-color .16s;
}

.afcheck input:checked { background: var(--vv-blue); border-color: var(--vv-blue); }

.afcheck input:checked::after {
    content: "";
    position: absolute;
    left: 6px; top: 2px;
    width: 6px; height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(42deg);
}

.afcheck input:focus-visible { outline: 2px solid var(--vv-blue); outline-offset: 2px; }

.afcheck a, .aflink {
    color: var(--vv-ice);
    text-decoration: none;
    font-weight: 600;
}
.afcheck a:hover, .aflink:hover { text-decoration: underline; }

.afbtn {
    width: 100%;
    height: 52px;
    border-radius: 10px;
    border: 0;
    background: var(--vv-blue);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 650;
    letter-spacing: .1px;
    cursor: pointer;
    transition: background .18s, transform .12s, box-shadow .18s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.afbtn:hover { background: var(--vv-blue-hover); box-shadow: 0 12px 28px rgba(37, 136, 245, .28); }
.afbtn:active { transform: translateY(1px); }
.afbtn:focus-visible { outline: 3px solid rgba(62, 155, 255, .45); outline-offset: 2px; }
.afbtn[disabled] { opacity: .72; cursor: progress; box-shadow: none; }

.afbtn .afspin {
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    animation: afSpin .7s linear infinite;
    display: none;
}

.afbtn.is-busy .afspin { display: inline-block; }

@keyframes afSpin { to { transform: rotate(360deg); } }

.afdivide {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 18px;
    color: var(--vv-dim);
    font-size: 12px;
    letter-spacing: .6px;
    text-transform: uppercase;
}
.afdivide::before, .afdivide::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--vv-hair);
}

.afswap {
    margin: 22px 0 0;
    font-size: 14px;
    color: var(--vv-muted);
    text-align: center;
}
.afswap a { color: var(--vv-ice); font-weight: 650; text-decoration: none; }
.afswap a:hover { text-decoration: underline; }

.afnotice {
    border: 1px solid rgba(37, 136, 245, .35);
    background: rgba(37, 136, 245, .1);
    color: var(--vv-soft);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 20px;
}

.afnotice.is-error {
    border-color: rgba(224, 106, 106, .4);
    background: rgba(224, 106, 106, .1);
    color: #F7C9C9;
}

.auth-errors {
    border: 1px solid rgba(224, 106, 106, .4);
    background: rgba(224, 106, 106, .1);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 20px;
    color: #F7C9C9;
    font-size: 13.5px;
}
.auth-errors ul { margin: 6px 0 0; padding-left: 18px; }
.auth-errors p { margin: 0; font-weight: 600; }

.affoot {
    margin: 26px 0 0;
    font-size: 12.5px;
    color: #93A6BC;
    text-align: center;
    line-height: 1.7;
}
.affoot a { color: var(--vv-muted); text-decoration: none; }
.affoot a:hover { color: var(--vv-ice); }

.afhelp { text-align: center; font-size: 12.5px; color: var(--vv-dim); margin-top: 14px; }
.afhelp a { color: var(--vv-muted); }

/* hidden must beat icon sizing on every icon */
svg[hidden] { display: none !important; }

/* ---------------------------------------------------------------- small laptops */
@media (min-width: 961px) and (max-height: 800px) {
    .afside { padding: 24px 42px 22px; }
    .afside h1 { font-size: 28px; margin-bottom: 8px; }
    .afside .aflead { font-size: 13px; line-height: 1.5; margin-bottom: 10px; }
    .afart { margin: 10px 0 6px; gap: 8px; }
    .afcardf { padding: 9px; }
    .afcardf small { font-size: 9.5px; margin-bottom: 6px; }
    .af-wave { height: 28px; }
    .af-shot, .af-frame { height: 48px; }
    .af-track i { height: 9px; }
    .af-play { width: 30px; height: 30px; }
    .afstatement { margin-bottom: 10px; font-size: 12px; }
    .afcaps li { padding: 4px 9px; font-size: 11px; }
    .afmain { padding: 18px 32px; }
    .afcard h2 { font-size: 21px; }
    .afcard .afsub { font-size: 13px; margin-bottom: 12px; }
    .affield { margin-bottom: 9px; }
    .afinput, .afbtn { height: 46px; }
    .afhint { display: none; }
    .afrow { margin-bottom: 12px; }
    .affoot { margin-top: 10px; font-size: 11px; }
    .afswap { margin-top: 10px; }
}

/* very short: the art stays, it just gets smaller */
@media (min-width: 961px) and (max-height: 700px) {
    .afside { padding: 18px 42px 16px; }
    .afside h1 { font-size: 24px; }
    .afside .aflead { display: none; }
    .afart { margin: 8px 0 4px; }
    .af-shot, .af-frame { height: 40px; }
    .af-wave { height: 22px; }
    .afstatement { margin: 6px 0 8px; font-size: 11.5px; }
    .afcaps { display: none; }
    .afmain { padding: 14px 32px; }
    .afcard h2 { font-size: 20px; margin-bottom: 6px; }
    .afcard .afsub { display: none; }
    .afinput, .afbtn { height: 44px; }
    .affield { margin-bottom: 8px; }
}

/* ---------------------------------------------------------------- tablets and phones */
@media (max-width: 960px) {
    /* phones and tablets: no motion, it is a desktop touch only */
    .authpage, .afcardf, .af-wave i { animation: none !important; }

    .authpage { display: block; min-height: 100dvh; }

    /* the brand block shrinks into a header, the four tools still show */
    .afside {
        display: block;
        padding: 20px 22px 4px;
        background: transparent;
        overflow: visible;
    }
    .afside::after { display: none; }
    .afbrand { margin-bottom: 14px; }
    .afbrand img { height: 28px; }
    .afbrand b { font-size: 18px; }
    .afside-body { padding: 0; margin: 0; max-width: none; }
    .afside h1 { font-size: 24px; line-height: 1.18; margin-bottom: 12px; letter-spacing: -.4px; }
    .afside .aflead,
    .afstatement,
    .afcaps,
    .afside-foot { display: none; }

    .afart {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin: 0 0 4px;
        max-width: none;
    }
    .afart::before { display: none; }
    .afcardf { padding: 8px 9px; animation: none; margin-top: 0; }
    .afcardf small { font-size: 9px; letter-spacing: .6px; margin-bottom: 5px; color: #A8B7CA; }
    .af-wave { height: 22px; }
    .af-shot, .af-frame { height: 40px; }
    .af-track { gap: 4px; }
    .af-track i { height: 7px; }
    .af-play { width: 24px; height: 24px; }
    .af-play::after { border-left-width: 8px; border-top-width: 5px; border-bottom-width: 5px; }

    .afmain {
        border-left: 0;
        padding: 18px 22px 38px;
        align-items: flex-start;
        background:
            radial-gradient(520px 280px at 50% -12%, rgba(37, 136, 245, .18), transparent 70%),
            var(--vv-surface);
    }
    .afcard { max-width: 480px; margin: 0 auto; }
    .afcard-brand { display: none; }
    .afcard h2 { font-size: 23px; }
    .afinput { height: 52px; font-size: 16px; }
    .afbtn { height: 52px; }
    .affield { margin-bottom: 14px; }
    .afhint { display: block; }
}

@media (max-width: 420px) {
    .afside { padding: 18px 20px 2px; }
    .afmain { padding: 16px 20px 34px; }
    .afside h1 { font-size: 22px; }
    .afcard h2 { font-size: 22px; }
}

/* short screens: keep the submit reachable when the keyboard is up */
@media (max-height: 700px) and (max-width: 960px) {
    .afmain { padding-top: 14px; padding-bottom: 24px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
    .authpage, .afcardf, .af-wave i { animation: none !important; }
    .afcardf { transform: none !important; }
}

/* Phones and tablets: the form is the page. No art block, no tool cards. */
@media (max-width: 960px) {
    .afside-body,
    .afart { display: none !important; }
    .afside { padding: 16px 22px 0; }
    .afbrand { margin: 0 0 10px; justify-content: center; }
    .afmain { padding-top: 8px; }
}
