/* ============================================
   Case Studies — Rich visual design system
   Extends styles.css with CS-specific layouts
   ============================================ */

/* --- Cinematic Hero --- */
.cs-hero {
    position: relative;
    min-height: 560px;
    padding: 10rem 0 5rem;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}

.cs-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    z-index: -2;
}

.cs-hero.theme-coral::before {
    background: linear-gradient(135deg, #1a1a1a 0%, #4a2520 60%, #e8836b 140%);
}

.cs-hero.theme-sage::before {
    background: linear-gradient(135deg, #1a1a1a 0%, #1f3a1f 60%, #7aab6d 140%);
}

.cs-hero.theme-sky::before {
    background: linear-gradient(135deg, #1a1a1a 0%, #1f3340 60%, #6ba3c4 140%);
}

.cs-hero.theme-purple::before {
    background: linear-gradient(135deg, #0d0419 0%, #2a1245 60%, #8e2de2 140%);
}

.cs-hero.theme-dark::before {
    background: linear-gradient(135deg, #000 0%, #1a1a1a 100%);
}

.cs-hero-bgimage {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    opacity: 0.18;
    filter: saturate(0.6) contrast(1.1);
}

.cs-hero-grid {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 360px);
    gap: 4rem;
    align-items: center;
}

.cs-back {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    transition: color var(--transition-fast);
}

.cs-back:hover { color: #fff; }

.cs-eyebrow {
    display: inline-flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.cs-eyebrow span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cs-eyebrow .accent {
    background: #e8836b;
    border-color: #e8836b;
    color: #fff;
}

.cs-hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.cs-hero-sub {
    font-size: 1.25rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.82);
    max-width: 640px;
}

.cs-hero-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.cs-hero-logo {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 100%;
}

.cs-hero-logo img {
    max-width: 100%;
    max-height: 120px;
    width: auto;
    height: auto;
}

.cs-hero-logo.placeholder {
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
    color: #fff;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
    padding: 3rem 2.5rem;
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
}

@media (max-width: 900px) {
    .cs-hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .cs-hero { padding: 8rem 0 4rem; min-height: auto; }
}

/* --- Stat strip --- */
.cs-stats {
    background: var(--color-bg-white);
    padding: 0;
    margin-top: -3rem;
    position: relative;
    z-index: 2;
}

.cs-stats-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.cs-stat {
    padding: 2.5rem 2rem;
    text-align: center;
    border-right: 1px solid var(--color-border-light);
    position: relative;
}

.cs-stat:last-child { border-right: none; }

.cs-stat-value {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.cs-stat-value.coral { color: var(--color-coral); }
.cs-stat-value.sage { color: var(--color-sage); }
.cs-stat-value.sky { color: var(--color-sky); }

.cs-stat-label {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

@media (max-width: 720px) {
    .cs-stats-inner { grid-template-columns: 1fr; }
    .cs-stat { border-right: none; border-bottom: 1px solid var(--color-border-light); }
    .cs-stat:last-child { border-bottom: none; }
}

/* --- Section scaffolding --- */
.cs-section {
    padding: 5rem 0;
}

.cs-section.tight { padding: 3rem 0; }

.cs-section.dark {
    background: var(--color-bg-dark);
    color: var(--color-text-on-dark);
}

.cs-section.warm {
    background: var(--color-bg-warm);
}

.cs-section-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-coral);
    font-weight: 600;
    margin-bottom: 1rem;
}

.cs-section h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    max-width: 820px;
}

.cs-section h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
}

.cs-section p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--color-text);
    max-width: 760px;
    margin-bottom: 1rem;
}

.cs-section.dark p { color: var(--color-text-on-dark); }
.cs-section.dark h2, .cs-section.dark h3 { color: #fff; }

/* --- The Problem — prominent callout list --- */
.cs-problem-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    display: grid;
    gap: 1rem;
}

.cs-problem-list li {
    padding: 1.25rem 1.25rem 1.25rem 3.5rem;
    background: #fff;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-coral);
    box-shadow: var(--shadow-card);
    position: relative;
    font-size: 1rem;
    line-height: 1.55;
}

.cs-problem-list li::before {
    content: "";
    position: absolute;
    left: 1.25rem;
    top: 1.4rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-coral);
    box-shadow: 0 0 0 4px rgba(232, 131, 107, 0.15);
}

/* --- Feature grid (What We Built) --- */
.cs-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.cs-feature {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--color-border-light);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.cs-feature:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.cs-feature-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.cs-feature-num.coral { background: linear-gradient(135deg, #e8836b, #d46b52); }
.cs-feature-num.sage  { background: linear-gradient(135deg, #7aab6d, #5d8a51); }
.cs-feature-num.sky   { background: linear-gradient(135deg, #6ba3c4, #4e87a9); }

.cs-feature h3 {
    margin: 0 0 0.75rem;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
}

.cs-feature p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

@media (max-width: 720px) {
    .cs-features { grid-template-columns: 1fr; }
}

/* --- Image showcase --- */
.cs-showcase {
    margin: 3rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: #fff;
}

.cs-showcase img {
    width: 100%;
    display: block;
}

.cs-showcase-caption {
    padding: 1rem 1.5rem;
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    border-top: 1px solid var(--color-border-light);
    background: var(--color-bg-warm);
}

/* --- Pull quote --- */
.cs-quote {
    margin: 3rem 0;
    padding: 2.5rem 2rem;
    background: var(--color-bg-warm);
    border-left: 6px solid var(--color-coral);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    font-size: 1.35rem;
    line-height: 1.4;
    font-weight: 500;
    color: var(--color-primary);
    font-style: italic;
    position: relative;
}

.cs-quote::before {
    content: "\201C";
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    font-size: 5rem;
    color: var(--color-coral);
    opacity: 0.25;
    font-family: Georgia, serif;
    line-height: 1;
}

.cs-quote-attribution {
    display: block;
    margin-top: 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-style: normal;
    color: var(--color-text-secondary);
}

/* --- Process / How It Works steps --- */
.cs-process {
    display: grid;
    gap: 1rem;
    margin: 2.5rem 0;
    counter-reset: step;
}

.cs-process-step {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 1.5rem;
    align-items: start;
    padding: 1.5rem;
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
    position: relative;
}

.cs-process-step::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-coral);
    background: rgba(232, 131, 107, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-process-step h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.cs-process-step p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

/* --- Audience chips --- */
.cs-audience {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0 2rem;
}

.cs-audience span {
    padding: 0.6rem 1.1rem;
    background: #fff;
    border-radius: 100px;
    font-size: 0.9rem;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    font-weight: 500;
}

/* --- Results highlight --- */
.cs-results {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 3rem;
    margin: 3rem 0;
    position: relative;
    overflow: hidden;
}

.cs-results::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(232, 131, 107, 0.3), transparent 70%);
    z-index: 0;
}

.cs-results > * { position: relative; z-index: 1; }

.cs-results h2 {
    color: #fff;
    margin-bottom: 1.5rem;
}

.cs-results p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
    max-width: 700px;
}

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

/* --- Link accents --- */
.cs-section a {
    color: var(--color-coral);
    text-decoration: none;
    border-bottom: 1px solid rgba(232, 131, 107, 0.3);
    transition: border-color var(--transition-fast);
}

.cs-section a:hover {
    border-bottom-color: var(--color-coral);
}

/* --- CTA card --- */
.cs-cta {
    background: linear-gradient(135deg, #e8836b, #d46b52);
    color: #fff;
    border-radius: var(--radius-xl);
    padding: 3.5rem 2.5rem;
    text-align: center;
    margin: 4rem 0 2rem;
}

.cs-cta h2 {
    color: #fff;
    margin-bottom: 1rem;
    max-width: none;
}

.cs-cta p {
    color: rgba(255, 255, 255, 0.92);
    margin: 0 auto 2rem;
    max-width: 540px;
}

.cs-cta .btn {
    background: #fff;
    color: #1a1a1a;
    padding: 1rem 2rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    font-family: var(--font-heading);
}

.cs-cta .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

/* --- Index page enhancements --- */
.cs-index-card {
    position: relative;
    overflow: hidden;
}

.cs-index-card .blog-card-thumbnail {
    height: 240px;
    object-fit: cover;
}

.cs-index-card-gradient {
    height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: var(--font-heading);
    gap: 0.5rem;
    padding: 1.5rem;
    text-align: center;
}

.cs-index-card-gradient .brand {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.cs-index-card-gradient .tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    opacity: 0.85;
}

.cs-index-card-gradient.coral { background: linear-gradient(135deg, #e8836b, #d46b52); }
.cs-index-card-gradient.sage  { background: linear-gradient(135deg, #7aab6d, #5d8a51); }
.cs-index-card-gradient.sky   { background: linear-gradient(135deg, #6ba3c4, #4e87a9); }
.cs-index-card-gradient.dark  { background: linear-gradient(135deg, #1a1a1a, #3a3a3a); }
.cs-index-card-gradient.purple { background: linear-gradient(135deg, #4a00e0, #8e2de2); }
.cs-index-card-gradient.ember { background: linear-gradient(135deg, #ff6b6b, #ee3b3b); }

/* --- In-content logo lockup --- */
.cs-logo-lockup {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: #fff;
    border-radius: 100px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border-light);
    margin-bottom: 1rem;
}

.cs-logo-lockup img {
    max-height: 36px;
    width: auto;
}

.cs-logo-lockup span {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}
