/* ─── CAREERS PAGE ───
   Layers on top of service-page.css (sp-hero, sp-title, sp-h2, sp-btn-*).
   Every class here is crs-prefixed so it can't collide with the service
   pages or the homepage stylesheets.

   NOTE: this file loads AFTER service-page.css, so anything declared here
   wins on equal specificity. Keep overrides narrow and never restate a
   property .sp-* already owns unless the override is the whole point. */

/* ═══ Hero ══════════════════════════════════════════════════════════ */
/* There's no hero visual on this page, so the copy column runs the full
   width of .sp-hero-inner instead of sharing the grid with a card stack. */
.crs-hero-inner {
    grid-template-columns: minmax(0, 1fr);
}

/* No max-width on the headline: it breaks at the explicit .sp-line spans,
   so a width cap can only ever force a second, unbalanced wrap. Never cap
   .sp-hero-copy either — it also wraps the lede and the buttons and would
   drag the whole column into a narrow ribbon. */
.crs-hero .sp-lede {
    max-width: 58ch;
}

/* Desktop only: service-page.css sets min-height:auto at <=1023px and the
   hero must be free to shrink to its content there. */
@media (min-width: 1024px) {
    .crs-hero {
        min-height: 74vh;
        min-height: 74dvh;
    }
}

/* On a service page the ambient labels sit safely outside a half-width copy
   column. Here the copy spans the full grid, so they clip the headline until
   the page gutters are wide enough to clear them. */
@media (max-width: 1499px) {
    .crs-hero .sp-hero-ambient { display: none; }
}

/* <button> doesn't inherit type styling, but .sp-btn-primary sets
   font-family/size/weight itself, so it already covers this element. Only
   neutralise the UA chrome that .sp-btn-primary does NOT set — touching
   border, background or font here would override the real button styling. */
.crs-apply-btn {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

/* ═══ Sections ══════════════════════════════════════════════════════ */
.crs-section {
    position: relative;
    padding: var(--section-y) var(--section-x);
    background:
        radial-gradient(ellipse 52% 40% at 12% 18%, rgba(79, 122, 244, 0.055), transparent 62%),
        var(--bg);
}

.crs-section--alt {
    background:
        radial-gradient(ellipse 48% 38% at 84% 22%, rgba(192, 64, 230, 0.05), transparent 62%),
        var(--bg);
}

.crs-inner {
    width: min(var(--page-max), 100%);
    margin: 0 auto;
}

.crs-head {
    margin-bottom: clamp(34px, 4.5vh, 58px);
}

.crs-head-copy {
    margin: 20px 0 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(15px, 1.15vw, 18px);
    font-weight: 500;
    line-height: 1.6;
    letter-spacing: -0.025em;
    color: rgba(255, 255, 255, 0.54);
    max-width: 46ch;
}

/* ═══ What we look for ══════════════════════════════════════════════ */
/* Real borders on the cells rather than a 1px grid gap showing a lighter
   parent through — translucent tiles washed that trick out completely. */
.crs-traits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
}

.crs-trait {
    padding: clamp(26px, 3.2vw, 42px);
    background: rgba(255, 255, 255, 0.018);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.4s var(--ease-luxe);
}

/* Top row and first column shouldn't double up on the container border. */
.crs-trait:nth-child(-n+2) { border-top: none; }
.crs-trait:nth-child(odd)  { border-left: none; }

@media (hover: hover) and (pointer: fine) {
    .crs-trait:hover { background: rgba(255, 255, 255, 0.038); }
}

.crs-trait-num {
    display: block;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.28);
}

.crs-trait-title {
    margin: 14px 0 0;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(19px, 1.8vw, 26px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.14;
    color: rgba(255, 255, 255, 0.92);
    text-wrap: balance;
}

.crs-trait-text {
    margin: 12px 0 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(14px, 1.05vw, 16px);
    font-weight: 500;
    line-height: 1.65;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.5);
    max-width: 46ch;
}

/* ═══ How it works ══════════════════════════════════════════════════ */
.crs-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.crs-step {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    padding: clamp(24px, 3vh, 34px) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.crs-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.62);
}

.crs-step-title {
    margin: 0;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(20px, 2vw, 29px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: rgba(255, 255, 255, 0.9);
}

.crs-step-text {
    margin: 10px 0 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(14px, 1.05vw, 16px);
    font-weight: 500;
    line-height: 1.65;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.5);
    max-width: 60ch;
}

.crs-note {
    margin: clamp(26px, 3.4vh, 38px) 0 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.6;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.42);
    max-width: 60ch;
}

/* ═══ Apply band ════════════════════════════════════════════════════ */
.crs-apply {
    position: relative;
    padding: var(--section-y) var(--section-x);
    background:
        radial-gradient(ellipse 60% 48% at 50% 42%, rgba(79, 122, 244, 0.12), transparent 68%),
        radial-gradient(ellipse 42% 34% at 78% 70%, rgba(29, 232, 181, 0.05), transparent 62%),
        var(--bg);
    text-align: center;
}

.crs-apply-inner {
    width: min(700px, 100%);
    margin: 0 auto;
}

.crs-apply-kicker {
    display: inline-block;
    padding: 6px 13px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.56);
}

.crs-apply-title {
    margin: 22px 0 0;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(32px, 4.2vw, 58px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.05em;
    color: var(--white);
    text-wrap: balance;
}

.crs-apply-text {
    margin: 18px auto 0;
    max-width: 46ch;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(15px, 1.15vw, 18px);
    font-weight: 500;
    line-height: 1.6;
    letter-spacing: -0.025em;
    color: rgba(255, 255, 255, 0.54);
}

.crs-apply .crs-apply-btn {
    margin-top: 32px;
}

/* ═══ Application modal ═════════════════════════════════════════════ */
/* Above the mobile-nav overlay (9750) but below the consent banner, which
   must always stay reachable on top. */
.crs-modal {
    position: fixed;
    inset: 0;
    z-index: 9800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(14px, 3vh, 40px) clamp(14px, 3vw, 32px);
}

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

.crs-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 3, 6, 0.76);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.34s var(--ease-luxe);
}

.crs-modal-panel {
    position: relative;
    width: min(820px, 100%);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    background: #0b0b11;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px) scale(0.985);
    transition: opacity 0.34s var(--ease-luxe), transform 0.34s var(--ease-luxe);
}

.crs-modal.is-open .crs-modal-backdrop { opacity: 1; }

.crs-modal.is-open .crs-modal-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.crs-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px clamp(16px, 2.4vw, 24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.crs-modal-title {
    margin: 0;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(16px, 1.6vw, 20px);
    font-weight: 800;
    letter-spacing: -0.035em;
    color: var(--white);
}

.crs-modal-close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.66);
    cursor: pointer;
    transition: background 0.28s var(--ease-luxe), color 0.28s var(--ease-luxe);
}

.crs-modal-close:hover {
    background: rgba(255, 255, 255, 0.09);
    color: var(--white);
}

.crs-modal-close svg { width: 17px; height: 17px; }

.crs-modal-body {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: clamp(10px, 1.6vw, 16px);
}

/* The Fillout snippet ships an inline height:700px, which overflows short
   viewports. !important is the only way past an inline style — this keeps
   the form sized to whatever space the panel actually has. */
.crs-modal-body > [data-zite-id] {
    height: min(700px, calc(100dvh - 150px)) !important;
    min-height: 420px !important;
    border-radius: 12px;
    overflow: hidden;
}

.crs-modal-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(30ch, 82%);
    margin: 0;
    text-align: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.55;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.42);
    pointer-events: none;
}

/* Locks the page behind the modal. The paddingRight compensation is applied
   inline by careers.js so the layout doesn't jump as the scrollbar goes. */
body.crs-modal-open {
    overflow: hidden;
}

/* ═══ Responsive ════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .crs-traits { grid-template-columns: minmax(0, 1fr); }
    /* Single column: every cell keeps its top rule except the first, and
       nothing carries a left rule any more. */
    .crs-trait { border-left: none; }
    .crs-trait:nth-child(-n+2) { border-top: 1px solid rgba(255, 255, 255, 0.1); }
    .crs-trait:first-child { border-top: none; }
}

@media (max-width: 600px) {
    /* Slightly tighter than the service-page default so the longest line
       ("Work that counts.") still fits on one line at 375px. */
    .crs-hero .sp-title { font-size: clamp(33px, 9.1vw, 48px); }

    .crs-step { grid-template-columns: 40px minmax(0, 1fr); gap: 14px; }
    .crs-step-num { width: 30px; height: 30px; font-size: 12px; }

    .crs-modal { padding: 0; }
    .crs-modal-panel {
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
        border: none;
    }
    .crs-modal-body > [data-zite-id] {
        height: calc(100dvh - 122px) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .crs-modal-backdrop,
    .crs-modal-panel {
        transition: none;
    }
}
