/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    --bg: #111111;
    --surface: #181818;
    --text: #f5f2ec;
    --muted: #a7a39b;
    --line: rgba(255, 255, 255, 0.15);

    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Inter', sans-serif;

    --container: min(92vw, 1600px);

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 5rem;
    --space-xl: 10rem;
    
    --anim-ease: cubic-bezier(0.2, 1, 0.2, 1);
    --anim-dur: 0.6s;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

ul {
    list-style: none;
}

.container {
    width: var(--container);
    margin: 0 auto;
}

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

.mb-large {
    margin-bottom: var(--space-md);
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, .font-serif {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.1;
}

.meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.muted {
    color: var(--muted);
}

/* ==========================================================================
   Loader
   ========================================================================== */
.loader {
    position: fixed;
    inset: 0;
    background-color: var(--bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s var(--anim-ease), visibility 0.8s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-text {
    font-family: var(--font-sans);
    font-size: clamp(1rem, 2vw, 1.5rem);
    letter-spacing: 0.2em;
    animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* ==========================================================================
   Cursor
   ========================================================================== */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    background-color: var(--text);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9998;
    mix-blend-mode: difference;
    transition: width 0.3s var(--anim-ease), height 0.3s var(--anim-ease), background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-cursor .cursor-text {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 500;
    color: var(--bg);
    opacity: 0;
    letter-spacing: 0.05em;
    transition: opacity 0.3s;
}

.custom-cursor.view-mode {
    width: 80px;
    height: 80px;
    background-color: #fff;
    mix-blend-mode: normal;
}

.custom-cursor.view-mode .cursor-text {
    opacity: 1;
}

@media (pointer: coarse) {
    .custom-cursor { display: none; }
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--space-sm) 4vw;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 100;
    mix-blend-mode: difference;
}

.logo {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.logo span {
    font-size: 0.65rem;
    color: var(--muted);
    letter-spacing: 0.1em;
}

.desktop-nav {
    display: flex;
    gap: var(--space-md);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}

.desktop-nav a {
    position: relative;
    padding-bottom: 2px;
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--anim-ease);
}

.desktop-nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.mobile-menu-btn {
    display: none;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    z-index: 101;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(10px);
    z-index: 99;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4vw;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s var(--anim-ease), visibility 0.5s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.mobile-nav-links a {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 10vw, 5rem);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s var(--anim-ease), opacity 0.5s;
}

.mobile-menu-overlay.active .mobile-nav-links a {
    transform: translateY(0);
    opacity: 1;
}

.mobile-socials {
    margin-top: var(--space-lg);
    display: flex;
    gap: var(--space-md);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    opacity: 0;
    transition: opacity 0.5s 0.3s;
}

.mobile-menu-overlay.active .mobile-socials {
    opacity: 1;
}

/* ==========================================================================
   Hero
   ========================================================================== */
#hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    inset: -10%;
    z-index: -1;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(17,17,17,0.2), rgba(17,17,17,0.7));
}

.hero-content {
    width: var(--container);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12vh 0 6vh 0;
}

.hero-top p, .hero-bottom p {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-headline {
    font-size: clamp(4rem, 12vw, 12rem);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.9;
}

.hero-bottom {
    display: flex;
    justify-content: space-between;
}

/* ==========================================================================
   Intro
   ========================================================================== */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-lg);
}

.intro-right h2 {
    font-size: clamp(2rem, 5vw, 4.5rem);
    margin-bottom: var(--space-md);
}

.intro-text {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--muted);
    max-width: 600px;
}

/* ==========================================================================
   Selected Work (Masonry)
   ========================================================================== */
.section-title {
    font-size: clamp(3rem, 8vw, 8rem);
    margin-bottom: var(--space-lg);
    line-height: 0.9;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--space-md);
}

.work-item {
    position: relative;
    overflow: hidden;
    display: block;
    background: var(--surface);
}

.work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--anim-ease);
}

.item-large { grid-column: 1 / 9; aspect-ratio: 16/9; }
.item-portrait { grid-column: 9 / 13; grid-row: 1 / 3; aspect-ratio: 3/4; }
.item-square { grid-column: 2 / 7; aspect-ratio: 1/1; }
.item-tall { grid-column: 7 / 12; aspect-ratio: 4/5; margin-top: -10%; }
.item-wide { grid-column: 1 / 13; aspect-ratio: 21/9; margin-top: var(--space-md); }

.work-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(17,17,17,0.8), transparent 50%);
    opacity: 0;
    transition: opacity 0.5s var(--anim-ease);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-md);
}

.work-meta {
    transform: translateY(20px);
    transition: transform 0.5s var(--anim-ease);
}

.work-meta .meta-number {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--muted);
}

.work-meta h3 {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    margin: 0.5rem 0 0.25rem 0;
}

.work-meta p {
    font-size: 0.85rem;
    color: var(--muted);
}

.work-item:hover img {
    transform: scale(1.03);
}

.work-item:hover .work-overlay {
    opacity: 1;
}

.work-item:hover .work-meta {
    transform: translateY(0);
}

/* ==========================================================================
   Feature Image
   ========================================================================== */
.feature-wrapper {
    position: relative;
    width: 100%;
    height: 80vh;
    overflow: hidden;
}

.feature-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-text {
    position: absolute;
    bottom: var(--space-lg);
    left: var(--space-lg);
    color: #fff;
}

.feature-text h3 {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-top: 1rem;
}

/* ==========================================================================
   Horizontal Scroll Section
   ========================================================================== */
.horizontal-scroll-container {
    height: 400vh; /* creates scroll area */
    position: relative;
}

.horizontal-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.horizontal-header {
    padding: 0 4vw;
    margin-bottom: var(--space-md);
}

.horizontal-header h2 {
    font-size: clamp(3rem, 8vw, 6rem);
}

.horizontal-track {
    display: flex;
    gap: var(--space-md);
    padding: 0 4vw;
    width: max-content;
    will-change: transform;
}

.h-card {
    width: clamp(280px, 40vw, 600px);
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--surface);
}

.h-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   About
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
}

.about-image {
    aspect-ratio: 4/5;
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.about-bio {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--muted);
    margin-bottom: var(--space-lg);
}

.about-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.detail-block p:not(.meta-label) {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ==========================================================================
   Quote
   ========================================================================== */
.quote-section {
    text-align: center;
}

.huge-quote {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 6vw, 6rem);
    font-style: italic;
    line-height: 1.1;
    color: var(--text);
}

/* ==========================================================================
   Stats
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    text-align: center;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: var(--space-lg) 0;
}

.stat-number {
    display: block;
    font-family: var(--font-serif);
    font-size: clamp(3rem, 6vw, 6rem);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

/* ==========================================================================
   Clients
   ========================================================================== */
.client-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md) var(--space-xl);
}

.client-list li {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--muted);
    transition: color 0.3s;
    cursor: default;
}

.client-list li:hover {
    color: var(--text);
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-heading {
    font-size: clamp(4rem, 10vw, 10rem);
    margin-bottom: var(--space-md);
}

.contact-email {
    display: inline-block;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    border-bottom: 1px solid currentColor;
    margin-bottom: var(--space-lg);
    padding-bottom: 0.5rem;
}

.contact-socials {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    padding: var(--space-md) 0;
    border-top: 1px solid var(--line);
}

.footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.back-to-top {
    text-transform: uppercase;
}

/* ==========================================================================
   Animations (Scroll Reveal)
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--anim-ease), transform 0.8s var(--anim-ease);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .intro-grid, .about-grid {
        grid-template-columns: 1fr;
    }
    
    .item-large { grid-column: 1 / 13; aspect-ratio: 16/9; }
    .item-portrait { grid-column: 1 / 7; aspect-ratio: 4/5; }
    .item-square { grid-column: 7 / 13; aspect-ratio: 1/1; }
    .item-tall { grid-column: 1 / 7; margin-top: 0; }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg) var(--space-md);
    }
}

@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .mobile-menu-btn { display: block; }
    
    .hero-content { padding: 15vh 0 5vh 0; }
    
    .work-grid { display: flex; flex-direction: column; }
    .work-item { width: 100%; aspect-ratio: 4/5 !important; margin-top: 0 !important; }
    
    /* Convert horizontal section to native scroll on mobile */
    .horizontal-scroll-container { height: auto; }
    .horizontal-sticky { position: relative; height: auto; overflow: visible; padding: var(--space-xl) 0; }
    .horizontal-track { overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 4vw var(--space-md) 4vw; width: 100%; }
    .h-card { scroll-snap-align: start; flex-shrink: 0; width: 80vw; }
    
    .about-details { grid-template-columns: 1fr; }
    .footer-flex { flex-direction: column; gap: var(--space-md); text-align: center; }
    
    .feature-text { bottom: var(--space-sm); left: var(--space-sm); }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .reveal { opacity: 1; transform: none; }
    .custom-cursor { display: none; }
    .horizontal-scroll-container { height: auto; }
    .horizontal-sticky { position: relative; height: auto; overflow-x: auto; }
    .horizontal-track { transform: none !important; overflow-x: auto; width: 100%; padding-bottom: 2rem;}
}