@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;1,500;1,600&display=swap');

:root {
    --ink: #171513;
    --muted: #77716b;
    --line: #e4dfd8;
    --paper: #faf9f6;
    --cream: #f1ece4;
    --accent: #9b6857;
    --accent-dark: #754c40;
    --white: #fff;
}

* { box-sizing: border-box; }

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

body {
    background:
        radial-gradient(circle at 80% 10%, rgba(180,145,125,.10), transparent 25%),
        #f8f7f3;
    color: var(--ink);
    font-family: "DM Sans", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

button, input { font: inherit; }

.page-shell {
    min-height: 100vh;
    padding: 26px;
    position: relative;
    overflow: hidden;
}

.ambient {
    position: fixed;
    border-radius: 999px;
    filter: blur(80px);
    pointer-events: none;
    opacity: .32;
}

.ambient-one {
    width: 360px;
    height: 360px;
    right: -100px;
    top: -100px;
    background: #dbc4b6;
}

.ambient-two {
    width: 300px;
    height: 300px;
    left: -160px;
    bottom: -120px;
    background: #ded4c7;
}

.login-layout {
    width: min(1260px, 100%);
    min-height: calc(100vh - 52px);
    margin: auto;
    display: grid;
    grid-template-columns: minmax(450px, .98fr) minmax(470px, 1.02fr);
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(225,220,213,.9);
    box-shadow: 0 30px 90px rgba(40,32,25,.10);
    overflow: hidden;
}

.visual-panel {
    min-height: 760px;
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 38px 52px;
    background:
        linear-gradient(145deg, rgba(107,66,53,.35), rgba(39,35,31,.86)),
        radial-gradient(circle at 54% 20%, #e7c4b1 0, #bd8975 27%, #806256 62%, #3b3733 100%);
}

.visual-panel::before {
    content: "";
    position: absolute;
    width: 430px;
    height: 430px;
    top: -100px;
    right: -80px;
    border-radius: 50%;
    background: rgba(246,218,200,.25);
    filter: blur(1px);
}

.visual-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 42px 42px;
    opacity: .16;
    pointer-events: none;
}

.visual-top,
.visual-content,
.visual-bottom {
    position: relative;
    z-index: 4;
}

.visual-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.03em;
}

.brand-mark {
    width: 31px;
    height: 31px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.7);
    font-family: "Playfair Display", Georgia, serif;
    font-style: italic;
    font-size: 17px;
}

.mini-label {
    font-size: 8px;
    letter-spacing: .22em;
    opacity: .68;
}

.visual-content {
    position: absolute;
    left: 52px;
    right: 52px;
    bottom: 125px;
}

.eyebrow {
    margin: 0 0 18px;
    font-size: 9px;
    line-height: 1.5;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    opacity: .68;
}

.visual-content h1 {
    margin: 0;
    font-size: clamp(60px, 6vw, 86px);
    line-height: .86;
    letter-spacing: -.065em;
    font-weight: 600;
}

.visual-content h1 em {
    display: block;
    margin-top: 13px;
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 500;
    letter-spacing: -.045em;
}

.visual-copy {
    max-width: 390px;
    margin: 30px 0 0;
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255,255,255,.72);
}

.visual-bottom {
    position: absolute;
    left: 52px;
    right: 52px;
    bottom: 37px;
    display: flex;
    justify-content: space-between;
    align-items: end;
    font-size: 8px;
    letter-spacing: .2em;
}

.visual-bottom strong {
    font-size: 8px;
    letter-spacing: .15em;
}

.polaroid {
    position: absolute;
    z-index: 3;
    width: 126px;
    padding: 9px 9px 25px;
    background: #f7f5ef;
    box-shadow: 0 25px 55px rgba(20,14,11,.24);
    color: #777;
    font-family: Georgia, serif;
    font-size: 8px;
}

.polaroid-image {
    width: 100%;
    height: 110px;
}

.polaroid span {
    position: absolute;
    bottom: 8px;
    left: 11px;
}

.polaroid-back {
    top: 215px;
    right: 88px;
    transform: rotate(8deg);
}

.polaroid-front {
    top: 295px;
    right: 200px;
    transform: rotate(-10deg);
}

.gradient-one {
    background:
        linear-gradient(140deg, rgba(69,52,67,.75), rgba(190,168,155,.4)),
        #86756f;
}

.gradient-two {
    background:
        linear-gradient(140deg, rgba(84,100,80,.85), rgba(193,157,130,.45)),
        #827b67;
}

.form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 70px 9%;
    background: rgba(255,255,255,.82);
}

.form-wrap {
    width: min(450px, 100%);
}

.mobile-brand { display: none; }

.heading .eyebrow {
    color: #8b8279;
    margin-bottom: 13px;
}

.heading h2 {
    margin: 0;
    font-size: clamp(43px, 4.5vw, 62px);
    line-height: .98;
    letter-spacing: -.055em;
}

.heading h2 em {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 500;
}

.heading > p:last-child {
    color: var(--muted);
    font-size: 13px;
    margin: 18px 0 34px;
}

.alert {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    padding: 13px 15px;
    margin: 0 0 20px;
    border: 1px solid #e5c9c3;
    background: #fcf3f1;
    color: #8b4034;
    font-size: 12px;
    line-height: 1.5;
}

.alert-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #9d4c40;
    color: white;
    font-weight: 700;
    font-size: 11px;
}

.field {
    display: block;
    margin-bottom: 18px;
}

.field > span {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    z-index: 2;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #a49d96;
    font-size: 16px;
}

.input-wrap input {
    width: 100%;
    height: 57px;
    padding: 0 18px 0 45px;
    border: 1px solid var(--line);
    border-radius: 4px;
    outline: none;
    color: var(--ink);
    background: #fff;
    font-size: 13px;
    transition: border-color .2s, box-shadow .2s;
}

.input-wrap input::placeholder {
    color: #b1aaa3;
}

.input-wrap input:focus {
    border-color: #a17a6b;
    box-shadow: 0 0 0 4px rgba(155,104,87,.09);
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 13px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #81766f;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.submit-btn {
    width: 100%;
    height: 58px;
    margin-top: 5px;
    border: 0;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 18px 0 22px;
    cursor: pointer;
    color: #fff;
    background: #181614;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .01em;
    transition: transform .18s, background .18s, box-shadow .18s;
}

.submit-btn:hover {
    transform: translateY(-1px);
    background: #302a26;
    box-shadow: 0 12px 25px rgba(30,24,20,.15);
}

.arrow {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.28);
    font-size: 16px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 27px 0;
    color: #a7a09a;
    font-size: 10px;
}

.divider::before,
.divider::after {
    content: "";
    height: 1px;
    background: var(--line);
    flex: 1;
}

.register-link {
    min-height: 57px;
    padding: 0 17px;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-size: 11px;
    transition: border-color .2s, background .2s;
}

.register-link:hover {
    border-color: #c5b4aa;
    background: #fdfbf9;
}

.register-link span:first-child {
    color: #827b75;
}

.register-link strong {
    color: var(--ink);
}

.link-arrow {
    margin-left: auto;
    font-size: 16px;
}

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 23px 0 0;
    color: #99918a;
    font-size: 10px;
}

.dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #789274;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 46px;
    color: #a09a94;
    font-size: 9px;
}

.form-footer a {
    text-decoration: none;
}

.form-footer a:hover {
    color: var(--ink);
}

@media (max-width: 920px) {
    .page-shell { padding: 0; }

    .login-layout {
        min-height: 100vh;
        display: block;
        border: 0;
        box-shadow: none;
    }

    .visual-panel {
        display: none;
    }

    .form-panel {
        min-height: 100vh;
        padding: 42px 25px;
        align-items: center;
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 60px;
        font-size: 16px;
    }

    .mobile-brand .brand-mark {
        color: var(--ink);
        border-color: #aaa39c;
    }

    .form-wrap { max-width: 480px; width: 100%; }
}

@media (max-width: 520px) {
    .form-panel { padding: 28px 20px; }

    .mobile-brand {
        margin-bottom: 42px;
    }

    .heading h2 {
        font-size: 45px;
    }

    .heading > p:last-child {
        margin-bottom: 28px;
    }

    .form-footer {
        margin-top: 35px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .form-wrap {
        animation: rise .65s ease both;
    }

    .visual-content {
        animation: fade .8s ease both;
    }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
