/* EHS Career Paths — Contour theme
   Brand tokens per EHSCP_Branding.md. Brass is the highlight: never more than
   a trail, a summit, a kicker per composition. Dark surfaces are always navy. */

:root {
    --forest: #00A8B5;   /* Signal Teal (signature) */
    --sage: #7FE3EA;     /* Light Teal (secondary strokes) */
    --brass: #FF8A3D;    /* Summit Orange (highlight, sparingly) */
    --navy: #17233B;     /* Deep Navy */
    --cream: #FDFCF8;    /* Bright Paper */
    --moss: #5A6472;     /* Slate (secondary text) */
    --fog: #C9CDC4;
    --white: #FFFFFF;
    --teal-bright: #2BC5D2; /* teal on dark */

    --serif: "Space Grotesk", Arial, Helvetica, sans-serif; /* display face; v1 serif retired */
    --sans: "Inter", Arial, Helvetica, sans-serif;

    --wrap: 1120px;
    --wrap-narrow: 720px;
    --radius: 4px;
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }

html { font-size: 100%; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--navy);
    background: var(--cream);
}

img { max-width: 100%; height: auto; }

a { color: var(--forest); text-decoration-color: var(--sage); text-underline-offset: 3px; }
a:hover { color: var(--teal-bright); text-decoration-color: var(--teal-bright); }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: var(--wrap-narrow); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; color: var(--navy); margin: 0 0 0.5em; }

/* Kicker: Inter caps, letterspaced, brass — the brand eyebrow */
.kicker {
    display: inline-block;
    font-family: var(--serif);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--forest);
    text-decoration: none;
    margin-bottom: 12px;
}
a.kicker:hover { color: var(--forest); }
.kicker-dark { color: var(--teal-bright); }

.section-title { font-size: 1.75rem; margin-bottom: 0.75em; }

/* ---------- Buttons & forms ---------- */

.btn {
    display: inline-block;
    font-family: var(--serif);
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 12px 22px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--forest); color: var(--cream); }
.btn-primary:hover { background: var(--navy); color: var(--cream); }
.btn-brass { background: transparent; color: var(--teal-bright); border-color: var(--teal-bright); }
.btn-brass:hover { background: var(--teal-bright); color: var(--navy); }
.btn-subscribe { background: var(--forest); color: var(--cream); padding: 9px 18px; }
.btn-subscribe:hover { background: var(--navy); color: var(--cream); }

.subscribe-form { display: flex; gap: 10px; max-width: 440px; margin-top: 8px; }
.subscribe-form input {
    flex: 1;
    font-family: var(--sans);
    font-size: 1rem;
    padding: 11px 14px;
    border: 1px solid var(--moss);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--navy);
    min-width: 0;
}
.subscribe-form input:focus { border-color: var(--forest); outline: 1px solid var(--forest); }
.subscribe-success { color: var(--forest); font-weight: 600; }
.subscribe-error { color: #8a3232; font-weight: 600; }
.subscribe-form.loading button { opacity: 0.6; pointer-events: none; }
form[data-members-form].success .subscribe-success { display: block; }
form[data-members-form].error + .subscribe-error { display: block; }

/* ---------- Header ---------- */

.site-header {
    background: var(--cream);
    border-bottom: 1px solid var(--sage);
}
.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 18px;
    padding-bottom: 18px;
}
.site-logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.site-logo-mark { display: block; height: 40px; width: auto; }
.site-logo-text { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; letter-spacing: -0.01em; color: var(--navy); white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav .nav { display: flex; list-style: none; margin: 0; padding: 0; gap: 26px; }
.site-nav .nav a {
    font-family: var(--serif);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--navy);
    text-decoration: none;
}
.site-nav .nav a:hover { color: var(--teal-bright); }

/* ---------- Hero ---------- */

.hero { padding: 64px 0 56px; border-bottom: 1px solid var(--sage); }
.hero-inner { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: center; }
.hero-title { font-size: clamp(2.1rem, 4.5vw, 3.2rem); letter-spacing: -0.01em; }
.hero-sub { font-size: 1.125rem; color: var(--moss); max-width: 34em; }
.hero-note { font-size: 0.875rem; color: var(--moss); margin-top: 10px; }
.hero-art { display: flex; justify-content: center; }
.contour-art { width: 100%; max-width: 380px; height: auto; opacity: 0.9; }

/* ---------- Three worlds ---------- */

.worlds { padding: 56px 0; }
.worlds-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.world-card {
    position: relative;
    display: block;
    background: var(--white);
    border: 1px solid var(--fog);
    border-radius: var(--radius);
    padding: 28px 24px 24px;
    text-decoration: none;
    color: var(--navy);
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.world-card:hover { border-color: var(--forest); transform: translateY(-2px); color: var(--navy); }
.world-card h3 { font-size: 1.3rem; margin-bottom: 0.4em; }
.world-card p { color: var(--moss); font-size: 0.9688rem; margin: 0 0 1em; }
.world-ring {
    display: block;
    width: 22px; height: 22px;
    border: 2px solid var(--forest);
    border-radius: 50%;
    margin-bottom: 14px;
    box-shadow: inset 0 0 0 4px var(--white), inset 0 0 0 6px var(--sage);
}
.card-cta { font-weight: 600; font-size: 0.9375rem; color: var(--forest); }
.world-card:hover .card-cta { color: var(--teal-bright); }

/* ---------- Data band (dark surfaces are always navy) ---------- */

.data-band { background: var(--navy); color: var(--fog); padding: 56px 0; }
.data-band h2 { color: var(--cream); font-size: 1.75rem; }
.data-band p { max-width: 46em; }
.data-band-copy { max-width: 760px; }
.data-band .btn-brass { margin-top: 8px; }

/* ---------- Stories / about teaser ---------- */

.stories { padding: 56px 0; }
.stories-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.stories p { color: var(--moss); }
.about-teaser {
    border-left: 3px solid var(--sage);
    padding-left: 24px;
    font-family: var(--serif);
    font-size: 1.0625rem;
}
.about-teaser p { color: var(--navy); }

/* ---------- Post feed ---------- */

.post-feed-section { padding: 40px 0 64px; }
.post-feed { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card { background: var(--white); border: 1px solid var(--fog); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.post-card-image { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.post-card-body { padding: 20px 20px 18px; display: flex; flex-direction: column; gap: 6px; }
.post-card .kicker { margin-bottom: 2px; font-size: 0.6875rem; }
.post-card-title { font-size: 1.2rem; margin: 0; }
.post-card-title a { color: var(--navy); text-decoration: none; }
.post-card-title a:hover { color: var(--forest); }
.post-card-excerpt { color: var(--moss); font-size: 0.9375rem; margin: 0; }
.post-card-meta { color: var(--moss); font-size: 0.8125rem; margin: 4px 0 0; }
.empty-note { color: var(--moss); font-style: italic; }

.pagination { display: flex; justify-content: space-between; margin-top: 36px; font-weight: 600; }
.pagination a { text-decoration: none; }

/* ---------- Article ---------- */

.article-header { padding: 56px 0 8px; }
.article-title { font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -0.01em; }
.article-deck { font-size: 1.1875rem; color: var(--moss); line-height: 1.5; margin-top: 0.25em; }
.article-byline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--moss); font-size: 0.9063rem; margin-top: 18px; padding-bottom: 8px; }
.byline-name { font-weight: 600; color: var(--navy); text-decoration: none; }
.article-feature { margin: 32px auto 8px; }
.article-feature img { border-radius: var(--radius); }
.article-feature figcaption { font-size: 0.8438rem; color: var(--moss); margin-top: 8px; }

/* Ghost content canvas: normal / wide / full widths */
.gh-canvas {
    display: grid;
    grid-template-columns:
        [full-start] minmax(24px, 1fr)
        [wide-start] minmax(0, 200px)
        [main-start] min(var(--wrap-narrow), calc(100% - 48px))
        [main-end] minmax(0, 200px)
        [wide-end] minmax(24px, 1fr)
        [full-end];
    padding: 24px 0 8px;
}
.gh-canvas > * { grid-column: main-start / main-end; }
.gh-canvas > .kg-width-wide { grid-column: wide-start / wide-end; }
.gh-canvas > .kg-width-full { grid-column: full-start / full-end; }

.gh-content { font-size: 1.0938rem; line-height: 1.75; }
.gh-content h2 { font-size: 1.6rem; margin-top: 1.6em; }
.gh-content h3 { font-size: 1.25rem; margin-top: 1.4em; }
.gh-content p { margin: 0 0 1.2em; }
.gh-content ul, .gh-content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.gh-content li { margin-bottom: 0.4em; }
.gh-content hr { border: 0; border-top: 1px solid var(--sage); margin: 2.2em 0; }
.gh-content blockquote {
    margin: 1.6em 0;
    padding: 4px 0 4px 22px;
    border-left: 3px solid var(--forest);
    font-family: var(--serif);
    font-size: 1.15rem;
    color: var(--navy);
}
.gh-content code { background: #ece7db; padding: 1px 5px; border-radius: 3px; font-size: 0.9em; }
.gh-content pre { background: var(--navy); color: var(--fog); padding: 16px 18px; border-radius: var(--radius); overflow-x: auto; }
.gh-content pre code { background: none; padding: 0; color: inherit; }

/* Data tables — quarterly snapshots live and die by these */
.gh-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6em 0;
    font-size: 0.9375rem;
    background: var(--white);
}
.gh-content th {
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: left;
    color: var(--cream);
    background: var(--forest);
    padding: 10px 12px;
}
.gh-content td { padding: 9px 12px; border-bottom: 1px solid var(--fog); vertical-align: top; }
.gh-content tr:nth-child(even) td { background: #faf8f2; }

.gh-content figure { margin: 1.8em 0; }
.gh-content figcaption { font-size: 0.8438rem; color: var(--moss); margin-top: 8px; text-align: center; }
.gh-content .kg-card { margin: 1.8em 0; }
.kg-callout-card { display: flex; gap: 12px; padding: 18px 20px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--sage); }
.kg-callout-card .kg-callout-emoji { font-size: 1.2rem; }
.kg-button-card { display: flex; justify-content: center; }
.kg-button-card .kg-btn, .kg-btn {
    display: inline-block; background: var(--forest); color: var(--cream) !important;
    padding: 12px 22px; border-radius: var(--radius); font-weight: 600; text-decoration: none;
}
.kg-bookmark-card a { display: flex; border: 1px solid var(--fog); border-radius: var(--radius); text-decoration: none; color: var(--navy); overflow: hidden; background: var(--white); }
.kg-bookmark-content { padding: 16px; flex: 1; }
.kg-bookmark-title { font-weight: 600; }
.kg-bookmark-description { color: var(--moss); font-size: 0.875rem; margin-top: 4px; }
.kg-bookmark-metadata { font-size: 0.8125rem; color: var(--moss); margin-top: 10px; }
.kg-bookmark-thumbnail img { height: 100%; object-fit: cover; width: 200px; }
.kg-bookmark-icon { width: 16px; height: 16px; margin-right: 6px; vertical-align: middle; }

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0; }
.tag-pill {
    font-size: 0.8125rem; font-weight: 600; text-decoration: none;
    border: 1px solid var(--sage); border-radius: 999px; padding: 4px 12px; color: var(--forest);
}
.tag-pill:hover { border-color: var(--teal-bright); color: var(--teal-bright); }

/* ---------- Subscribe CTA block ---------- */

.subscribe-cta { background: var(--navy); border-radius: var(--radius); padding: 36px 32px; margin: 40px 0; }
.subscribe-cta-title { color: var(--cream); font-size: 1.4rem; }
.subscribe-cta-sub { color: var(--fog); margin: 0 0 12px; }
.subscribe-cta .subscribe-form input { border-color: var(--navy); }
.subscribe-cta .subscribe-success { color: var(--sage); }

/* ---------- Guides hub / reports ---------- */

.guides-hub { padding-bottom: 56px; }
.hub-section { margin-bottom: 48px; }
.hub-lede { color: var(--moss); margin-top: -0.5em; margin-bottom: 1.2em; }
.hub-dot {
    display: inline-block; width: 12px; height: 12px; margin-right: 12px;
    border-radius: 50%; border: 2px solid var(--forest); vertical-align: 2px;
}
.reports-library { padding-bottom: 56px; }

/* ---------- Archives, author, error ---------- */

.archive-header { padding: 56px 0 8px; }
.author-header { display: flex; gap: 20px; align-items: center; }
.author-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.error-page { padding: 96px 24px; text-align: center; }

/* ---------- Footer ---------- */

.site-footer { background: var(--navy); color: var(--fog); margin-top: 48px; }
.site-footer-inner {
    display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 32px;
    padding-top: 48px; padding-bottom: 48px; align-items: start;
}
.footer-brand img { height: 36px; width: auto; }
.footer-tagline { font-family: var(--serif); color: var(--fog); margin-top: 12px; }
.footer-nav .nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-nav a { color: var(--fog); text-decoration: none; font-size: 0.9375rem; }
.footer-nav a:hover { color: var(--teal-bright); }
.footer-meta { font-size: 0.875rem; }
.footer-meta a { color: var(--fog); }
.footer-meta a:hover { color: var(--teal-bright); }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-art { order: -1; }
    .contour-art { max-width: 220px; }
    .worlds-grid, .post-feed { grid-template-columns: repeat(2, 1fr); }
    .stories-inner { grid-template-columns: 1fr; }
    .site-footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 640px) {
    .worlds-grid, .post-feed { grid-template-columns: 1fr; }
    .site-header-inner { flex-wrap: wrap; }
    .site-nav { width: 100%; justify-content: space-between; gap: 16px; }
    .site-nav .nav { gap: 16px; }
    .subscribe-form { flex-direction: column; }
    .hero { padding-top: 40px; }
    .gh-content table { display: block; overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}


/* ---------- Inline subscribe band (mid-page CTA, matches hero) ---------- */
.subscribe-band { padding: 56px 0; border-top: 1px solid var(--sage); border-bottom: 1px solid var(--sage); }
.subscribe-band-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.subscribe-band-copy h2 { margin-bottom: 0.25em; }
.subscribe-band-copy p { color: var(--moss); margin: 0; }
.subscribe-band .subscribe-form { max-width: 480px; margin-top: 4px; }

/* ---------- Footer briefing CTA (above nav links) ---------- */
.footer-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; padding: 36px 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-cta-line { color: var(--fog); margin: 6px 0 0; max-width: 34em; }
.footer-cta .subscribe-form { max-width: 480px; margin-top: 0; }

@media (max-width: 960px) {
    .subscribe-band-inner, .footer-cta { grid-template-columns: 1fr; gap: 20px; }
}
