/* Careers apply page (uses tokens and .job-qr-code from careers.css) */

/* ---------- Hero ---------- */
.apply-hero {
    position: relative;
    overflow: hidden;
    padding: 128px 0 56px;
    background:
        radial-gradient(circle at 85% 20%, rgba(255, 90, 31, 0.28) 0%, rgba(255, 90, 31, 0) 45%),
        radial-gradient(circle at 10% 110%, rgba(255, 90, 31, 0.14) 0%, rgba(255, 90, 31, 0) 40%),
        linear-gradient(160deg, #17171a 0%, #1d1d1f 55%, #26211f 100%);
    color: #fff;
}

.apply-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 85%);
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 85%);
    pointer-events: none;
}

.apply-hero .container {
    position: relative;
    z-index: 1;
}

.apply-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.1rem;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.55);
}

.apply-breadcrumb a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.2s ease;
}

.apply-breadcrumb a:hover {
    color: #fff;
}

.apply-breadcrumb i {
    font-size: 0.6rem;
    opacity: 0.6;
}

.apply-breadcrumb [aria-current] {
    color: #fff;
    font-weight: 600;
}

.apply-eyebrow {
    display: inline-block;
    margin-bottom: 0.5rem;
    color: #ff8a5c;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.apply-title {
    max-width: 820px;
    margin: 0 0 1rem;
    color: #fff;
    font-size: clamp(1.85rem, 4.2vw, 2.9rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.apply-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.apply-hero-meta li {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.88rem;
    font-weight: 600;
}

.apply-hero-meta i {
    color: #ff8a5c;
    font-size: 0.8rem;
}

/* ---------- Layout ---------- */
.apply-body {
    position: relative;
    background: var(--careers-canvas);
    padding: 0 0 72px;
}

.apply-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1.5rem;
    align-items: start;
    max-width: 1160px;
    margin: 2rem auto 0;
    position: relative;
    z-index: 2;
}

.apply-card,
.apply-summary,
.apply-next,
.apply-qr {
    background: var(--careers-surface);
    border: 1px solid var(--careers-line);
    border-radius: var(--careers-radius);
    box-shadow: var(--careers-shadow);
}

.apply-card {
    padding: 2rem 2.25rem;
    scroll-margin-top: 110px;
}

/* ---------- Form ---------- */
.apply-card .apply-form-header h2 {
    margin: 0 0 0.25rem;
    line-height: 1.25;
    color: var(--careers-ink);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.apply-card .apply-form-header p {
    margin: 0;
    line-height: 1.5;
    color: var(--careers-muted);
    font-size: 0.97rem;
}

.req {
    color: var(--careers-accent);
}

.apply-optional {
    margin-left: 0.35rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: #f1f1f4;
    color: var(--careers-muted);
    font-size: 0.72rem;
    font-weight: 600;
    vertical-align: 1px;
}

.apply-hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.apply-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-top: 1.1rem;
    padding: 0.8rem 1rem;
    border-radius: 14px;
    background: #fdf1f1;
    border: 1px solid #f6d3d3;
    color: #a4282b;
    font-size: 0.93rem;
    font-weight: 600;
}

.apply-alert[hidden] {
    display: none;
}

.apply-alert i {
    margin-top: 0.15rem;
}

.apply-step {
    margin: 1.4rem 0 0;
    padding: 1.4rem 0 0;
    border: 0;
    border-top: 1px solid var(--careers-line);
    min-width: 0;
}

.apply-step legend {
    float: left;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1rem;
    padding: 0;
    color: var(--careers-ink);
    font-size: 1.05rem;
    font-weight: 700;
}

.apply-step legend + * {
    clear: both;
}

.apply-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--careers-accent-soft);
    color: var(--careers-accent);
    font-size: 0.85rem;
    font-weight: 800;
}

.apply-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem 1rem;
}

.apply-field + .apply-field {
    margin-top: 1rem;
}

.apply-grid .apply-field + .apply-field {
    margin-top: 0;
}

.apply-field label,
.apply-label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--careers-ink);
    font-size: 0.88rem;
    font-weight: 600;
}

.apply-field input[type="text"],
.apply-field input[type="email"],
.apply-field input[type="tel"],
.apply-field input[type="url"],
.apply-field textarea {
    display: block;
    width: 100%;
    padding: 0.7rem 0.95rem;
    border: 1px solid #dcdce1;
    border-radius: 12px;
    background: #fff;
    color: var(--careers-ink);
    font-size: 1rem;
    line-height: 1.4;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

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

.apply-field input::placeholder,
.apply-field textarea::placeholder {
    color: #a1a1a8;
}

.apply-field input:hover,
.apply-field textarea:hover {
    border-color: #c8c8cf;
}

.apply-field input:focus,
.apply-field textarea:focus {
    outline: none;
    border-color: var(--careers-accent);
    box-shadow: 0 0 0 4px var(--careers-accent-ring);
}

.apply-field .is-invalid,
.apply-field .is-invalid:hover {
    border-color: #d9363e;
}

.apply-field .is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(217, 54, 62, 0.15);
}

.apply-error {
    color: #c62f36;
    font-size: 0.84rem;
    font-weight: 600;
}

.apply-error:not(:empty) {
    margin-top: 0.4rem;
}

.apply-field-foot {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.apply-counter {
    flex-shrink: 0;
    margin-top: 0.4rem;
    margin-left: auto;
    color: #a1a1a8;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}

/* Experience pills */
.apply-choices {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

.apply-choice {
    position: relative;
    margin: 0 !important;
    cursor: pointer;
}

.apply-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.apply-choice span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #dcdce1;
    border-radius: 12px;
    background: #fff;
    color: var(--careers-body);
    font-size: 0.92rem;
    font-weight: 600;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.apply-choice:hover span {
    border-color: #c8c8cf;
}

.apply-choice input:checked + span {
    border-color: var(--careers-accent);
    background: var(--careers-accent-soft);
    color: var(--careers-ink);
    box-shadow: inset 0 0 0 1px var(--careers-accent);
}

.apply-choice input:focus-visible + span {
    box-shadow: 0 0 0 4px var(--careers-accent-ring);
}

/* Resume dropzone */
.apply-dropzone {
    position: relative;
    display: block;
    margin: 0 !important;
    padding: 1.35rem 1.25rem;
    border: 2px dashed #d6d6dc;
    border-radius: 16px;
    background: #fafafb;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.apply-dropzone:hover,
.apply-dropzone.is-dragging {
    border-color: var(--careers-accent);
    background: #fff7f3;
}

.apply-dropzone:focus-within {
    border-color: var(--careers-accent);
    box-shadow: 0 0 0 4px var(--careers-accent-ring);
}

.apply-dropzone.is-invalid {
    border-color: #d9363e;
    background: #fdf6f6;
}

.apply-dropzone.has-file {
    padding: 1rem 1.1rem;
    border-style: solid;
    border-color: var(--careers-line);
    background: #fff;
    cursor: default;
}

.apply-dropzone input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.apply-dropzone-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.apply-dropzone-empty[hidden],
.apply-file[hidden] {
    display: none;
}

.apply-dropzone-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 0.25rem;
    border-radius: 50%;
    background: var(--careers-accent-soft);
    color: var(--careers-accent);
    font-size: 1.3rem;
}

.apply-dropzone-title {
    color: var(--careers-body);
    font-size: 0.98rem;
    font-weight: 500;
}

.apply-dropzone-title strong {
    color: var(--careers-accent);
    font-weight: 700;
}

.apply-dropzone-hint {
    color: var(--careers-muted);
    font-size: 0.84rem;
}

.apply-file {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-align: left;
}

.apply-file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--careers-accent-soft);
    color: var(--careers-accent);
    font-size: 1.1rem;
}

.apply-file-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.apply-file-name {
    overflow: hidden;
    color: var(--careers-ink);
    font-weight: 700;
    font-size: 0.95rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.apply-file-size {
    color: var(--careers-muted);
    font-size: 0.82rem;
}

.apply-file-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    margin-left: auto;
    border: none;
    border-radius: 50%;
    background: #f4f4f6;
    color: var(--careers-muted);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.apply-file-remove:hover {
    background: #fdecec;
    color: #c62f36;
}

/* Submit */
.apply-submit {
    margin-top: 1.5rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--careers-line);
}

.apply-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.9rem 1.5rem;
    border-radius: 999px;
    font-size: 1.02rem;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(255, 90, 31, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.apply-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(255, 90, 31, 0.36);
}

.apply-submit-btn i {
    transition: transform 0.2s ease;
}

.apply-submit-btn:hover i {
    transform: translateX(3px);
}

.apply-submit-btn.is-loading {
    opacity: 0.85;
    cursor: progress;
    transform: none;
}

.apply-submit-btn.is-loading i {
    display: none;
}

.apply-submit-btn.is-loading::before {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: careers-spin 0.8s linear infinite;
}

.apply-privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.75rem 0 0;
    color: var(--careers-muted);
    font-size: 0.83rem;
    text-align: center;
}

/* Success */
.apply-success {
    padding: 1.5rem 0.5rem;
    text-align: center;
    outline: none;
}

.apply-success[hidden],
.apply-form[hidden] {
    display: none;
}

.apply-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin-bottom: 1.5rem;
    border-radius: 50%;
    background: #e9f7ee;
    color: #1a7f37;
    font-size: 2rem;
    box-shadow: 0 0 0 10px #f4fbf6;
    animation: apply-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

.apply-success h2 {
    margin: 0 0 0.75rem;
    line-height: 1.3;
    color: var(--careers-ink);
    font-size: clamp(1.5rem, 3vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.01em;
}

.apply-success p {
    max-width: 520px;
    margin: 0 auto;
    color: var(--careers-body);
    font-size: 1.02rem;
    line-height: 1.65;
}

.apply-success-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.apply-success-actions .btn {
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    font-weight: 700;
}

.apply-btn-ghost {
    background: #f4f4f6;
    border: 1px solid #f4f4f6;
    color: var(--careers-ink);
}

.apply-btn-ghost:hover {
    background: #ebebee;
    color: var(--careers-ink);
}

@keyframes apply-pop {
    from { transform: scale(0.4); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ---------- Aside ---------- */
.apply-aside {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.apply-summary {
    padding: 1.4rem 1.5rem;
}

.apply-summary-eyebrow {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--careers-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.apply-summary-title {
    margin: 0 0 0.8rem;
    color: var(--careers-ink);
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.3;
}

.apply-summary-facts {
    margin: 0;
}

.apply-summary-facts > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--careers-line);
    font-size: 0.88rem;
}

.apply-summary-facts dt {
    flex-shrink: 0;
    color: var(--careers-muted);
    font-weight: 500;
}

.apply-summary-facts dd {
    margin: 0;
    color: var(--careers-ink);
    font-weight: 600;
    text-align: right;
}

.apply-summary-details {
    margin-top: 0.4rem;
}

.apply-summary-details details {
    border-top: 1px solid var(--careers-line);
}

.apply-summary-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0;
    color: var(--careers-ink);
    font-size: 0.93rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.apply-summary-details summary::-webkit-details-marker {
    display: none;
}

.apply-summary-details summary i {
    color: var(--careers-muted);
    font-size: 0.75rem;
    transition: transform 0.25s ease;
}

.apply-summary-details details[open] summary i {
    transform: rotate(180deg);
}

.apply-summary-details summary:hover {
    color: var(--careers-accent);
}

.apply-summary-details ul {
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.apply-summary-details li {
    position: relative;
    padding-left: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--careers-body);
    font-size: 0.88rem;
    line-height: 1.55;
}

.apply-summary-details li::before {
    content: '';
    position: absolute;
    left: 0.1rem;
    top: 0.6em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--careers-accent);
}

/* What happens next */
.apply-next {
    padding: 1.3rem 1.5rem;
}

.apply-next h3 {
    margin: 0 0 0.9rem;
    line-height: 1.3;
    color: var(--careers-ink);
    font-size: 1rem;
    font-weight: 800;
}

.apply-next ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.apply-next li {
    position: relative;
    display: flex;
    gap: 0.8rem;
    padding-bottom: 0.85rem;
}

.apply-next li:last-child {
    padding-bottom: 0;
}

.apply-next li:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 13px;
    top: 30px;
    bottom: 4px;
    width: 2px;
    background: var(--careers-line);
}

.apply-next li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--careers-ink);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
}

.apply-next strong {
    display: block;
    color: var(--careers-ink);
    font-size: 0.92rem;
}

.apply-next p {
    margin: 0.15rem 0 0;
    color: var(--careers-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* QR */
.apply-qr {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
    padding: 1.1rem 1.25rem;
}

.apply-qr .job-qr-code {
    flex-shrink: 0;
    width: 132px;
    box-shadow: 0 0 0 4px #fff, 0 4px 14px rgba(16, 24, 40, 0.08);
}

.apply-qr figcaption {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.apply-qr strong {
    color: var(--careers-ink);
    font-size: 0.95rem;
}

.apply-qr span {
    color: var(--careers-muted);
    font-size: 0.85rem;
    line-height: 1.45;
}

.apply-eeo {
    margin: 0.25rem 0.25rem 0;
    color: var(--careers-muted);
    font-size: 0.8rem;
    line-height: 1.55;
}

@keyframes careers-spin {
    to { transform: rotate(360deg); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
    .apply-layout {
        grid-template-columns: minmax(0, 1fr) 330px;
    }

    .apply-choices {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .apply-layout {
        grid-template-columns: minmax(0, 1fr);
        margin-top: 1.5rem;
    }

    /* Already on a small screen, so the "use your phone" QR isn't needed */
    .apply-qr {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .apply-hero {
        padding: 112px 0 44px;
    }

    .apply-breadcrumb {
        margin-bottom: 0.9rem;
        font-size: 0.82rem;
    }

    /* The job title is already the page heading, so keep the trail to one line */
    .apply-breadcrumb .crumb-job {
        display: none;
    }

    .apply-hero-meta li {
        padding: 0.3rem 0.75rem;
        font-size: 0.8rem;
    }

    .apply-choice span {
        font-size: 0.88rem;
    }

    .apply-body {
        padding-bottom: 48px;
    }

    .apply-layout {
        margin-top: 1rem;
        gap: 1rem;
    }

    .apply-card {
        padding: 1.4rem 1.1rem;
    }

    .apply-card .apply-form-header h2 {
        font-size: 1.4rem;
    }

    .apply-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .apply-step {
        margin-top: 1.2rem;
        padding-top: 1.2rem;
    }

    .apply-summary,
    .apply-next {
        padding: 1.2rem 1.1rem;
    }
}


@media (prefers-reduced-motion: reduce) {
    .apply-success-icon,
    .apply-submit-btn,
    .apply-submit-btn.is-loading::before {
        animation: none;
        transition: none;
    }
}
