/* ============================================================
   CAREERS PAGE - Code Xenix
   Premium design system
   ============================================================ */

/* ---------- Base ---------- */
.cr-page {
    color: var(--text-primary);
    overflow: hidden;
}

.cr-section {
    padding: 100px 0;
    position: relative;
}

/* ---------- Shared ---------- */
.cr-kicker {
    color: var(--brand-primary);
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.cr-heading {
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 16px;
}

.cr-subheading {
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1.7;
    max-width: 560px;
}

.cr-section__head {
    margin-bottom: 56px;
}

.cr-section__head--center {
    text-align: center;
}

.cr-section__head--center .cr-subheading {
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   HERO
   ============================================================ */
.cr-hero {
    position: relative;
    padding: 50px 0 60px;
    background: linear-gradient(160deg, var(--bg-body) 0%, var(--bg-surface-alt) 50%, var(--bg-surface) 100%);
    overflow: hidden;
}

.cr-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 207, 20, 0.25), transparent);
}

.cr-hero__shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.cr-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.06;
}

.cr-shape--1 {
    width: 500px;
    height: 500px;
    background: var(--brand-primary);
    top: -200px;
    right: -120px;
    animation: cr-float 12s ease-in-out infinite;
}

.cr-shape--2 {
    width: 300px;
    height: 300px;
    background: #5d1eb2;
    bottom: -100px;
    left: -80px;
    animation: cr-float 15s ease-in-out infinite reverse;
}

.cr-shape--3 {
    width: 180px;
    height: 180px;
    background: var(--brand-primary);
    top: 40%;
    left: 50%;
    animation: cr-float 10s ease-in-out infinite 2s;
}

@keyframes cr-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.04); }
}

/* Breadcrumb */
.cr-breadcrumb {
    position: relative;
    z-index: 1;
    margin-bottom: 40px;
}

.cr-breadcrumb ol {
    display: flex;
    align-items: center;
    gap: 3px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.cr-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.25s ease;
    font-size: 1.3rem;
}

.cr-breadcrumb a:hover {
    color: var(--brand-primary);
}

.cr-breadcrumb [aria-hidden="true"] {
    color: #5a6570;
}

.cr-breadcrumb [aria-current="page"] {
    color: var(--text-primary);
    font-size: 1.3rem;
}

/* Hero grid */
.cr-hero__grid {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 48px;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    animation: cr-fadeUp 0.8s ease both;
}

.cr-hero__content {
    position: relative;
    z-index: 1;
}

.cr-hero__title {
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 600;
    line-height: 1.08;
    margin-bottom: 20px;
}

.cr-hero__subtitle {
    color: var(--text-secondary);
    font-size: 1.5rem;
    line-height: 1.75;
    max-width: 600px;
    margin-bottom: 18px;
}

.cr-hero__desc {
    color: var(--text-secondary);
    font-size: 1.5rem;
    line-height: 1.75;
    max-width: 600px;
    margin-bottom: 36px;
}

.cr-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* Buttons */
.cr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 28px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    position: relative;
    z-index: 2;
    background: linear-gradient(17deg, var(--brand-primary-dark) 0%, var(--brand-primary) 100%);
    border: 1px solid var(--brand-primary);
    color: var(--text-primary);
    box-shadow: 0 3px 10px rgba(148, 207, 20, 0.5);
    transition: all 0.2s ease-out;
}

.cr-btn:hover {
    transform: translateY(-2px);
    border-color: var(--border-main);
    color: var(--text-muted);
    box-shadow: 0 3px 10px rgba(var(--shadow-color-rgb), 0.5);
}

.cr-btn--secondary {
    background: linear-gradient(17deg, var(--bg-panel) 0%, var(--border-main) 100%);
    border: 1px solid var(--border-main);
    color: var(--text-primary);
    box-shadow: 0 3px 10px rgba(var(--shadow-color-rgb), 0.5);
}

.cr-btn--secondary:hover {
    background: linear-gradient(17deg, var(--brand-primary-dark) 0%, var(--brand-primary) 100%);
    border-color: var(--brand-primary);
    color: var(--text-primary);
    box-shadow: 0 3px 10px rgba(148, 207, 20, 0.5);
}

.cr-btn--sm {
    min-height: 40px;
    padding: 0 20px;
    font-size: 14px;
}

.cr-btn--lg {
    min-height: 54px;
    padding: 0 36px;
}

/* Hero illustration */
.cr-hero__panel {
    position: relative;
}

.cr-hero__illustration {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(var(--text-primary-rgb), 0.06);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cr-hero__svg {
    width: 100%;
    max-width: 400px;
    height: auto;
}

.cr-hero__node {
    animation: cr-nodeFloat 4s ease-in-out infinite;
}

@keyframes cr-nodeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ============================================================
   WHY JOIN
   ============================================================ */
.cr-why {
    background: var(--bg-body);
}

.cr-why__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.cr-why-card {
    background: var(--bg-surface);
    border: 1px solid rgba(var(--text-primary-rgb), 0.08);
    border-radius: 16px;
    padding: 36px 28px;
    position: relative;
    overflow: hidden;
    z-index: 0;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.cr-why-card::before {
    background: var(--brand-primary);
    content: '';
    inset: 0;
    position: absolute;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.45s cubic-bezier(.22, 1, .36, 1);
    z-index: -1;
    border-radius: 16px;
}

.cr-why-card:hover::before {
    transform: scale(1);
}

.cr-why-card:hover {
    border-color: var(--brand-primary);
    transform: translateY(-4px) scale(1.02);
}

.cr-why-card:hover .cr-why-card__icon {
    background: rgba(var(--shadow-color-rgb), 0.15);
    color: var(--bg-surface-hover);
}

.cr-why-card:hover .cr-why-card__icon i {
    color: var(--bg-surface-hover);
}

.cr-why-card:hover h3 {
    color: var(--bg-surface-hover);
}

.cr-why-card:hover p {
    color: #1a2025;
}

.cr-why-card__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.cr-why-card__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(148, 207, 20, 0.12);
    flex-shrink: 0;
    transition: background 0.3s ease, color 0.3s ease;
}

.cr-why-card__icon i {
    font-size: 1.3rem;
    color: var(--brand-primary);
    transition: color 0.3s ease;
}

.cr-why-card h3 {
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    transition: color 0.3s ease;
}

.cr-why-card p {
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1.65;
    margin: 0;
    transition: color 0.3s ease;
}

/* ============================================================
   CULTURE
   ============================================================ */
.cr-culture {
    background: var(--bg-surface-alt);
}

.cr-culture__intro {
    max-width: 760px;
    margin: 0 auto 56px;
    text-align: center;
}

.cr-culture__intro p {
    color: var(--text-secondary);
    font-size: 1.5rem;
    line-height: 1.75;
}

.cr-culture__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.cr-culture-card {
    background: var(--bg-surface);
    border: 1px solid rgba(var(--text-primary-rgb), 0.08);
    border-radius: 16px;
    padding: 36px 28px;
    position: relative;
    overflow: hidden;
    z-index: 0;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.cr-culture-card::before {
    background: var(--brand-primary);
    content: '';
    inset: 0;
    position: absolute;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.45s cubic-bezier(.22, 1, .36, 1);
    z-index: -1;
    border-radius: 16px;
}

.cr-culture-card:hover::before {
    transform: scale(1);
}

.cr-culture-card:hover {
    border-color: var(--brand-primary);
    transform: translateY(-4px) scale(1.02);
}

.cr-culture-card:hover .cr-culture-card__icon {
    background: rgba(var(--shadow-color-rgb), 0.15);
    color: var(--bg-surface-hover);
}

.cr-culture-card:hover .cr-culture-card__icon i {
    color: var(--bg-surface-hover);
}

.cr-culture-card:hover h3 {
    color: var(--bg-surface-hover);
}

.cr-culture-card:hover p {
    color: #1a2025;
}

.cr-culture-card__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.cr-culture-card__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(148, 207, 20, 0.12);
    flex-shrink: 0;
    transition: background 0.3s ease, color 0.3s ease;
}

.cr-culture-card__icon i {
    font-size: 1.3rem;
    color: var(--brand-primary);
    transition: color 0.3s ease;
}

.cr-culture-card h3 {
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    transition: color 0.3s ease;
}

.cr-culture-card p {
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1.65;
    margin: 0;
    transition: color 0.3s ease;
}

/* ============================================================
   BENEFITS
   ============================================================ */
.cr-benefits {
    background: var(--bg-body);
}

.cr-benefits__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.cr-benefit-card {
    background: linear-gradient(160deg, rgba(var(--text-primary-rgb), 0.04), rgba(var(--text-primary-rgb), 0.01));
    border: 1px solid rgba(var(--text-primary-rgb), 0.07);
    border-radius: 16px;
    padding: 36px 28px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.cr-benefit-card:hover {
    transform: translateY(-4px);
    border-color: rgba(148, 207, 20, 0.3);
}

.cr-benefit-card__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.cr-benefit-card__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(148, 207, 20, 0.1);
    border-radius: 10px;
    flex-shrink: 0;
    color: var(--brand-primary);
    font-size: 1.3rem;
}

.cr-benefit-card h3 {
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.cr-benefit-card p {
    color: var(--text-muted);
    font-size: 1.4rem;
    line-height: 1.65;
    margin: 0;
}

/* ============================================================
   HIRING PROCESS / TIMELINE
   ============================================================ */
.cr-process {
    background: var(--bg-surface-alt);
}

.cr-timeline {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    padding: 20px 0;
}

.cr-timeline__line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 27px;
    width: 2px;
    background: linear-gradient(to bottom, var(--brand-primary), rgba(148, 207, 20, 0.15));
}

.cr-timeline__item {
    position: relative;
    padding-left: 76px;
    padding-bottom: 40px;
}

.cr-timeline__item:last-child {
    padding-bottom: 0;
}

.cr-timeline__marker {
    position: absolute;
    left: 18px;
    top: 6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-surface-alt);
    border: 3px solid var(--brand-primary);
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cr-timeline__item:hover .cr-timeline__marker {
    transform: scale(1.2);
    box-shadow: 0 0 16px rgba(148, 207, 20, 0.35);
}

.cr-timeline__card {
    background: var(--bg-surface);
    border: 1px solid rgba(var(--text-primary-rgb), 0.08);
    border-radius: 14px;
    padding: 28px 28px 24px;
    position: relative;
    overflow: hidden;
    z-index: 0;
    transition: border-color 0.3s ease;
}

.cr-timeline__card::before {
    background: var(--brand-primary);
    content: '';
    inset: 0;
    position: absolute;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.45s cubic-bezier(.22, 1, .36, 1);
    z-index: -1;
    border-radius: 14px;
}

.cr-timeline__item:hover .cr-timeline__card::before {
    transform: scale(1);
}

.cr-timeline__item:hover .cr-timeline__card {
    border-color: var(--brand-primary);
}

.cr-timeline__card:hover .cr-timeline__step {
    background: rgba(var(--shadow-color-rgb), 0.15);
    color: var(--bg-surface-hover);
}

.cr-timeline__card:hover h3 {
    color: var(--bg-surface-hover);
}

.cr-timeline__card:hover p {
    color: #1a2025;
}

.cr-timeline__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.cr-timeline__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--brand-primary);
    background: rgba(148, 207, 20, 0.1);
    padding: 4px 12px;
    border-radius: 6px;
    letter-spacing: 1px;
    flex-shrink: 0;
    transition: background 0.3s ease, color 0.3s ease;
}

.cr-timeline__card h3 {
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    transition: color 0.3s ease;
}

.cr-timeline__card p {
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1.65;
    margin: 0;
}

/* ============================================================
   OPEN POSITIONS
   ============================================================ */
.cr-positions {
    background: var(--bg-body);
}

.cr-positions__tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 40px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.cr-positions__tabs::-webkit-scrollbar {
    display: none;
}

.cr-tab-btn {
    background: rgba(var(--text-primary-rgb), 0.04);
    border: 1px solid rgba(var(--text-primary-rgb), 0.08);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    padding: 12px 24px;
    transition: all 0.3s ease;
}

.cr-tab-btn:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

.cr-tab-btn.active {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-hover));
    color: var(--bg-surface-hover);
    border-color: var(--brand-primary);
    box-shadow: 0 4px 16px rgba(148, 207, 20, 0.3);
}

.cr-positions__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.cr-job-card {
    background: var(--bg-surface);
    border: 1px solid rgba(var(--text-primary-rgb), 0.08);
    border-radius: 16px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.cr-job-card:hover {
    transform: translateY(-4px);
    border-color: rgba(148, 207, 20, 0.3);
}

.cr-job-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.cr-job-card__head h3 {
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.cr-job-card__dept {
    flex-shrink: 0;
    background: rgba(148, 207, 20, 0.12);
    color: var(--brand-primary);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
}

.cr-job-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.cr-job-card__meta span {
    color: #5a6570;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cr-job-card__meta i {
    color: var(--brand-primary);
    font-size: 1rem;
}

.cr-job-card__desc {
    color: var(--text-muted);
    font-size: 1.35rem;
    line-height: 1.65;
    margin: 0;
    flex-grow: 1;
}

.cr-job-card .cr-btn {
    align-self: flex-start;
}

/* Empty state */
.cr-positions__empty {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(var(--text-primary-rgb), 0.06);
    border-radius: 16px;
}

.cr-positions__empty-icon {
    font-size: 4rem;
    color: var(--border-main);
    margin-bottom: 24px;
}

.cr-positions__empty h3 {
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.cr-positions__empty p {
    color: var(--text-muted);
    font-size: 1.4rem;
    line-height: 1.7;
    max-width: 500px;
    margin: 0 auto 28px;
}

/* ============================================================
   FINAL CTA
   ============================================================ */
.cr-cta {
    background: linear-gradient(160deg, var(--bg-surface-alt) 0%, var(--bg-surface) 50%, var(--bg-body) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cr-cta__shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cr-shape--4 {
    width: 400px;
    height: 400px;
    background: var(--brand-primary);
    top: -150px;
    left: -100px;
    opacity: 0.04;
    animation: cr-float 14s ease-in-out infinite;
}

.cr-shape--5 {
    width: 250px;
    height: 250px;
    background: #5d1eb2;
    bottom: -80px;
    right: -60px;
    opacity: 0.05;
    animation: cr-float 11s ease-in-out infinite reverse;
}

.cr-cta__content {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
}

.cr-cta__title {
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 18px;
}

.cr-cta__desc {
    color: var(--text-secondary);
    font-size: 1.5rem;
    line-height: 1.75;
    margin-bottom: 36px;
}

.cr-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes cr-fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.cr-fade {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.cr-fade.cr-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE — Tablet
   ============================================================ */
@media (max-width: 1024px) {
    .cr-section {
        padding: 72px 0;
    }

    .cr-hero {
        padding: 110px 0 72px;
    }

    .cr-hero__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .cr-hero__illustration {
        max-width: 400px;
        margin: 0 auto;
    }

    .cr-why__grid,
    .cr-culture__grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

/* ============================================================
   RESPONSIVE — Mobile
   ============================================================ */
@media (max-width: 640px) {
    .cr-section {
        padding: 56px 0;
    }

    .cr-hero {
        padding: 90px 0 56px;
    }

    .cr-hero__title {
        font-size: 2rem;
    }

    .cr-hero__actions {
        flex-direction: column;
    }

    .cr-hero__actions .cr-btn {
        width: 100%;
    }

    .cr-why__grid,
    .cr-culture__grid,
    .cr-benefits__grid {
        grid-template-columns: 1fr;
    }

    .cr-positions__grid {
        grid-template-columns: 1fr;
    }

    .cr-timeline {
        padding-left: 0;
    }

    .cr-timeline__line {
        left: 23px;
    }

    .cr-timeline__item {
        padding-left: 64px;
    }

    .cr-timeline__marker {
        left: 14px;
        width: 18px;
        height: 18px;
    }

    .cr-positions__tabs {
        justify-content: flex-start;
        gap: 6px;
        flex-wrap: nowrap;
    }

    .cr-tab-btn {
        font-size: 1.1rem;
        padding: 10px 16px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .cr-cta__actions {
        flex-direction: column;
    }

    .cr-cta__actions .cr-btn {
        width: 100%;
    }
}
