/*
|--------------------------------------------------------------------------
| KSP Tenant Selection Portal
| Main Stylesheet
|--------------------------------------------------------------------------
*/

:root {
    --navy: #0b1f3a;
    --navy-dark: #07162a;
    --navy-light: #17365d;

    --white: #ffffff;
    --background: #f7f9fc;
    --surface: #ffffff;

    --text-primary: #172033;
    --text-secondary: #667085;
    --text-muted: #98a2b3;

    --border: #d9e0ea;
    --border-light: #e9edf3;

    --danger: #c62828;

    --radius: 8px;
    --radius-lg: 12px;

    --shadow-sm:
        0 1px 3px rgba(16, 24, 40, 0.06);

    --shadow-md:
        0 6px 20px rgba(16, 24, 40, 0.07);

    --transition:
        0.2s ease;
}


/* =========================
   RESET
   ========================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;

    background: var(--background);

    color: var(--text-primary);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    font-size: 16px;
    line-height: 1.6;

    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
    font: inherit;
}


/* =========================
   TYPOGRAPHY
   ========================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;

    color: var(--text-primary);

    font-weight: 600;

    line-height: 1.3;
}

p {
    margin-top: 0;
}

a {
    color: var(--navy);

    text-decoration: none;
}

a:hover {
    text-decoration: none;
}


/* =========================
   LAYOUT
   ========================= */

main {
    width: 100%;
}

.container {
    width: min(
        1080px,
        calc(100% - 40px)
    );

    margin: 0 auto;
}


/* =========================
   HEADER
   ========================= */

.site-header {
    width: 100%;

    background: var(--white);

    border-bottom: 1px solid var(--border);
}

.site-header-inner {
    width: min(
        1080px,
        calc(100% - 40px)
    );

    min-height: 70px;

    margin: 0 auto;

    display: flex;

    align-items: center;

    justify-content: space-between;
}

.brand {
    color: var(--navy);

    font-size: 18px;

    font-weight: 700;
}


/* =========================
   REGISTRATION HEADER
   ========================= */

.registration-header {
    padding:
        48px 0
        32px;

    background: var(--white);

    border-bottom: 1px solid var(--border);
}

.registration-heading {
    text-align: center;
}

.eyebrow {
    display: inline-block;

    margin-bottom: 10px;

    color: var(--navy);

    font-size: 12px;

    font-weight: 700;

    letter-spacing: 0.08em;

    text-transform: uppercase;
}

.registration-heading h1 {
    margin-bottom: 12px;

    color: var(--navy);

    font-size:
        clamp(30px, 5vw, 42px);
}

.registration-heading p {
    max-width: 680px;

    margin:
        0 auto;

    color: var(--text-secondary);
}


/* =========================
   PROGRESS
   ========================= */

.progress-wrapper {
    position: relative;

    max-width: 900px;

    margin:
        42px auto 0;
}

.progress-line {
    position: absolute;

    top: 17px;

    left: 8%;

    width: 84%;

    height: 2px;

    background: var(--border);
}

.progress-line-fill {
    width: 0;

    height: 100%;

    background: var(--navy);

    transition:
        width 0.25s ease;
}

.progress-steps {
    position: relative;

    display: flex;

    justify-content: space-between;
}

.progress-step {
    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 7px;

    width: 80px;

    color: var(--text-muted);

    font-size: 12px;

    text-align: center;
}

.step-number {
    width: 34px;

    height: 34px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: var(--white);

    border: 2px solid var(--border);

    border-radius: 50%;

    color: var(--text-muted);

    font-weight: 600;

    transition:
        all var(--transition);
}

.progress-step.active .step-number,
.progress-step.completed .step-number {
    background: var(--navy);

    border-color: var(--navy);

    color: var(--white);
}

.progress-step.active .step-label,
.progress-step.completed .step-label {
    color: var(--navy);

    font-weight: 600;
}


/* =========================
   REGISTRATION CONTENT
   ========================= */

.registration-content {
    padding:
        36px 0
        60px;
}


/* =========================
   FORM STEP
   ========================= */

.form-step {
    display: none;
}

.form-step.active {
    display: block;

    animation:
        stepFade 0.2s ease;
}

@keyframes stepFade {

    from {
        opacity: 0;

        transform:
            translateY(6px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}


/* =========================
   STEP CARD
   ========================= */

.step-card {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);

    overflow: hidden;
}

.step-card-header {
    padding: 30px;

    border-bottom: 1px solid var(--border-light);
}

.step-kicker {
    display: block;

    margin-bottom: 7px;

    color: var(--navy);

    font-size: 13px;

    font-weight: 600;
}

.step-card-header h2 {
    margin-bottom: 7px;

    font-size: 25px;
}

.step-card-header p {
    margin-bottom: 0;

    color: var(--text-secondary);
}


/* =========================
   FORM SECTION
   ========================= */

.form-section {
    padding: 28px 30px;

    border-bottom: 1px solid var(--border-light);
}

.form-section:last-child {
    border-bottom: 0;
}

.form-section h3 {
    margin-bottom: 7px;

    font-size: 17px;
}

.section-help {
    margin-bottom: 18px;

    color: var(--text-secondary);

    font-size: 14px;
}


/* =========================
   FORM GRID
   ========================= */

.form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 20px;
}

.form-grid-3 {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}


/* =========================
   FORM GROUP
   ========================= */

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;

    margin-bottom: 7px;

    color: var(--text-primary);

    font-size: 14px;

    font-weight: 600;
}

.optional {
    margin-left: 5px;

    color: var(--text-muted);

    font-size: 12px;

    font-weight: 400;
}

.form-control {
    width: 100%;

    min-height: 46px;

    padding:
        10px 13px;

    background: var(--white);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    color: var(--text-primary);

    outline: none;

    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

.form-control:focus {
    border-color: var(--navy);

    box-shadow:
        0 0 0 3px
        rgba(11, 31, 58, 0.08);
}

textarea.form-control {
    min-height: 110px;

    resize: vertical;
}

.form-control.input-error {
    border-color: var(--danger);
}

.form-help {
    margin-top: 6px;

    color: var(--text-secondary);

    font-size: 13px;
}


/* =========================
   INPUT SUFFIX
   ========================= */

.input-with-suffix {
    display: flex;

    align-items: stretch;
}

.input-with-suffix .form-control {
    border-radius:
        var(--radius) 0 0 var(--radius);
}

.input-with-suffix span {
    min-width: 70px;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 0 10px;

    background: var(--background);

    border:
        1px solid var(--border);

    border-left: 0;

    border-radius:
        0 var(--radius) var(--radius) 0;

    color: var(--text-secondary);

    font-size: 13px;
}


/* =========================
   CHOICE CARD
   ========================= */

.choice-grid {
    display: grid;

    gap: 14px;
}

.choice-grid-2 {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
}

.choice-card {
    position: relative;

    display: flex;

    align-items: flex-start;

    gap: 12px;

    min-height: 58px;

    padding: 15px;

    background: var(--white);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    cursor: pointer;

    transition:
        border-color var(--transition),
        background var(--transition);
}

.choice-card:hover {
    border-color: var(--navy-light);

    background: #fafbfd;
}

.choice-card input {
    margin-top: 3px;

    accent-color: var(--navy);
}

.choice-content {
    display: flex;

    flex-direction: column;

    gap: 2px;
}

.choice-content strong {
    color: var(--text-primary);

    font-size: 14px;
}

.choice-content small {
    color: var(--text-secondary);

    font-size: 13px;
}


/* =========================
   CATEGORY GRID
   ========================= */

.category-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 10px;
}

.check-card {
    display: flex;

    align-items: center;

    gap: 9px;

    min-height: 46px;

    padding: 10px 12px;

    background: var(--white);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    color: var(--text-primary);

    font-size: 14px;

    cursor: pointer;
}

.check-card:hover {
    border-color: var(--navy-light);

    background: #fafbfd;
}

.check-card input {
    accent-color: var(--navy);
}


/* =========================
   CHOICE LIST
   ========================= */

.choice-list {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 10px;
}


/* =========================
   DOCUMENT LIST
   ========================= */

.document-list {
    border-top:
        1px solid var(--border-light);
}

.document-row {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    min-height: 64px;

    padding:
        13px 0;

    border-bottom:
        1px solid var(--border-light);

    color: var(--text-primary);

    font-size: 14px;
}

.document-choice {
    display: flex;

    align-items: center;

    gap: 18px;

    white-space: nowrap;
}

.document-choice label {
    display: flex;

    align-items: center;

    gap: 6px;

    color: var(--text-secondary);

    cursor: pointer;
}

.document-choice input {
    accent-color: var(--navy);
}


/* =========================
   INFO BOX
   ========================= */

.info-box {
    margin:
        24px 30px;

    padding: 16px 18px;

    background: #f4f7fb;

    border: 1px solid #dbe3ed;

    border-radius: var(--radius);
}

.info-box strong {
    display: block;

    margin-bottom: 4px;

    color: var(--navy);

    font-size: 14px;
}

.info-box p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 13px;
}


/* =========================
   DECLARATION
   ========================= */

.declaration-box {
    margin: 28px 30px;

    padding: 24px;

    background: #fafbfd;

    border:
        1px solid var(--border);

    border-radius: var(--radius);

    color: var(--text-secondary);

    font-size: 14px;
}

.declaration-box p:last-of-type {
    margin-bottom: 0;
}

.declaration-box ul {
    margin:
        12px 0 18px;

    padding-left: 20px;
}

.declaration-box li {
    margin-bottom: 5px;
}


/* =========================
   AGREEMENT
   ========================= */

.agreement-card {
    display: flex;

    align-items: flex-start;

    gap: 12px;

    padding: 16px;

    background: #f4f7fb;

    border:
        1px solid #dbe3ed;

    border-radius: var(--radius);

    color: var(--text-primary);

    font-size: 14px;

    cursor: pointer;
}

.agreement-card input {
    margin-top: 4px;

    accent-color: var(--navy);
}


/* =========================
   ACTIONS
   ========================= */

.step-actions {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 14px;

    padding: 22px 30px;

    background: #fcfdff;

    border-top:
        1px solid var(--border-light);
}


/* =========================
   BUTTON
   ========================= */

.btn {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    min-height: 44px;

    padding:
        0 20px;

    border: 1px solid transparent;

    border-radius: var(--radius);

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    transition:
        background var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.btn:hover {
    text-decoration: none;
}

.btn:focus-visible {
    outline:
        3px solid
        rgba(11, 31, 58, 0.15);

    outline-offset: 2px;
}

.btn-primary {
    background: var(--navy);

    color: var(--white);
}

.btn-primary:hover {
    background: var(--navy-dark);
}

.btn-secondary {
    background: var(--white);

    border-color: var(--border);

    color: var(--navy);
}

.btn-secondary:hover {
    background: var(--background);
}


/* =========================
   FOOTER
   ========================= */

.site-footer {
    margin-top: 0;

    padding:
        28px 20px;

    background: var(--navy);

    color:
        rgba(255, 255, 255, 0.8);

    text-align: center;

    font-size: 14px;
}

.site-footer p {
    margin: 0;
}


/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 768px) {

    .container,
    .site-header-inner {
        width:
            calc(100% - 28px);
    }

    .registration-header {
        padding:
            36px 0
            24px;
    }

    .registration-heading h1 {
        font-size: 30px;
    }

    .progress-wrapper {
        margin-top: 32px;
    }

    .progress-step {
        width: 42px;
    }

    .step-label {
        display: none;
    }

    .progress-line {
        left: 7%;

        width: 86%;
    }

    .form-grid,
    .form-grid-3,
    .choice-grid-2,
    .category-grid,
    .choice-list {
        grid-template-columns: 1fr;
    }

    .step-card-header,
    .form-section {
        padding:
            22px 20px;
    }

    .step-card-header h2 {
        font-size: 22px;
    }

    .step-actions {
        padding:
            18px 20px;
    }

    .btn {
        min-height: 44px;
    }

    .document-row {
        align-items: flex-start;

        flex-direction: column;

        gap: 10px;
    }

    .document-choice {
        width: 100%;
    }

    .info-box,
    .declaration-box {
        margin:
            20px;
    }

}


@media (max-width: 480px) {

    .step-actions {
        flex-direction: column-reverse;

        align-items: stretch;
    }

    .step-actions .btn {
        width: 100%;
    }

    .document-choice {
        justify-content: space-between;
    }

}


/* =========================
   REDUCED MOTION
   ========================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration:
            0.01ms !important;

        animation-iteration-count:
            1 !important;

        transition-duration:
            0.01ms !important;
    }

}