/* ============================= */
/* ROOT VARIABLES + GLOBAL RESET */
/* ============================= */
:root {
    --primary: #4B3CC6;
    --primary-2: #3A2BA5;
    --accent: #16BAC5;
    --bg: #F5F7FB;
    --card: #FFFFFF;
    --muted: #6b7280;
    --border: #E6E9FB;
    --radius: 14px;
    --shadow: 0 12px 30px rgba(56, 50, 120, 0.08);
    --success: #10b981;
    --danger: #ef4444;
    --max-width: 1050px;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
    background: var(--bg);
    color: #0f1724;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 28px;
}

/* ============================= */
/*         MAIN CONTAINER        */
/* ============================= */
.main-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    gap: 20px;
    flex-direction: column;
}

/* ============================= */
/*            HEADER             */
/* ============================= */
.header {
    display: flex;
    align-items: center;
    align-self: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
}

.header-logo {
    width: 200px;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
}

.header-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-heading h1 {
    margin: 0;
    font-size: 60px;
    color: var(--primary-2)
}

.header-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 13px
}

/* ============================= */
/*         FORM CONTAINER        */
/* ============================= */
.form-container {
    display: flex;
    flex-direction: column;
    gap: 18px
}

.form-container h2 {
    margin: 0;
    font-size: 25px;
    color: var(--primary-2);
    align-self: center;
}

/* ============================= */
/*       ALL SECTION CARD        */
/* ============================= */
.section-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.card-heading h2 {
    margin: 0;
    font-size: 16px;
    color: var(--primary-2)
}

.card-heading p {
    margin: 0;
    font-size: 13px;
    color: var(--muted)
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Grid inside card: 2 columns on desktop, 1 on mobile */
    gap: 14px 18px;
    align-items: start;
}

.field {
    position: relative;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field select,
.field textarea {
    width: 100%;
    padding: 14px 12px 12px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fbfbff;
    font-size: 14px;
    outline: none;
}

.field input:focus,
.field select:focus {
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(75, 60, 198, 0.08);
    background: white;
}

.field label {
    position: absolute;
    left: 12px;
    top: 12px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    padding: 0 6px;
    pointer-events: none;
    transition: all .16s ease;
}

.field input:not(:placeholder-shown)+label,
.field input:focus+label,
.field select:focus+label,
.field select:valid+label,
.field textarea:not(:placeholder-shown)+label {
    top: -8px;
    left: 10px;
    font-size: 11px;
    color: var(--primary-2);
    background: var(--card);
}

.declaration-box {
    font-size: 14px
}

.btn-container {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.btn {
    padding: 12px 16px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 700;
}

.btn.submit-btn {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    color: white;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-loader {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn.reset-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted)
}

/* ============================= */
/*         SUCCESS MODAL         */
/* ============================= */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 36, 0.4);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.hidden {
    display: none;
}

.success-card {
    background: white;
    padding: 32px 28px;
    border-radius: 18px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.35s ease;
}

.checkmark {
    width: 60px;
    height: 60px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto;
}

.success-card h2 {
    margin: 12px 0 6px;
    color: var(--primary-2);
}

.success-card p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
}

.redirect-note {
    margin-top: 12px;
    font-size: 12px;
    opacity: 0.8;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.error {
    border-color: var(--danger) !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.06)
}

/* ============================= */
/*       MOBILE RESPONSIVE       */
/* ============================= */
@media (max-width:900px) {

    .header {
        flex-direction: column;
        /* stack items vertically */
        align-items: center;
        /* center horizontally */
        text-align: center;
        gap: 10px;
    }

    .brand {
        flex-direction: column;
        /* logo up, text down */
        align-items: center;
        gap: 8px;
    }

    .header-logo {
        width: 100px;
        height: 100px;
    }

    .header-heading h1 {
        font-size: 30px;
        text-align: center;
    }

    .header-heading p {
        text-align: center;
    }

    .form-container h2 {
        font-size: 22px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    body {
        padding: 16px;
    }

    .card-heading h2 {
        font-size: 16px;
    }
}