/**
 * STUDIO PAGE STYLE GUIDE
 * -----------------------------------------------------------------------------
 * 
 * 1. COLOR PALETTE
 *    - Background: #212121 (Dark Grey)
 *    - Text Primary: #FFFFFF (White)
 *    - Text Secondary: #666666 (Medium Grey)
 *    - UI Muted: #A8A8A8 (Light Grey)
 *    - Accent: #F8D200 (Yellow)
 *    - Border: #E0E0E0
 * 
 * 2. TYPOGRAPHY
 *    - Primary Font: 'Roboto', sans-serif (Body text)
 *    - Heading Font: 'Raleway', sans-serif (Headings, Logo)
 *    - H1 Size: 3.5rem (Desktop), 2.5rem (Mobile)
 *    - H2 Size: 2rem
 *    - Body Size: 1rem (16px)
 * 
 * 3. SPACING SYSTEM
 *    - XS: 8px
 *    - SM: 16px
 *    - MD: 24px
 *    - LG: 40px
 *    - XL: 80px
 *    - Header Offset: 80px
 * 
 * 4. COMPONENTS
 *    - Buttons: Pill shape, outline style, accent hover
 *    - Cards: Grayscale default, color on hover
 *    - Side Panels: Right-aligned sliding overlay
 * 
 * -----------------------------------------------------------------------------
 */

/* =========================================
   Layout & Grid System
   ========================================= */
html {
    scroll-behavior: smooth;
}

.studio-container {
    padding-top: var(--header-offset);
    max-width: 1400px;
    margin: 0 auto;
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

.studio-section {
    padding: var(--spacing-xl) 0;
    position: relative;
    border-bottom: 1px solid #333;
}

.studio-section:last-child {
    border-bottom: none;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: flex-start;
}

.col-left {
    padding-right: var(--spacing-md);
}

.col-right {
    padding-left: var(--spacing-md);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    text-transform: none; /* Sentence case for consistency */
    font-weight: 700;
}

.section-heading {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-text-primary);
    border-bottom: none;
    font-weight: 700;
}

.intro-text {
    font-size: 1.5rem;
    line-height: 1.4;
    font-weight: 300;
    margin-bottom: var(--spacing-md);
    color: var(--color-text-primary);
}

.body-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-ui-muted);
    margin-bottom: var(--spacing-md);
}

.align-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

/* =========================================
   Section 1: About Us (Media Component)
   ========================================= */
.media-container {
    margin-top: var(--spacing-lg);
    position: relative;
    width: 100%;
    height: 60vh; /* Dynamic height */
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-element {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Prevents cropping */
    display: block;
}

.media-overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    padding: 0 var(--spacing-md);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1;
    z-index: 10;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    pointer-events: none;
}

/* Carousel Specifics */
.studio-carousel {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================
   Section 2: Philosophy (PLACE)
   ========================================= */
.philosophy-section {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

.philosophy-header {
    margin-bottom: 80px; /* Generous spacing below header */
}

.philosophy-section .section-heading {
    font-size: 3rem; /* Strong but not oversized */
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--color-text-primary);
}

.philosophy-section .text-block p {
    max-width: 55%; /* Increased width as requested (at least half) */
    font-size: 1.1rem;
    line-height: 1.6; /* Comfortable line-height */
    color: var(--color-ui-muted); /* Neutral text color */
    margin: 0;
}

.place-acronym-list {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.place-item {
    display: flex;
    align-items: center; /* Vertically center */
    width: 100%; /* Span full container width */
    padding: 30px 20px; /* Generous vertical spacing */
    background: rgba(255, 255, 255, 0.03); /* Soft tinted background strip */
    margin-bottom: 2px; /* Tiny gap between strips */
    position: relative;
    transition: background 0.3s ease;
    cursor: default; /* Editorial feel, not necessarily clickable buttons */
}

.place-item:hover {
    background: rgba(255, 255, 255, 0.06); /* Subtle hover effect */
}

.place-item .letter {
    font-family: var(--font-heading);
    font-size: 6rem; /* Large bold capital letter */
    font-weight: 900; /* Bold */
    color: #FFF; /* "Black" equivalent in Dark Mode (High Contrast) */
    line-height: 0.8;
    width: 80px; /* Fixed width for alignment */
    text-align: left; /* Left aligned */
    flex-shrink: 0;
    margin-right: 20px;
}

.place-item .word {
    font-family: var(--font-heading);
    font-size: 3.5rem; /* Extra-large font size */
    font-weight: 300; /* Light weight */
    color: #444; /* Light grey color / Low contrast (Dark Grey on Dark BG) */
    line-height: 1;
    letter-spacing: -0.02em;
}

/* Remove old hover effects */
.place-item .word::before {
    display: none;
}

@media (max-width: 768px) {
    .place-item {
        padding: 20px 15px;
    }
    .place-item .letter {
        font-size: 4rem;
        width: 50px;
    }
    .place-item .word {
        font-size: 2rem;
    }
    .philosophy-header {
        margin-bottom: 40px;
    }
}

/* =========================================
   Section 3: Background
   ========================================= */
.background-text-content {
    max-width: 600px; /* Narrower width for center alignment */
    margin: 0 auto var(--spacing-xl) auto; /* Center block, spacing bottom */
    text-align: center; /* Center aligned text */
}

.background-text-content .section-title {
    margin-bottom: var(--spacing-sm);
    text-align: center; /* Title centered */
}

.background-text-content .body-text {
    margin-bottom: var(--spacing-md);
    text-align: center;
}

/* Read More Button - Editorial Style */
.btn-read-more {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--color-ui-muted);
    color: var(--color-text-primary);
    padding: 10px 25px;
    border-radius: 50px; /* Pill shape */
    font-family: var(--font-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-read-more:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.btn-read-more .plus-icon {
    margin-right: 5px;
    font-weight: bold;
}

/* 
   Image Layout - Reference Match
   - Left Image: Narrower, Portrait (3:4)
   - Right Image: Dominant, Wider, Landscape/Square (4:3)
   - Gap: Generous 30px
   - Alignment: Top aligned (flex-start)
   - No CSS transforms or z-index overrides required for standard layout
*/
.background-images-row {
    display: flex;
    gap: 30px; /* Generous gap for editorial feel */
    width: 100%;
    align-items: flex-start; /* Top aligned */
    justify-content: space-between;
}

.bg-img-wrapper {
    overflow: hidden;
    position: relative;
}

/* Specific sizing for image balance */
.bg-img-wrapper.img-left {
    flex: 1; /* Width Ratio Unit: 1 */
}

.bg-img-wrapper.img-right {
    flex: 2.5; /* Width Ratio Unit: 2.5 (Dominant) */
}

.bg-img-responsive {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.bg-img-wrapper.img-left .bg-img-responsive {
    aspect-ratio: 3/4; /* Portrait ratio (0.75) */
}

.bg-img-wrapper.img-right .bg-img-responsive {
    aspect-ratio: 4/3; /* Landscape/Square-ish ratio (1.33) */
}

.bg-img-responsive:hover {
    filter: grayscale(0%);
}

.img-caption {
    font-family: var(--font-primary);
    font-size: 0.85rem;
    color: var(--color-ui-muted);
    margin-top: 12px;
    font-weight: 400;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .background-images-row {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .bg-img-wrapper.img-left,
    .bg-img-wrapper.img-right {
        flex: none;
        width: 100%;
    }

    .bg-img-responsive {
        aspect-ratio: auto;
        height: auto;
    }
}

/* =========================================
   Section 4: Our People
   ========================================= */
.people-section .grid-layout {
    margin-bottom: var(--spacing-xl);
}

.category-group {
    margin-bottom: var(--spacing-xl);
}

.category-title {
    font-size: 1.5rem;
    color: var(--color-ui-muted);
    border-bottom: 1px solid #333;
    padding-bottom: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.person-card {
    cursor: pointer;
}

.person-image-wrapper {
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
    position: relative;
}

.person-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s ease, transform 0.5s ease;
}

.person-card:hover .person-image {
    filter: grayscale(0%);
    transform: scale(1.03);
}

.person-info {
    text-align: left;
}

.person-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.person-role {
    font-size: 0.9rem;
    color: var(--color-ui-muted);
    text-transform: uppercase;
    margin-top: 4px;
}

/* =========================================
   Side Panel System (Global)
   ========================================= */
.side-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    justify-content: flex-end;
}

.side-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =========================================
   Disable Scroll Snap (One Scroll) Override
   ========================================= */
main {
    scroll-snap-type: none !important;
    height: auto !important;
    overflow-y: visible !important;
}

main section {
    scroll-snap-align: none !important;
    scroll-snap-stop: normal !important;
}

.side-panel {
    width: 60vw;
    height: 100%;
    background: var(--color-bg-primary);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: var(--spacing-xl) var(--spacing-lg);
    border-left: 1px solid #333;
    display: flex;
    flex-direction: column;
    position: relative;
    max-width: 100%;
}

.side-panel-overlay.active .side-panel {
    transform: translateX(0);
}

@media (max-width: 768px) {
    .side-panel {
        width: 100%;
    }
}

.panel-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--color-text-primary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.panel-close-btn:hover {
    color: var(--color-accent);
}

.panel-content {
    margin-top: var(--spacing-lg);
    flex-grow: 1;
}

.panel-scrollable {
    overflow-y: auto;
    padding-right: 10px; /* Space for scrollbar */
}

/* Scrollbar Styling */
.panel-scrollable::-webkit-scrollbar {
    width: 6px;
}
.panel-scrollable::-webkit-scrollbar-track {
    background: #111;
}
.panel-scrollable::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

/* Panel Content Typography */
.panel-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-accent);
}

.panel-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    margin-bottom: var(--spacing-lg);
    border-bottom: 1px solid #333;
    padding-bottom: var(--spacing-sm);
}

.panel-body {
    font-size: 1rem;
    line-height: 1.8;
    color: #ddd;
}

/* =========================================
   Section 5: CTA
   ========================================= */
.work-cta {
    padding: var(--spacing-xl) 0;
}

.btn-pill {
    display: inline-block;
    padding: 15px 40px;
    border: 1px solid var(--color-text-primary);
    border-radius: 50px;
    color: var(--color-text-primary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.btn-pill:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #000;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    padding: 12px 24px; /* Slightly tighter padding */
    font-family: var(--font-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: var(--spacing-sm); /* Move closer to text */
    margin-bottom: var(--spacing-lg); /* Reduce bottom space */
    width: auto; /* Allow auto width */
    text-align: left;
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 992px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }
    
    .col-left, .col-right {
        padding: 0;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .media-overlay-text {
        font-size: 2rem;
    }
    
    .side-panel {
        width: 100%; /* Full width on tablet */
    }
}

@media (max-width: 768px) {
    .intro-text {
        font-size: 1.2rem;
    }
    
    .place-item {
        font-size: 2rem;
    }
    
    .media-container {
        height: 40vh;
    }
    
    .people-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 2rem;
    }
    
    .people-grid {
        grid-template-columns: 1fr; /* 1 column on small mobile */
    }
    
    .media-overlay-text {
        font-size: 1.5rem;
        bottom: 10px;
        left: 10px;
    }
}
