/* ═══════════════════════════════════════════════════════════════
   CASE STUDY — Shared template for all /work/ project pages
   ═══════════════════════════════════════════════════════════════ */

/* ── Hero ────────────────────────────────────────────────────── */
.cs-hero {
    position: relative;
    min-height: 88vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-top: 80px; /* clear fixed navbar */
    overflow: hidden;
}

/* Background image layer */
.cs-hero-bg {
    position: absolute;
    inset: 0;
    background: #1a1a1a;
    z-index: 0;
}

.cs-hero-bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* Gradient overlay — heavier at bottom for legibility */
.cs-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.28) 0%,
        rgba(0, 0, 0, 0.18) 40%,
        rgba(0, 0, 0, 0.72) 100%
    );
}

/* Top scrim — soft white gradient keeps logo & menu button legible on dark hero images */
.cs-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 140px;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.72) 0%,
        rgba(255, 255, 255, 0) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Back / Next navigation row (sits just below fixed navbar) */
.cs-hero-nav {
    position: absolute;
    top: calc(80px + 1.75rem);
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    /* Override max-width center via wrapper trick */
    left: 50%;
    transform: translateX(-50%);
}

.cs-hero-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 0.5rem 0;
}

.cs-hero-nav a:hover {
    color: #fff;
}

.cs-hero-nav .nav-disabled {
    color: rgba(255, 255, 255, 0.3);
    cursor: default;
    pointer-events: none;
}

/* Hero content — stacked at the bottom */
.cs-hero-content {
    position: relative;
    z-index: 2;
    padding: 0 2rem 4.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

/* Category badge */
.cs-badge {
    display: inline-block;
    padding: 0.3rem 0.875rem;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 1.5rem;
}

.cs-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.75rem, 7vw, 5.5rem);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.0;
    color: #fff;
    margin: 0 0 1rem;
}

.cs-hero-tagline {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: 400;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.68);
    margin: 0;
}

/* ── Overview ────────────────────────────────────────────────── */
.cs-overview {
    padding: 6rem 0 5rem;
    background: var(--color-bg-primary);
}

.cs-overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.cs-col-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-brand-green-primary);
    margin-bottom: 1rem;
    display: block;
}

.cs-overview-col h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.375rem, 2.5vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
    margin-bottom: 1.25rem;
}

.cs-overview-col p {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--color-text-secondary);
    margin: 0;
}

/* Deliverables — full width below the 2-col */
.cs-deliverables {
    max-width: 1000px;
    margin: 4rem auto 0;
    padding-top: 3.5rem;
    border-top: 1px solid var(--color-border-primary);
}

.cs-deliverables h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.375rem, 2.5vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
    margin-bottom: 1.75rem;
}

.cs-deliverables ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem 3rem;
}

.cs-deliverables li {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text-primary);
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.cs-deliverables li::before {
    content: '—';
    color: var(--color-brand-green-primary);
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Visual Showcase ─────────────────────────────────────────── */
.cs-showcase {
    padding: 5rem 0;
    background: var(--color-bg-primary);
}

.cs-showcase-block {
    margin-bottom: 2rem;
}

.cs-showcase-block:last-child {
    margin-bottom: 0;
}

/* Placeholder elements */
.cs-ph {
    width: 100%;
    background: #e9e9e9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cs-ph span {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #aaa;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    user-select: none;
}

/* Aspect ratio variants */
.cs-ph-hero   { aspect-ratio: 7 / 3; min-height: 320px; }
.cs-ph-tall   { aspect-ratio: 4 / 5; }
.cs-ph-square { aspect-ratio: 1; }
.cs-ph-wide   { aspect-ratio: 16 / 7; min-height: 260px; }

/* Real images — reuse the same aspect-ratio helpers */
.cs-img {
    display: block;
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
}
.cs-img.cs-ph-hero   { aspect-ratio: 7 / 3;  min-height: 240px; }
.cs-img.cs-ph-tall   { aspect-ratio: 4 / 5; }
.cs-img.cs-ph-square { aspect-ratio: 1; }
.cs-img.cs-ph-wide   { aspect-ratio: 16 / 7; min-height: 220px; }
.cs-img.cs-ph-free   { width: 100%; height: 100%; }

/* Real portfolio images in showcase */
.cs-showcase-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

/* 2-column grid */
.cs-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* 3-column grid */
.cs-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

/* 4-column grid (packaging etc.) */
.cs-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

/* Categorised deliverables (3 columns: Branding / Web / Marketing) */
.cs-deliverables-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem 3rem;
    margin-top: 0;
}

.cs-del-category h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 0.875rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid var(--color-border-primary);
}

.cs-del-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cs-del-category li {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
    display: flex;
    align-items: baseline;
    gap: 0.625rem;
}

.cs-del-category li::before {
    content: '—';
    color: var(--color-brand-green-primary);
    font-weight: 700;
    flex-shrink: 0;
    font-size: 0.875rem;
}

/* Section divider tint */
.cs-showcase.tinted {
    background: var(--color-bg-green-tint);
}

/* ── Results ─────────────────────────────────────────────────── */
.cs-results {
    padding: 6rem 0;
    background: var(--color-bg-green-tint);
    text-align: center;
}

.cs-results-inner {
    max-width: 760px;
    margin: 0 auto;
}

.cs-results-heading {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
}

.cs-results-body {
    font-size: 1.125rem;
    line-height: 1.85;
    color: var(--color-text-secondary);
}

/* ── CTA ─────────────────────────────────────────────────────── */
.cs-cta {
    padding: 5rem 0;
    background: var(--color-bg-primary);
    text-align: center;
}

.cs-cta-heading {
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
}

.btn-back-work {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.9375rem 2.25rem;
    border: 1.5px solid var(--color-brand-green-primary);
    border-radius: 100px;
    color: var(--color-brand-green-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease;
}

.btn-back-work:hover {
    background: var(--color-brand-green-primary);
    color: #fff;
}

/* ── Simplified single-column overview (service highlight format) ─ */
.cs-overview-single {
    max-width: 760px;
    margin: 0 auto;
}

.cs-section-block {
    margin-bottom: 3.5rem;
}

.cs-section-block:last-child {
    margin-bottom: 0;
}

.cs-section-block h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.375rem, 2.5vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
    margin-bottom: 1.125rem;
}

.cs-section-block p {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--color-text-secondary);
    margin: 0;
}

.cs-section-block ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cs-section-block li {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text-primary);
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.cs-section-block li::before {
    content: '—';
    color: var(--color-brand-green-primary);
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Video section ───────────────────────────────────────────── */
.cs-video-section {
    padding: 4rem 0;
    background: var(--color-bg-primary);
}

.cs-video-wrap {
    max-width: 860px;
    margin: 0 auto;
}

.cs-video-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #e9e9e9;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.cs-video-placeholder span {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #aaa;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cs-video-placeholder small {
    font-size: 0.75rem;
    color: #bbb;
}

.cs-video-caption {
    margin-top: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    text-align: center;
    font-style: italic;
}

/* HTML5 video embed */
.cs-video-embed {
    width: 100%;
    border-radius: 12px;
    display: block;
}

/* ── Green fill CTA button ────────────────────────────────────── */
.btn-next-green {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.9375rem 2.25rem;
    background: var(--color-brand-green-primary);
    border-radius: 100px;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: background 0.25s ease, transform 0.2s ease;
}

.btn-next-green:hover {
    background: var(--color-brand-green-secondary);
    transform: translateX(3px);
}

/* ── Website showcase hover card (mirrors work-page card effect) ── */
.cs-website-link {
    position: relative;
    display: block;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
}

.cs-website-link img {
    display: block;
    width: 100%;
    border-radius: 0;
    transition: transform 0.6s ease;
}

.cs-website-link:hover img,
.cs-website-link:focus-visible img {
    transform: scale(1.02);
}

.cs-website-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.5s ease-in-out;
}

.cs-website-link:hover .cs-website-overlay,
.cs-website-link:focus-visible .cs-website-overlay {
    background: rgba(0, 0, 0, 0.52);
}

.cs-website-btn {
    display: inline-block;
    padding: 0.625rem 1.75rem;
    border: 1.5px solid rgba(255, 255, 255, 0.75);
    border-radius: 100px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.45s ease-in-out 0.06s,
                transform 0.45s ease-in-out 0.06s,
                background 0.2s ease;
}

.cs-website-link:hover .cs-website-btn,
.cs-website-link:focus-visible .cs-website-btn {
    opacity: 1;
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.12);
}

/* Touch devices — always show overlay + button */
@media (hover: none) {
    .cs-website-overlay {
        background: rgba(0, 0, 0, 0.38);
    }
    .cs-website-btn {
        opacity: 1;
        transform: none;
    }
}

/* ── Confidentiality note ────────────────────────────────────── */
.cs-confidentiality-note {
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    font-style: italic;
    opacity: 0.75;
}

/* ── Project prev / next navigation ─────────────────────────── */
.cs-project-nav {
    padding: 4rem 0;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.cs-project-nav-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 2rem;
}

.cs-nav-project {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    text-decoration: none;
}

.cs-nav-project--prev { align-items: flex-start; }
.cs-nav-project--next { align-items: flex-end; }

.cs-nav-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

.cs-nav-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text-primary);
    transition: color 0.2s ease;
}

.cs-nav-project:hover .cs-nav-title {
    color: var(--color-brand-green-primary);
}

.cs-nav-divider {
    width: 1px;
    height: 48px;
    background: rgba(0,0,0,0.1);
}

.cs-nav-back {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.cs-nav-back:hover { color: var(--color-brand-green-primary); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .cs-hero {
        min-height: 75vh;
    }

    .cs-hero-content {
        padding: 0 1.5rem 3.5rem;
    }

    .cs-hero-nav {
        padding: 0 1.5rem;
    }

    .cs-overview {
        padding: 4rem 0 3.5rem;
    }

    .cs-overview-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .cs-deliverables {
        margin-top: 3rem;
        padding-top: 2.5rem;
    }

    .cs-deliverables ul {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .cs-showcase {
        padding: 3rem 0;
    }

    .cs-showcase-block {
        margin-bottom: 1rem;
    }

    .cs-ph-hero   { aspect-ratio: 4 / 3; min-height: 200px; }
    .cs-ph-wide   { aspect-ratio: 4 / 3; min-height: 200px; }

    .cs-grid-2,
    .cs-grid-3,
    .cs-grid-4 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cs-deliverables-categories {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cs-results {
        padding: 4rem 0;
    }

    .cs-cta {
        padding: 3.5rem 0;
    }

    .cs-project-nav-inner {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }

    .cs-nav-divider,
    .cs-nav-back { display: none; }
}

/* ── Hero image slider (two-image fade crossfade) ──────────────── */
.cs-hero-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.cs-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    animation: heroFade 10s infinite;
}

.cs-hero-slide:nth-child(1) { animation-delay: 0s; }
.cs-hero-slide:nth-child(2) { animation-delay: 5s; }

@keyframes heroFade {
    0%   { opacity: 0; }
    10%  { opacity: 1; }
    45%  { opacity: 1; }
    55%  { opacity: 0; }
    100% { opacity: 0; }
}

.cs-hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.cs-hero-slider::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.28) 0%,
        rgba(0, 0, 0, 0.18) 40%,
        rgba(0, 0, 0, 0.72) 100%
    );
    z-index: 1;
}
