/* =============================================================
   LUMAVISION — film-page.css
   Shared styles for all film pages (claire-matthew, lakota-mark,
   ryan-lilly, spencer-ellise). Only page-specific padding tweaks
   and head meta live inline on each page.
   ============================================================= */

/* ── Design tokens ─────────────────────────────────────────── */
:root {
    --font-body: "calluna", serif;
    --font-headings: "itc-avant-garde-gothic-pro", sans-serif;
    --font-ui: "Montserrat", sans-serif;

    --bg-dark: #1e1f20;
    --bg-light: #f5f5f0;
    --text-light-primary: #e8e8e8;
    --text-light-secondary: #b8b8b8;
    --text-dark-primary: #2a2a2a;
    --text-dark-secondary: #4a4a4a;
    --border-medium: rgba(0, 0, 0, 0.15);

    --nav-shadow-opacity: 0;
    --nav-shadow-height: 180px;
    --hero-overlay-opacity: 0.52;
    --star-spacing: 4.5rem;
}

/* ── Reset ──────────────────────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overscroll-behavior-y: none;
}

body {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.8;
    letter-spacing: 0.2px;
    color: var(--text-dark-secondary);
    overflow-x: hidden;
    overscroll-behavior-y: none;
    background: transparent;
}

/* ── Fixed hero background ──────────────────────────────────── */
.film-hero-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: var(--bg-dark);
}

.film-hero-bg img {
    width: 100%;
    height: calc(100% + 300px);
    margin-top: -300px;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.film-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, var(--hero-overlay-opacity));
}

/* ── Nav ────────────────────────────────────────────────────── */
nav {
    position: relative;
    z-index: 200;
    width: 100%;
    padding: 1.5rem 5%;
    pointer-events: none;
}

nav a,
nav .logo {
    pointer-events: auto;
}

nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-shadow-height);
    z-index: -1;
    -webkit-mask-image: linear-gradient(to bottom,
            black 0%, black 15%,
            rgba(0,0,0,0.85) 30%, rgba(0,0,0,0.55) 50%,
            rgba(0,0,0,0.20) 70%, rgba(0,0,0,0.04) 88%,
            transparent 100%);
    mask-image: linear-gradient(to bottom,
            black 0%, black 15%,
            rgba(0,0,0,0.85) 30%, rgba(0,0,0,0.55) 50%,
            rgba(0,0,0,0.20) 70%, rgba(0,0,0,0.04) 88%,
            transparent 100%);
}

nav::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-shadow-height);
    z-index: -1;
    opacity: var(--nav-shadow-opacity);
    background: linear-gradient(in oklab to bottom,
            oklch(0% 0 0 / 1) 0%,
            oklch(0% 0 0 / 0.95) 12%,
            oklch(0% 0 0 / 0.80) 25%,
            oklch(0% 0 0 / 0.55) 42%,
            oklch(0% 0 0 / 0.28) 60%,
            oklch(0% 0 0 / 0.08) 78%,
            oklch(0% 0 0 / 0.01) 92%,
            oklch(0% 0 0 / 0) 100%);
}

nav .container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    position: absolute;
    left: 5%;
    top: 50%;
    transform: translateY(-50%);
}

.logo img {
    height: 20px;
    width: auto;
    display: block;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 4.5rem;
    align-items: center;
    margin: 0;
}

nav a {
    text-decoration: none;
    color: #ffffff;
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-family: var(--font-headings);
    font-weight: 500;
    opacity: 0.9;
    -webkit-font-smoothing: antialiased;
}

nav a:hover {
    opacity: 1;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* ── Page wrapper ───────────────────────────────────────────── */
.film-page {
    position: relative;
    z-index: 15;
    width: 100%;
    padding: 0 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.film-inner {
    width: 100%;
    max-width: 720px;
}

/* ── Title block ────────────────────────────────────────────── */
.film-header {
    text-align: center;
    padding: 5.5rem 0 3.5rem 0;
    width: 100%;
}

.film-meta,
.film-subtitle {
    font-family: var(--font-body);
    font-weight: 400;
    letter-spacing: 7.5px;
    font-size: clamp(0.45rem, 0.68vw, 0.68rem);
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    opacity: 0.85;
}

.film-meta > span,
.film-subtitle > span {
    margin: 0 1.2rem;
    text-align: center;
    white-space: nowrap;
}

.film-meta::before,
.film-meta::after,
.film-subtitle::before,
.film-subtitle::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ffffff;
    opacity: 0;
}

/* Location br hidden on desktop */
.meta-break {
    display: none;
}

.film-meta::before {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 40%);
    mask-image: linear-gradient(to right, transparent 0%, black 40%);
}

.film-meta::after {
    -webkit-mask-image: linear-gradient(to left, transparent 0%, black 40%);
    mask-image: linear-gradient(to left, transparent 0%, black 40%);
}

.film-subtitle::before {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 40%);
    mask-image: linear-gradient(to right, transparent 0%, black 40%);
}

.film-subtitle::after {
    -webkit-mask-image: linear-gradient(to left, transparent 0%, black 40%);
    mask-image: linear-gradient(to left, transparent 0%, black 40%);
}

.film-meta {
    margin-top: 1.8rem;
}

.film-subtitle {
    margin-bottom: 1.8rem;
}

.film-title {
    font-family: var(--font-headings);
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-light-primary);
    line-height: 1.1;
}

/* ── Video wrapper ──────────────────────────────────────────── */
.film-video-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    border: none;
    position: relative;
    z-index: 20;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
}

/* ── White body section (review) ────────────────────────────── */
.film-body-section {
    position: relative;
    z-index: 10;
    width: 100%;
    background: var(--bg-light);
    padding: var(--star-spacing) 5% 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── Grain wrapper & dark section (reaction + note) ─────────── */
.grain-wrapper {
    position: relative;
    background: var(--bg-dark);
    overflow: hidden;
    width: 100%;
}

.grain-wrapper-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    z-index: 0;
}

.film-dark-section {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 6rem 5% 8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── Lower white section (gallery + footer) ─────────────────── */
.film-lower-section {
    position: relative;
    z-index: 10;
    width: 100%;
    background: var(--bg-light);
    padding: 2rem 5% 8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── Section labels ─────────────────────────────────────────── */
.section-label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.82rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-dark-secondary);
    opacity: 0.5;
    margin-bottom: 1.4rem;
}

.dark-label {
    color: var(--text-light-secondary);
    opacity: 1;
}

/* ── Film note ──────────────────────────────────────────────── */
.film-note {
    margin-bottom: 5rem;
}

.film-note p {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--text-dark-secondary);
    text-align: justify;
    text-align-last: left;
}

.dark-note p {
    color: var(--text-light-secondary);
}

.film-note p::first-letter {
    float: left;
    font-size: 3.8rem;
    line-height: 0.8;
    padding-right: 6px;
    padding-top: 4px;
    color: var(--text-dark-primary);
    font-weight: 600;
}

.dark-note p::first-letter {
    color: var(--text-light-primary);
}

/* ── Photo gallery ──────────────────────────────────────────── */
.film-gallery-wrap {
    margin-bottom: 3rem;
    width: 100%;
}

.film-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 240px 380px 240px;
    gap: 6px;
}

.film-gallery-item:nth-child(1) { grid-column: 1;     grid-row: 1; }
.film-gallery-item:nth-child(2) { grid-column: 2 / 4; grid-row: 1; }
.film-gallery-item:nth-child(3) { grid-column: 1 / 4; grid-row: 2; }
.film-gallery-item:nth-child(4) { grid-column: 1 / 3; grid-row: 3; }
.film-gallery-item:nth-child(5) { grid-column: 3;     grid-row: 3; }

.film-gallery-item {
    overflow: hidden;
    background: #d5d5d0;
    position: relative;
}

.film-gallery-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(8%);
}

/* ── Star animation ─────────────────────────────────────────── */
.film-review-stars {
    font-size: 1.5rem;
    letter-spacing: 6px;
    color: var(--text-dark-primary);
    margin-top: 0;
    margin-bottom: var(--star-spacing);
    display: flex;
    justify-content: center;
    gap: 10px;
    overflow: hidden;
}

.film-review-stars .star {
    display: inline-block;
    opacity: 0;
    transform: translateX(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.film-review-stars.stars-visible .star:nth-child(1) { transition-delay: 0s;      opacity: 1; transform: none; }
.film-review-stars.stars-visible .star:nth-child(2) { transition-delay: 0.075s;  opacity: 1; transform: none; }
.film-review-stars.stars-visible .star:nth-child(3) { transition-delay: 0.15s;   opacity: 1; transform: none; }
.film-review-stars.stars-visible .star:nth-child(4) { transition-delay: 0.225s;  opacity: 1; transform: none; }
.film-review-stars.stars-visible .star:nth-child(5) { transition-delay: 0.3s;    opacity: 1; transform: none; }

/* ── Review block ───────────────────────────────────────────── */
.film-review {
    margin-bottom: 0;
}

.film-review-title {
    font-family: var(--font-headings);
    font-weight: 500;
    font-size: 0.78rem;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: var(--text-dark-primary);
    margin-bottom: 2.2rem;
    line-height: 1.6;
    text-align: center;
}

.film-review p:not(.film-review-title):not(.film-review-author) {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--text-dark-secondary);
    text-align: justify;
    text-align-last: left;
    margin-bottom: 1em;
}

.film-review p:last-child {
    margin-bottom: 0;
}

.film-review-author {
    font-family: var(--font-headings);
    font-style: normal;
    font-weight: 500;
    font-size: 0.78rem;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: var(--text-dark-primary);
    margin-top: 1.4rem !important;
    text-align: right;
}

/* ── Expandable review (pages with long reviews) ────────────── */
.film-review-more {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.45s ease-out;
}

.film-review-more > div {
    overflow: hidden;
}

.film-review-more.is-open {
    grid-template-rows: 1fr;
}

.film-review-more p:first-child {
    margin-top: 0;
}

.film-review-toggle {
    display: inline-block;
    margin-left: 6px;
    font-family: var(--font-headings);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-dark-secondary);
    background: none;
    border: none;
    border-bottom: 1px solid currentColor;
    cursor: pointer;
    padding: 0 0 1px 0;
    opacity: 0.55;
    transition: opacity 0.2s ease;
    transform: translateY(-1px);
}

.film-review-toggle:hover {
    opacity: 1;
}

/* ── Reaction video ─────────────────────────────────────────── */
.film-reaction-wrap {
    margin-bottom: 4.5rem;
    width: 100%;
}

/* ── Back / next links ──────────────────────────────────────── */
.film-back {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-medium);
    width: 100%;
}

.film-back a {
    font-family: var(--font-headings);
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-dark-primary);
    text-decoration: none;
    padding-bottom: 3px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.film-back a:hover {
    border-color: var(--text-dark-primary);
}

/* ── YouTube facade player ──────────────────────────────────── */
.film-video-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
    position: relative;
    cursor: pointer;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
}

.film-video-wrapper iframe {
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    display: block;
    border: none;
    position: absolute;
    top: -2px;
    left: -2px;
}

.film-video-facade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.film-video-facade img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(1);
    transition: filter 0.3s ease;
}

.film-video-facade:hover img {
    filter: brightness(0.72);
}

.film-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 1.5px solid rgba(255, 255, 255, 0.65);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.film-video-facade:hover .film-play-btn {
    border-color: #fff;
    transform: translate(-50%, -50%) scale(1.05);
}

.film-play-btn::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 14px;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.85);
    margin-left: 4px;
}

.film-video-facade:hover .film-play-btn::after {
    border-color: transparent transparent transparent #fff;
}

.film-video-wrapper.playing .film-video-facade {
    display: none;
}

/* ── Hamburger toggle ───────────────────────────────────────── */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: auto;
    z-index: 9999 !important;
    padding: 4px;
    -webkit-tap-highlight-color: transparent;
    appearance: none;
    -webkit-appearance: none;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background-color: #ffffff;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
    border-radius: 1px;
}

/* gap=5px, span height=1.5px → center offset = 5.75px */
.nav-toggle.open span:nth-child(1) { transform: translateY(5.75px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-5.75px) rotate(-45deg); }

/* ── Mobile overlay menu ────────────────────────────────────── */
.mobile-menu {
    display: flex;
    position: fixed;
    inset: 0;
    background-color: rgba(14, 14, 15, 0.98);
    z-index: 100;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    margin: 0;
}

.mobile-menu ul li {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.mobile-menu.open ul li:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: none; }
.mobile-menu.open ul li:nth-child(2) { transition-delay: 0.11s; opacity: 1; transform: none; }
.mobile-menu.open ul li:nth-child(3) { transition-delay: 0.17s; opacity: 1; transform: none; }
.mobile-menu.open ul li:nth-child(4) { transition-delay: 0.23s; opacity: 1; transform: none; }
.mobile-menu.open ul li:nth-child(5) { transition-delay: 0.29s; opacity: 1; transform: none; }
.mobile-menu.open ul li:nth-child(6) { transition-delay: 0.35s; opacity: 1; transform: none; }

.mobile-menu ul a {
    font-family: var(--font-headings);
    font-size: 1.4rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-light-primary);
    text-decoration: none;
    display: block;
    padding: 1.1rem 0;
    text-align: center;
    opacity: 0.85;
    transition: opacity 0.2s ease;
    -webkit-font-smoothing: antialiased;
    touch-action: manipulation;
}

.mobile-menu ul a:active { opacity: 1; }

.mobile-menu ul li + li {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* ── Mobile breakpoint ──────────────────────────────────────── */
@media (max-width: 768px) {

    /* Kill fixed parallax on iOS — causes repaint lag in Safari */
    .film-hero-bg {
        position: absolute;
    }

    .film-hero-bg img {
        height: 100%;
        margin-top: 0;
    }

    nav {
        pointer-events: auto;
    }

    #nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
        min-width: 44px;
        min-height: 44px;
        touch-action: manipulation;
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translate(-50%, -50%);
        min-height: 44px;
        display: flex;
        align-items: center;
        touch-action: manipulation;
    }

    a,
    button {
        touch-action: manipulation;
    }

    .film-header {
        padding: 3rem 0 2.5rem;
    }

    .meta-break {
        display: inline;
    }

    .meta-sep {
        display: none;
    }

    .film-meta span {
        margin: 0;
    }

    .film-meta .meta-date {
        display: block;
    }

    :root {
        --star-spacing-mobile: 2.2rem;
    }

    .film-review-stars {
        margin-top: 0;
        margin-bottom: var(--star-spacing-mobile);
    }

    .film-body-section {
        padding: 0 5% 2rem;
    }

    .film-dark-section {
        padding: 4rem 5% 5rem;
    }

    .film-lower-section {
        padding: 2rem 5% 5rem;
    }

    .film-review p:not(.film-review-title):not(.film-review-author),
    .film-note p {
        text-align: left;
    }

    .film-note p::first-letter {
        font-size: 2.8rem;
    }

    .film-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: 180px 280px 180px;
    }

    .film-gallery-item:nth-child(1) { grid-column: 1;     grid-row: 1; }
    .film-gallery-item:nth-child(2) { grid-column: 2;     grid-row: 1; }
    .film-gallery-item:nth-child(3) { grid-column: 1 / 3; grid-row: 2; }
    .film-gallery-item:nth-child(4) { grid-column: 1;     grid-row: 3; }
    .film-gallery-item:nth-child(5) { grid-column: 2;     grid-row: 3; }

    .film-back {
        flex-wrap: wrap;
        gap: 1rem;
    }
}
