@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;400;600&display=swap');

/* Case study pages. Layered on top of style.css, which stays unchanged. */

/* style.css sets box-sizing on body only, and it is not inherited */
.case-study *,
.case-study *::before,
.case-study *::after { box-sizing: border-box; }

body.case-study {
    margin: 40px auto 0 auto;
    max-width: 1100px;
    padding: 0 40px 90px 40px;
}

/* main spans the full page width so the hero can be full width,
   while every text block is centred in a narrow reading column */
.cs-main { width: 100%; }
.cs-backrow,
.cs-head,
.cs-section,
.cs-live {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

/* back link */
.cs-backrow { margin-top: 40px; }
.cs-back {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #5a5a5a;
    transition: color 0.3s ease-in-out;
}
.cs-back svg {
    width: 15px;
    height: 15px;
    display: block;
    transition: transform 0.3s ease-in-out;
}
.cs-back:hover { color: black; }
.cs-back:hover svg { transform: translateX(-5px); }

/* masthead */
.cs-head { padding: 60px 0 0 0; }
.cs-head h1 {
    font-size: 44px;
    font-weight: 400;
    letter-spacing: -0.5px;
    margin: 0 0 12px 0;
    line-height: 1.1;
}
.cs-sub {
    font-size: 19px;
    line-height: 1.5;
    color: #444;
    margin: 0;
    font-weight: 200;
}

/* one-line meta */
.cs-meta {
    margin: 28px 0 0 0;
    padding: 18px 0;
    border-top: 1px solid #e4e4e4;
    border-bottom: 1px solid #e4e4e4;
    font-size: 14px;
    letter-spacing: 0.3px;
    color: #1a1a1a;
}
.cs-meta b {
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 11px;
    color: grey;
    margin-right: 8px;
}
.cs-meta i { font-style: normal; color: #c4c4c4; margin: 0 14px; }

/* hero, full page width on a tinted panel */
.cs-hero { margin: 48px 0 0 0; }
.cs-hero-panel {
    background: #eef1f7;
    border-radius: 3px;
    padding: 36px;
    display: flex;
    justify-content: center;
}
.cs-hero-panel img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
    box-shadow: 0px 6px 28px rgba(60, 70, 100, 0.16);
    cursor: zoom-in;
}
/* full-width figures share the hero's caption treatment: held to the
   reading column so the caption never runs the width of the image */
.cs-hero figcaption,
.cs-wide figcaption {
    max-width: 680px;
    margin: 14px auto 0 auto;
    font-size: 12px;
    color: grey;
    line-height: 1.6;
}

/* sections */
.cs-section { margin: 68px auto 0 auto; }
.cs-section h2,
.cs-live h2 {
    font-size: 19px;
    font-weight: 400;
    letter-spacing: -0.2px;
    color: #111;
    margin: 0 0 18px 0;
    line-height: 1.4;
}
.cs-section p,
.cs-live p {
    font-size: 15px;
    line-height: 1.8;
    color: #1a1a1a;
    margin: 0 0 18px 0;
}
.cs-section p:last-child,
.cs-live p:last-child { margin-bottom: 0; }

.cs-lead {
    font-size: 17px !important;
    line-height: 1.7 !important;
    color: #333 !important;
}

/* the confidentiality note */
.cs-note {
    font-size: 13px !important;
    line-height: 1.7 !important;
    color: #6b6b6b !important;
    border-left: 2px solid #e0e0e0;
    padding-left: 16px;
    margin-top: 24px !important;
}

/* inline snippet */
.cs-figure { margin: 32px 0 0 0; }
.cs-figure img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border: 1px solid #e8e8e8;
    border-radius: 2px;
    background: #fff;
    cursor: zoom-in;
}
.cs-figure figcaption {
    font-size: 12px;
    color: grey;
    line-height: 1.6;
    margin-top: 12px;
    text-align: center;
}

/* a dense sheet that needs the full page width to stay legible */
.cs-wide { margin: 34px 0 0 0; }
.cs-wide img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #e8e8e8;
    border-radius: 2px;
    background: #fff;
    cursor: zoom-in;
}

/* placeholder until the crops are ready */
.cs-slot {
    border: 1px dashed #c8cedb;
    background: #f7f9fc;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    width: 100%;
    min-height: 150px;
}
.cs-figure .cs-slot { background: #f6f6f6; border-color: #d2d2d2; }
.cs-hero-panel .cs-slot { min-height: 300px; }
.cs-slot span {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #98a0b0;
    line-height: 1.9;
}

/* live link */
.cs-live {
    margin: 68px auto 0 auto;
    padding: 28px 0 0 0;
    border-top: 1px solid #e4e4e4;
}
/* external link styling is shared, see style.css */
.cs-live a { color: #111; }

/* other projects: separated by running the full page width, wider than the
   680px reading column, and by being a list rather than a panel */
.cs-more {
    margin: 120px 0 0 0;
    padding: 30px 0 0 0;
    border-top: 1px solid #dcdcdc;
}
.cs-more-title {
    letter-spacing: 3px;
    color: grey;
    font-size: 11px;
    text-transform: uppercase;
    margin: 0 0 6px 0;
}
.cs-more-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 28px 0;
    border-bottom: 1px solid #ededed;
    color: black;
    text-decoration: none;
}
.cs-more-item:hover { color: black; text-decoration: none; }
.cs-more-text { display: block; }
.cs-more-name {
    display: block;
    font-size: 24px;
    letter-spacing: -0.2px;
    line-height: 1.3;
    margin-bottom: 6px;
    transition: opacity 0.3s ease-in-out;
}
.cs-more-desc {
    display: block;
    font-size: 13px;
    line-height: 1.7;
    color: #6b6b6b;
    max-width: 520px;
}
.cs-more-go {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    color: #bdbdbd;
    transition: transform 0.3s ease-in-out, color 0.3s ease-in-out;
}
.cs-more-item:hover .cs-more-go { color: #111; transform: translateX(6px); }
.cs-more-item:hover .cs-more-name { text-decoration: underline; }

/* lightbox */
#cs-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 40;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
#cs-lightbox.open { display: flex; }
#cs-lightbox img { max-width: 94%; max-height: 94%; width: auto; height: auto; }
#cs-lightbox button {
    position: absolute;
    top: 0; right: 0;
    margin: 20px 30px;
    background: none; border: none;
    color: #eaeaea; font-size: 28px; line-height: 1;
    cursor: pointer; font-family: inherit;
}

@media screen and (max-width: 800px) {
    body.case-study { margin: 30px auto 0 auto; padding: 0 20px 60px 20px; }
    .cs-backrow { margin-top: 20px; }
    .cs-head { padding: 36px 0 0 0; }
    .cs-head h1 { font-size: 30px; }
    .cs-sub { font-size: 16px; }
    .cs-meta { margin-top: 22px; }
    .cs-meta i { margin: 0 10px; }
    .cs-hero { margin-top: 32px; }
    .cs-hero-panel { padding: 14px; border-radius: 2px; }
    .cs-hero-panel .cs-slot { min-height: 170px; }
    .cs-section { margin-top: 48px; }
    .cs-section h2, .cs-live h2 { font-size: 17px; }
    .cs-lead { font-size: 16px !important; }
    .cs-slot { min-height: 120px; padding: 18px; }
    .cs-live { margin-top: 48px; }
    .cs-more { margin-top: 72px; padding-top: 24px; }
    .cs-more-item { padding: 22px 0; gap: 18px; }
    .cs-more-name { font-size: 20px; }
    .cs-more-list { grid-template-columns: 1fr; gap: 14px; }
}
