/* =========================================================
   TEQKILA — Case Study Stylesheet v2.0
   Premium, inspiring, content-rich project pages
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    --primary: #0a0a0a;
    --accent: #c8a97e;
    --light: #fafaf8;
    --muted: #6b7280;
    --border: #e5e7eb;
    --card-bg: #ffffff;
    --section-bg: #f4f3ef;
    --hero-overlay: rgba(10, 10, 10, 0.55);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--light);
    color: var(--primary);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

/* ── LAYOUT ── */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ── NAV / HEADER ── */
.cs-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 22px 0;
    mix-blend-mode: normal;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.cs-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.back-link {
    text-decoration: none;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary);
    gap: 12px;
}

.cs-nav-brand {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    color: var(--primary);
    font-weight: 600;
}

/* ── HERO ── */
.cs-hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: flex-end;
    padding-bottom: 80px;
    overflow: hidden;
    margin-top: 73px;
}

.cs-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.1s ease-out;
}

.cs-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.5) 0%,
            rgba(0, 0, 0, 0.35) 35%,
            rgba(0, 0, 0, 0.75) 100%);
}

.cs-hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 800px;
}

.cs-project-number {
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 16px;
    display: block;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 0, 0, 0.7);
}

.cs-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(48px, 9vw, 96px);
    font-weight: 700;
    line-height: 1.0;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.95), 0 4px 40px rgba(0, 0, 0, 0.8), 0 0 80px rgba(0, 0, 0, 0.5);
}

.cs-hero-tagline {
    font-size: clamp(16px, 2.5vw, 22px);
    font-weight: 400;
    color: #ffffff;
    max-width: 540px;
    line-height: 1.6;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.95), 0 2px 24px rgba(0, 0, 0, 0.8);
}

.cs-hero-meta {
    display: flex;
    gap: 40px;
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.35);
}

.cs-meta-item span {
    display: block;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 5px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.cs-meta-item strong {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
}

/* ── INTRO / OVERVIEW ── */
.cs-overview {
    padding: 100px 0;
    background: var(--light);
}

.cs-overview .container {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 80px;
    align-items: start;
}

.cs-section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
    display: block;
}

.cs-overview-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 28px;
    color: var(--primary);
}

.cs-overview-text p {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.85;
    margin-bottom: 20px;
}

.cs-details-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
}

.cs-details-card h3 {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.cs-detail-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 22px;
}

.cs-detail-row:last-child {
    margin-bottom: 0;
}

.cs-detail-row dt {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
}

.cs-detail-row dd {
    font-size: 15px;
    font-weight: 500;
    color: var(--primary);
}

/* ── GALLERY ── */
.cs-gallery {
    padding: 0 0 100px;
    background: var(--light);
}

.cs-gallery-header {
    margin-bottom: 48px;
}

.cs-gallery-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 600;
}

.gallery-mosaic {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 120px;
    gap: 16px;
}

.gm-item {
    overflow: hidden;
    border-radius: 16px;
    background: var(--border);
    position: relative;
}

.gm-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.gm-item:hover img {
    transform: scale(1.06);
}

.gm-1 {
    grid-column: span 7;
    grid-row: span 4;
}

.gm-2 {
    grid-column: span 5;
    grid-row: span 2;
}

.gm-3 {
    grid-column: span 5;
    grid-row: span 2;
}

.gm-4 {
    grid-column: span 4;
    grid-row: span 3;
}

.gm-5 {
    grid-column: span 4;
    grid-row: span 3;
}

.gm-6 {
    grid-column: span 4;
    grid-row: span 3;
}

/* ── CHALLENGE / APPROACH / RESULT ── */
.cs-case-study {
    padding: 100px 0;
    background: var(--section-bg);
}

.cs-case-study h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 600;
    margin-bottom: 60px;
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cs-pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.cs-pillar {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 44px 36px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.cs-pillar:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.08);
}

.cs-pillar-number {
    font-size: 64px;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    color: var(--border);
    line-height: 1;
    margin-bottom: 20px;
    display: block;
}

.cs-pillar h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--primary);
}

.cs-pillar p {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.8;
}

/* ── COLOR PALETTE ── */
.cs-palette {
    padding: 100px 0;
    background: var(--primary);
}

.cs-palette .cs-section-label {
    color: rgba(255, 255, 255, 0.5);
}

.cs-palette h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
}

.cs-palette-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    margin-bottom: 60px;
    max-width: 480px;
}

.palette-swatches {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.palette-swatch {
    flex: 1;
    min-width: 140px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.swatch-color {
    height: 140px;
    width: 100%;
    transition: transform 0.4s ease;
}

.palette-swatch:hover .swatch-color {
    transform: scaleY(1.05);
    transform-origin: bottom;
}

.swatch-info {
    padding: 18px 16px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
}

.swatch-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 4px;
}

.swatch-hex {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Courier New', monospace;
}

.swatch-role {
    display: block;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 4px;
}

/* ── IMPACT / RESULTS METRICS ── */
.cs-impact {
    padding: 100px 0;
    background: var(--light);
}

.cs-impact h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 600;
    margin-bottom: 60px;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 60px;
}

.impact-stat {
    padding: 50px 40px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
}

.impact-stat:hover {
    border-color: var(--accent);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06);
}

.impact-number {
    font-family: 'Playfair Display', serif;
    font-size: clamp(48px, 7vw, 72px);
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    display: block;
    margin-bottom: 12px;
}

.impact-label {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── TESTIMONIAL ── */
.cs-testimonial {
    background: var(--section-bg);
    border-radius: 24px;
    padding: 60px 64px;
    position: relative;
}

.cs-testimonial::before {
    content: '"';
    position: absolute;
    top: 20px;
    left: 40px;
    font-family: 'Playfair Display', serif;
    font-size: 140px;
    color: var(--border);
    line-height: 1;
}

.cs-testimonial blockquote {
    font-family: 'Playfair Display', serif;
    font-size: clamp(20px, 2.5vw, 26px);
    font-style: italic;
    line-height: 1.65;
    color: var(--primary);
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.cs-testimonial cite {
    font-style: normal;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ── FOOTER ── */
.cs-footer {
    padding: 60px 0;
    background: var(--primary);
    text-align: center;
}

.cs-footer a {
    font-family: 'Playfair Display', serif;
    font-size: clamp(20px, 3vw, 30px);
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: var(--transition);
}

.cs-footer a:hover {
    color: #fff;
}

.cs-footer p {
    color: rgba(255, 255, 255, 0.3);
    font-size: 13px;
    margin-top: 20px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
    .cs-overview .container {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .cs-pillars {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .impact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-mosaic {
        grid-template-columns: repeat(6, 1fr);
        grid-auto-rows: 100px;
    }

    .gm-1 {
        grid-column: span 6;
        grid-row: span 3;
    }

    .gm-2,
    .gm-3 {
        grid-column: span 3;
        grid-row: span 2;
    }

    .gm-4,
    .gm-5,
    .gm-6 {
        grid-column: span 2;
        grid-row: span 2;
    }
}

@media (max-width: 768px) {
    .cs-hero {
        min-height: 85vh;
    }

    .cs-hero-meta {
        flex-wrap: wrap;
        gap: 24px;
    }

    .palette-swatches {
        gap: 12px;
    }

    .palette-swatch {
        min-width: 100px;
    }

    .cs-testimonial {
        padding: 40px 32px;
    }

    .impact-grid {
        grid-template-columns: 1fr;
    }

    .cs-pillars {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .gallery-mosaic {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 120px;
    }

    .gm-1,
    .gm-2,
    .gm-3,
    .gm-4,
    .gm-5,
    .gm-6 {
        grid-column: span 2;
        grid-row: span 2;
    }

    .cs-hero-title {
        font-size: 42px;
    }

    .back-link span {
        display: none;
    }
}

/* ============================================
   LIGHTBOX GALLERY STYLES
   ============================================ */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: auto;
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    animation-name: zoom;
    animation-duration: 0.4s;
}

@keyframes zoom {
    from {transform:scale(0.95); opacity: 0}
    to {transform:scale(1); opacity: 1}
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: 300;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
    z-index: 10001;
}

.lightbox-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

@media only screen and (max-width: 700px) {
    .lightbox-content {
        width: 100%;
    }
}