/* ===== Case Study Page Styles ===== */

/* ── Main Container ── */
.cs {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    /* dynamic viewport height — Safari 15.4+ */
    overflow-y: auto;
    padding-top: 36px;
    scroll-behavior: smooth;
}

/* Article page only — centered column on desktop */
.cs--article>* {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* ── Hero ── */
.cs-hero {
    padding: 80px 64px 48px;
    max-width: 900px;
    animation: csFadeIn 0.7s ease both;
}

@keyframes csFadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cs-hero__label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--muted);
    margin-bottom: 20px;
}

.cs-hero__title {
    font-family: var(--font-body);
    font-size: clamp(40px, 5.5vw, 72px);
    font-weight: 300;
    line-height: 1.08;
    letter-spacing: -2px;
    color: var(--text);
    margin-bottom: 20px;
}

.cs-hero__title em {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    color: var(--accent);
}

.cs-hero__subtitle {
    font-size: 1.05rem;
    color: var(--body-color);
    line-height: 1.6;
    max-width: 560px;
}

.cs-hero__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--muted);
}

.cs-hero__meta-sep {
    color: var(--border);
    font-size: 13px;
}


/* ── Cover Image / Video ── */
.cs-cover {
    padding: 0 64px 64px;
    animation: csFadeIn 0.8s ease 0.15s both;
}

.cs-cover__img {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    background: linear-gradient(145deg, #e0dbd4, #cdc7be);
}

body.dark .cs-cover__img {
    background: linear-gradient(145deg, #2a2825, #1f1e1b);
}

.cs-cover__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cs-cover__video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}

.cs-cover__video iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}

.cs-cover__disclaimer {
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
    text-align: center;
    margin-top: 16px;
    letter-spacing: 0.2px;
    line-height: 1.5;
    font-style: italic;
}


/* ── Project Metadata ── */
.cs-meta {
    padding: 48px 64px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

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

.cs-meta__item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cs-meta__label {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--muted);
}

.cs-meta__value {
    font-size: 15px;
    font-weight: 400;
    color: var(--text);
    line-height: 1.4;
}


/* ── Content Sections ── */
.cs-section {
    padding: 72px 64px;
    border-bottom: 1px solid var(--border);
}

/* Article-only overrides — tighter spacing for long-form reading */
.cs--article .cs-hero {
    padding: 56px 48px 36px;
    max-width: 760px;
}

.cs--article .cs-hero__title {
    font-size: clamp(28px, 4.5vw, 56px);
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
}

.cs--article .cs-section {
    padding: 40px 48px;
}

/* ── Article body text ── */
.cs-body {
    max-width: 640px;
}

.cs-body p {
    font-size: 1rem;
    color: var(--body-color);
    line-height: 1.75;
    margin-bottom: 16px;
}

.cs-body p:last-child {
    margin-bottom: 0;
}

.cs-body p em {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--accent);
}

.cs-body p strong {
    color: var(--text);
    font-weight: 500;
}

/* ── Section heading ── */
.cs-section__heading {
    font-family: var(--font-body);
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.3px;
    line-height: 1.3;
    margin-bottom: 20px;
}

/* ── Inline media ── */
.cs-media {
    max-width: 760px;
    margin-top: 8px;
}

.cs-media img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    object-position: top;
    border-radius: 10px;
    display: block;
}

/* ── Tool list (structured items) ── */
.cs-tool-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 600px;
    margin-top: 4px;
}

.cs-tool-item {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px 16px;
    align-items: baseline;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.cs-tool-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cs-tool-item__name {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--accent);
}

.cs-tool-item__desc {
    font-size: 0.9rem;
    color: var(--body-color);
    line-height: 1.6;
}

.cs-section--alt {
    background: rgba(0, 0, 0, 0.015);
}

/* Image-only section — no top padding gap */
.cs-section--cover {
    padding-top: 0;
    border-bottom: none;
}

/* Footer CTA section */
.cs-section--footer {
    padding-bottom: 80px;
}

.cs-footer-cta {
    max-width: 600px;
    border-top: 1px solid var(--border);
    padding-top: 36px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cs-footer-cta p,
.cs-footer-cta__source,
.cs-footer-cta__tagline {
    font-size: 0.9rem;
    color: var(--body-color);
    line-height: 1.6;
    margin: 0;
}

.cs-footer-cta__source {
    color: var(--muted);
}

.cs-footer-cta a {
    color: var(--accent);
    text-decoration: none;
}

.cs-footer-cta__back {
    color: var(--accent);
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
}

body.dark .cs-section--alt {
    background: rgba(255, 255, 255, 0.015);
}

.cs-section__label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 36px;
}

.cs-section__content p {
    font-size: 1.05rem;
    color: var(--body-color);
    line-height: 1.7;
    margin-bottom: 18px;
}

.cs-section__content p:last-child {
    margin-bottom: 0;
}

.cs-section__content p strong {
    color: var(--text);
    font-weight: 500;
}

.cs-section__content p em {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--accent);
}

.cs-section__content--narrow {
    max-width: 640px;
}


/* ── Blockquote ── */
.cs-quote {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-style: italic;
    font-weight: 400;
    color: var(--text);
    line-height: 1.55;
    padding: 28px 0 28px 28px;
    margin: 32px 0;
    border-left: 3px solid var(--accent);
    max-width: 560px;
}


/* ── Process Steps ── */
.cs-process {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 640px;
}

.cs-process__step {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.cs-process__num {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 400;
    color: var(--accent);
    opacity: 0.5;
    min-width: 44px;
    line-height: 1;
    padding-top: 4px;
}

.cs-process__body h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 8px;
}

.cs-process__body p {
    font-size: 0.95rem;
    color: var(--body-color);
    line-height: 1.65;
}


/* ── Gallery ── */
.cs-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.cs-gallery__item {
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: linear-gradient(145deg, #e0dbd4, #cdc7be);
}

body.dark .cs-gallery__item {
    background: linear-gradient(145deg, #2a2825, #1f1e1b);
}

.cs-gallery__item--wide {
    grid-column: 1 / -1;
}

.cs-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cs-gallery__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--muted);
    opacity: 0.5;
}


/* ── Results / Stats ── */
.cs-results {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.cs-results__stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
    padding: 28px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color .2s ease;
}

.cs-results__stat:hover {
    border-color: rgba(196, 85, 58, 0.2);
}

body.dark .cs-results__stat:hover {
    border-color: rgba(212, 105, 79, 0.25);
}

.cs-results__number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    color: var(--accent);
    line-height: 1;
}

.cs-results__desc {
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
    letter-spacing: 0.3px;
}


/* ── Learnings List ── */
.cs-learnings {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cs-learnings li {
    font-size: 1rem;
    color: var(--body-color);
    line-height: 1.65;
    padding-left: 20px;
    position: relative;
}

.cs-learnings li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.6;
}


/* ── Next Project ── */
.cs-next {
    padding: 64px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.cs-next__label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--muted);
    margin-bottom: 16px;
}

.cs-next__link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 40px);
    font-weight: 400;
    color: var(--text);
    transition: color .2s ease, gap .25s ease;
}

.cs-next__link:hover {
    color: var(--accent);
    gap: 18px;
}

.cs-next__title {
    font-style: italic;
}


/* ── Footer ── */
.cs-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 64px;
}

.cs-footer__copy {
    font-size: 12px;
    color: var(--muted);
}


/* ════════════════════════════════════════════ */
/* RESPONSIVE — Mobile First                   */
/* ════════════════════════════════════════════ */

/* Tablet (≤ 820px) */
@media (max-width: 820px) {

    .cs-hero,
    .cs-cover,
    .cs-meta,
    .cs-section,
    .cs-next,
    .cs-footer {
        padding-left: 24px;
        padding-right: 24px;
    }

    .cs-hero {
        padding-top: 40px;
        padding-bottom: 24px;
    }

    .cs-section {
        padding-top: 32px;
        padding-bottom: 32px;
    }

    .cs-meta__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cs-results {
        grid-template-columns: repeat(2, 1fr);
    }

    .cs-gallery {
        grid-template-columns: 1fr;
    }

    .cs-gallery__item--wide {
        grid-column: auto;
    }

    .cs-process__step {
        flex-direction: column;
        gap: 8px;
    }

    .cs-process__num {
        font-size: 20px;
    }

    .cs-media img {
        max-height: 280px;
    }

    .cs-tool-item {
        grid-template-columns: 90px 1fr;
        gap: 8px 12px;
    }
}

/* Mobile (≤ 480px) */
@media (max-width: 480px) {

    .cs-hero,
    .cs-cover,
    .cs-meta,
    .cs-section,
    .cs-next,
    .cs-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    /* Ensure last section clears the fixed bottom nav */
    .cs-section--footer {
        padding-bottom: 120px;
    }

    .cs-hero {
        padding-top: 32px;
        padding-bottom: 20px;
    }

    .cs-section {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .cs-section__heading {
        font-size: 15px;
        margin-bottom: 14px;
    }

    .cs-body p {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .cs-media img {
        max-height: 220px;
        border-radius: 8px;
    }

    .cs-tool-item {
        grid-template-columns: 1fr;
        gap: 2px;
        padding-bottom: 14px;
    }

    .cs-tool-item__name {
        font-size: 0.75rem;
    }

    .cs-tool-item__desc {
        font-size: 0.875rem;
    }

    .cs-hero__label {
        font-size: 10px;
    }
}