﻿:root {
    --ink: #1C1626;
    --purple: #6B2FA0;
    --magenta: #C20B9C;
    --blue: #2F80ED;
    --amber: #FFB424;
    --green: #1B7A4B;
    --grad: linear-gradient(135deg,#6B2FA0,#C20B9C);
    --paper: #FFFFFF;
    --rule: rgba(60,70,110,.07);
    --line: #DCD7E4;
    --muted: #8A8494;
    --edge: rgba(28,22,38,.13);
    --edge-soft: rgba(28,22,38,.07);
}

* {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Inter",system-ui,sans-serif;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    background: var(--paper);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(22px,5vw,64px) clamp(16px,4vw,44px);
    position: relative;
    overflow-x: hidden;
}

/* login body must grow and scroll, never lock to the viewport */
body.auth-wrapper {
    height: auto !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

::selection {
    background: #F8C8DC;
    color: var(--ink);
}

/* the white ruled-paper background (unchanged) */
.pad {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(620px 480px at 94% -6%,rgba(194,11,156,.045),transparent 60%), radial-gradient(640px 540px at 3% 108%,rgba(107,47,160,.05),transparent 60%), repeating-linear-gradient(180deg,transparent 0,transparent 33px,var(--rule) 33px,var(--rule) 34px);
}

/* ===== book cover: white plate + hairline frame + left binding ===== */
.cover {
    --bind: clamp(22px,5.5vw,32px);
    position: relative;
    z-index: 2;
    margin: auto;
    width: 100%;
    max-width: 452px;
    background: #fff;
    border: 1px solid var(--edge-soft);
    border-radius: 3px 6px 6px 3px;
    /* book depth: gutter shading near the spine + a stack of page edges + lift */
    box-shadow: inset 26px 0 30px -26px rgba(28,22,38,.16), 2px 3px 0 #F4F2F7, 4px 6px 0 #F1EDF5, 6px 9px 0 #EEE9F3, 8px 12px 0 #EBE6F1, 11px 16px 0 #E8E3EE, 13px 20px 30px -16px rgba(28,22,38,.28), 0 42px 72px -34px rgba(28,22,38,.36);
    padding: clamp(30px,6vw,44px) clamp(24px,5vw,34px) clamp(24px,5vw,34px) calc(var(--bind) + clamp(18px,4vw,28px));
}
    /* hairline frame around the cover face */
    .cover::before {
        content: "";
        position: absolute;
        pointer-events: none;
        border: 1px solid var(--edge);
        border-radius: 2px;
        top: clamp(13px,2.6vw,18px);
        right: clamp(13px,2.6vw,18px);
        bottom: clamp(13px,2.6vw,18px);
        left: calc(var(--bind) + clamp(8px,2vw,12px));
    }

/* left binding */
.binding {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--bind);
    border-right: 1px solid var(--edge);
}

    .binding::before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        right: 4px;
        width: 1px;
        background: var(--edge-soft);
    }

    .binding::after {
        content: "";
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: clamp(24px,6vw,40px);
        bottom: clamp(24px,6vw,40px);
        width: 2px;
        background: repeating-linear-gradient(180deg,rgba(194,11,156,.55) 0 2.5px,transparent 2.5px 8px);
    }

/* ===== original middle (unchanged) ===== */
.brandrow {
    display: flex;
    align-items: center;
    gap: 2px;
    font-family: "Bricolage Grotesque";
    font-weight: 800;
    font-size: 18px;
    color: var(--ink);
    margin-bottom: clamp(22px,5vw,32px);
}

    .brandrow .dots {
        display: flex;
        gap: 4px;
        margin-left: 8px;
        margin-top: 6px;
    }

        .brandrow .dots i {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            display: block;
        }

.eyebrow {
    font-family: "JetBrains Mono";
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--magenta);
    margin: 0 0 10px;
}

h1 {
    font-family: "Bricolage Grotesque";
    font-weight: 700;
    font-size: clamp(27px,6.4vw,35px);
    line-height: 1.08;
    margin: 0 0 10px;
    letter-spacing: -.015em;
}

.mark {
    background-image: linear-gradient(transparent 58%,rgba(255,180,36,.6) 58%);
    background-repeat: no-repeat;
    background-position: 0 0;
    background-size: 0% 100%;
    padding: 0 .04em;
    animation: wipe .85s cubic-bezier(.5,0,.2,1) .45s forwards;
}

@keyframes wipe {
    to {
        background-size: 100% 100%;
    }
}

.sub {
    margin: 0 0 clamp(22px,4.5vw,30px);
    color: #6C6778;
    font-size: clamp(14px,3.6vw,15.5px);
    line-height: 1.55;
}

form {
    display: flex;
    flex-direction: column;
    gap: clamp(18px,4vw,22px);
}

.field {
    position: relative;
}

    .field label {
        display: block;
        font-family: "JetBrains Mono";
        font-size: 10px;
        letter-spacing: .13em;
        text-transform: uppercase;
        color: var(--muted);
        font-weight: 600;
        margin-bottom: 5px;
    }

    .field input {
        width: 100%;
        border: 0;
        border-bottom: 1.6px solid var(--line);
        background: transparent;
        padding: 7px 34px 8px 2px;
        font: inherit;
        font-size: 16px;
        color: var(--ink);
        transition: border-color .18s,box-shadow .18s;
    }

        .field input::placeholder {
            color: #BBB5C6;
        }

        .field input:focus {
            outline: none;
            border-bottom-color: var(--purple);
            box-shadow: 0 1.5px 0 0 var(--purple);
        }

    .field .eye {
        position: absolute;
        right: 0;
        bottom: 4px;
        width: 30px;
        height: 30px;
        border: 0;
        background: none;
        cursor: pointer;
        color: #A49DB2;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 7px;
    }

        .field .eye:hover {
            color: var(--purple);
            background: rgba(107,47,160,.07);
        }

.rowline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: -4px;
}

.check {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    font-size: 13.5px;
    color: #5C5768;
    user-select: none;
}

    .check input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .check .box {
        width: 19px;
        height: 19px;
        border: 1.6px solid #CDC6DA;
        border-radius: 5px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff;
        transition: .16s;
    }

        .check .box svg {
            width: 11px;
            height: 11px;
            stroke: #fff;
            stroke-width: 3;
            fill: none;
            opacity: 0;
        }

    .check input:checked + .box {
        background: var(--grad);
        border-color: transparent;
    }

        .check input:checked + .box svg {
            opacity: 1;
        }

.link {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--magenta);
    text-decoration: none;
}

    .link:hover {
        text-decoration: underline;
    }

.btn {
    width: 100%;
    height: 54px;
    border: 0;
    border-radius: 40px;
    background: var(--grad);
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 15.5px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-top: 4px;
    box-shadow: 0 18px 34px -14px rgba(150,15,140,.5);
    transition: transform .12s,box-shadow .2s;
}

    .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 22px 40px -14px rgba(150,15,140,.62);
    }

    .btn:active {
        transform: translateY(0);
    }

    .btn::after {
        content: "";
        position: absolute;
        top: 0;
        left: -60%;
        width: 42%;
        height: 100%;
        background: linear-gradient(100deg,transparent,rgba(255,255,255,.34),transparent);
        transform: skewX(-18deg);
        animation: sheen 5s ease-in-out infinite;
    }

@keyframes sheen {
    0%,74% {
        left: -60%;
    }

    88% {
        left: 130%;
    }

    100% {
        left: 130%;
    }
}

.note {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
    padding-right: 4px;
}

    .note svg {
        width: 44px;
        height: 38px;
        flex: 0 0 44px;
        overflow: visible;
    }

        .note svg path {
            fill: none;
            stroke: var(--magenta);
            stroke-width: 2;
            stroke-linecap: round;
            pathLength: 1;
            stroke-dasharray: 1;
            stroke-dashoffset: 1;
            animation: draw .7s ease 1.5s forwards;
        }

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

.note .hand {
    font-family: "Caveat";
    font-weight: 700;
    font-size: clamp(18px,4.6vw,22px);
    color: var(--purple);
    transform: rotate(-3deg);
    opacity: 0;
    animation: fade .5s ease 1.4s forwards;
    white-space: nowrap;
}

@keyframes fade {
    to {
        opacity: 1;
    }
}

.foot {
    margin-top: clamp(16px,4vw,22px);
    padding-top: 16px;
    border-top: 1px dashed #E7E4EF;
    font-size: 13px;
    color: #6C6778;
}

    .foot .new {
        margin: 0;
        color: var(--ink);
    }

        .foot .new a {
            color: var(--magenta);
            font-weight: 700;
            text-decoration: none;
        }

            .foot .new a:hover {
                text-decoration: underline;
            }

.terms {
    margin-top: 12px;
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.6;
}

    .terms a {
        color: var(--purple);
        font-weight: 600;
        text-decoration: none;
    }

        .terms a:hover {
            text-decoration: underline;
        }

.copy {
    margin-top: 10px;
    font-size: 11px;
    color: #B5AEC0;
}

@media (max-width:380px) {
    .note .hand {
        font-size: 18px;
    }

    .note svg {
        width: 38px;
        flex-basis: 38px;
    }
}

@media (min-width:1500px) {
    h1 {
        font-size: 36px;
    }

    .cover {
        max-width: 472px;
    }
}

@media (prefers-reduced-motion:reduce) {
    .mark {
        animation: none;
        background-size: 100% 100%;
    }

    .btn::after {
        animation: none;
    }

    .note .hand {
        animation: none;
        opacity: 1;
    }

    .note svg path {
        animation: none;
        stroke-dashoffset: 0;
    }
}
