/* Apply page — extends landing-page/style.css tokens */

.apply-container {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    position: relative;
    z-index: 2;
}

.apply-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--accent-glow);
}

.apply-logo {
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.apply-spacer {
    width: 50px;
}

.apply-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.5);
}

.apply-intro {
    text-align: center;
    margin-bottom: 2rem;
}

.apply-title {
    font-size: 1.875rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-glow) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.apply-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
}

/* Stepper */
.stepper {
    margin-bottom: 2.5rem;
}

.stepper-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.stepper-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 25%;
}

.stepper-label {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Steps */
.step {
    display: none;
    animation: stepFade 0.35s ease-out;
}

.step.step-active {
    display: block;
}

@keyframes stepFade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Fields */
.field-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.field-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.625rem;
}

.optional-tag {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: 0.625rem;
    padding: 2px 8px;
    border-radius: 8px;
    margin-left: 0.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 500;
}

.field-input,
.field-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.875rem 1.125rem;
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    outline: none;
}

.field-textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

.field-input:focus,
.field-textarea:focus {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.field-input.invalid,
.field-textarea.invalid {
    border-color: #f87171;
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.1);
}

.textarea-counter {
    position: absolute;
    bottom: 10px;
    right: 14px;
    color: var(--text-secondary);
    font-size: 0.7rem;
    pointer-events: none;
    background: rgba(10, 10, 15, 0.6);
    padding: 2px 6px;
    border-radius: 6px;
}

/* Radio / Checkbox pills */
.radio-group,
.checkbox-group {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.radio-pill,
.checkbox-pill {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.radio-pill input,
.checkbox-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-pill span,
.checkbox-pill span {
    display: inline-block;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.625rem 1.125rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.radio-pill:hover span,
.checkbox-pill:hover span {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
}

.radio-pill input:checked ~ span,
.checkbox-pill input:checked ~ span {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

/* Conditional field */
.conditional-field {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-bottom: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin-bottom 0.35s ease;
}

.conditional-field.open {
    max-height: 400px;
    opacity: 1;
    margin-bottom: 1.5rem;
}

/* Honeypot */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Error / Submit error */
.error-message {
    color: #f87171;
    font-size: 0.8rem;
    margin-top: 0.375rem;
    min-height: 1rem;
}

.submit-error {
    color: #f87171;
    font-size: 0.9rem;
    margin-top: 1rem;
    text-align: center;
    min-height: 1rem;
}

/* Actions */
.step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-primary,
.btn-secondary {
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 8px 20px -8px rgba(99, 102, 241, 0.5);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -8px rgba(99, 102, 241, 0.6);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* Captcha */
.captcha-group {
    display: flex;
    justify-content: center;
}

/* Success state */
.success-state {
    text-align: center;
    padding: 3rem 1rem;
    animation: stepFade 0.5s ease-out;
}

.success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
    font-size: 2.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 12px 32px -8px rgba(16, 185, 129, 0.5);
}

.success-title {
    font-size: 1.625rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.success-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.success-cta {
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 640px) {
    .apply-card {
        padding: 1.5rem;
        border-radius: 20px;
    }
    .apply-title {
        font-size: 1.5rem;
    }
    .step-actions {
        flex-direction: column-reverse;
    }
    .step-actions button {
        width: 100%;
    }
}
