/*
  Ordo Primatis — Job Detail Pages
  Shared stylesheet: ordo-jobs.css
  Matches the Ordo_Primatis_Optimized.html token system exactly.
*/

/* ─────────────────────────────────────────
   TOKENS  (mirror the main site)
───────────────────────────────────────── */
:root {
    --bg:             #0c2340;   /* deep clinical navy */
    --ink:            #f4f6f9;    /* off-white primary text */
    --navy-deep:      #081a30;    /* deeper navy — inverse text on light chips */
    --gray:           #9fb0c7;    /* muted slate-blue secondary text */
    --hairline:       1px solid rgba(255,255,255,0.85);
    --hairline-soft:  1px solid rgba(255,255,255,0.16);

    --f-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --f-display: 'Cormorant Garamond', 'Playfair Display', serif;
    --f-serif:   'Cormorant Garamond', 'Playfair Display', serif;
    --f-mono:    'JetBrains Mono', monospace;

    --nav-h: 72px;
    --page-max: 1160px;
    --gutter: clamp(20px, 4.7vw, 60px);
}

/* ─────────────────────────────────────────
   RESET
───────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--f-body);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
    overflow-x: hidden;
}

/* ─────────────────────────────────────────
   NAV
───────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9999;
    height: var(--nav-h);
    background: var(--bg);
    border-bottom: var(--hairline);
    display: flex;
    align-items: center;
    padding: 0 var(--gutter);
    justify-content: space-between;
    gap: 20px;
}

.nav__brand {
    font-family: var(--f-display);
    font-size: clamp(14px, 1.5vw, 17px);
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
    color: var(--ink);
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}

.nav__logo {
    height: clamp(22px, 2.6vw, 28px);
    width: auto;
    display: block;
}

.nav__tagline {
    font-size: clamp(9px, 1vw, 11px);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray);
    text-align: right;
    line-height: 1.4;
    max-width: 400px;
}

/* ─────────────────────────────────────────
   PAGE WRAPPER
───────────────────────────────────────── */
.page {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: calc(var(--nav-h) + clamp(40px, 6vw, 72px)) var(--gutter) clamp(60px, 8vw, 100px);
}

/* ─────────────────────────────────────────
   BACK LINK
───────────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--f-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
    border-bottom: var(--hairline);
    padding-bottom: 2px;
    transition: opacity 0.2s;
}

.back-link:hover { opacity: 0.55; }

.back-link:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 4px;
}

.back-link::before {
    content: '←';
    font-style: normal;
    font-family: var(--f-body);
    font-size: 12px;
}

/* ─────────────────────────────────────────
   HERO
───────────────────────────────────────── */
.hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: clamp(32px, 5vw, 72px);
    align-items: end;
    margin-top: clamp(36px, 5vw, 56px);
    padding-bottom: clamp(28px, 4vw, 48px);
    border-bottom: var(--hairline);
}

.hero__title {
    font-family: var(--f-display);
    font-size: clamp(38px, 5.8vw, 68px);
    line-height: 0.96;
    letter-spacing: 0;
    font-weight: 600;
}

.role-meta {
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray);
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: right;
    white-space: nowrap;
    padding-bottom: 4px;  /* align baselines with title */
}

/* ─────────────────────────────────────────
   INTRO
───────────────────────────────────────── */
.intro {
    font-size: clamp(17px, 1.7vw, 22px);
    line-height: 1.4;
    letter-spacing: -0.01em;
    margin: clamp(32px, 4.5vw, 52px) 0 clamp(36px, 5vw, 60px);
    max-width: 860px;
}

/* Brand name in body copy — body font, title case, bold to stand out.
   (The stylized logo lockup is reserved for the hero only.) */
.intro strong {
    font-family: inherit;
    font-weight: 600;
    font-style: inherit;
    text-transform: none;
    letter-spacing: inherit;
}

/* ─────────────────────────────────────────
   CONTENT GRID  (sticky label + body)
───────────────────────────────────────── */
.content-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: clamp(32px, 5vw, 72px);
    align-items: start;
}

/* Labels only appear in the left column on desktop */
.section-label {
    position: sticky;
    top: calc(var(--nav-h) + 24px);
    font-family: var(--f-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gray);
    line-height: 1.4;
}

.job-section {
    padding-bottom: clamp(36px, 5vw, 52px);
    margin-bottom:  clamp(36px, 5vw, 52px);
    border-bottom: var(--hairline-soft);
}

.job-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.job-section h2 {
    font-family: var(--f-body);
    font-size: clamp(24px, 2.8vw, 34px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: clamp(18px, 2.5vw, 28px);
}

/* ─────────────────────────────────────────
   LIST ITEMS
───────────────────────────────────────── */
.job-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 2vw, 20px);
}

.job-section li {
    font-size: clamp(15px, 1.4vw, 18px);
    line-height: 1.55;
    padding-left: 20px;
    position: relative;
}

/* Diamond bullet — keeps brand language from main site */
.job-section li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 5px;
    height: 5px;
    background: var(--ink);
    transform: rotate(45deg);
    flex-shrink: 0;
}

.job-section li strong {
    font-weight: 600;
}

/* ─────────────────────────────────────────
   APPLY BOX
───────────────────────────────────────── */
.apply-box {
    border: var(--hairline);
    padding: clamp(24px, 3vw, 36px);
    margin-top: clamp(48px, 6vw, 64px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: clamp(20px, 3vw, 32px);
}

.apply-box p {
    font-size: clamp(15px, 1.4vw, 18px);
    line-height: 1.45;
    max-width: 640px;
}

.apply-link {
    display: inline-block;
    font-family: var(--f-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--ink);
    text-decoration: none;
    padding: 15px 24px;
    white-space: nowrap;
    transition: opacity 0.2s;
    /* min-width ensures adequate touch target */
    min-width: 160px;
    text-align: center;
}

.apply-link:hover { opacity: 0.72; }

.apply-link:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 4px;
}

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.page-footer {
    margin-top: clamp(56px, 8vw, 88px);
    padding-top: clamp(32px, 5vw, 48px);
    border-top: var(--hairline);
    font-family: var(--f-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(18px, 2.5vw, 24px);
}

.page-footer__logo {
    height: clamp(36px, 4.5vw, 46px);
    width: auto;
    display: block;
    opacity: 0.92;
}

/* ─────────────────────────────────────────
   REDUCED MOTION
───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .back-link, .apply-link { transition: none; }
}

/* ─────────────────────────────────────────
   TABLET  ≤ 900px
───────────────────────────────────────── */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 20px;
    }

    .role-meta {
        text-align: left;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px 24px;
        white-space: normal;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* On tablet/mobile the sticky labels are redundant
       (they'd float mid-content) — promote them to
       section eyebrows instead */
    .section-label {
        position: static;
        display: block;
        margin-bottom: 12px;
        padding-top: clamp(32px, 5vw, 48px);
        color: var(--gray);
    }
}

/* ─────────────────────────────────────────
   MOBILE  ≤ 600px
───────────────────────────────────────── */
@media (max-width: 600px) {
    .nav__tagline { display: none; }

    .hero__title {
        /* allow wrapping on narrow screens */
        white-space: normal;
        word-break: break-word;
    }

    .apply-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .apply-link {
        width: 100%;
        text-align: center;
    }

    /* Increase tap target on back link */
    .back-link {
        padding: 10px 0;
    }
}
