/* Base Styles */
:root {
    --primary: #111111;
    --secondary: #F9F9F9;
    --accent: #E63946;
    --text: #222222;
    --text-light: #666666;
    --spacing: 28px;
    --border-radius: 8px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    line-height: 1.7;
    background-color: #fff;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing);
}

section {
    padding: 120px 0;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 0.8em;
}

h1 { 
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

h2 { 
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
}

h3 { 
    font-size: 1.5rem;
    font-weight: 600;
}

h4 { 
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

/* Hero Section */
.case-hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

.case-study-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-study-hero .hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
}

.hero-overlay h1 {
    font-size: 3.5rem;
    margin: 0;
}

.case-hero-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    will-change: transform;
    transform: scale(1.01); /* Prevents white edges on zoom */
}

.case-study-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    background: linear-gradient(
        to bottom, 
        rgba(0, 0, 0, 0.2) 0%, 
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    padding: var(--spacing);
    backdrop-filter: blur(2px);
}

.hero-overlay h1 {
    font-size: 3.5rem;
    margin: 0 0 1.5rem;
    max-width: 800px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1.1;
}

.tagline {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 3rem;
    max-width: 600px;
    opacity: 0.9;
    line-height: 1.6;
    font-weight: 300;
    letter-spacing: 0.01em;
}

/* Project Overview */
.project-overview, .project-process, .project-gallery {
    margin-bottom: 60px;
}

.project-overview h2, .project-process h2, .project-gallery h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.overview-grid h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* Tools List */
.tools-list {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.tool {
    background-color: #f0f0f0;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

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

.gallery-grid img {
    width: 100%;
    border-radius: 5px;
}

.process-step {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin: 8rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.process-step.visible {
    opacity: 1;
    transform: translateY(0);
}

.highlight-item {
    position: relative;
    margin: 0;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.highlight-item:hover {
    transform: translateY(-4px);
}

.highlight-item video {
    width: 100%;
    display: block;
    transition: transform 0.6s ease;
    will-change: transform;
}

.highlight-item:hover video {
    transform: scale(1.02);
}

/* Back Button */
.back-to-portfolio {
    text-align: center;
    margin-top: 40px;
}

.btn {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0056b3;
}
