/* ===== CUSTOM PROPERTIES ===== */
:root {
    --bg-deep: #0D0D11;
    --bg-surface: #1C1D22;
    --bg-inverse: #E8E4DF;
    --accent: #C5A880;
    --accent-dim: rgba(197, 168, 128, 0.3);
    --text-primary: #F0EDE8;
    --text-muted: rgba(240, 237, 232, 0.4);
    --text-dark: #1a1a1a;
    --text-dark-muted: rgba(0, 0, 0, 0.4);

    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 32px;
    --space-lg: 64px;
    --space-xl: 128px;
    --space-2xl: 160px;

    --edge: clamp(20px, 4vw, 60px);
    --font: "Inter", sans-serif;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== RESET ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none !important;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font);
    font-weight: 400;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Film grain overlay */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9000;
    pointer-events: none;
    opacity: 0.04;
    filter: url(#grain);
    width: 100%;
    height: 100%;
}

/* Viewport vignette — classic cinema edge darkening */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 8500;
    pointer-events: none;
    background: radial-gradient(ellipse, transparent 55%, rgba(0,0,0,0.35) 100%);
}

/* Scroll progress bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    z-index: 8000;
    background: linear-gradient(90deg, var(--accent), var(--text-primary));
    pointer-events: none;
    will-change: width;
}

/* Floating geometric shapes */
.atmos-shapes {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

@keyframes floatShape {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-40px) rotate(8deg); }
}

.atmos-circle {
    position: absolute;
    width: 400px;
    height: 400px;
    border: 1px solid var(--text-primary);
    border-radius: 50%;
    opacity: 0.03;
    top: 15%;
    right: -100px;
    animation: floatShape 30s ease-in-out infinite;
}

.atmos-line {
    position: absolute;
    width: 1px;
    height: 60vh;
    background: var(--text-primary);
    opacity: 0.03;
    top: 10%;
    left: 20%;
    transform: rotate(15deg);
    animation: floatShape 25s ease-in-out infinite reverse;
}

.atmos-square {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 1px solid var(--text-primary);
    opacity: 0.03;
    bottom: 20%;
    left: 10%;
    transform: rotate(45deg);
    animation: floatShape 35s ease-in-out infinite;
}

.sr-only {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ===== FLUID TYPOGRAPHY ===== */
p {
    font-size: clamp(0.85rem, 0.8rem + 0.25vw, 1rem);
    font-family: var(--font);
    font-weight: 400;
    line-height: 1.6;
}

h1 {
    font-size: clamp(4rem, 3rem + 8vw, 16rem);
    font-family: var(--font);
    font-weight: 900;
    line-height: 0.85;
    letter-spacing: -0.04em;
}

h2 {
    font-size: clamp(2rem, 1.5rem + 3vw, 6rem);
    font-family: var(--font);
    font-weight: 700;
}

h3 {
    font-size: clamp(1.1rem, 1rem + 0.4vw, 1.6rem);
    font-family: var(--font);
    font-weight: 400;
    text-align: center;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    width: 100%;
    padding-bottom: var(--space-sm);
}

h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 1px;
    background-color: var(--accent);
}

h4 {
    font-size: clamp(0.85rem, 0.8rem + 0.2vw, 1.2rem);
    font-family: var(--font);
    font-weight: 700;
}

h5 {
    font-size: clamp(2.8rem, 2rem + 6vw, 12rem);
    font-family: var(--font);
    font-weight: 900;
    line-height: 0.6;
    letter-spacing: -0.03em;
}

h6 {
    font-size: clamp(1.1rem, 1rem + 0.4vw, 2rem);
    font-family: var(--font);
    font-weight: 700;
    line-height: 1.1;
}

/* ===== KEYFRAMES ===== */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroReveal {
    0% {
        opacity: 0;
        transform: scale(2.5);
        clip-path: inset(50% 0 50% 0);
    }
    60% {
        opacity: 1;
        transform: scale(1.05);
        clip-path: inset(0 0 0 0);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        clip-path: inset(0 0 0 0);
    }
}

/* Ambient color drift */
@keyframes ambientDrift {
    0%, 100% { filter: hue-rotate(0deg) brightness(1); }
    33% { filter: hue-rotate(3deg) brightness(1.01); }
    66% { filter: hue-rotate(-3deg) brightness(0.99); }
}

@keyframes shimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes scrollHint {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        transform: scaleY(1);
        transform-origin: top;
    }
    51% {
        transform-origin: bottom;
    }
    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

/* ===== NAVIGATION ===== */
#nav-section {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 20px var(--edge);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(13, 13, 17, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.navigation {
    display: flex;
    gap: var(--space-md);
}

.navigation a {
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font);
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    position: relative;
    transition: color 0.2s ease;
}

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

.navigation a:hover {
    color: var(--accent);
}

.navigation a:hover::after {
    width: 100%;
}

/* ===== HERO ===== */
#hero {
    height: 92vh;
    margin: 0 var(--edge);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#hero::before {
    content: "";
    position: absolute;
    inset: 0 calc(-1 * var(--edge));
    background: radial-gradient(ellipse at 50% 40%, rgba(197, 168, 128, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

.titles {
    margin: 0 auto;
    width: fit-content;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.tit1 {
    width: fit-content;
    margin-left: 28%;
    margin-bottom: -2rem;
    letter-spacing: 0.6rem;
    font-family: var(--font);
    font-weight: 300;
    font-size: clamp(0.75rem, 0.7rem + 0.3vw, 1rem);
    opacity: 0;
    animation: heroReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

.hero-heading {
    background: linear-gradient(
        90deg,
        var(--text-primary) 0%,
        var(--accent) 25%,
        var(--text-primary) 50%,
        var(--accent) 75%,
        var(--text-primary) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: heroReveal 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
    opacity: 0;
}

.tit2 {
    width: fit-content;
    margin-left: 50%;
    margin-top: 0.5rem;
    letter-spacing: 0.6rem;
    font-family: var(--font);
    font-weight: 300;
    font-size: clamp(0.75rem, 0.7rem + 0.3vw, 1rem);
    opacity: 0;
    animation: heroReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) 1.6s forwards;
}

.links {
    position: absolute;
    bottom: var(--space-lg);
    left: 0;
    z-index: 1;
}

.links a {
    display: inline-block;
    margin-bottom: var(--space-sm);
}

.links img {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.links a:hover img {
    opacity: 1;
}

/* Scroll hint */
.scroll-hint {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    width: 1px;
    height: 60px;
    background: var(--accent);
    animation: scrollHint 2.5s ease-in-out infinite;
}

/* ===== STATS / NUMBERS ===== */
#our-numbers {
    background-color: var(--bg-inverse);
    color: var(--text-dark);
    padding: var(--space-2xl) var(--edge);
    position: relative;
}

#our-numbers::before,
#our-numbers::after {
    content: "";
    position: absolute;
    left: var(--edge);
    right: var(--edge);
    height: 1px;
    background: var(--text-dark-muted);
}

#our-numbers::before { top: var(--space-lg); }
#our-numbers::after { bottom: var(--space-lg); }

#our-numbers h3 {
    margin-bottom: var(--space-xl);
}

#our-numbers h3::after {
    background-color: var(--text-dark-muted);
}

.numbers {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
}

.number {
    padding: 0 var(--space-md);
    position: relative;
}

.number + .number::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background: var(--text-dark-muted);
}

.number h2 {
    transition: color 0.4s var(--ease);
}

.number:hover h2 {
    color: var(--accent);
}

.number h4 {
    padding-top: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-desc {
    opacity: 0.4;
    margin-top: var(--space-xs);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ===== WTF SECTION ===== */
#wtf {
    background-color: var(--bg-inverse);
    color: var(--text-dark);
    overflow: hidden;
    position: relative;
}

#wtf::after {
    content: "";
    position: absolute;
    bottom: -80px;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, var(--bg-inverse), var(--bg-deep));
    pointer-events: none;
}

.wtftitle {
    max-width: 85vw;
    margin: 0 auto;
    padding-bottom: var(--space-2xl);
}

.wtftitle h5 {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wtf-line {
    display: block;
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.8s var(--ease);
}

.wtf-line:nth-child(2) {
    transition-delay: 0.2s;
}

#wtf.visible .wtf-line {
    clip-path: inset(0 0 0 0);
}

.wtf-body {
    padding-top: var(--space-lg);
    border-top: 1px solid var(--text-dark-muted);
    margin-top: var(--space-lg);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.6s, transform 0.6s ease 0.6s;
    max-width: 600px;
}

#wtf.visible .wtf-body {
    opacity: 0.5;
    transform: translateY(0);
}

/* ===== PHOTO GRID ===== */
#photos-section {
    color: white;
    padding: var(--space-2xl) var(--edge);
    position: relative;
}

#photos-section::before {
    content: "";
    position: absolute;
    top: -80px;
    left: 0;
    right: 0;
    height: 80px;
    pointer-events: none;
}

#photos-section h3 {
    margin-bottom: var(--space-xl);
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    max-width: 1200px;
    margin: 0 auto;
}

.photo-card.featured {
    grid-column: span 2;
    grid-row: span 2;
}

.photo-card {
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.photo-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.photo-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    display: flex;
    position: relative;
}

.photo-card.featured .photo-container {
    height: 100%;
}

.photo-container::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
    z-index: 1;
    transition: background 0.4s ease;
}

.photo-card:hover .photo-container::after {
    background: radial-gradient(circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(197,168,128,0.4) 0%, rgba(0,0,0,0.5) 70%);
}

.photo-container h6 {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 2;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    transform: translateY(4px);
    transition: transform 0.4s var(--ease), color 0.4s ease;
}

.photo-card:hover .photo-container h6 {
    transform: translateY(0);
    color: var(--accent);
}

.photo-container img {
    filter: grayscale(100%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.5s ease, transform 0.5s ease;
}

.photo-card:hover .photo-container img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.photo-name {
    padding: 10px 8px;
    text-align: right;
    font-weight: 700;
    font-family: var(--font);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    font-variant: small-caps;
    text-transform: lowercase;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.photo-card:hover .photo-name {
    color: var(--accent);
}

/* ===== FOOTER ===== */
footer {
    background-color: var(--bg-deep);
    padding: var(--space-md) var(--edge);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.flink {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.flink:hover {
    color: #fff;
}

.back-to-top {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: var(--font);
    transition: color 0.3s ease;
}

.back-to-top:hover {
    color: var(--accent);
}

/* ===== CINEMATIC ENHANCEMENTS ===== */

/* Hero shimmer starts after reveal completes */
.hero-heading.shimmer-active {
    animation: shimmer 8s ease-in-out infinite;
    opacity: 1;
    transform: scale(1);
    clip-path: inset(0 0 0 0);
}

/* Section dissolves — film dissolve between scenes */
main > section {
    opacity: 0.15;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

main > section.in-view {
    opacity: 1;
}

/* WTF — Godard title card: left-aligned, slight rotation */
.wtftitle h5 {
    align-items: flex-start;
    margin-left: -2vw;
}

.wtf-line {
    transition: clip-path 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    transform: rotate(-1.5deg);
}

.wtf-line:nth-child(2) {
    transition-delay: 0.3s;
    transform: rotate(0.8deg);
}

#wtf.visible .wtf-line {
    transform: rotate(-0.2deg);
}

#wtf.visible .wtf-line:nth-child(2) {
    transform: rotate(0.1deg);
}

/* Film-frame borders on photo containers */
.photo-container::before {
    content: "";
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 3;
    pointer-events: none;
    transition: border-color 0.4s ease;
}

.photo-card:hover .photo-container::before {
    border-color: var(--accent-dim);
}

/* h3 split-reveal — curtain parting from center */
h3[data-reveal] {
    clip-path: inset(0 50% 0 50%);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), clip-path 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

h3[data-reveal].revealed {
    clip-path: inset(0 0 0 0);
}

/* Nav scroll state */
#nav-section {
    transition: background 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}

#nav-section.scrolled {
    background: rgba(13, 13, 17, 0.95);
    border-bottom-color: var(--accent-dim);
}

/* Cinematic color grading per section */
#our-numbers,
#wtf {
    filter: sepia(0.04) contrast(1.02);
}

#photos-section {
    filter: brightness(1.02) saturate(1.05);
}

#hero {
    filter: saturate(0.95) contrast(1.03);
}

/* Ambient color drift on hero and photos — applied to inner containers
   to avoid stacking with per-section color grading filters */
.titles,
.photos-grid {
    animation: ambientDrift 60s ease-in-out infinite;
}

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

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .photos-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .photo-card.featured {
        grid-column: span 2;
        grid-row: span 2;
    }

    .numbers {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md) 0;
    }

    .number:nth-child(4)::before {
        display: none;
    }
}

@media (max-width: 768px) {
    #hero {
        height: auto;
        min-height: 80vh;
    }

    .titles {
        width: 100%;
        text-align: center;
    }

    .tit1 {
        margin-left: 0;
        margin-bottom: -1.5rem;
        width: 100%;
        letter-spacing: 0.2rem;
    }

    .tit2 {
        margin-left: 0;
        margin-top: -1.5rem;
        width: 100%;
        letter-spacing: 0.2rem;
        text-align: center;
    }

    .links {
        position: relative;
        bottom: auto;
        left: auto;
        text-align: center;
        margin: var(--space-md) 0;
    }

    .scroll-hint {
        display: none;
    }

    .numbers {
        grid-template-columns: repeat(2, 1fr);
    }

    .number + .number::before {
        display: none;
    }

    .number {
        border-bottom: 1px solid rgba(0,0,0,0.08);
        padding-bottom: var(--space-sm);
    }

    .number:last-child {
        border-bottom: none;
    }

    .photos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .photo-card.featured {
        grid-column: span 1;
        grid-row: span 1;
    }

    .photo-container {
        height: 180px;
    }

    .photo-card.featured .photo-container {
        height: 180px;
    }

    #nav-section {
        padding: 15px var(--edge);
        flex-direction: column;
        gap: var(--space-sm);
        align-items: flex-start;
    }

    .navigation {
        width: 100%;
        justify-content: space-between;
    }

    #our-numbers::before,
    #our-numbers::after {
        display: none;
    }

    #our-numbers,
    #photos-section {
        padding-top: 80px;
        padding-bottom: 80px;
    }

    .wtftitle {
        padding-bottom: 80px;
    }

    .wtf-body {
        max-width: 100%;
    }

    .footer-inner {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }

    /* Grain: disable on mobile (GPU cost) */
    body::after {
        display: none;
    }

    /* Vignette: disable on mobile */
    body::before {
        display: none;
    }

    /* Floating shapes: disable on mobile */
    .atmos-shapes {
        display: none;
    }
}

@media (max-width: 480px) {
    .navigation {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .numbers {
        grid-template-columns: 1fr;
    }

    .number {
        text-align: center;
        padding: var(--space-sm) 0;
    }

    .photos-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
    }

    .photo-container,
    .photo-card.featured .photo-container {
        height: 250px;
    }

    .photo-container h6 {
        bottom: 12px;
        left: 12px;
    }

    .photo-name {
        text-align: left;
        padding: 10px 12px;
    }

    #our-numbers,
    #photos-section {
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .wtftitle {
        padding-bottom: 60px;
    }

    .photo-card:hover {
        transform: none;
    }

    footer p {
        font-size: 0.7rem;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }

    [data-reveal],
    .photo-card,
    .wtf-line,
    .wtf-body,
    .tit1, .tit2, .hero-heading {
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
    }

    .wtf-body {
        opacity: 0.5 !important;
    }

    main > section {
        opacity: 1 !important;
    }

    .cursor-outer,
    .cursor-inner {
        display: none !important;
    }

    body, * {
        cursor: auto !important;
    }
}

/* ===== CURSOR (via inversion.js — class names must stay) ===== */
.cursor-outer {
    position: fixed;
    top: 0;
    left: 0;
    width: 80px;
    height: 80px;
    border: 2px solid white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    backdrop-filter: invert(1) hue-rotate(180deg);
    -webkit-backdrop-filter: invert(1) hue-rotate(180deg);
    background-color: rgba(255, 255, 255, 0.1);
    mix-blend-mode: difference;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
    opacity: 0;
    box-shadow:
        inset 0 0 20px rgba(255, 255, 255, 0.2),
        0 0 30px rgba(255, 255, 255, 0.1);
}

.cursor-inner {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    backdrop-filter: invert(1);
    -webkit-backdrop-filter: invert(1);
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    opacity: 0;
    filter: drop-shadow(0 0 3px white);
}
