/* ==========================================================================
   Ella Couffinhal — base
   ========================================================================== */

:root {
    --bg: #0c0b0a;
    --bg-2: #151311;
    --fg: #f1ebe3;
    --muted: rgba(241, 235, 227, 0.56);
    --line: rgba(241, 235, 227, 0.14);
    --accent: #ff4d1a;
    --accent-ink: #120805;

    --font-display: 'Tanker', 'Impact', 'Arial Narrow', sans-serif;
    --font-serif: 'Instrument Serif', Georgia, serif;
    --font-body: 'Supreme', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Martian Mono', ui-monospace, Menlo, monospace;

    --gutter: clamp(16px, 2.6vw, 40px);
    --nav-h: 76px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

/* Film grain over everything */
body::after {
    content: '';
    position: fixed;
    inset: -50%;
    z-index: 90;
    pointer-events: none;
    opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain 1.2s steps(6) infinite;
}

@keyframes grain {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-3%, 2%); }
    40% { transform: translate(2%, -4%); }
    60% { transform: translate(-4%, -2%); }
    80% { transform: translate(3%, 4%); }
    100% { transform: translate(0, 0); }
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--accent-ink); }

main { overflow-x: clip; width: 100%; max-width: 100%; }

.wrap { padding-inline: var(--gutter); }

.display {
    font-family: var(--font-display);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0;
    line-height: 0.88;
}

/* Serif italic accent inside display headings */
.display em, .serif {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    text-transform: none;
    letter-spacing: -0.02em;
}
.display em { color: var(--accent); padding-right: 0.04em; }

.eyebrow, .mono {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.eyebrow { color: var(--muted); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Masked line reveal */
.line-mask { display: block; overflow: hidden; padding-block: 0.14em 0.04em; margin-block: -0.14em -0.04em; }
.line-mask > span { display: inline-block; will-change: transform; }

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: var(--gutter);
    color: var(--fg);
}
/* Translucent bar: the picture shows through, blurred, under the links */
.nav::before {
    content: '';
    position: absolute; inset: 0; z-index: -1;
    background: rgba(12, 11, 10, 0.5);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.nav.is-scrolled::before { opacity: 1; }
body.menu-open .nav::before { opacity: 0; }

.nav__logo {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(26px, 2.3vw, 36px);
    letter-spacing: 0.01em;
    line-height: 1;
    text-transform: uppercase;
}

.nav__right { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 40px); }

.lang { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; }
.lang span { opacity: 0.4; }
.lang button { padding: 6px 2px; opacity: 0.45; transition: opacity 0.3s ease; letter-spacing: inherit; font-size: inherit; font-weight: inherit; }
.lang button:hover { opacity: 0.8; }
.lang button[aria-pressed='true'] { opacity: 1; }

.nav__links { display: flex; gap: clamp(18px, 2.4vw, 40px); list-style: none; }

.nav__links a,
.scramble {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
    position: relative;
    display: inline-block;
    padding-block: 6px;
}

/* The logo also carries .scramble: keep its display face and size */
.nav__logo.scramble {
    font-family: var(--font-display);
    font-size: clamp(26px, 2.3vw, 36px);
    letter-spacing: 0.01em;
    padding-block: 0;
}

.nav__links a::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.6s var(--ease);
}

.nav__links a:hover::after,
.nav__links a[aria-current='page']::after { transform: scaleX(1); transform-origin: left; }

.nav__toggle { display: none; width: 40px; height: 40px; position: relative; }
.nav__toggle span {
    position: absolute; left: 8px; right: 8px; height: 2px; background: currentColor;
    transition: transform 0.5s var(--ease);
}
.nav__toggle span:nth-child(1) { top: 15px; }
.nav__toggle span:nth-child(2) { top: 23px; }
body.menu-open .nav__toggle span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
body.menu-open .nav__toggle span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* Contact is set apart from the other links: a solid accent pill, rendered outside
   .nav (it sits above the bar). .nav__right reserves its width. */
.nav__right { margin-right: calc(var(--cta-w, 0px) + clamp(14px, 1.6vw, 24px)); }
.nav-cta {
    position: fixed;
    top: 0; right: var(--gutter);
    z-index: 50;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    pointer-events: none;
}
.nav-cta__btn {
    pointer-events: auto;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 18px 4px 14px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    overflow: hidden;
    isolation: isolate;
    transition: color 0.5s var(--ease), background 0.5s var(--ease);
}
.nav-cta__btn .scramble { padding-block: 8px; font-weight: 500; }
/* Cream fill rising from the bottom on hover */
.nav-cta__btn::before {
    content: '';
    position: absolute; inset: 0;
    z-index: -1;
    background: var(--fg);
    border-radius: inherit;
    transform: translateY(101%);
    transition: transform 0.6s var(--ease);
}
.nav-cta__btn:hover::before { transform: translateY(0); }
.nav-cta__btn i {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    transition: transform 0.6s var(--ease);
}
.nav-cta__btn:hover i { transform: scale(1.5); }
/* On the contact page itself the dot blinks like a recording light */
.nav-cta__btn[aria-current='page'] i { animation: rec 1s steps(1) infinite; }
body.menu-open .nav-cta__btn { background: var(--accent-ink); color: var(--accent); }
body.menu-open .nav-cta__btn::before { display: none; }
@media (max-width: 480px) {
    .nav-cta { display: none; }
    .nav__right { margin-right: 0; }
}

.menu {
    position: fixed;
    inset: 0;
    z-index: 45;
    background: var(--accent);
    color: var(--accent-ink);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: calc(var(--nav-h) + 20px) var(--gutter) var(--gutter);
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.8s var(--ease);
    pointer-events: none;
}
body.menu-open .menu { clip-path: inset(0 0 0 0); pointer-events: auto; }
body.menu-open { overflow: hidden; }

.menu a {
    display: block;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.6rem, 12vw, 5rem);
    line-height: 0.95;
    text-transform: uppercase;
    letter-spacing: -0.03em;
}
.menu__meta { display: flex; justify-content: space-between; margin-top: 32px; font-family: var(--font-mono); font-size: 11px; }

@media (max-width: 860px) {
    .nav__links { display: none; }
    .nav__toggle { display: block; }
}

/* ==========================================================================
   Intro + page curtain
   ========================================================================== */

.intro {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--accent);
    color: var(--accent-ink);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--gutter);
}
.intro__name {
    width: fit-content;
    font-size: clamp(3.2rem, 13.4vw, 15.5rem);
    white-space: nowrap;
}
.intro__name .char { display: inline-block; }
.intro__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.intro__count { font-family: var(--font-display); font-weight: 400; font-size: clamp(3rem, 8vw, 7rem); line-height: 0.8; font-variant-numeric: tabular-nums; }

/* Page transition: letterbox bars closing from top and bottom */
.curtain { position: fixed; inset: 0; z-index: 99; pointer-events: none; }
.curtain i { position: absolute; left: 0; right: 0; height: 50.5%; background: var(--accent); transform: scaleY(0); }
.curtain i:first-child { top: 0; transform-origin: top; }
.curtain i:last-child { bottom: 0; transform-origin: bottom; }

/* ==========================================================================
   Project tile
   ========================================================================== */

.tile { position: relative; display: block; overflow: hidden; background: var(--bg-2); isolation: isolate; }

.tile__media { position: absolute; inset: 0; overflow: hidden; }
.tile__media img,
.tile__media video {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease), opacity 0.6s ease, filter 0.8s ease;
}
.tile__media img { filter: grayscale(0.35) contrast(1.05) brightness(0.82); }
.tile__media video { opacity: 0; }
.tile.is-playing .tile__media video { opacity: 1; }
.tile:hover .tile__media img,
.tile:hover .tile__media video { transform: scale(1.05); }
.tile:hover .tile__media img { filter: grayscale(0) contrast(1.05) brightness(0.95); }

.tile::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(8, 7, 6, 0.78) 0%, rgba(8, 7, 6, 0) 45%);
    z-index: 1;
    pointer-events: none;
}

.tile__caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    padding: clamp(14px, 1.8vw, 26px);
}
.tile__title {
    font-family: var(--font-display);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.92;
    font-size: clamp(1.5rem, 2.6vw, 2.6rem);
}
.tile--xl .tile__title { font-size: clamp(2rem, 4.4vw, 4.6rem); }
.tile__title { letter-spacing: 0.01em; }
.tile__meta { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); text-align: right; white-space: nowrap; }
.tile__meta b { display: block; color: var(--fg); font-weight: 400; margin-bottom: 2px; }

.tile__vf { position: absolute; inset: clamp(10px, 1.2vw, 18px); z-index: 2; pointer-events: none; opacity: 0; transform: scale(1.04); transition: opacity 0.5s ease, transform 0.8s var(--ease); }
.tile__vf i { position: absolute; width: 18px; height: 18px; border: 0 solid rgba(255, 255, 255, 0.85); }
.tile__vf i:nth-child(1) { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.tile__vf i:nth-child(2) { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.tile__vf i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.tile__vf i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.tile__hud {
    position: absolute; top: clamp(18px, 2vw, 30px); left: clamp(22px, 2.2vw, 34px); right: clamp(22px, 2.2vw, 34px);
    z-index: 2; display: flex; justify-content: space-between; gap: 12px;
    font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em; color: #fff;
    opacity: 0; transition: opacity 0.5s ease; pointer-events: none;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
.tile__hud b { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; animation: rec 1s steps(1) infinite; }
.tile:hover .tile__vf, .tile.is-playing .tile__vf { opacity: 1; transform: scale(1); }
.tile:hover .tile__hud, .tile.is-playing .tile__hud { opacity: 1; }
@keyframes rec { 50% { opacity: 0; } }

/* ==========================================================================
   Home — hero
   ========================================================================== */

.hero {
    position: relative;
    height: 100svh;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--gutter);
    overflow: hidden;
}
.hero__video { position: absolute; inset: 0; z-index: -2; }
.hero__video video { width: 100%; height: 100%; object-fit: cover; }
/* Lens vignette only: the title relies on the picture showing through */
.hero::before {
    content: '';
    position: absolute; inset: 0; z-index: -1;
    background: radial-gradient(130% 100% at 50% 45%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.55) 100%);
}

/* Camera viewfinder over the reel */
.viewfinder {
    position: absolute;
    inset: calc(var(--nav-h) + 4px) var(--gutter) var(--gutter);
    pointer-events: none;
    color: #fff;
    mix-blend-mode: difference;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.viewfinder > i { position: absolute; width: clamp(18px, 2.4vw, 34px); height: clamp(18px, 2.4vw, 34px); border: 0 solid currentColor; }
.viewfinder .tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.viewfinder .tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.viewfinder .bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.viewfinder .br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.viewfinder .cross { top: 50%; left: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 0; }
.viewfinder .cross::before, .viewfinder .cross::after { content: ''; position: absolute; background: currentColor; }
.viewfinder .cross::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.viewfinder .cross::after { top: 50%; left: 0; right: 0; height: 1px; }
.vf-rec, .vf-meta { position: absolute; top: clamp(12px, 1.4vw, 20px); display: flex; align-items: center; gap: 10px; }
.vf-rec { left: clamp(28px, 3vw, 48px); }
.vf-meta { right: clamp(28px, 3vw, 48px); gap: clamp(12px, 1.6vw, 24px); }
.vf-rec b { width: 7px; height: 7px; border-radius: 50%; background: #00c8f0; animation: rec 1s steps(1) infinite; }
@media (max-width: 700px) { .vf-meta span:not(:last-child) { display: none; } }

.hero__inner { position: relative; mix-blend-mode: difference; color: #fff; padding: 0 clamp(8px, 1.2vw, 18px) clamp(6px, 1vw, 14px); }
.hero__row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: clamp(14px, 2vw, 28px);
}
.hero__lead { font-family: var(--font-serif); font-style: italic; font-size: clamp(20px, 2vw, 30px); line-height: 1.1; max-width: 32ch; }
.hero__title { line-height: 0.8; }
#hero-title {
    display: block;
    padding-top: 0.14em; /* room for accents above the capitals */
    width: fit-content;
    font-size: clamp(3.2rem, 16vw, 22rem);
    white-space: nowrap;
}
.hero__title .char { display: inline-block; }
.hero__scroll { display: flex; align-items: center; gap: 10px; }
.hero__scroll i { display: block; width: 1px; height: 38px; background: currentColor; transform-origin: top; animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

@media (max-width: 700px) {
    .hero__scroll { display: none; }
}

/* ==========================================================================
   Home — sections
   ========================================================================== */

.section { padding-block: clamp(96px, 14vw, 200px); }

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: clamp(28px, 4vw, 56px);
}
.section-head h2 { font-size: clamp(2.6rem, 7vw, 7.5rem); }
.link-arrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase;
    padding-bottom: 4px; border-bottom: 1px solid var(--line);
    transition: border-color 0.4s ease, color 0.4s ease;
    white-space: nowrap;
}
.link-arrow:hover { color: var(--accent); border-color: var(--accent); }

/* Mosaic: 6 columns, 5 tiles, fully interlocked
   rows 1-2: 4x2 + 2x2 | rows 3-4: 3x2 + 3x2 | rows 5-6: 6x2 */
.mosaic {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: clamp(150px, 17vw, 300px);
    grid-auto-flow: dense;
    gap: clamp(8px, 1vw, 16px);
}
.mosaic > :nth-child(1) { grid-column: span 4; grid-row: span 2; }
.mosaic > :nth-child(2) { grid-column: span 2; grid-row: span 2; }
.mosaic > :nth-child(3) { grid-column: span 3; grid-row: span 2; }
.mosaic > :nth-child(4) { grid-column: span 3; grid-row: span 2; }
.mosaic > :nth-child(5) { grid-column: span 6; grid-row: span 2; }

@media (max-width: 760px) {
    .mosaic { grid-template-columns: 1fr; grid-auto-rows: auto; }
    .mosaic > * { grid-column: auto !important; grid-row: auto !important; aspect-ratio: 4 / 3; }
    .mosaic > :nth-child(2) { aspect-ratio: 4 / 5; }
}

/* Marquee */
.marquee {
    overflow: hidden;
    border-block: 1px solid var(--line);
    padding-block: clamp(18px, 2.4vw, 34px);
}
.marquee__track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track a {
    display: flex; align-items: center;
    font-family: var(--font-display);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    font-size: clamp(2.4rem, 6vw, 6rem);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(241, 235, 227, 0.5);
    transition: color 0.4s ease, -webkit-text-stroke-color 0.4s ease;
    padding-right: clamp(24px, 3vw, 48px);
}
.marquee__track a::after {
    content: '';
    width: 0.32em; height: 0.32em; border-radius: 50%;
    background: var(--accent);
    margin-left: clamp(24px, 3vw, 48px);
}
.marquee__track a:hover { color: var(--fg); -webkit-text-stroke-color: var(--fg); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* About */
.about {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(32px, 6vw, 120px);
    align-items: start;
}
.about__portrait { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--bg-2); }
.about__portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: grayscale(1) contrast(1.05); }
.about__portrait figcaption { position: absolute; left: 16px; bottom: 14px; }
.about__heading { font-size: clamp(2.2rem, 4.2vw, 4.6rem); line-height: 0.95; margin-bottom: clamp(28px, 4vw, 56px); }
.pill {
    display: inline-block;
    width: 1.9em; height: 0.78em;
    border-radius: 999px;
    overflow: hidden;
    vertical-align: 0.02em;
    margin-inline: 0.12em;
    position: relative;
}
.pill video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.about__text { font-size: clamp(1.25rem, 2vw, 1.9rem); line-height: 1.32; font-weight: 400; letter-spacing: -0.01em; max-width: 34ch; }
.about__facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: clamp(40px, 5vw, 72px);
    padding-top: 24px;
    border-top: 1px solid var(--line);
}
.about__facts dt { margin-bottom: 8px; }
.about__facts dd { font-size: 15px; font-weight: 500; }

@media (max-width: 860px) {
    .about { grid-template-columns: 1fr; }
    .about__portrait { max-width: 460px; }
    .about__facts { grid-template-columns: 1fr 1fr; }
}

/* Category slices (horizontal accordion) */
.slices { display: flex; gap: clamp(8px, 1vw, 16px); height: clamp(420px, 62vh, 720px); }
.slice {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    background: var(--bg-2);
    transition: flex-grow 0.9s var(--ease);
}
.slices:hover .slice { flex-grow: 0.7; }
.slices .slice:hover { flex-grow: 2.4; }
.slice video, .slice img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(1) brightness(0.45);
    transition: filter 0.9s ease, transform 1.2s var(--ease);
}
.slice:hover video, .slice:hover img { filter: grayscale(0) brightness(0.75); transform: scale(1.04); }
.slice__label {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: clamp(16px, 2vw, 28px);
    display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
}
.slice__label h3 { font-size: clamp(1.6rem, 2.8vw, 3.2rem); white-space: nowrap; }
.slice__label sup { font-family: var(--font-body); font-size: 0.32em; font-weight: 500; vertical-align: top; margin-left: 6px; color: var(--accent); }

@media (max-width: 760px) {
    .slices { flex-direction: column; height: auto; }
    .slice { flex: none; height: 38vh; }
    .slices:hover .slice, .slices .slice:hover { flex-grow: 0; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer { padding: clamp(96px, 14vw, 200px) var(--gutter) var(--gutter); border-top: 1px solid var(--line); }
.footer__cta { display: block; margin-bottom: clamp(48px, 8vw, 120px); }
.footer__cta .display { font-size: clamp(3rem, 10vw, 11rem); display: block; }
.footer__cta .display em { font-style: normal; color: var(--accent); }
.footer__mail {
    display: inline-flex; align-items: center; gap: 14px;
    margin-top: 28px;
    padding: 18px 28px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 700;
    font-size: clamp(15px, 1.4vw, 19px);
    transition: background 0.4s ease, color 0.4s ease;
}
.footer__mail:hover { background: var(--fg); color: var(--bg); }
.footer__bottom {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px 32px;
    padding-top: 24px; border-top: 1px solid var(--line);
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);
}
.footer__fin { font-family: var(--font-serif); font-style: italic; font-size: 28px; text-transform: none; letter-spacing: 0; color: var(--fg); margin-right: 16px; }
.footer__bottom nav { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.footer__bottom a:hover { color: var(--fg); }

/* ==========================================================================
   Page header (category, festival, contact)
   ========================================================================== */

.page-head { padding: calc(var(--nav-h) + clamp(60px, 10vw, 150px)) var(--gutter) clamp(32px, 4vw, 56px); }
.page-head__title { font-size: clamp(3.4rem, 14vw, 16rem); white-space: nowrap; }
.page-head__title sup { font-family: var(--font-body); font-weight: 500; font-size: 0.14em; letter-spacing: 0; vertical-align: top; margin-left: 0.2em; color: var(--accent); }
.page-head__bar {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    margin-top: clamp(24px, 3vw, 40px); padding-top: 18px; border-top: 1px solid var(--line);
}
.page-head__bar p { color: var(--muted); max-width: 52ch; }

.toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 4px; flex-shrink: 0; }
.toggle button {
    padding: 8px 18px; border-radius: 999px;
    font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);
    transition: background 0.4s ease, color 0.4s ease;
}
.toggle button[aria-pressed='true'] { background: var(--fg); color: var(--bg); }

@media (max-width: 700px) {
    .page-head__title { white-space: normal; font-size: clamp(3rem, 17vw, 6rem); }
    .page-head__bar p { display: none; }
}

/* Category grid: cinematic rectangles, alternating wide / half */
.works { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(8px, 1vw, 16px); padding-bottom: clamp(96px, 12vw, 180px); }
.works .tile { aspect-ratio: 16 / 9; }
.works .tile--xl { grid-column: 1 / -1; aspect-ratio: 2.35 / 1; }
@media (max-width: 760px) {
    .works { grid-template-columns: 1fr; }
    .works .tile, .works .tile--xl { aspect-ratio: 16 / 10; }
}

/* Category list view */
.list { list-style: none; border-top: 1px solid var(--line); padding-bottom: clamp(96px, 12vw, 180px); }
.list a {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 2fr) auto;
    align-items: center;
    gap: 24px;
    padding-block: clamp(18px, 2.2vw, 30px);
    border-bottom: 1px solid var(--line);
    transition: color 0.4s ease, padding 0.6s var(--ease);
}
.list a:hover { color: var(--accent); padding-left: 16px; }
.list__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.8rem, 4.4vw, 4.4rem); line-height: 0.95; text-transform: uppercase; letter-spacing: -0.03em; }
.list__col { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.list__arrow { font-size: 22px; transition: transform 0.6s var(--ease); }
.list a:hover .list__arrow { transform: translateX(6px) rotate(-45deg); }
@media (max-width: 760px) {
    .list a { grid-template-columns: 1fr auto; }
    .list__col { display: none; }
}

.floating-preview {
    position: fixed; top: 0; left: 0; z-index: 30;
    width: clamp(260px, 26vw, 420px);
    aspect-ratio: 16 / 10;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.8);
    background: var(--bg-2);
}
.floating-preview video { width: 100%; height: 100%; object-fit: cover; }
@media (hover: none) { .floating-preview { display: none; } }

[hidden] { display: none !important; }

/* ==========================================================================
   Project page
   ========================================================================== */

.project { padding: calc(var(--nav-h) + clamp(28px, 4vw, 56px)) var(--gutter) 0; }
.project__back { display: inline-flex; gap: 10px; margin-bottom: clamp(20px, 3vw, 36px); }
.project__title { font-size: clamp(3rem, 9vw, 10rem); margin-bottom: clamp(28px, 4vw, 56px); }

.project__layout {
    display: grid;
    grid-template-columns: minmax(0, 8.5fr) minmax(0, 3.5fr);
    gap: clamp(24px, 3.4vw, 64px);
    align-items: start;
}

.player { position: relative; background: #000; overflow: hidden; }
.player video { width: 100%; height: 100%; max-height: 82vh; object-fit: contain; background: #000; }
.player--portrait { max-width: 460px; }
.player__sound {
    position: absolute; left: 16px; top: 16px; z-index: 2;
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 18px; border-radius: 999px;
    background: var(--accent); color: var(--accent-ink);
    font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase;
    transition: opacity 0.4s ease, transform 0.4s var(--ease);
}
.player__sound:hover { transform: scale(1.05); }
.player__sound i { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.player__sound i b { width: 2px; background: currentColor; animation: eq 0.9s ease-in-out infinite alternate; }
.player__sound i b:nth-child(2) { animation-delay: 0.2s; }
.player__sound i b:nth-child(3) { animation-delay: 0.4s; }
@keyframes eq { from { height: 3px; } to { height: 12px; } }

.info { position: sticky; top: calc(var(--nav-h) + 12px); }
.info__desc { font-size: clamp(1.05rem, 1.3vw, 1.25rem); line-height: 1.5; font-weight: 500; margin-bottom: 32px; }
.info dl { display: grid; grid-template-columns: auto 1fr; gap: 12px 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.info dt { padding-top: 2px; }
.info dd { font-size: 15px; font-weight: 500; }
.info__credits { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.info__credits ul { list-style: none; margin-top: 14px; display: grid; gap: 8px; }
.info__credits li { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.info__credits li span:first-child { color: var(--muted); }

@media (max-width: 960px) {
    .project__layout { grid-template-columns: 1fr; }
    .info { position: static; }
}

/* Stills: 3-col, first still 2x2 -> rows interlock (2x2 + 1 + 1, then 3 x 1) */
.stills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-flow: dense;
    gap: clamp(8px, 1vw, 16px);
    margin-top: clamp(64px, 9vw, 140px);
}
.stills figure { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--bg-2); }
/* Contact-sheet annotation: frame number and source timecode */
.stills figcaption {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
    display: flex; justify-content: space-between; gap: 8px;
    padding: 10px 12px;
    font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em; color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}
.stills figcaption span:first-child { color: var(--accent); }
.stills figure:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.stills img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.stills figure:hover img { transform: scale(1.05); }
.stills--portrait { grid-template-columns: repeat(6, 1fr); }
.stills--portrait figure { aspect-ratio: 9 / 16; }
.stills--portrait figure:first-child { grid-column: auto; grid-row: auto; aspect-ratio: 9 / 16; }
@media (max-width: 760px) {
    .stills { grid-template-columns: 1fr 1fr; }
    .stills figure:first-child { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 9; }
    .stills--portrait { grid-template-columns: repeat(3, 1fr); }
    .stills--portrait figure:first-child { grid-column: auto; aspect-ratio: 9 / 16; }
}

.next { display: block; position: relative; margin-top: clamp(96px, 12vw, 180px); height: clamp(340px, 60vh, 640px); overflow: hidden; }
.next .tile__media img { filter: grayscale(1) brightness(0.4); }
.next:hover .tile__media img { filter: grayscale(0) brightness(0.6); }
.next__label { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 18px; padding: var(--gutter); }
.next__label .display { font-size: clamp(2.8rem, 9vw, 9rem); }

/* ==========================================================================
   Festival
   ========================================================================== */

.fest { list-style: none; border-top: 1px solid var(--line); }
.fest li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 5fr) minmax(0, 3fr) minmax(0, 3fr);
    gap: 24px;
    align-items: baseline;
    padding-block: clamp(18px, 2vw, 28px);
    border-bottom: 1px solid var(--line);
}
.fest__name { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 3.4vw, 3.4rem); line-height: 0.95; text-transform: uppercase; letter-spacing: -0.02em; }
.fest__award { color: var(--accent); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.fest__film a:hover { color: var(--accent); }
@media (max-width: 760px) { .fest li { grid-template-columns: 1fr; gap: 6px; } }

.empty {
    display: grid;
    place-items: center;
    text-align: center;
    padding-block: clamp(80px, 12vw, 180px);
    border-block: 1px solid var(--line);
}
.empty .display { font-size: clamp(2.2rem, 6vw, 6rem); max-width: 16ch; }
.empty p { margin-top: 20px; color: var(--muted); }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact {
    position: relative;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    padding: calc(var(--nav-h) + 24px) var(--gutter) var(--gutter);
    overflow: hidden;
    isolation: isolate;
}
.contact__bg { position: absolute; inset: 0; z-index: -1; }
.contact__bg video { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1) brightness(0.26); }
/* Warm wash from the bottom-left so the page reads apart from the neutral project pages */
.contact__bg::after {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(120% 80% at 0% 100%, rgba(255, 77, 26, 0.22), transparent 60%),
        linear-gradient(to bottom, rgba(12, 11, 10, 0.6), transparent 30%, transparent 55%, var(--bg));
}
.contact__body { margin-top: auto; padding-top: clamp(48px, 10vh, 120px); }
.contact__title { font-size: clamp(3rem, 10vw, 11rem); }
.contact__mailwrap { margin-top: clamp(4px, 1vw, 14px); }
.contact__mail {
    display: block;
    width: fit-content;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: -0.04em;
    font-size: clamp(2.2rem, 7.6vw, 9rem);
    color: var(--accent);
    transition: color 0.4s ease;
}
.contact__mail:hover { color: var(--fg); }
.contact__copy {
    margin-top: clamp(16px, 2vw, 28px);
    padding: 12px 20px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
.contact__copy:hover { border-color: var(--fg); }
.contact__copy.is-done { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.contact__rows { list-style: none; margin-top: clamp(40px, 6vw, 88px); border-bottom: 1px solid var(--line); }
.contact__rows li { border-top: 1px solid var(--line); }
.contact__row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(120px, 22%) 1fr auto;
    align-items: baseline;
    gap: 16px;
    padding: clamp(14px, 1.6vw, 22px) 0;
    isolation: isolate;
    transition: color 0.5s var(--ease), padding 0.6s var(--ease);
}
.contact__val { font-size: clamp(18px, 2vw, 28px); font-weight: 500; letter-spacing: -0.01em; }
.contact__clock { margin-left: 12px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--muted); font-variant-numeric: tabular-nums; }
.contact__arrow { font-size: clamp(18px, 2vw, 28px); transition: transform 0.6s var(--ease); }
a.contact__row::before {
    content: '';
    position: absolute;
    inset: 0 calc(var(--gutter) * -1);
    z-index: -1;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.6s var(--ease);
}
a.contact__row:hover { color: var(--accent-ink); padding-inline: 16px; }
a.contact__row:hover::before { transform: scaleY(1); }
a.contact__row:hover .eyebrow { color: inherit; }
a.contact__row:hover .contact__arrow { transform: rotate(45deg); }
@media (max-width: 560px) {
    .contact__row { grid-template-columns: 1fr auto; row-gap: 6px; }
    .contact__row .eyebrow { grid-column: 1 / -1; }
}

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

body.menu-open .nav { color: var(--accent-ink); }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* Home: the hero stays pinned (sticky) and the page body slides over it */
.hero { position: sticky; top: 0; z-index: 0; }
.page-body {
    position: relative;
    z-index: 1;
    background: var(--bg);
    box-shadow: 0 -40px 80px rgba(0, 0, 0, 0.45);
}
.project__layout--portrait { grid-template-columns: minmax(0, 460px) minmax(0, 1fr); }
.project__layout--portrait .info { max-width: 520px; }
@media (max-width: 960px) { .project__layout--portrait { grid-template-columns: 1fr; } }
