/* =========================================
   ELDORIA EXPEDITION BUREAU
   Dark / Gold Expedition UI
========================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #e9e8e4;
    --bg-soft: #f5f4f0;

    --panel: #111315;
    --panel-2: #17191c;
    --field: #1c1f22;
    --field-hover: #222529;

    --text: #f4f1e8;
    --text-dark: #181a1d;
    --muted: #9a9da1;
    --muted-dark: #6f7377;

    --line: rgba(255, 255, 255, 0.10);
    --line-soft: rgba(255, 255, 255, 0.07);

    --gold: #c79a4b;
    --gold-light: #e1bd72;
    --gold-dark: #9d722d;

    --danger: #d06b5e;
    --success: #79a88a;

    --shadow:
        0 24px 70px rgba(0, 0, 0, 0.25);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    color: var(--text-dark);

    font-family:
        "DM Sans",
        Arial,
        sans-serif;

    line-height: 1.5;

    background:
        radial-gradient(
            circle at 75% 16%,
            rgba(255, 255, 255, 0.90),
            transparent 25%
        ),
        linear-gradient(
            135deg,
            #efeee9 0%,
            #deddd8 48%,
            #f2f1ed 100%
        );

    position: relative;
}

body::before {
    content: "";

    position: fixed;
    inset: 0;

    pointer-events: none;

    opacity: 0.20;

    background:
        linear-gradient(
            145deg,
            transparent 45%,
            rgba(55, 57, 59, 0.10) 45.2%,
            transparent 46%
        ),
        linear-gradient(
            35deg,
            transparent 62%,
            rgba(55, 57, 59, 0.08) 62.2%,
            transparent 63%
        );

    z-index: -1;
}


/* =========================================
   HEADER
========================================= */

.site-header {
    position: relative;
    z-index: 5;

    min-height: 74px;

    background:
        radial-gradient(
            circle at 78% -30%,
            rgba(199, 154, 75, 0.15),
            transparent 35%
        ),
        linear-gradient(
            115deg,
            #0b0d0f,
            #141619 58%,
            #0a0c0e
        );

    border-bottom: 1px solid rgba(199, 154, 75, 0.18);

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.15);
}

.site-header::after {
    content: "";

    position: absolute;
    right: 0;
    top: 0;

    width: 42%;
    height: 100%;

    opacity: 0.22;

    background:
        linear-gradient(
            135deg,
            transparent 47%,
            #6e7377 47.4%,
            transparent 48%
        ),
        linear-gradient(
            155deg,
            transparent 57%,
            #3c4145 57.4%,
            transparent 58%
        );

    pointer-events: none;
}

.header-inner {
    width: min(1120px, calc(100% - 44px));

    min-height: 74px;

    margin: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    position: relative;
    z-index: 2;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 43px;
    height: 43px;

    display: grid;
    place-items: center;

    border: 1px solid var(--gold);

    border-radius: 50%;

    color: var(--gold-light);

    font-family:
        "Playfair Display",
        Georgia,
        serif;

    font-size: 22px;

    box-shadow:
        0 0 0 4px rgba(199, 154, 75, 0.06),
        inset 0 0 15px rgba(199, 154, 75, 0.08);
}

.brand h1 {
    color: #f3efe6;

    font-family:
        "Playfair Display",
        Georgia,
        serif;

    font-size: 22px;

    line-height: 1;

    letter-spacing: 0.10em;
}

.brand span {
    display: block;

    margin-top: 4px;

    color: #a5a7aa;

    font-size: 8px;

    letter-spacing: 0.17em;
}

.student-info {
    padding: 7px 13px;

    text-align: right;

    border:
        1px solid rgba(255, 255, 255, 0.08);

    border-radius: 6px;

    background:
        rgba(255, 255, 255, 0.035);
}

.student-info span {
    display: block;

    color: var(--gold-light);

    font-size: 8px;

    letter-spacing: 0.12em;
}

.student-info strong {
    display: block;

    margin-top: 1px;

    color: #e8e7e3;

    font-size: 11px;
}


/* =========================================
   MAIN
========================================= */

.page-container {
    width: min(1000px, calc(100% - 40px));

    margin: auto;

    padding:
        38px 0
        70px;

    position: relative;
}

.hero-compass {
    position: absolute;

    right: -40px;
    top: 34px;

    width: 270px;
    height: 270px;

    border:
        1px solid rgba(40, 42, 43, 0.08);

    border-radius: 50%;

    pointer-events: none;

    opacity: 0.55;
}

.hero-compass::before,
.hero-compass::after {
    content: "";

    position: absolute;

    left: 50%;
    top: 50%;

    width: 1px;
    height: 100%;

    background:
        rgba(40, 42, 43, 0.07);

    transform:
        translate(-50%, -50%)
        rotate(45deg);
}

.hero-compass::after {
    transform:
        translate(-50%, -50%)
        rotate(-45deg);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin-bottom: 26px;

    color: #575b5f;

    font-size: 11px;

    cursor: pointer;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.back-link:hover {
    color: var(--gold-dark);
    transform: translateX(-2px);
}

.intro {
    position: relative;
    z-index: 2;

    margin-bottom: 30px;

    max-width: 690px;
}

.eyebrow {
    margin-bottom: 9px;

    color: var(--gold-dark);

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 0.16em;
}

.intro h2 {
    color: #17191c;

    font-family:
        "DM Sans",
        Arial,
        sans-serif;

    font-size: clamp(31px, 4.6vw, 47px);

    line-height: 1.05;

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: -0.035em;
}

.intro h2::first-line {
    letter-spacing: -0.04em;
}

.intro-text {
    max-width: 570px;

    margin-top: 15px;

    color: #4f5357;

    font-size: 12px;
}


/* =========================================
   ERROR SUMMARY
========================================= */

.error-summary {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    margin-bottom: 13px;

    padding: 13px 15px;

    border:
        1px solid rgba(208, 107, 94, 0.45);

    border-left:
        3px solid var(--danger);

    border-radius: 7px;

    background:
        rgba(45, 22, 20, 0.96);

    color: #f3d9d4;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.12);

    font-size: 12px;
}

.error-summary p {
    margin-top: 2px;

    color: #cba6a0;

    font-size: 11px;
}

.error-icon {
    width: 23px;
    height: 23px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: var(--danger);

    color: white;

    font-weight: 700;

    box-shadow:
        0 0 0 4px rgba(208, 107, 94, 0.10);
}


/* =========================================
   FORM
========================================= */

#registrationForm {
    position: relative;
    z-index: 2;

    padding: 18px;

    border:
        1px solid rgba(255, 255, 255, 0.08);

    border-radius: 8px;

    background:
        linear-gradient(
            145deg,
            #121416 0%,
            #0f1113 55%,
            #17191b 100%
        );

    box-shadow:
        var(--shadow);

    overflow: hidden;
}

#registrationForm::before {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(199, 154, 75, 0.09),
            transparent 25%
        ),
        linear-gradient(
            120deg,
            transparent 0%,
            rgba(255, 255, 255, 0.015) 50%,
            transparent 100%
        );
}

.form-card {
    position: relative;
    z-index: 1;

    margin-bottom: 9px;

    padding: 15px 17px;

    border:
        1px solid var(--line);

    border-radius: 5px;

    background:
        rgba(255, 255, 255, 0.018);

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.form-card:hover {
    background:
        rgba(255, 255, 255, 0.028);

    border-color:
        rgba(199, 154, 75, 0.16);
}

.form-card:focus-within {
    border-color:
        rgba(199, 154, 75, 0.40);

    box-shadow:
        0 0 0 1px rgba(199, 154, 75, 0.04),
        0 10px 24px rgba(199, 154, 75, 0.06);
}

.field-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;

    margin-bottom: 8px;
}

.field-header label {
    color: #e8e7e3;

    font-size: 11px;

    font-weight: 600;
}

.field-header label span {
    color: var(--gold-light);
}

.field-header label strong {
    color: var(--gold-light);
}

.field-number {
    padding: 2px 7px;

    border: 1px solid rgba(199, 154, 75, 0.22);

    border-radius: 99px;

    color: #a3a6a9;

    font-size: 8px;

    font-weight: 700;

    letter-spacing: 0.10em;

    background: rgba(199, 154, 75, 0.05);
}


/* =========================================
   INPUTS
========================================= */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 100%;

    border:
        1px solid rgba(255, 255, 255, 0.11);

    border-radius: 3px;

    background:
        linear-gradient(
            180deg,
            #1d2023,
            #191b1e
        );

    color: #e9e8e4;

    font-family: inherit;
    font-size: 12px;

    outline: none;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select {
    height: 40px;

    padding: 0 12px;
}

input:hover,
select:hover,
textarea:hover {
    background: var(--field-hover);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--gold);

    box-shadow:
        0 0 0 3px rgba(199, 154, 75, 0.08);
}

::placeholder {
    color: #6f7377;
}

select {
    appearance: none;

    padding-right: 38px;

    cursor: pointer;
}

select option {
    background: #181b1e;
    color: #eeeeea;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter:
        invert(72%)
        sepia(34%)
        saturate(600%)
        hue-rotate(355deg);

    opacity: 0.85;

    cursor: pointer;
}


/* =========================================
   SELECT ARROW
========================================= */

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: "⌄";

    position: absolute;

    right: 13px;
    top: 50%;

    transform:
        translateY(-58%);

    pointer-events: none;

    color: var(--gold-light);

    font-size: 16px;
}


/* =========================================
   VALIDATION
========================================= */

.field-message {
    min-height: 0;

    margin-top: 5px;

    font-size: 10px;
}

.field-message.error {
    color: var(--danger);
}

.field-message.success {
    color: var(--success);
}

.input-error {
    border-color:
        var(--danger) !important;

    box-shadow:
        0 0 0 2px rgba(208, 107, 94, 0.08) !important;
}

.input-success {
    border-color:
        rgba(121, 168, 138, 0.62) !important;
}

.input-error-card {
    border-color:
        var(--danger) !important;
}


/* =========================================
   AGE
========================================= */

.age-display {
    display: none;

    margin-top: 7px;

    padding: 4px 9px;

    width: fit-content;

    border: 1px solid rgba(199, 154, 75, 0.20);

    border-radius: 99px;

    background: rgba(199, 154, 75, 0.05);

    color: var(--gold-light);

    font-size: 10px;
}

.age-display.visible {
    display: block;
}


/* =========================================
   RANGE
========================================= */

.range-wrapper {
    padding:
        5px 0
        1px;
}

.range-labels {
    display: flex;
    justify-content: space-between;

    margin-bottom: 6px;

    color: #777b7f;

    font-size: 9px;
}

input[type="range"] {
    width: 100%;
    height: 4px;

    appearance: none;

    border: 0;

    border-radius: 99px;

    background:
        linear-gradient(
            to right,
            var(--gold)
                0%,
            var(--gold)
                var(--range-progress, 13.33%),
            #36393c
                var(--range-progress, 13.33%),
            #36393c
                100%
        );

    outline: none;

    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;

    width: 16px;
    height: 16px;

    border:
        2px solid #f7f3e8;

    border-radius: 50%;

    background: var(--gold);

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.30);
}

input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;

    border:
        2px solid #f7f3e8;

    border-radius: 50%;

    background: var(--gold);
}


/* =========================================
   FILE UPLOAD
========================================= */

.field-hint {
    margin-bottom: 8px;

    color: #7e8286;

    font-size: 9px;
}

.file-upload {
    display: flex;
    align-items: center;
    gap: 11px;

    min-height: 62px;

    padding: 10px 12px;

    border:
        1px dashed rgba(199, 154, 75, 0.35);

    border-radius: 4px;

    background:
        rgba(255, 255, 255, 0.015);

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.file-upload:hover {
    border-color: var(--gold);

    background:
        rgba(199, 154, 75, 0.035);
}

.file-upload input {
    display: none;
}

.upload-icon {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border:
        1px solid rgba(199, 154, 75, 0.35);

    border-radius: 50%;

    color: var(--gold-light);

    font-size: 18px;
}

.file-upload strong {
    display: block;

    color: #e7e5df;

    font-size: 11px;
}

.file-upload small {
    display: block;

    margin-top: 2px;

    max-width: 620px;

    overflow: hidden;

    color: #7d8185;

    font-size: 9px;

    text-overflow: ellipsis;

    white-space: nowrap;
}


/* =========================================
   TEXTAREA
========================================= */

textarea {
    min-height: 100px;

    padding: 11px 12px;

    resize: vertical;
}

.textarea-footer {
    display: flex;
    justify-content: space-between;

    margin-top: 5px;

    color: #6f7377;

    font-size: 9px;
}

#characterCount.near-limit {
    color: var(--gold-light);
}


/* =========================================
   TERMS
========================================= */

.terms-card {
    padding:
        13px 17px;
}

.terms-choice {
    position: relative;

    display: flex;
    align-items: center;
    gap: 9px;

    color: #d8d7d2;

    cursor: pointer;

    font-size: 11px;
}

.terms-choice input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}

.terms-choice .custom-checkbox {
    width: 17px;
    height: 17px;

    flex-shrink: 0;

    border:
        1px solid #5e6266;

    border-radius: 3px;

    background: #1a1c1f;

    transition:
        all 0.15s ease;
}

.terms-choice input:checked + .custom-checkbox {
    border-color: var(--gold);

    background:
        linear-gradient(
            135deg,
            var(--gold-light),
            var(--gold-dark)
        );

    box-shadow:
        inset 0 0 0 3px #151719;
}

.terms-choice a {
    color: var(--gold-light);

    text-decoration: underline;

    text-underline-offset: 2px;
}


/* =========================================
   BUTTONS
========================================= */

.form-actions {
    display: grid;

    grid-template-columns:
        1.5fr
        0.75fr;

    gap: 11px;

    margin-top: 14px;
}

.btn {
    min-height: 42px;

    padding: 0 18px;

    border:
        1px solid transparent;

    border-radius: 3px;

    font-family: inherit;

    font-size: 11px;

    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    background:
        linear-gradient(
            135deg,
            #d2a656,
            #b88537
        );

    color: #171411;

    box-shadow:
        0 8px 20px rgba(199, 154, 75, 0.18);
}

.btn-primary:hover {
    background:
        linear-gradient(
            135deg,
            #e0b866,
            #c69442
        );

    box-shadow:
        0 10px 26px rgba(199, 154, 75, 0.24);
}

.btn-primary span {
    font-size: 15px;
}

.btn-secondary {
    border-color:
        rgba(255, 255, 255, 0.18);

    background:
        transparent;

    color: #dddcd7;
}

.btn-secondary:hover {
    border-color:
        rgba(199, 154, 75, 0.45);

    background:
        rgba(255, 255, 255, 0.035);
}


/* =========================================
   SUCCESS
========================================= */

.success-message {
    display: flex;
    align-items: center;
    gap: 13px;

    margin-top: 15px;

    padding: 14px 16px;

    border:
        1px solid rgba(121, 168, 138, 0.38);

    border-radius: 6px;

    background:
        #15231b;

    color: #dcebe1;

    font-size: 11px;
}

.success-icon {
    width: 28px;
    height: 28px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 50%;

    background: var(--success);

    color: white;

    font-weight: 700;

    box-shadow:
        0 0 0 4px rgba(121, 168, 138, 0.10);
}

.success-message p {
    margin-top: 2px;

    color: #91ad9b;

    font-size: 10px;
}


/* =========================================
   FOOTER
========================================= */

.site-footer {
    position: relative;

    min-height: 68px;

    padding:
        17px max(22px, calc((100% - 1120px) / 2));

    border-top:
        1px solid rgba(199, 154, 75, 0.14);

    background:
        linear-gradient(
            115deg,
            #0b0d0f,
            #141619,
            #0a0c0e
        );

    display: grid;

    grid-template-columns:
        1fr
        auto
        1fr;

    align-items: center;

    gap: 20px;

    color: #8f9397;

    font-size: 9px;

    letter-spacing: 0.04em;
}

.site-footer div:nth-child(2) {
    color: #c5c7c8;
}

.site-footer div:last-child {
    text-align: right;
}


/* =========================================
   MODAL
========================================= */

.modal {
    position: fixed;

    inset: 0;

    z-index: 100;

    display: grid;

    place-items: center;

    padding: 20px;

    background:
        rgba(5, 6, 7, 0.70);

    backdrop-filter: blur(7px);
}

.modal-box {
    width: min(390px, 100%);

    padding: 28px;

    border:
        1px solid rgba(199, 154, 75, 0.25);

    border-radius: 7px;

    background:
        linear-gradient(
            145deg,
            #17191b,
            #0f1113
        );

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.45);

    text-align: center;
}

.modal-icon {
    width: 38px;
    height: 38px;

    margin:
        0 auto 13px;

    display: grid;
    place-items: center;

    border:
        1px solid rgba(199, 154, 75, 0.30);

    border-radius: 50%;

    background:
        rgba(199, 154, 75, 0.08);

    color: var(--gold-light);

    font-weight: 700;
}

.modal-box h3 {
    color: #f0eee8;

    font-family:
        "Playfair Display",
        Georgia,
        serif;

    font-size: 22px;
}

.modal-box p {
    margin-top: 6px;

    color: #92969a;

    font-size: 11px;
}

.modal-actions {
    display: flex;
    justify-content: center;

    gap: 9px;

    margin-top: 21px;
}

.btn-danger {
    background:
        #9b4038;

    color: white;
}

.btn-danger:hover {
    background:
        #b24a41;
}


/* =========================================
   UTILITY
========================================= */

.hidden {
    display: none !important;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 760px) {
    .header-inner {
        width: calc(100% - 28px);
    }

    .student-info {
        display: none;
    }

    .page-container {
        width: calc(100% - 24px);

        padding-top: 28px;
    }

    .hero-compass {
        right: -100px;
        top: 25px;

        width: 220px;
        height: 220px;

        opacity: 0.30;
    }

    .intro h2 {
        font-size: 30px;
    }

    #registrationForm {
        padding: 11px;
    }

    .form-card {
        padding:
            14px 13px;
    }

    .form-actions {
        grid-template-columns: 1fr;
    }

    .site-footer {
        grid-template-columns: 1fr;

        gap: 6px;

        text-align: center;
    }

    .site-footer div:last-child {
        text-align: center;
    }
}

@media (max-width: 460px) {
    .brand-mark {
        width: 37px;
        height: 37px;
    }

    .brand h1 {
        font-size: 19px;
    }

    .brand span {
        font-size: 7px;
    }

    .intro h2 {
        font-size: 26px;
    }

    .intro-text {
        font-size: 11px;
    }

    .form-card {
        margin-bottom: 7px;
    }

    .field-header label {
        font-size: 10px;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="date"],
    select {
        height: 39px;
    }
}