/* ==========================================================================
   Join page ("Únete")
   ========================================================================== */

.join {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
    align-items: start;
    gap: 80px;
}

/* ---------- Info column ---------- */

.join__heading {
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 650;
    letter-spacing: -0.025em;
}

.checklist + .join__heading {
    margin-top: 48px;
}

.checklist {
    display: grid;
    gap: 14px;
}

.checklist li {
    position: relative;
    padding-left: 36px;
    color: var(--muted);
}

/* small pill bullet */
.checklist li::before {
    content: "";
    position: absolute;
    top: 0.58em;
    left: 0;
    width: 20px;
    height: 8px;
    border-radius: var(--pill);
    background: var(--black);
}

/* ---------- Form card ---------- */

.join__card {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    scroll-margin-top: calc(var(--header-height) + 16px);
    padding: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 24px 48px -24px rgba(0, 0, 0, 0.12);
}

.join__card-title {
    font-size: 1.5rem;
    font-weight: 650;
    letter-spacing: -0.025em;
}

.join__card-text {
    margin: 6px 0 28px;
    color: var(--muted);
    font-size: 0.9375rem;
}

.messages {
    margin-bottom: 24px;
}

.message {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    background: var(--black);
    color: var(--white);
    font-size: 0.9375rem;
    font-weight: 500;
}

.form {
    display: grid;
    gap: 20px;
}

.field {
    display: grid;
    gap: 8px;
}

.field__label {
    font-size: 0.9375rem;
    font-weight: 600;
}

.field__optional {
    color: var(--muted);
    font-weight: 400;
}

.field input:not([type="checkbox"]),
.field select,
.field textarea {
    width: 100%;
    min-height: 52px;
    padding: 12px 16px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--white);
    font-size: 1rem; /* 16px avoids iOS zoom on focus */
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field textarea {
    min-height: 120px;
    resize: vertical;
}

.field select {
    appearance: none;
    padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23141414' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #9a9a96;
}

.field input:not([type="checkbox"]):focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--black);
    box-shadow: 0 0 0 4px rgba(14, 14, 14, 0.08);
}

.field--invalid input:not([type="checkbox"]),
.field--invalid select,
.field--invalid textarea {
    border-color: #b42318;
}

.field__error,
.form__error {
    color: #b42318;
    font-size: 0.875rem;
    font-weight: 500;
}

.field--check {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.field--check input {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--black);
}

.field--check .field__error {
    grid-column: 1 / -1;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .join {
        gap: 48px;
    }

    .join__card {
        padding: 32px;
    }
}

@media (max-width: 800px) {
    .join {
        grid-template-columns: 1fr;
    }

    .join__card {
        position: static;
    }
}

@media (max-width: 600px) {
    .join {
        gap: 40px;
    }

    .join__heading {
        font-size: 1.3125rem;
    }

    .checklist + .join__heading {
        margin-top: 36px;
    }

    .join__card {
        margin-inline: calc(var(--gutter) * -0.5);
        padding: 24px 20px;
        border-radius: 24px;
    }

    .join__card-title {
        font-size: 1.3125rem;
    }
}
