/* =========================================================
   Enterlyze — Careers page
   Loaded AFTER index.css / footer.css / responsive.css.
   Every class is prefixed "cp-" so nothing here can leak into
   (or be overridden by) another page's styles.
   Uses the shared :root variables from index.css, with fallbacks.
   ========================================================= */

.cp-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.cp-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

body.cp-lock {
    overflow: hidden;
}

/* ---------- Hero ---------- */
/* Same colours as the home page banner (home.css .hero) */
.cp-hero {
    position: relative;
    isolation: isolate;
    background: #14100c url(../image/hero-bg-1920.webp) center / cover no-repeat;
    padding: 150px 20px 90px;
    text-align: center;
    color: #fff;
}

/* Text is centred over the bright office photo, so the overlay covers the full width */
.cp-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(8, 10, 14, .62);
}

.cp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 12px;
    line-height: 20.4px;
    letter-spacing: .96px;
    text-transform: uppercase;
    color: #fff;
}

.cp-eyebrow__dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: #fca918;
    box-shadow: 0 0 0 5px rgba(252, 169, 24, .12);
    flex: none;
}

.cp-hero__inner {
    max-width: 860px;
    margin: 0 auto;
}

.cp-hero h1 {
    margin-top: 28px;
    font-size: 54px;
    line-height: 1.15;
    font-weight: 800;
    color: #fff;
}

.cp-hero h1 span {
    color: #fca918;
}

.cp-hero p {
    margin: 22px auto 0;
    max-width: 700px;
    color: #fff;
    font-size: 19px;
    line-height: 1.7;
}

.cp-hero__actions {
    margin-top: 36px;
    display: flex;
    justify-content: center;
}

/* ---------- Open roles ---------- */
.cp-jobs {
    padding: 70px 0 80px;
    background: var(--bg, #f5faff);
    scroll-margin-top: 90px;
}

.cp-jobs__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.cp-jobs__head h2 {
    font-size: 36px;
    font-weight: 800;
    color: #0b1e2e;
}

.cp-count {
    color: var(--muted, #64748b);
    font-size: 15px;
}

.cp-filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 12px;
    margin-bottom: 28px;
}

.cp-filters[hidden] {
    display: none;
}

.cp-field {
    position: relative;
    display: block;
}

.cp-field input,
.cp-field select {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line, #dce9f3);
    border-radius: 12px;
    background: #fff;
    font: inherit;
    font-size: 15px;
    color: var(--ink, #0a1d33);
}

.cp-field--search input {
    padding-left: 42px;
}

.cp-field--search i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted, #64748b);
    pointer-events: none;
}

.cp-field input:focus-visible,
.cp-field select:focus-visible,
.cp-form input:focus-visible,
.cp-btn:focus-visible,
.cp-iconbtn:focus-visible,
.cp-card__open:focus-visible {
    outline: 3px solid rgba(10, 102, 178, .35);
    outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.cp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 26px;
    border-radius: 12px;
    border: 2px solid transparent;
    font: inherit;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background .2s, transform .2s, color .2s;
}

.cp-btn--primary {
    background: var(--blue, #074b88);
    color: #fff;
}

.cp-btn--primary:hover:not(:disabled) {
    background: #053763;
    transform: translateY(-1px);
}

.cp-btn--ghost {
    background: #fff;
    border-color: var(--line, #dce9f3);
    color: var(--blue, #074b88);
}

.cp-btn--ghost:hover {
    border-color: var(--blue, #074b88);
}

.cp-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.cp-iconbtn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 0;
    background: #eef4fa;
    color: var(--ink, #0a1d33);
    font-size: 18px;
    cursor: pointer;
}

.cp-iconbtn:hover {
    background: #dce9f3;
}

/* ---------- Status / empty / error ---------- */
.cp-status:empty {
    display: none;
}

.cp-state {
    text-align: center;
    padding: 56px 20px;
    background: #fff;
    border: 1px dashed var(--line, #dce9f3);
    border-radius: 18px;
    color: var(--muted, #64748b);
}

.cp-state i {
    font-size: 34px;
    color: var(--blue2, #0a66b2);
    margin-bottom: 14px;
}

.cp-state h3 {
    color: var(--ink, #0a1d33);
    font-size: 20px;
    margin-bottom: 8px;
}

.cp-state a {
    color: var(--blue2, #0a66b2);
    font-weight: 600;
}

.cp-state .cp-btn {
    margin-top: 18px;
}

/* ---------- Job cards ---------- */
.cp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.cp-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 26px;
    background: #fff;
    border: 1px solid var(--line, #dce9f3);
    border-radius: 18px;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}

.cp-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow, 0 24px 70px rgba(7, 75, 136, .14));
    border-color: var(--blue2, #0a66b2);
}

.cp-card__title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink, #0a1d33);
}

.cp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cp-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #eef4fa;
    color: var(--blue, #074b88);
    font-size: 13px;
    font-weight: 500;
}

.cp-chip--skill {
    background: #fff;
    border: 1px solid var(--line, #dce9f3);
    color: var(--ink, #0a1d33);
}

.cp-chip--pref {
    background: #fff8e8;
    color: #8a5a00;
}

.cp-card__line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--muted, #64748b);
}

.cp-card__line i {
    color: var(--blue2, #0a66b2);
    width: 16px;
    text-align: center;
}

.cp-card__foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--line, #dce9f3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cp-card__date {
    font-size: 13px;
    color: var(--muted, #64748b);
}

/* The whole card is clickable via the one real button inside it */
.cp-card__open {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-weight: 600;
    font-size: 14px;
    color: var(--blue, #074b88);
    cursor: pointer;
}

.cp-card__open::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;
}

/* Skeleton loaders */
.cp-skeleton {
    height: 210px;
    border-radius: 18px;
    background: linear-gradient(90deg, #eaf1f8 25%, #f6faff 37%, #eaf1f8 63%);
    background-size: 400% 100%;
    animation: cp-shimmer 1.4s ease infinite;
}

@keyframes cp-shimmer {
    0% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0 50%;
    }
}

/* ---------- How hiring works ---------- */
.cp-steps {
    padding: 80px 0 90px;
    background: linear-gradient(180deg, #fff 0%, var(--bg, #f5faff) 100%);
}

.cp-steps h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 800;
    color: #0b1e2e;
    margin-bottom: 48px;
}

.cp-steps__list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.cp-steps__list li {
    position: relative;
    text-align: center;
    padding: 30px 20px 28px;
    background: #fff;
    border: 1px solid var(--line, #dce9f3);
    border-radius: 18px;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}

.cp-steps__list li:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow, 0 24px 70px rgba(7, 75, 136, .14));
    border-color: var(--blue2, #0a66b2);
}

.cp-steps__icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--blue, #074b88);
    color: #fff;
    font-size: 26px;
    margin-bottom: 18px;
    transition: background .25s;
    animation: cp-step-glow 6s ease-in-out infinite;
}

.cp-steps__list li:hover .cp-steps__icon {
    background: var(--blue2, #0a66b2);
}

/* The glow travels across the four steps, one after another */
.cp-steps__list li:nth-child(2) .cp-steps__icon {
    animation-delay: 1.5s;
}

.cp-steps__list li:nth-child(3) .cp-steps__icon {
    animation-delay: 3s;
}

.cp-steps__list li:nth-child(4) .cp-steps__icon {
    animation-delay: 4.5s;
}

@keyframes cp-step-glow {

    0%,
    25%,
    100% {
        box-shadow: 0 0 0 0 rgba(252, 169, 24, 0);
    }

    12% {
        box-shadow: 0 0 0 10px rgba(252, 169, 24, .28);
    }
}

.cp-steps__num {
    position: absolute;
    top: -4px;
    right: -6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #fca918;
    color: #0b1e2e;
    font-weight: 700;
    font-size: 13px;
}

/* Arrow in the gap between two cards */
.cp-steps__arrow {
    position: absolute;
    z-index: 1;
    top: 47px;
    right: -38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line, #dce9f3);
    border-radius: 50%;
    background: #fff;
    color: #fca918;
    font-size: 14px;
    box-shadow: 0 6px 16px rgba(7, 75, 136, .12);
}

.cp-steps__arrow i {
    animation: cp-arrow-flow 1.5s ease-in-out infinite;
}

.cp-steps__list li:nth-child(2) .cp-steps__arrow i {
    animation-delay: .25s;
}

.cp-steps__list li:nth-child(3) .cp-steps__arrow i {
    animation-delay: .5s;
}

@keyframes cp-arrow-flow {

    0%,
    100% {
        transform: translateX(-3px);
    }

    50% {
        transform: translateX(3px);
    }
}

.cp-steps__list h3 {
    font-size: 18px;
    color: var(--ink, #0a1d33);
    margin-bottom: 6px;
}

.cp-steps__list p {
    color: var(--muted, #64748b);
    font-size: 15px;
    line-height: 1.6;
}

/* Cards rise in one by one on first scroll. cp-reveal is added by careerpage.js,
   so without JS the cards are simply visible. */
.cp-reveal .cp-steps__list li {
    opacity: 0;
}

.cp-reveal.cp-in .cp-steps__list li {
    opacity: 1;
    animation: cp-rise .6s ease backwards;
}

.cp-reveal.cp-in .cp-steps__list li:nth-child(2) {
    animation-delay: .15s;
}

.cp-reveal.cp-in .cp-steps__list li:nth-child(3) {
    animation-delay: .3s;
}

.cp-reveal.cp-in .cp-steps__list li:nth-child(4) {
    animation-delay: .45s;
}

@keyframes cp-rise {
    from {
        opacity: 0;
        transform: translateY(26px);
    }
}

/* Two columns: the arrow after each row's last card has nowhere to point */
@media (max-width: 992px) {
    .cp-steps__list li:nth-child(2) .cp-steps__arrow {
        display: none;
    }
}

/* One column: the arrows point down, between the cards */
@media (max-width: 640px) {
    .cp-steps__list li:nth-child(2) .cp-steps__arrow {
        display: inline-flex;
    }

    .cp-steps__arrow {
        top: auto;
        right: auto;
        bottom: -38px;
        left: calc(50% - 18px);
        transform: rotate(90deg);
    }
}

@media (prefers-reduced-motion: reduce) {

    .cp-steps__icon,
    .cp-steps__arrow i,
    .cp-reveal.cp-in .cp-steps__list li {
        animation: none;
    }

    .cp-steps__list li {
        transition: none;
    }
}

/* ---------- Modal ---------- */
.cp-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(10, 29, 51, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cp-modal[hidden] {
    display: none;
}

.cp-dialog {
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .3);
    overflow: hidden;
}

.cp-dialog__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--line, #dce9f3);
}

.cp-dialog__head h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--ink, #0a1d33);
}

.cp-dialog__body {
    padding: 24px;
    overflow-y: auto;
}

.cp-section {
    margin-top: 26px;
}

.cp-section:first-child {
    margin-top: 0;
}

.cp-section h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--ink, #0a1d33);
    margin-bottom: 8px;
}

.cp-prose {
    font-size: 15px;
    line-height: 1.75;
    color: #3d4b5c;
    white-space: pre-wrap;
}

.cp-list {
    padding-left: 20px;
    font-size: 15px;
    line-height: 1.75;
    color: #3d4b5c;
}

.cp-list li+li {
    margin-top: 4px;
}

.cp-apply {
    margin-top: 34px;
    padding-top: 26px;
    border-top: 1px solid var(--line, #dce9f3);
    scroll-margin-top: 10px;
}

.cp-apply>h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* ---------- Form ---------- */
.cp-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cp-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.cp-form__group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink, #0a1d33);
}

.cp-form input[type="text"],
.cp-form input[type="email"],
.cp-form input[type="tel"],
.cp-form input[type="number"],
.cp-form input[type="file"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line, #dce9f3);
    border-radius: 12px;
    background: #fff;
    font: inherit;
    font-size: 15px;
}

.cp-form input[aria-invalid="true"] {
    border-color: #d93025;
}

.cp-form__hint {
    margin-top: 5px;
    font-size: 12px;
    color: var(--muted, #64748b);
}

.cp-form__error {
    margin-top: 5px;
    font-size: 13px;
    color: #d93025;
}

.cp-form__error:empty {
    display: none;
}

.cp-check {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400 !important;
    font-size: 14px !important;
    line-height: 1.6;
    color: #3d4b5c !important;
}

.cp-check input {
    margin-top: 4px;
    width: 17px;
    height: 17px;
    flex: none;
}

.cp-check a {
    color: var(--blue2, #0a66b2);
    font-weight: 600;
}

.cp-form__alert {
    padding: 12px 14px;
    border-radius: 12px;
    background: #fdecea;
    color: #a52019;
    font-size: 14px;
}

.cp-form__submit {
    align-self: flex-start;
}

.cp-success {
    text-align: center;
    padding: 36px 10px;
}

.cp-success i {
    font-size: 46px;
    color: #1e9e5a;
    margin-bottom: 14px;
}

.cp-success h3 {
    font-size: 22px;
    margin-bottom: 8px;
    color: var(--ink, #0a1d33);
}

.cp-success p {
    color: var(--muted, #64748b);
    margin-bottom: 20px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .cp-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cp-filters {
        grid-template-columns: 1fr 1fr;
    }

    .cp-field--search {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .cp-hero {
        background-image: url(../image/hero-bg-1200.webp);
    }
}

@media (max-width: 992px) {$1.cp-hero {
        padding-top: 130px;
    }

    .cp-hero h1 {
        font-size: 42px;
    }

    .cp-steps__list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .cp-hero {
        padding: 120px 16px 60px;
    }

    .cp-hero h1 {
        font-size: 32px;
    }

    .cp-hero p {
        font-size: 16px;
    }

    .cp-jobs {
        padding: 50px 0 60px;
    }

    .cp-jobs__head h2,
    .cp-steps h2 {
        font-size: 28px;
    }

    .cp-grid,
    .cp-filters,
    .cp-steps__list,
    .cp-form__row {
        grid-template-columns: 1fr;
    }

    .cp-modal {
        padding: 0;
        align-items: flex-end;
    }

    .cp-dialog {
        max-height: 94vh;
        border-radius: 20px 20px 0 0;
    }

    .cp-dialog__body {
        padding: 18px;
    }

    .cp-form__submit {
        align-self: stretch;
    }
}

@media (prefers-reduced-motion: reduce) {

    .cp-card,
    .cp-btn {
        transition: none;
    }

    .cp-skeleton {
        animation: none;
    }
}
