/* ==========================================================================
   Design System Variables - Editorial Luxury
   ========================================================================== */
:root {
    /* Color Palette - Linen-bound Monograph */
    --clr-bg: #FAF7F2; /* Warm off-white / aged parchment */
    --clr-text: #1C1A17; /* Deep warm charcoal / near-black */
    --clr-accent: #B08D79; /* Dusty clay / warm muted tone for subtle hovers */
    
    /* Typography */
    /* Sans for grounding/structural elements - set small and quiet */
    --font-sans: 'Inter', -apple-system, sans-serif;
    /* High-contrast serif for narrative/headlines - elegant thin/thick strokes */
    --font-serif: 'Cormorant Garamond', serif; 
    
    /* Spacing - Breathing room is the luxury signal */
    --space-xs: 0.5rem;   /* 8px */
    --space-sm: 1.5rem;   /* 24px */
    --space-md: 4rem;     /* 64px */
    --space-lg: 8rem;     /* 128px */
    --space-xl: 14rem;    /* 224px (Massive negative space between sections) */
    
    /* Transitions */
    --transition-gentle: all 0.5s ease;
    --transition-slow: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ==========================================================================
   Base Reset & Typographic Hierarchy
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--clr-bg);
}

body {
    font-family: var(--font-serif);
    background-color: var(--clr-bg);
    color: var(--clr-text);
    line-height: 1.6;
    font-size: 1.25rem; /* 20px base for comfortable narrative reading */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Clear all button/link native styling */
a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-gentle);
}

p {
    margin-bottom: var(--space-sm);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    /* No borders, no border-radius. Images bleed naturally. */
    border-radius: 0; 
}

/* Utility: Screen Reader / SEO Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Typography Hierarchy */

/* Navigation & Small Tags: Grotesque, tiny, quiet */
.nav-text, .tag-text, .footer-text {
    font-family: var(--font-sans);
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 400;
}

/* Primary Headlines: High-contrast serif, large, tracked out slightly */
h1, h2 {
    font-family: var(--font-serif);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: var(--space-md);
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: var(--space-md);
}

/* Tagline / Positioning Statement */
.tagline {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.3;
    font-weight: 400;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    letter-spacing: -0.02em;
}

/* Body Text / Narrative */
.narrative-text {
    font-size: 1.125rem; /* 18px */
    line-height: 1.7;
    font-weight: 400;
    max-width: 600px;
}

/* Text Links (The only CTAs allowed) */
.text-link {
    font-family: var(--font-sans);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    display: inline-block;
    padding-bottom: 2px;
}

.text-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--clr-text);
    transform-origin: right;
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.text-link:hover::after {
    transform-origin: left;
    transform: scaleX(1);
}

/* ==========================================================================
   Layout & Structure
   ========================================================================== */

.container {
    width: 90%;
    max-width: 1600px; /* Very wide for generous grids */
    margin: 0 auto;
}

.section-padding {
    padding: var(--space-xl) 0;
}

/* Navigation */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--space-sm) 5%;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    z-index: 100;
    transition: background-color 0.4s ease;
}

.site-header.scrolled {
    background-color: rgba(250, 247, 242, 0.95);
    backdrop-filter: blur(8px);
}

.site-header .logo {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.nav-links {
    display: flex;
    gap: var(--space-sm);
}

.nav-links a {
    opacity: 0.7;
}

.nav-links a:hover {
    opacity: 1;
}

/* Section 1: Hero (Let the image breathe without severe cropping) */
.hero {
    width: 100%;
    padding-top: var(--space-xl); /* Push down below nav */
}

.hero-img-wrapper {
    width: 100%;
    /* Remove strict 100vh forcing to preserve image content */
    display: flex;
    justify-content: center;
}

.hero-img-wrapper img {
    width: 100%;
    height: auto;
    max-height: 85vh; /* Keep it large but prevent screen overflow */
    object-fit: contain; /* ensures the entire image is visible, or cover but with auto-height */
}

/* Section 2: Positioning (Sparse, centered) */
.positioning {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: calc(var(--space-xl) * 1.5);
    padding-bottom: var(--space-md);
}

/* Section 3: Asymmetric Projects Grid (The Musical Interval) */
.projects-grid {
    display: grid;
    /* 12 column grid to allow fine-tuned asymmetric spanning */
    grid-template-columns: repeat(12, 1fr);
    grid-gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.project-tile {
    position: relative;
    /* Base span, overridden by modifiers */
    grid-column: span 12; 
    margin-bottom: var(--space-lg);
    cursor: pointer;
    overflow: hidden; /* Contains the image scale */
}

@media(min-width: 768px){
    /* The Rhythmic Grid Layout Classes (Combined to prevent shorthand overriding) */
    .c1-span-9 { grid-column: 1 / span 9; } /* Large left-aligned hero */
    .c1-span-7 { grid-column: 1 / span 7; }
    .c2-span-5 { grid-column: 2 / span 5; }
    .c3-span-6 { grid-column: 3 / span 6; }
    .c4-span-8 { grid-column: 4 / span 8; } /* Large right-aligned hero */
    .c6-span-6 { grid-column: 6 / span 6; }
    .c7-span-6 { grid-column: 7 / span 6; } /* Widened for medium tile */
    .c8-span-5 { grid-column: 8 / span 5; } /* Widened from c10-span-3 */
    .span-12 { grid-column: 1 / span 12; margin-top: var(--space-xl); margin-bottom: var(--space-xl);} /* Full bleed break */
}

.project-tile img {
    width: 100%;
    height: auto;
    display: block;
    /* transition is simple and slow, removing GSAP transforms */
    transition: opacity 0.6s ease;
}

/* Force process images to be even smaller within their grid containers */
.process-img-restrict {
    max-width: 35%;
    margin: 0 auto; /* Center them within their tile */
}

/* Hover effect: Subtle opacity fade on the image itself, rather than complex scales */
.project-tile:hover img:not(.process-img-restrict) {
    opacity: 0.9;
}

/* Section 4: Testimonial (Typography & Portrait Focus) */
.testimonial-section {
    width: 100%;
}

.testimonial-block {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    align-items: center;
    margin-bottom: var(--space-xxl);
}
.testimonial-block:last-child {
    margin-bottom: 0;
}

.testimonial-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    filter: grayscale(100%);
    aspect-ratio: 3/4;
}

@media(min-width: 768px) {
    .testimonial-block {
        grid-template-columns: 3fr 8fr; /* Made image smaller, text wider */
        gap: var(--space-xxl);
        margin-bottom: 12rem;
    }
    .testimonial-block.reverse {
        grid-template-columns: 8fr 3fr;
    }
    .testimonial-block.reverse .testimonial-image {
        order: 2;
    }
    .testimonial-block.reverse .testimonial-content {
        order: 1;
        padding-right: var(--space-xl);
    }
    .testimonial-block:not(.reverse) .testimonial-content {
        padding-left: var(--space-xl);
    }
}

.testimonial-quote {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
    color: var(--clr-text-main);
    margin-bottom: var(--space-md);
    font-style: italic;
}

.testimonial-body {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--clr-text-light);
    margin-bottom: var(--space-md);
}

.testimonial-author {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--clr-text-main);
}
.testimonial-author span {
    color: var(--clr-accent);
}

/* Section 5: Studio Bio (Two-Column) */
.studio-bio .container {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media(min-width: 768px){
    .studio-bio .container {
        grid-template-columns: 5fr 7fr;
        align-items: center;
    }
}

.bio-image {
    width: 100%;
    height: 80vh;
    object-fit: cover;
}

.bio-text {
    max-width: 500px;
    margin: 0 auto;
}

.bio-text p {
    margin-bottom: var(--space-sm);
}

/* Section 5: Press / Publications */
.press-strip {
    border-top: 1px solid rgba(28, 26, 23, 0.1);
    border-bottom: 1px solid rgba(28, 26, 23, 0.1);
    padding: var(--space-lg) 0;
    margin: var(--space-xl) auto;
    width: 90%;
    max-width: 1200px;
}

.press-grid {
    display: flex;
    flex-direction: column-reverse; /* Book image on top for mobile */
    gap: var(--space-md);
}

@media(min-width: 768px){
    .press-grid {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .press-list-container {
        flex: 1;
        padding-right: var(--space-lg);
    }
}

.press-list {
    list-style: none;
}

.press-list li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(28, 26, 23, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.press-list li:last-child {
    border-bottom: none;
}

.press-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
}

.press-book-img {
    max-width: 250px;
    justify-self: end;
}

/* Section 6: Contact / Footer */
.site-footer {
    padding-top: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-top: 1px solid var(--clr-text);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-sm);
}

@media(min-width: 768px){
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-col a:hover {
    color: var(--clr-accent);
}

/* Footer Embedded Form */
.footer-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 100%;
}

.footer-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(28, 26, 23, 0.2);
    padding: 0.25rem 0;
    font-family: var(--font-sans);
    font-size: 11px;
    letter-spacing: 0.05em;
    color: var(--clr-text);
    outline: none;
    width: 100%;
    transition: var(--transition-gentle);
}

.footer-input::placeholder {
    color: rgba(28, 26, 23, 0.4);
    text-transform: uppercase;
}

.footer-input:focus {
    border-color: var(--clr-text);
}

.footer-submit {
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--clr-text);
    opacity: 0.7;
    text-align: left;
    padding: 0;
    transition: opacity 0.3s ease;
}

.footer-submit:hover {
    opacity: 1;
}

/* ==========================================================================
   Process Section
   ========================================================================== */
.process-section {
    width: 100%;
}

.process-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md); /* Reduced from space-lg */
    border-top: 1px solid rgba(28, 26, 23, 0.1);
    padding-top: var(--space-md); /* Reduced from space-lg */
}

@media(min-width: 768px){
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
        column-gap: var(--space-xl);
        row-gap: var(--space-xl);
    }
}

.process-step {
    display: flex;
    flex-direction: column;
}

.process-number {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--clr-accent);
    margin-bottom: 0.25rem; /* Tighter against the headline */
    letter-spacing: 0.1em;
}

.process-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-bottom: var(--space-xs);
    font-weight: 400;
}

.process-desc {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--clr-text);
    opacity: 0.85;
    max-width: 90%;
}

/* ==========================================================================
   Sticky Inquiry Button
   ========================================================================== */
.sticky-inquiry {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--clr-text);
    color: var(--clr-bg);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    z-index: 1000;
    transition: transform 0.4s ease, background-color 0.4s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.sticky-inquiry:hover {
    transform: translateY(-3px);
    background-color: var(--clr-accent);
    color: #fff;
}

.sticky-inquiry::after {
    display: none; /* Remove generic text-link underline if inherited */
}

@media(max-width: 767px) {
    .sticky-inquiry {
        bottom: 1.5rem;
        right: 1.5rem;
        padding: 0.6rem 1.25rem;
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Safely Sandboxed Mobile Overrides
   ========================================================================== */
@media(max-width: 767px) {
    /* Universally strip down the massive desktop padding/tracking to tight stack values */
    :root {
        --space-sm: 1rem;
        --space-md: 1.5rem;
        --space-lg: 2.5rem;
        --space-xl: 3.5rem;
        --space-xxl: 4rem;
    }

    /* Prevent horizontal scrolling if inline margins push elements wide */
    body {
        overflow-x: hidden;
    }

    /* Prevent Header overlap by wrapping and shrinking text */
    .site-header {
        flex-wrap: wrap;
        padding-top: var(--space-md);
    }
    .site-header .logo {
        font-size: 1.25rem;
    }
    .nav-links {
        width: 100%; /* Force the navigation row to span the entire screen width */
        justify-content: space-between; /* Distribute the words evenly from left to right edges */
        gap: 0;
        margin-top: 0.5rem; /* Add some breathing room between the logo and the navigation */
    }

    /* Push the hero section further down on mobile so the wrapped multi-line header doesn't touch the image */
    .hero {
        padding-top: 8rem;
    }

    /* Remove horizontal bounding constraints natively */
    .hero-img-wrapper img {
        max-height: none; /* Stops object-fit: contain from causing pillar-boxing on vertical screens */
    }

    .bio-image {
        height: auto;
        aspect-ratio: 4 / 5; /* Gives the studio portrait a clean proportion on mobile */
    }

    .project-tile img {
        max-width: 100%;
    }
    
    .process-img-restrict {
        max-width: 100%;
    }

    /* Strip all inline desktop grid offsets. Let the grid-gap natively handle the exact spacing. */
    .project-tile {
        margin-top: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
        margin-left: 0 !important;
    }
}
