/* =====================================================================
   Case study template (first used by the Hologic Brand Portal)
   Everything is scoped under .cs so it never clashes with styles.css.
   Type: Newsreader for display headings, Agenda for everything else.
   ===================================================================== */

.cs {
    --cs-ink: #0d1320;
    --cs-muted: #596377;
    --cs-line: #e4e8ef;
    --cs-tint: #eef1f6;

    font-family: "Agenda", Arial, sans-serif;
    color: var(--cs-ink);
    width: 100%;
}

.cs h1,
.cs h2,
.cs h3,
.cs h4,
.cs p {
    margin: 0;
    padding: 0;
    font-family: inherit;
    color: inherit;
    text-align: left;
}

/* ---------- Type ---------- */

.cs h1 {
    font-size: clamp(40px, 6.5vw, 88px);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.01em;
    max-width: 11ch;
    margin-bottom: 24px;
}

.cs h2 {
    font-size: clamp(32px, 4vw, 56px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.015em;
    word-spacing: 0.04em;
    max-width: 13ch;
    margin-bottom: 24px;
}

.cs h3 {
    font-size: clamp(22px, 2.6vw, 32px);
    font-weight: 300;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.cs h4 {
    display: block;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cs-muted);
    margin-bottom: 16px;
}

.cs p {
    font-size: 18px;
    line-height: 1.7;
    color: var(--cs-muted);
    max-width: 60ch;
}

/* ---------- Layout ---------- */

.cs-shell {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
}

.cs-section {
    padding: 72px 0;
}

.cs-section--tint {
    background: linear-gradient(to bottom, transparent 0%, var(--cs-tint) 100%);
}

/* Hero */
.cs-hero {
    padding-top: 32px;
}

.cs-hero-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.5fr;
    gap: 40px;
    align-items: start;
}

.cs-hero-grid h3 {
    color: var(--cs-muted);
    max-width: 22ch;
}

.cs-hero-video video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 20px;
    border: 1px solid var(--cs-line);
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.18);
    background: #fff;
}

/* Context */
.cs-context {
    max-width: 680px;
}

.cs-context p {
    margin-bottom: 48px;
}

.cs-context h3 {
    margin-top: 8px;
}

/* Solution: five-step architecture */
.cs-flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr;
    gap: 20px;
    align-items: start;
    margin-top: 24px;
}

.cs-step {
    min-width: 0;
}

.cs-step h3 {
    font-size: 24px;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.cs-step p {
    font-size: 16px;
    line-height: 1.6;
    max-width: 24ch;
}

.cs-step-visual {
    position: relative;
    height: 170px;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--cs-line);
    background: #f1f3f7;
}

.cs-arrow {
    align-self: center;
    justify-self: center;
    font-size: 26px;
    line-height: 1;
    color: #8a94a6;
    transform: translateY(-20px);
}

/* Abstract shapes inside the step visuals */
.cs-shape {
    position: absolute;
    display: block;
}

.cs-shape-circle {
    width: 58px;
    height: 58px;
    top: 42px;
    left: 34px;
    border-radius: 50%;
    background: #08a7d8;
    box-shadow: 0 8px 18px rgba(8, 167, 216, 0.16);
}

.cs-shape-circle.small {
    width: 26px;
    height: 26px;
    top: 34px;
    left: 96px;
    background: #d64cb4;
}

.cs-shape-line {
    width: 74px;
    height: 2px;
    top: 116px;
    left: 34px;
    background: var(--cs-ink);
    opacity: 0.2;
}

.cs-shape-line.short {
    width: 92px;
    top: 122px;
}

.cs-shape-block {
    width: 58px;
    height: 58px;
    top: 42px;
    left: 34px;
    border-radius: 14px;
    background: #08a7d8;
}

.cs-shape-block.pink {
    width: 44px;
    height: 44px;
    top: 68px;
    left: 104px;
    background: #d64cb4;
}

.cs-shape-grid {
    inset: 34px;
    border-radius: 18px;
    background-color: rgba(255, 255, 255, 0.55);
    background-image:
        linear-gradient(to right, rgba(13, 19, 32, 0.12) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(13, 19, 32, 0.12) 1px, transparent 1px);
    background-size: 28px 28px;
}

.cs-shape-card {
    width: 82px;
    height: 108px;
    top: 30px;
    left: 46px;
    border-radius: 16px;
    background: #08a7d8;
    box-shadow: 0 10px 24px rgba(8, 167, 216, 0.14);
}

.cs-shape-card.back {
    top: 22px;
    left: 70px;
    background: transparent;
    border: 2px dashed rgba(13, 19, 32, 0.15);
    box-shadow: none;
}

.cs-shape-page {
    width: 96px;
    height: 118px;
    top: 26px;
    left: 40px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #d8deea;
    box-shadow: 0 10px 24px rgba(13, 19, 32, 0.08);
}

.cs-shape-page::before,
.cs-shape-page::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    border-radius: 8px;
}

.cs-shape-page::before {
    top: 14px;
    height: 18px;
    background: #dfe5f0;
}

.cs-shape-page::after {
    top: 42px;
    height: 42px;
    background: linear-gradient(
        to bottom,
        #e7ebf3 0 6px,
        transparent 6px 14px,
        #e7ebf3 14px 20px,
        transparent 20px 28px,
        #e7ebf3 28px 34px
    );
}

.cs-shape-page.overlay {
    z-index: -1;
    top: 18px;
    left: 72px;
    background: #3b79ea;
    border: none;
    box-shadow: none;
}

/* Image + text rows (hub, consistency, depth) */
.cs-split {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 56px;
    align-items: start;
}

.cs-split--image-first {
    grid-template-columns: 1.2fr 0.8fr;
}

.cs-split p {
    max-width: 42ch;
    margin-bottom: 32px;
}

.cs-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 20px;
    border: 1px solid var(--cs-line);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.08);
}

/* Short labelled points (hub + outcome) */
.cs-points {
    display: grid;
    gap: 20px;
}

.cs-points--row {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.cs-point {
    display: grid;
    gap: 6px;
}

.cs-point strong {
    font-size: 17px;
    font-weight: 500;
    color: var(--cs-ink);
}

.cs-point span {
    font-size: 16px;
    line-height: 1.6;
    color: var(--cs-muted);
}

/* "Next project" block reuses the site component; centre it in the shell */
.cs .project-next {
    font-family: var(--font-primary);
}

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

@media (max-width: 1200px) {
    .cs-flow {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 32px 24px;
    }

    .cs-arrow {
        display: none;
    }
}

@media (max-width: 1000px) {
    .cs-hero-grid,
    .cs-split,
    .cs-split--image-first,
    .cs-points--row {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .cs h1,
    .cs h2 {
        max-width: none;
    }

    /* Text before image on narrow screens */
    .cs-split--image-first .cs-figure {
        order: 2;
    }
}

@media (max-width: 768px) {
    .cs-shell {
        width: calc(100% - 32px);
    }

    .cs-section {
        padding: 48px 0;
    }

    .cs-flow {
        grid-template-columns: 1fr 1fr;
        gap: 28px 16px;
    }

    .cs-step-visual {
        height: 130px;
        border-radius: 20px;
    }

    .cs-step h3 {
        font-size: 20px;
    }

    .cs p {
        font-size: 17px;
    }
}


/* ---------- Pairing C: serif display headings ---------- */

.cs h1,
.cs h2,
.cs-step h3 {
    font-family: "Newsreader", Georgia, serif;
    font-weight: 400;
    letter-spacing: -0.01em;
    word-spacing: normal;
}

.cs h1 {
    font-size: clamp(52px, 7vw, 104px);
    line-height: 0.95;
}

.cs h2 {
    font-size: clamp(40px, 4.6vw, 64px);
    line-height: 1;
}

.cs h3 {
    font-weight: 400;
}

.cs h4 {
    font-weight: 700;
}

.cs-step h3 {
    font-size: 30px;
    line-height: 1;
}

.cs-point strong {
    font-weight: 700;
}

/* Serif runs narrower: give headings a wider measure */
.cs h1 {
    max-width: 14ch;
}

.cs h2 {
    max-width: 16ch;
}

@media (min-width: 1001px) {
    .cs-hero-grid {
        grid-template-columns: 1fr 1.2fr;
    }
}

.cs-hero-grid h1 {
    font-size: clamp(48px, 5.6vw, 84px);
}

/* Newsreader is wider than the previous serif: slightly smaller hero title */
.cs-hero-grid h1 {
    font-size: clamp(44px, 4.4vw, 68px);
    line-height: 1;
    max-width: 16ch;
}

/* Cover: the hero sits on its own grey-blue gradient band */
.cs-section--cover {
    background: linear-gradient(to bottom, rgba(238, 241, 246, 0) 0%, rgba(238, 241, 246, 0.6) 35%, var(--cs-tint) 100%);
    padding-bottom: 72px;
}

/* The first section after the cover starts on clean white */
.cs-section--white {
    background: #fff;
}

/* Lead paragraph on the cover (longer intro text than a subtitle) */
.cs .cs-lead {
    font-size: 20px;
    line-height: 1.55;
    max-width: 40ch;
    margin-top: 8px;
}

/* Text column vertically centred next to its image */
.cs-split--center {
    align-items: center;
}

.cs-split p + p {
    margin-top: 16px;
}

/* Very tall images (portrait mock-ups) stay within the screen */
.cs-figure img {
    max-height: 80vh;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .cs .cs-lead {
        font-size: 18px;
    }
}
