/* ═══════════════════════════════════════════════════════════════════════
   INSIGHTS — the hub (/insights) and article pages (/insights/<slug>).
   Loaded alongside header.css. Tokens mirror the rest of the site.
   ═══════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #f6f1eb;
    --bg-warm: #ede6db;
    --surface: #fff;
    --sage: #5a7a62;
    --sage-deep: #3d5a44;
    --teal: #2a8a7a;
    --gold: #b8924a;
    --brown: #2c2214;
    --text: #2c2a25;
    --text-mid: #6b655b;
    --text-light: #9e968a;
    --border: rgba(90, 122, 98, 0.14);
    --shadow: 0 12px 48px rgba(44, 34, 20, 0.07);
}

html { overflow-x: clip; overscroll-behavior: none; scroll-padding-top: calc(var(--site-header-h) + 16px); }

body {
    font-family: 'Manrope', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: clip;
    overscroll-behavior: none;
    padding-top: var(--site-header-h); /* clears the fixed header */
}

/* ── REVEAL ── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.22, 1, .36, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.rd1 { transition-delay: .08s; }
.rd2 { transition-delay: .16s; }
.rd3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* ═══ HUB ══════════════════════════════════════════════════════════════ */

.ins-hubhead {
    background: linear-gradient(160deg, #f0f7f4 0%, #e8f4f1 30%, #f6f1eb 70%, #f3ede5 100%);
    padding: 72px 48px 64px;
    border-bottom: 1px solid var(--border);
}
.ins-hubhead__inner { max-width: 760px; margin: 0 auto; text-align: center; }
.ins-hubhead__eyebrow { font-size: .7rem; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--teal); margin-bottom: 14px; }
.ins-hubhead__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.3rem, 5vw, 3.5rem); font-weight: 400; line-height: 1.15;
    color: var(--brown); margin-bottom: 18px;
}
.ins-hubhead__title em { font-style: italic; font-weight: 500; color: var(--sage); }
.ins-hubhead__sub { font-size: 1rem; color: var(--text-mid); line-height: 1.8; max-width: 560px; margin: 0 auto; }

.ins-hub { padding: 56px 48px 24px; }
.ins-hub__inner { max-width: 1080px; margin: 0 auto; }
.ins-hub__empty { text-align: center; color: var(--text-mid); padding: 48px 0; }

/* Lead post — the newest piece gets the room. */
.ins-lead {
    display: grid; grid-template-columns: 1.05fr 1fr; gap: 0;
    background: var(--surface); border: 1px solid var(--border); border-radius: 24px;
    overflow: hidden; text-decoration: none; box-shadow: var(--shadow);
    transition: transform .25s, box-shadow .25s, border-color .25s;
    margin-bottom: 40px;
}
.ins-lead:hover { transform: translateY(-3px); box-shadow: 0 18px 52px rgba(44, 34, 20, .11); border-color: rgba(42, 138, 122, .3); }
.ins-lead__img { min-height: 280px; background: var(--bg-warm); }
.ins-lead__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ins-lead__text { padding: 40px 44px; align-self: center; }
.ins-lead__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 500; line-height: 1.2;
    color: var(--brown); margin: 10px 0 14px;
}
.ins-lead__teaser { font-size: .95rem; color: var(--text-mid); line-height: 1.75; margin-bottom: 18px; }

/* Card grid */
.ins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }

.ins-card {
    display: block; background: var(--surface); border: 1px solid var(--border);
    border-radius: 20px; padding: 30px 32px; text-decoration: none;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.ins-card:hover { transform: translateY(-3px); box-shadow: 0 16px 44px rgba(44, 34, 20, .1); border-color: rgba(42, 138, 122, .3); }
.ins-card__tag { font-size: .68rem; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; color: var(--teal); }
.ins-card__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem; font-weight: 600; line-height: 1.25;
    color: var(--brown); margin: 10px 0 10px;
}
.ins-card__teaser { font-size: .9rem; color: var(--text-mid); line-height: 1.65; margin-bottom: 16px; }
.ins-card__meta { font-size: .76rem; color: var(--text-light); font-weight: 500; }

.ins-hub__cta { padding: 24px 48px 84px; }
.ins-hub__cta .ins-cta { max-width: 1080px; margin: 0 auto; }

/* ═══ ARTICLE ══════════════════════════════════════════════════════════ */

.ins-article { padding: 40px 48px 84px; }
.ins-article__inner { max-width: 720px; margin: 0 auto; }

.ins-crumb { display: flex; gap: 8px; align-items: center; font-size: .76rem; color: var(--text-light); margin-bottom: 28px; }
.ins-crumb a { color: var(--teal); text-decoration: none; font-weight: 600; }
.ins-crumb a:hover { text-decoration: underline; }

.ins-head { margin-bottom: 34px; }
.ins-head__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.1rem, 4.6vw, 3.1rem); font-weight: 500; line-height: 1.15;
    color: var(--brown); letter-spacing: -.2px; margin-bottom: 18px;
}
.ins-head__standfirst { font-size: 1.12rem; color: var(--text-mid); line-height: 1.72; font-weight: 400; }
.ins-head__meta {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    font-size: .8rem; color: var(--text-light); font-weight: 500;
    margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border);
}

.ins-hero { margin: 0 0 38px; border-radius: 20px; overflow: hidden; background: var(--bg-warm); }
.ins-hero img { width: 100%; height: auto; display: block; }

/* ── Article body — long-form reading is the whole job here ── */
.ins-body { font-size: 1.06rem; line-height: 1.85; color: var(--text); }
.ins-body > * + * { margin-top: 1.2em; }

.ins-body h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.6rem, 3.2vw, 2.05rem); font-weight: 600; line-height: 1.25;
    color: var(--brown); margin-top: 2.2em; margin-bottom: .1em; scroll-margin-top: calc(var(--site-header-h) + 20px);
}
.ins-body h3 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.08rem; font-weight: 700; line-height: 1.45;
    color: var(--brown); margin-top: 1.9em; margin-bottom: -.35em; scroll-margin-top: calc(var(--site-header-h) + 20px);
}

.ins-body a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.ins-body a:hover { color: var(--sage-deep); }
.ins-body strong { font-weight: 700; color: var(--brown); }

.ins-body ul, .ins-body ol { padding-left: 1.3em; }
.ins-body li + li { margin-top: .5em; }
.ins-body li::marker { color: var(--teal); }

.ins-body blockquote {
    border-left: 3px solid var(--teal);
    padding: 4px 0 4px 22px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem; font-style: italic; line-height: 1.55; color: var(--sage-deep);
}
.ins-body blockquote p + p { margin-top: .6em; }

.ins-body hr { border: none; border-top: 1px solid var(--border); margin: 2.4em 0; }

.ins-body img { width: 100%; height: auto; border-radius: 16px; display: block; }
.ins-body figcaption { font-size: .8rem; color: var(--text-light); text-align: center; margin-top: 10px; }

.ins-body table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ins-body th, .ins-body td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.ins-body th { font-weight: 700; color: var(--brown); background: var(--bg-warm); }

/* ── Author ── */
.ins-author {
    display: flex; gap: 18px; align-items: flex-start;
    margin-top: 56px; padding: 26px 28px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
}
.ins-author__photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.ins-author__photo--initials {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--sage), var(--teal));
    color: #fff; font-weight: 700; font-size: .95rem; letter-spacing: .5px;
}
.ins-author__name { font-size: .95rem; font-weight: 700; color: var(--brown); }
.ins-author__role { font-size: .8rem; font-weight: 600; color: var(--teal); margin-top: 1px; }
.ins-author__bio { font-size: .86rem; color: var(--text-mid); line-height: 1.65; margin-top: 8px; }
.ins-author__link {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
    font-size: .78rem; font-weight: 700; color: var(--teal); text-decoration: none;
}
.ins-author__link:hover { text-decoration: underline; }
.ins-author__link svg { width: 14px; height: 14px; fill: currentColor; }

/* ── In-article CTA ── */
.ins-cta {
    margin-top: 28px; padding: 40px 44px;
    background: linear-gradient(160deg, #f0f7f4 0%, #e8f4f1 40%, #f3ede5 100%);
    border: 1px solid var(--border); border-radius: 24px; text-align: center;
}
.ins-cta__eyebrow { font-size: .68rem; font-weight: 700; letter-spacing: 2.2px; text-transform: uppercase; color: var(--teal); margin-bottom: 12px; }
.ins-cta__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 500; line-height: 1.2;
    color: var(--brown); margin-bottom: 12px;
}
.ins-cta__body { font-size: .95rem; color: var(--text-mid); line-height: 1.75; max-width: 460px; margin: 0 auto 24px; }
.ins-cta__btn {
    display: inline-block; padding: 15px 34px;
    background: var(--sage-deep); color: #fff; border-radius: 16px;
    font-size: .9rem; font-weight: 700; text-decoration: none;
    transition: background-color .2s ease;
}
.ins-cta__btn:hover { background: #2f4835; }

.ins-disclaimer { font-size: .76rem; color: var(--text-light); line-height: 1.65; margin-top: 24px; text-align: center; }

/* ── More from Insights ── */
.ins-more { margin-top: 64px; padding-top: 44px; border-top: 1px solid var(--border); }
.ins-more__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem; font-weight: 500; color: var(--brown); margin-bottom: 22px;
}
.ins-more__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ins-more .ins-card { padding: 26px 26px; }
.ins-more .ins-card__title { font-size: 1.3rem; }

/* ── FOOTER (matches careers/caremate) ── */
.cm-footer { background: var(--brown); padding: 32px 48px; }
.cm-footer__inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cm-footer__logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.cm-footer__logo img { width: 28px; height: 32px; object-fit: contain; filter: brightness(0) invert(1); opacity: .85; }
.cm-footer__logo-text { font-size: .9rem; font-weight: 700; color: rgba(255, 255, 255, .85); letter-spacing: .4px; }
.cm-footer__links { display: flex; gap: 24px; list-style: none; flex-wrap: wrap; }
.cm-footer__links a { font-size: .78rem; color: rgba(255, 255, 255, .5); text-decoration: none; transition: color .2s; }
.cm-footer__links a:hover { color: rgba(255, 255, 255, .9); }
.cm-footer__copy { font-size: .75rem; color: rgba(255, 255, 255, .4); }

/* ═══ RESPONSIVE ═══════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    .ins-hubhead { padding: 56px 40px 48px; }
    .ins-hub { padding: 44px 40px 20px; }
    .ins-hub__cta { padding: 20px 40px 64px; }
    .ins-article { padding: 32px 40px 64px; }

    .ins-lead { grid-template-columns: 1fr; }
    .ins-lead__img { min-height: 220px; max-height: 300px; }
    .ins-lead__text { padding: 30px 28px; }
}

@media (max-width: 768px) {
    .ins-hubhead { padding: 44px 24px 40px; }
    .ins-hub { padding: 32px 24px 16px; }
    .ins-hub__cta { padding: 16px 24px 48px; }
    .ins-article { padding: 24px 24px 56px; }

    .ins-grid { grid-template-columns: 1fr; }
    .ins-more__grid { grid-template-columns: 1fr; }

    .ins-body { font-size: 1.02rem; }
    .ins-head__standfirst { font-size: 1.04rem; }

    .ins-cta { padding: 32px 24px; }
    .ins-author { padding: 22px 20px; gap: 14px; }

    .cm-footer { padding: 24px; }
    .cm-footer__inner { flex-direction: column; gap: 16px; text-align: center; }
    .cm-footer__links { justify-content: center; gap: 10px 20px; }
}
