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

:root {
    --bg: #0a0a0a;
    --bg-elevated: #111111;
    --text: #f0ede8;
    --text-muted: #8a8579;
    --accent: #c9b99a;
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: 'Inter', -apple-system, sans-serif;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    cursor: default;
}

body.loading {
    overflow: hidden;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

/* ============================================
   LOADER
   ============================================ */
.loader {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.loader.done {
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
}

.loader-text {
    font-family: var(--serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 300;
    letter-spacing: 0.1em;
    opacity: 0;
    animation: loaderFadeIn 0.8s var(--ease) 0.2s forwards;
}

.loader-bar {
    width: 120px;
    height: 1px;
    background: rgba(255,255,255,0.1);
    overflow: hidden;
    opacity: 0;
    animation: loaderFadeIn 0.8s var(--ease) 0.4s forwards;
}

.loader-progress {
    width: 0%;
    height: 100%;
    background: var(--accent);
    transition: width 0.3s ease;
}

@keyframes loaderFadeIn {
    to { opacity: 1; }
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.cursor {
    position: fixed;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 150;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.3s ease, transform 0.4s var(--ease);
    mix-blend-mode: difference;
}

.cursor.active {
    opacity: 1;
    transform: scale(1);
}

.cursor-text {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--bg);
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 3rem;
    transition: all 0.6s var(--ease);
    mix-blend-mode: difference;
}

.nav.scrolled {
    mix-blend-mode: normal;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 1rem 3rem;
}

.nav-logo {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text);
    transition: opacity 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.4s var(--ease);
}

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

.nav-links a:hover::after {
    width: 100%;
}

.nav-menu {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 110;
}

.nav-menu span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--text);
    transition: all 0.4s var(--ease);
}

.nav-menu.active span:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}

.nav-menu.active span:last-child {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s var(--ease);
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu a {
    font-family: var(--serif);
    font-size: 3rem;
    font-weight: 300;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s var(--ease);
}

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

.mobile-menu.active a:nth-child(1) { transition-delay: 0.15s; }
.mobile-menu.active a:nth-child(2) { transition-delay: 0.25s; }
.mobile-menu.active a:nth-child(3) { transition-delay: 0.35s; }

/* ============================================
   HERO — FULL BLEED PHOTO
   ============================================ */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    animation: heroZoom 20s ease alternate infinite;
}

@keyframes heroZoom {
    from { transform: scale(1.1); }
    to { transform: scale(1.2); }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(to bottom, rgba(10,10,10,0.4) 0%, rgba(10,10,10,0.1) 40%, rgba(10,10,10,0.6) 100%),
        radial-gradient(ellipse at center, transparent 30%, rgba(10,10,10,0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: var(--serif);
    font-weight: 300;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

.hero-line {
    display: block;
    font-size: clamp(3.5rem, 11vw, 10rem);
    opacity: 0;
    transform: translateY(80px) rotateX(15deg);
    animation: heroReveal 1.4s var(--ease-out) forwards;
}

.hero-line:nth-child(1) { animation-delay: 0.3s; }
.hero-line:nth-child(2) { animation-delay: 0.5s; }
.hero-line:nth-child(3) { animation-delay: 0.7s; }

.hero-line.italic {
    font-style: italic;
    color: var(--accent);
    text-shadow: 0 0 80px rgba(201, 185, 154, 0.3);
}

.hero-subtitle {
    font-size: 0.8rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(240, 237, 232, 0.7);
    opacity: 0;
    animation: fadeUp 1s var(--ease) 1.2s forwards;
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    animation: fadeUp 1s var(--ease) 1.8s forwards;
    z-index: 2;
}

.hero-scroll span {
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(240, 237, 232, 0.5);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease infinite;
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.8); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ============================================
   SECTIONS COMMON
   ============================================ */
.section-header {
    padding: 0 3rem;
    margin-bottom: 2rem;
}

.section-label {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    display: block;
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
}

.section-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    letter-spacing: 0.05em;
}

/* ============================================
   GALLERY — HORIZONTAL SCROLL
   ============================================ */
.work {
    padding: 8rem 0 6rem;
}

.gallery-track {
    display: flex;
    gap: 1.5rem;
    padding: 0 3rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gallery-track::-webkit-scrollbar {
    display: none;
}

.gallery-track:active {
    cursor: grabbing;
}

.gallery-item {
    flex-shrink: 0;
    width: 500px;
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    scroll-snap-align: start;
}

.gallery-item .gallery-image {
    height: 350px;
    overflow: hidden;
}

.gallery-item--tall {
    width: 380px;
}

.gallery-item--tall .gallery-image {
    height: 500px;
}

.gallery-image img {
    transition: transform 1.5s var(--ease), filter 0.8s ease;
    filter: brightness(0.8) saturate(0.9);
    will-change: transform;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.08);
    filter: brightness(1) saturate(1);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 70%, transparent);
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.6s var(--ease);
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
    opacity: 1;
}

.gallery-category {
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent);
}

.gallery-caption h3 {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 300;
    margin-top: 0.3rem;
}

/* ============================================
   DIVIDER IMAGE
   ============================================ */
.divider-image {
    width: 100%;
    height: 60vh;
    overflow: hidden;
    position: relative;
}

.divider-image img {
    width: 100%;
    height: 130%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.7) saturate(0.8);
    will-change: transform;
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
[data-reveal] {
    opacity: 0;
    transition: opacity 1s var(--ease), transform 1s var(--ease);
}

[data-reveal="left"] {
    transform: translateX(60px);
}

[data-reveal="right"] {
    transform: translateX(-60px);
}

[data-reveal="scale"] {
    transform: scale(0.92);
}

[data-reveal=""] {
    transform: translateY(50px);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Staggered gallery items */
.gallery-item[data-reveal].revealed:nth-child(1) { transition-delay: 0s; }
.gallery-item[data-reveal].revealed:nth-child(2) { transition-delay: 0.1s; }
.gallery-item[data-reveal].revealed:nth-child(3) { transition-delay: 0.2s; }
.gallery-item[data-reveal].revealed:nth-child(4) { transition-delay: 0.3s; }
.gallery-item[data-reveal].revealed:nth-child(5) { transition-delay: 0.4s; }
.gallery-item[data-reveal].revealed:nth-child(6) { transition-delay: 0.5s; }
.gallery-item[data-reveal].revealed:nth-child(7) { transition-delay: 0.6s; }

/* Stats count-up */
.stat { overflow: hidden; }

.stat[data-reveal] {
    transform: translateY(30px);
}

.stat[data-reveal].revealed:nth-child(1) { transition-delay: 0.1s; }
.stat[data-reveal].revealed:nth-child(2) { transition-delay: 0.3s; }
.stat[data-reveal].revealed:nth-child(3) { transition-delay: 0.5s; }

/* ============================================
   ABOUT
   ============================================ */
.about {
    padding: 10rem 3rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.about-image {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 3px;
    position: relative;
}

.about-image::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(201, 185, 154, 0.15);
    border-radius: 3px;
    pointer-events: none;
}

.about-image img {
    transition: transform 1.5s var(--ease);
}

.about-image:hover img {
    transform: scale(1.04);
}

.about-title {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.about-title em {
    color: var(--accent);
    text-shadow: 0 0 60px rgba(201, 185, 154, 0.15);
}

.about-content p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.9;
}

.about-stats {
    display: flex;
    gap: 3rem;
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.stat-number {
    font-family: var(--serif);
    font-size: 2.8rem;
    font-weight: 300;
    color: var(--accent);
    display: inline;
    line-height: 1;
}

.stat-plus {
    font-family: var(--serif);
    font-size: 2.8rem;
    font-weight: 300;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
    margin-top: 0.5rem;
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
    padding: 10rem 3rem;
    text-align: center;
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(201, 185, 154, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.contact-content {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.contact-title {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 300;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.contact-title em {
    color: var(--accent);
    text-shadow: 0 0 60px rgba(201, 185, 154, 0.15);
}

.contact p {
    color: var(--text-muted);
    font-weight: 300;
    margin-bottom: 2.5rem;
}

.contact-email {
    display: inline-block;
    position: relative;
    padding-bottom: 6px;
    overflow: hidden;
}

.contact-email-text {
    font-family: var(--serif);
    font-size: clamp(1.25rem, 3vw, 2.2rem);
    font-weight: 300;
    color: var(--text);
    transition: color 0.4s ease;
}

.contact-email-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent);
    transform: translateX(-101%);
    transition: transform 0.6s var(--ease);
}

.contact-email:hover .contact-email-text {
    color: var(--accent);
}

.contact-email:hover .contact-email-line {
    transform: translateX(0);
}

.contact-socials {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 3.5rem;
}

.contact-socials a {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.3s ease, transform 0.3s var(--ease);
}

.contact-socials a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 2.5rem 3rem;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.04);
}

.footer p {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.12em;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s var(--ease);
    cursor: zoom-out;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--text);
    font-size: 2.5rem;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s var(--ease);
    font-weight: 300;
    z-index: 210;
}

.lightbox-close:hover {
    opacity: 0.6;
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text);
    font-size: 3rem;
    cursor: pointer;
    padding: 1rem;
    transition: opacity 0.3s ease;
    font-weight: 300;
    z-index: 210;
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.6;
}

.lightbox-counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    z-index: 210;
}

.lightbox-img {
    max-width: 88vw;
    max-height: 88vh;
    object-fit: contain;
    transform: scale(0.92);
    opacity: 0;
    transition: transform 0.6s var(--ease), opacity 0.4s ease;
}

.lightbox.active .lightbox-img {
    transform: scale(1);
    opacity: 1;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .nav-links { display: none; }
    .nav-menu { display: flex; }
    .cursor { display: none; }

    .nav {
        padding: 1.25rem 1.5rem;
        mix-blend-mode: normal;
    }

    .section-header {
        padding: 0 1.5rem;
    }

    .gallery-track {
        padding: 0 1.5rem;
        gap: 1rem;
    }

    .gallery-item {
        width: 320px;
    }

    .gallery-item .gallery-image {
        height: 260px;
    }

    .gallery-item--tall {
        width: 260px;
    }

    .gallery-item--tall .gallery-image {
        height: 380px;
    }

    .gallery-caption {
        transform: translateY(0);
        opacity: 1;
    }

    .divider-image {
        height: 40vh;
    }

    .about {
        padding: 5rem 1.5rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-image {
        aspect-ratio: 4 / 3;
    }

    .about-stats {
        gap: 2rem;
    }

    .contact {
        padding: 5rem 1.5rem;
    }

    .stat-number, .stat-plus {
        font-size: 2.2rem;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-line {
        font-size: 3rem;
    }

    .gallery-item {
        width: 280px;
    }

    .gallery-item--tall {
        width: 220px;
    }

    .about-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .contact-socials {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
