/* ============================================================
   Human Match — Careers page
   Reuses tokens + header/footer/glow/buttons from ../styles.css.
   Only careers-specific layout lives here.
   ============================================================ */

/* Active nav item (careers is the current page). */
.nav-item--active,
.nav-item[aria-current="page"] {
    color: var(--gold);
    background: var(--gold-soft);
}

/* ── Careers hero ─────────────────────────────────────────── */
.careers-hero {
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(48px, 8vw, 96px) 24px clamp(32px, 5vw, 56px);
    text-align: center;
}
.careers-hero .kicker { justify-content: center; }
.careers-hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(38px, 6vw, 66px);
    font-weight: 900;
    line-height: 1.04;
    letter-spacing: -0.01em;
    margin: 14px 0 18px;
}
.careers-hero .lede {
    font-size: clamp(17px, 2.2vw, 20px);
    line-height: 1.6;
    color: var(--text-soft);
    max-width: 720px;
    margin: 0 auto;
}
.careers-hero .hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    justify-content: center;
    margin-top: 30px;
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}
.careers-hero .hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.careers-hero .hero-meta span::before {
    content: "";
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 10px rgba(230, 179, 37, 0.6);
}

/* ── Values strip ─────────────────────────────────────────── */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 8px;
}
.value-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 24px;
}
.value-card h3 {
    font-size: 17px;
    margin: 0 0 8px;
    font-weight: 700;
}
.value-card p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text-muted);
}

/* ── Roles list ───────────────────────────────────────────── */
.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}
.role-card {
    display: flex;
    flex-direction: column;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 24px 22px;
    cursor: pointer;
    transition: transform .2s var(--ease), border-color .2s var(--ease),
        background .2s var(--ease), box-shadow .2s var(--ease);
}
.role-card:hover,
.role-card:focus-visible {
    transform: translateY(-3px);
    border-color: var(--gold-line);
    background: var(--surface-strong);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    outline: none;
}
.role-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 999px;
    color: var(--text-soft);
    background: var(--surface-strong);
    border: 1px solid var(--border);
}
.tag--open {
    color: #0A0716;
    background: var(--gold);
    border-color: var(--gold);
}
.tag--area {
    color: var(--gold);
    background: var(--gold-soft);
    border-color: var(--gold-line);
}
.role-card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 23px;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 10px;
}
.role-card__blurb {
    margin: 0 0 18px;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text-muted);
    flex: 1;
}
.role-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.role-card__salary {
    font-size: 13.5px;
    color: var(--text-soft);
    font-weight: 600;
}
.role-card__cta {
    font-size: 13px;
    font-weight: 700;
    color: var(--gold);
    white-space: nowrap;
}

/* ── Role modal ───────────────────────────────────────────── */
.role-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: max(24px, 5vh) 16px 24px;
    background: rgba(2, 4, 10, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    overflow-y: auto;
}
.role-modal.open { display: flex; }
.role-modal__panel {
    position: relative;
    width: 100%;
    max-width: 720px;
    background: linear-gradient(180deg, #0b0f1d 0%, #070510 100%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 40px clamp(22px, 4vw, 44px) 36px;
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
}
.role-modal__close {
    position: absolute;
    top: 18px; right: 18px;
    width: 40px; height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-soft);
    cursor: pointer;
    transition: background .2s var(--ease), color .2s var(--ease);
}
.role-modal__close:hover { background: var(--surface-strong); color: var(--text); }
.role-modal__close svg { width: 18px; height: 18px; }
.role-modal__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.role-modal__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 900;
    line-height: 1.1;
    margin: 0 0 14px;
}
.role-modal__summary {
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-soft);
    margin: 0 0 22px;
}
.role-modal__facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 0 0 26px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-deep);
}
.role-modal__fact .k {
    display: block;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 4px;
}
.role-modal__fact .v {
    font-size: 14.5px;
    color: var(--text);
    font-weight: 600;
}
.role-block { margin: 0 0 24px; }
.role-block h4 {
    font-size: 12.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 12px;
}
.role-block ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}
.role-block li {
    position: relative;
    padding-left: 26px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-soft);
}
.role-block li::before {
    content: "";
    position: absolute;
    left: 4px; top: 9px;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 8px rgba(230, 179, 37, 0.5);
}
.role-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
    padding-top: 26px;
    border-top: 1px solid var(--border);
}

/* ── Buttons (primary gold pill, reused by modal + form) ──── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 34px;
    border-radius: 999px;
    border: none;
    background: var(--gold);
    color: #0A0716;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s var(--ease), background .2s var(--ease);
}
.btn-primary:hover:not(:disabled),
.btn-primary:focus-visible { transform: translateY(-2px); background: var(--gold-warm); }
.btn-primary:disabled { opacity: 0.55; cursor: default; }
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 26px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--text-soft);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .2s var(--ease), color .2s var(--ease);
}
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--gold-line); color: var(--text); }

/* ── Application form ─────────────────────────────────────── */
.apply-wrap {
    max-width: 860px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(26px, 4vw, 44px);
}
.apply-selected {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 26px;
    padding: 14px 18px;
    border: 1px solid var(--gold-line);
    background: var(--gold-soft);
    border-radius: var(--radius-sm);
    font-size: 14.5px;
}
.apply-selected strong { color: var(--gold); }
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
    letter-spacing: 0.01em;
}
.field label .req, .consent .req { color: var(--gold); font-weight: 800; margin-left: 3px; }
.field label .opt { color: var(--text-faint); font-weight: 500; margin-left: 6px; font-size: 12px; }
.field .hint { font-size: 12.5px; line-height: 1.5; color: var(--text-faint); }
.field .hint a { color: var(--gold); text-decoration: none; }
.field .hint a:hover { text-decoration: underline; }
.input, .select, .textarea {
    width: 100%;
    padding: 13px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    transition: border-color .2s var(--ease), background .2s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--gold-line);
    background: rgba(255, 255, 255, 0.05);
}
.textarea { resize: vertical; min-height: 120px; }
.select { appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23E6B325' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 42px;
}
/* Native dropdown options render on the OS layer. Without an explicit
   background the popup is white while our text colour is white — options
   were invisible. Force a dark surface + light text on the options. */
.select option {
    background-color: #0b0f1d;
    color: #ffffff;
}

/* Fit fields — the "apply the Agapone way" block */
.fit-section {
    grid-column: 1 / -1;
    margin-top: 6px;
    padding: 22px;
    border: 1px dashed var(--gold-line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(230,179,37,0.05), rgba(139,92,246,0.04));
}
.fit-section__head { margin-bottom: 18px; }
.fit-section__head h3 {
    font-size: 16px;
    margin: 0 0 6px;
    font-weight: 700;
}
.fit-section__head p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-muted);
}
.fit-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.discover-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gold);
    text-decoration: none;
}
.discover-link:hover { text-decoration: underline; }

/* Agapone code — the customer-priority callout */
.aga-code {
    grid-column: 1 / -1;
    margin-top: 4px;
    padding: 22px;
    border: 1px solid var(--gold-line);
    border-radius: var(--radius);
    background: var(--gold-soft);
}
.aga-code__badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
    color: #0A0716;
    background: var(--gold);
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}
.aga-code h3 { font-size: 16px; margin: 0 0 8px; font-weight: 700; }
.aga-code p { margin: 0 0 14px; font-size: 13.5px; line-height: 1.6; color: var(--text-soft); }
.aga-code details {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
}
.aga-code summary {
    cursor: pointer;
    color: var(--gold);
    font-weight: 600;
    list-style: none;
}
.aga-code summary::-webkit-details-marker { display: none; }
.aga-code summary::before { content: "＋ "; }
.aga-code details[open] summary::before { content: "－ "; }
.aga-code ol { margin: 12px 0 0; padding-left: 20px; line-height: 1.7; }

/* Consent + submit */
.consent {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-muted);
}
.consent input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--gold); flex: none; }
.consent a { color: var(--gold); }
.form-foot {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
}
.form-status {
    font-size: 14px;
    line-height: 1.5;
    min-height: 1.2em;
}
.form-status.is-success { color: #7ee0a8; }
.form-status.is-error { color: #ff9a9a; }
.apply-honey {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    opacity: 0; overflow: hidden;
}

/* ── Section modules always visible ───────────────────────────
   styles.css sets `.module { opacity:0 }` and reveals it via an
   IntersectionObserver in app.js (`.module.is-in-view`). The careers
   page does NOT load app.js, so without this override every section
   would stay invisible. Force them visible (careers.css loads last). */
.module {
    opacity: 1 !important;
    transform: none !important;
}

/* ── Reveal / stagger always visible ──────────────────────────
   styles.css hides `.reveal` / `.reveal-stagger > *` (opacity:0) and
   reveals them via an IntersectionObserver in app.js. The careers page
   does not load app.js, so force them visible (careers.css loads last).
   No entrance animation on purpose: reliability over polish. */
.reveal,
.reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
    .form-grid { grid-template-columns: 1fr; }
    .fit-grid { grid-template-columns: 1fr; }
    .role-modal__actions .btn-primary,
    .role-modal__actions .btn-ghost { width: 100%; }
}
