
/* =====================================================
   PILIH LOGIN
   TEMA: FOREST GREEN - CREAM - TERRACOTTA
   File: assets/css/pilih_login.css
===================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --login-green: #174b3a;
    --login-green-dark: #103629;
    --login-green-light: #2c7658;
    --login-cream: #f8f4e9;
    --login-terracotta: #c87958;
    --login-gold: #e5bc78;
    --login-text: #20382e;
    --login-muted: #7d857b;
    --login-border: #e8e1d3;
    --login-white: #fffdf8;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body.auth-body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    position: relative;
    font-family: 'DM Sans', sans-serif;
    color: var(--login-text);
    background:
        radial-gradient(
            circle at 8% 12%,
            rgba(229, 188, 120, 0.20),
            transparent 30%
        ),
        radial-gradient(
            circle at 92% 88%,
            rgba(44, 118, 88, 0.12),
            transparent 32%
        ),
        var(--login-cream);
}

h1,
h2,
h3,
strong {
    font-family: 'Manrope', sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

/* =====================================================
   DEKORASI BACKGROUND
===================================================== */

.ambient {
    position: fixed;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(3px);
    animation: loginAmbientFloat 10s ease-in-out infinite alternate;
}

.ambient-one {
    width: 340px;
    height: 340px;
    top: -130px;
    right: -100px;
    background: rgba(229, 188, 120, 0.15);
}

.ambient-two {
    width: 290px;
    height: 290px;
    left: -100px;
    bottom: -100px;
    background: rgba(44, 118, 88, 0.12);
    animation-delay: -3s;
}

.ambient-three {
    width: 180px;
    height: 180px;
    top: 45%;
    left: 45%;
    background: rgba(200, 121, 88, 0.08);
    animation-delay: -5s;
}

@keyframes loginAmbientFloat {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(22px, -20px, 0);
    }
}

/* =====================================================
   ANIMASI MASUK DAN KELUAR HALAMAN
===================================================== */

.page-enter {
    animation: loginPageEnter 0.65s cubic-bezier(.2, .8, .2, 1) both;
}

.page-leave {
    animation: loginPageLeave 0.3s ease forwards;
    pointer-events: none;
}

@keyframes loginPageEnter {
    from {
        opacity: 0;
        transform: translateY(22px) scale(.99);
        filter: blur(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes loginPageLeave {
    to {
        opacity: 0;
        transform: translateY(-12px) scale(.99);
        filter: blur(3px);
    }
}

/* =====================================================
   PEMBUNGKUS HALAMAN PILIH LOGIN
===================================================== */

.selection-wrapper {
    width: min(1050px, calc(100% - 48px));
    min-height: 100vh;
    margin: auto;
    padding: 42px 0;
    position: relative;
    z-index: 1;
}

/* =====================================================
   TOMBOL KEMBALI
===================================================== */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid rgba(23, 75, 58, 0.13);
    border-radius: 13px;
    background: rgba(255, 253, 248, 0.7);
    color: var(--login-green);
    font-size: 12px;
    font-weight: 700;
    transition: transform .25s ease, background .25s ease;
}

.back-link:hover {
    color: var(--login-green-dark);
    background: var(--login-white);
    transform: translateX(-4px);
}

.back-link i {
    font-size: 16px;
}

/* =====================================================
   JUDUL HALAMAN
===================================================== */

.selection-heading {
    max-width: 700px;
    margin: 55px auto 42px;
    text-align: center;
    animation: loginHeadingEnter .7s ease both;
}

@keyframes loginHeadingEnter {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.selection-heading .section-eyebrow {
    display: inline-block;
    margin-bottom: 15px;
    color: var(--login-terracotta);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2.5px;
}

.selection-heading h1 {
    margin: 0;
    color: var(--login-green-dark);
    font-size: clamp(32px, 4.5vw, 48px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1.8px;
}

.selection-heading h1 span {
    color: var(--login-green-light);
}

.selection-heading p {
    max-width: 510px;
    margin: 18px auto 0;
    color: var(--login-muted);
    font-size: 13px;
    line-height: 1.9;
}

/* =====================================================
   KARTU PILIHAN PERAN
===================================================== */

.role-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    perspective: 1000px;
}

.role-card {
    position: relative;
    min-width: 0;
    min-height: 330px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(232, 225, 211, 0.95);
    border-radius: 25px;
    background: rgba(255, 253, 248, 0.88);
    box-shadow:
        0 15px 40px rgba(35, 61, 44, 0.055),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    transition:
        transform .35s ease,
        box-shadow .35s ease,
        border-color .35s ease;
    animation: loginCardEnter .7s cubic-bezier(.2, .8, .2, 1) both;
}

.teacher-card {
    animation-delay: .12s;
}

.student-card {
    animation-delay: .24s;
}

@keyframes loginCardEnter {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.role-card::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    top: -95px;
    right: -75px;
    border-radius: 50%;
    background: rgba(44, 118, 88, 0.07);
    transition: transform .5s ease;
}

.role-card::after {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    right: -55px;
    bottom: -75px;
    border-radius: 50%;
    background: rgba(229, 188, 120, 0.13);
    transition: transform .5s ease;
}

.role-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 55px rgba(35, 61, 44, 0.12);
}

.role-card:hover::before {
    transform: scale(1.3);
}

.role-card:hover::after {
    transform: scale(1.25);
}

.teacher-card:hover {
    border-color: rgba(44, 118, 88, 0.35);
}

.student-card:hover {
    border-color: rgba(200, 121, 88, 0.4);
}

/* Bagian atas kartu */

.role-card-top,
.role-card-bottom {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.role-icon {
    width: 61px;
    height: 61px;
    display: grid;
    place-items: center;
    border-radius: 19px;
    font-size: 26px;
    transition: transform .35s ease;
}

.role-card:hover .role-icon {
    transform: rotate(-7deg) scale(1.06);
}

.teacher-icon {
    color: #f7e7c8;
    background: linear-gradient(
        145deg,
        var(--login-green),
        var(--login-green-light)
    );
    box-shadow: 0 10px 22px rgba(23, 75, 58, 0.17);
}

.student-icon {
    color: #fff4e9;
    background: linear-gradient(
        145deg,
        var(--login-terracotta),
        #a95e42
    );
    box-shadow: 0 10px 22px rgba(200, 121, 88, 0.19);
}

.role-number {
    color: #9a9b8c;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.8px;
}

/* Isi kartu */

.role-card-content {
    position: relative;
    z-index: 1;
    margin: 30px 0;
}

.role-label {
    display: inline-block;
    color: var(--login-terracotta);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
}

.role-card-content h2 {
    margin: 10px 0 12px;
    color: var(--login-green-dark);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.8px;
}

.role-card-content p {
    max-width: 350px;
    margin: 0;
    color: var(--login-muted);
    font-size: 12px;
    line-height: 1.9;
}

/* Bagian bawah kartu */

.role-card-bottom {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(232, 225, 211, 0.95);
    font-size: 12px;
    font-weight: 800;
}

.teacher-card .role-card-bottom {
    color: var(--login-green);
}

.student-card .role-card-bottom {
    color: #ad6246;
}

.role-arrow {
    width: 39px;
    height: 39px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #f0eee3;
    color: var(--login-green);
    transition:
        transform .3s ease,
        background .3s ease,
        color .3s ease;
}

.student-card .role-arrow {
    color: #ad6246;
    background: #f7e9df;
}

.role-card:hover .role-arrow {
    transform: translate(3px, -3px);
    color: white;
    background: var(--login-green);
}

.student-card:hover .role-arrow {
    background: var(--login-terracotta);
}

/* =====================================================
   FOOTER
===================================================== */

.selection-footer {
    margin-top: 32px;
    padding-bottom: 10px;
    text-align: center;
    color: var(--login-muted);
    font-size: 11px;
    line-height: 1.8;
}

.selection-footer a {
    margin-left: 5px;
    color: var(--login-green);
    font-weight: 800;
    transition: color .25s ease;
}

.selection-footer a:hover {
    color: var(--login-terracotta);
}

/* =====================================================
   RESPONSIVE TABLET
===================================================== */

@media (max-width: 850px) {
    .selection-wrapper {
        width: min(700px, calc(100% - 40px));
        padding: 35px 0;
    }

    .selection-heading {
        margin: 45px auto 32px;
    }

    .role-grid {
        gap: 18px;
    }

    .role-card {
        min-height: 315px;
        padding: 23px;
    }

    .role-card-content h2 {
        font-size: 25px;
    }
}

/* =====================================================
   RESPONSIVE PONSEL
===================================================== */

@media (max-width: 600px) {
    .selection-wrapper {
        width: calc(100% - 32px);
        padding: 25px 0;
    }

    .selection-heading {
        margin: 38px auto 27px;
    }

    .selection-heading h1 {
        font-size: 34px;
        letter-spacing: -1.3px;
    }

    .selection-heading p {
        margin-top: 13px;
        font-size: 12px;
    }

    .role-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .role-card {
        min-height: 285px;
        padding: 22px;
        border-radius: 21px;
    }

    .role-card-content {
        margin: 24px 0;
    }

    .role-card-content h2 {
        font-size: 25px;
    }

    .role-card-content p {
        font-size: 12px;
    }

    .role-icon {
        width: 54px;
        height: 54px;
        border-radius: 17px;
        font-size: 23px;
    }

    .selection-footer {
        margin-top: 24px;
        font-size: 10px;
    }
}

/* =====================================================
   AKSESIBILITAS ANIMASI
===================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
