/* ============================================
   LEBANON HANOVER DOCUMENTARY
   Clean, professional one-pager stylesheet
   Black background, light text, minimal design
   ============================================ */

/* --------------------------------------------
   CSS CUSTOM PROPERTIES
   -------------------------------------------- */
:root {
    /* Colors */
    --color-bg: #000000;
    --color-bg-alt: #111111;
    /* The pay what you want block */
    --color-text: #ededed;
    --color-text-muted: #9a9a9a;
    --color-border: #2a2a2a;
    --color-accent: #ffffff;
    --color-error: #ff8a80;

    /* Dark form controls and scrollbars */
    color-scheme: dark;

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    
    /* Navigation height, and the logo in it */
    --nav-height: 60px;
    --nav-logo-height: 44px;
    
    /* The logo on the opening photo: its width and distance above the bottom edge */
    --logo-width: clamp(160px, 24vw, 352px);
    --logo-inset: clamp(1.25rem, 4vw, 3.5rem);
    
    /* Deepest corner of a photo band edge: 5deg across the page */
    --band-corner: calc(100vw * tan(5deg));
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


/* --------------------------------------------
   FONTS
   Self-hosted variable fonts (Fontsource, latin subset),
   so visitors make no requests to Google Fonts
   -------------------------------------------- */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/montserrat-latin-wght-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url('fonts/playfair-display-latin-wght-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Playfair Display';
    font-style: italic;
    font-weight: 400 900;
    font-display: swap;
    src: url('fonts/playfair-display-latin-wght-italic.woff2') format('woff2');
}


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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
}

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

/* Also for elements that set their own display, like .cta-button */
[hidden] {
    display: none !important;
}


/* --------------------------------------------
   LAYOUT
   -------------------------------------------- */
.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}


/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    /* No bottom border: the slanted top of the opening photo is the menu's edge */
    background-color: var(--color-bg);
    height: var(--nav-height);
    /* Links centred; the first column keeps room for the logo */
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

/* Where the logo ends up (initLogoDock in script.js) */
.nav-logo-spot {
    justify-self: start;
    height: var(--nav-logo-height);
    aspect-ratio: 1077 / 568;
    margin-left: var(--space-md);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: 0 var(--space-md);
}

.nav-link {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--color-text);
    padding: 0.5rem 0;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-accent);
    transition: width var(--transition-smooth);
}

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

.nav-link:hover {
    color: var(--color-text);
}

/* Mobile menu toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
}

.nav-toggle-line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-text);
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* Mobile navigation. From 1000px down, the links and the logo don't fit side by side */
@media (max-width: 1000px) {
    .nav {
        display: flex;
        justify-content: flex-start;
        padding: 0 var(--space-md);
    }

    .nav-logo-spot {
        margin-left: 0;
    }
    
    .nav-container {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        padding: var(--space-md);
        gap: var(--space-sm);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform var(--transition-smooth), opacity var(--transition-smooth), visibility var(--transition-smooth);
    }
    
    .nav-container.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.is-open .nav-toggle-line:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }
    
    .nav-toggle.is-open .nav-toggle-line:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.is-open .nav-toggle-line:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -4px);
    }
}


/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: var(--space-xl) 0;
}

.section-hero {
    padding-top: var(--space-xl);
    text-align: center;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-lg);
}


/* ============================================
   PHOTO BANDS
   Full-width photos between sections. The top and
   bottom edges are tilted by --top and --bottom
   (-5deg to 5deg; positive rises to the right).
   --focus is the object-position for narrow screens.
   data-anchor="top" or "bottom" keeps that edge of the photo in view.
   script.js moves the photo for the parallax effect.
   ============================================ */
.photo-band {
    --top: 0deg;
    --bottom: 0deg;
    --focus: 50% 50%;
    /* Height difference between the left and right end of each edge */
    --top-rise: calc(100vw * tan(var(--top)));
    --bottom-rise: calc(100vw * tan(var(--bottom)));
    
    position: relative;
    z-index: 1;
    height: clamp(280px, 65svh, 760px);
    overflow: hidden;
    clip-path: polygon(
        0 max(0px, var(--top-rise)),
        100% max(0px, -1 * var(--top-rise)),
        100% calc(100% - max(0px, var(--bottom-rise))),
        0 calc(100% - max(0px, -1 * var(--bottom-rise)))
    );
}

/* Taller than the band: 15% room on each side for the
   parallax in script.js */
.photo-band > img,
.photo-band > video {
    position: absolute;
    top: -15%;
    left: 0;
    width: 100%;
    height: 130%;
    object-fit: cover;
    object-position: var(--focus);
    will-change: transform;
}

/* All the room is below: script.js only moves the photo up,
   and zooms out towards the top */
.photo-band[data-anchor="top"] > img {
    top: 0;
    transform-origin: 50% 0;
}

/* All the room is above: script.js only moves the photo down,
   and zooms out towards the bottom */
.photo-band[data-anchor="bottom"] > img {
    top: -30%;
    transform-origin: 50% 100%;
}

/* Logo at the bottom left of the opening photo, above its slanted bottom edge
   where that's highest under the logo: the edge starts max(0px, -rise) up at the
   left of the page and climbs tan(--bottom) for every pixel to the right.
   script.js moves it into the menu and leaves .site-logo-spot to mark this place */
.site-logo,
.site-logo-spot {
    --logo-left: clamp(1rem, 4vw, 4rem);
    position: absolute;
    bottom: calc(var(--logo-inset) + max(0px, -1 * var(--bottom-rise))
        + max(var(--logo-left) * tan(var(--bottom)), (var(--logo-left) + var(--logo-width)) * tan(var(--bottom))));
    left: var(--logo-left);
    width: var(--logo-width);
}

/* Empty, so it takes the logo's height from logo-white.png (1077 x 568) */
.site-logo-spot {
    aspect-ratio: 1077 / 568;
}

.site-logo {
    filter: drop-shadow(0 0 24px rgba(0, 0, 0, 0.35));
}

/* In the menu: script.js sets the transform, from the size and place of
   .site-logo-spot at the top of the page to .nav-logo-spot once scrolled */
.site-logo.is-docking {
    position: fixed;
    top: 0;
    bottom: auto;
    left: 0;
    transform-origin: 0 0;
}

.site-logo a {
    display: block;
}

.site-logo img {
    display: block;
    width: 100%;
    height: auto;
}

/* Taller bands on desktop */
@media (min-width: 901px) {
    .photo-band {
        height: clamp(320px, 80svh, 900px);
    }
}

/* Press quote on a photo band between the sections: centred on the photo,
   over a soft dark patch that keeps it readable on the lighter photos */
.photo-band > .quote {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    padding: var(--space-md);
    background: radial-gradient(ellipse 60% 40% at 50% 50%, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
    text-align: center;
    text-shadow: 0 1px 16px rgba(0, 0, 0, 0.5);
}

/* Press quotes on the opening photo: centred in the part below the logo.
   They share one grid cell, so the longest sets the height; script.js
   crossfades from one to the next */
.quotes {
    position: absolute;
    /* Below the logo: its top, plus its height (logo-white.png is 1077 x 568) */
    top: calc(var(--logo-inset) + max(0px, var(--top-rise)) + var(--logo-width) * 568 / 1077 + var(--space-sm));
    bottom: calc(var(--space-sm) + max(0px, var(--bottom-rise)));
    left: 0;
    right: 0;
    display: grid;
    place-items: center;
    /* Same side margins as the logo */
    padding: 0 clamp(1rem, 4vw, 4rem);
    text-align: center;
    text-shadow: 0 1px 16px rgba(0, 0, 0, 0.5);
}

/* Switched off while the quotes are on the photo bands further down
   (.photo-band > .quote): delete this rule to show them here again */
.quotes {
    display: none;
}

.quotes > .quote {
    grid-area: 1 / 1;
    opacity: 0;
    /* Hidden ones let the mouse through to the one that shows */
    pointer-events: none;
    transition: opacity 1.2s ease;
}

.quotes > .quote.is-active {
    opacity: 1;
    pointer-events: auto;
}

.quote blockquote {
    max-width: 46rem;
    margin: 0 auto;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(1.05rem, 2.2vw, 1.45rem);
    line-height: 1.5;
    text-wrap: balance;
}

/* Lighter than --color-text-muted, which gets lost on a photo */
.quote figcaption {
    margin-top: var(--space-xs);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text);
    opacity: 0.8;
}

.quote figcaption::before {
    content: '– ';
}

/* Landscape phones: no room below the logo, so beside it, level with its top */
@media (max-height: 500px) {
    .quotes {
        top: calc(var(--logo-inset) + max(0px, var(--top-rise)));
        bottom: auto;
        left: auto;
        right: clamp(1rem, 4vw, 4rem);
        width: min(30rem, 50vw);
        padding: 0;
        place-items: start;
        text-align: left;
    }

    .quotes blockquote {
        font-size: 1rem;
        line-height: 1.45;
    }
}


/* Fade in when scrolled into view (initReveal in script.js) */
.reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}


/* ============================================
   SECTION BACKGROUNDS
   A faint photo behind the text (data-bg on the
   section) that drifts round in an oval. Next to a
   photo band it runs on under the band, so its
   slanted corners show it too.
   Off unless <body> has class="has-backgrounds".
   ============================================ */
.section[data-bg] {
    /* How far the photo drifts from the middle: sideways, up and down */
    --drift-x: 4vw;
    --drift-y: 3vw;
    position: relative;
    isolation: isolate;
    /* The drifting photo is wider than the section */
    overflow-x: clip;
}

.has-backgrounds .section[data-bg]::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Bigger than the section by the drift, so it never uncovers it */
    margin: calc(-1 * var(--drift-y)) calc(-1 * var(--drift-x));
    z-index: -1;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    pointer-events: none;
    /* Sideways and up/down a quarter turn apart make an oval.
       The easing follows a sine, which keeps the oval round */
    animation:
        drift-x var(--drift-time) cubic-bezier(0.37, 0, 0.63, 1) infinite alternate,
        drift-y var(--drift-time) cubic-bezier(0.37, 0, 0.63, 1) calc(var(--drift-time) / -2) infinite var(--drift-turn, alternate);
}

/* As deep as a band corner can get (5deg across the page) */
.photo-band + .section[data-bg]::before {
    top: calc(-1 * var(--band-corner));
}

.section[data-bg]:has(+ .photo-band)::before {
    bottom: calc(-1 * var(--band-corner));
}

.section[data-bg="1"]::before {
    --drift-time: 10s;
    background-image: url('images/background1.jpg');
    opacity: 0.25;
}

/* Has a brighter light, so a little fainter. Goes round slower and
   the other way, so neighbouring sections never move in step */
.section[data-bg="2"]::before {
    --drift-time: 13s;
    --drift-turn: alternate-reverse;
    background-image: url('images/background2.jpg');
    opacity: 0.2;
}

@keyframes drift-x {
    from {
        translate: calc(-1 * var(--drift-x)) 0;
    }
    to {
        translate: var(--drift-x) 0;
    }
}

/* On transform, not translate, so it adds up with drift-x */
@keyframes drift-y {
    from {
        transform: translateY(calc(-1 * var(--drift-y)));
    }
    to {
        transform: translateY(var(--drift-y));
    }
}


/* ============================================
   HERO / TRAILER SECTION
   ============================================ */


/* Festival laurels: first thing under the opening photo.
   Every logo gets the same area (--laurel-size squared), so wide and tall
   logos look equally big. --ratio (width / height) is set per logo in index.html */
.laurels {
    --laurel-size: 67.5px;
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(1rem, 3vw, 2.5rem);
    margin-bottom: var(--space-lg);
}

/* One row: when it doesn't fit, flex-shrink (weighted by width) shrinks
   every logo by the same factor, so their areas stay equal */
.laurels li {
    width: calc(var(--laurel-size) * sqrt(var(--ratio)));
    min-width: 0;
}

.laurel {
    display: block;
    width: 100%;
    height: auto;
}

/* Video sections: the form right under the trailer */
.video-section {
    margin-bottom: var(--space-md);
}

.video-section:last-child {
    margin-bottom: 0;
}

.video-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

/* Responsive video embed container */
.embed-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background-color: var(--color-bg-alt);
}

.embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Trailer poster with a play button (see initVideoPosters in script.js) */
.video-poster {
    position: absolute;
    inset: 0;
    display: block;
    background-color: #000;
}

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

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 76px;
    height: 76px;
    transform: translate(-50%, -50%);
    border: 2px solid #ffffff;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.35);
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

/* Triangle, nudged right to look centred */
.play-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 13px 0 13px 22px;
    border-color: transparent transparent transparent #ffffff;
    transition: border-color var(--transition-fast);
}

.video-poster:hover .play-icon {
    background-color: #ffffff;
    transform: translate(-50%, -50%) scale(1.05);
}

.video-poster:hover .play-icon::after {
    border-left-color: #000000;
}

/* ============================================
   WATCH THE FULL FILM
   Right under the trailer: what the full film is
   and the form to rent it (rendered by app.js)
   ============================================ */
.buy {
    padding: 3.5rem 2.75rem;
    background-color: var(--color-bg);
    text-align: left;
}

/* One column in the middle, the text aligned left */
.buy-body {
    max-width: 34rem;
    margin: 0 auto;
}

.buy-title {
    margin-bottom: 1.1rem;
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.4rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.1;
    text-wrap: balance;
}

.buy-text {
    font-size: 0.95rem;
    line-height: 1.75;
    text-wrap: pretty;
}

.buy-subs {
    margin-top: 1.1rem;
    font-size: 0.85rem;
    line-height: 1.8;
}

.buy-subs-label {
    margin-right: 0.15em;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1rem;
    color: var(--color-text-muted);
}

/* A dot after every language but the last. Lines break
   after a dot, never inside a language */
.buy-subs [lang] {
    white-space: nowrap;
}

.buy-subs [lang]:not(:last-child)::after {
    content: '·';
    margin: 0 0.1em 0 0.45em;
    color: var(--color-text-muted);
}

.buy-price {
    margin-top: var(--space-md);
    padding-top: 1.4rem;
    border-top: 1px solid var(--color-border);
}

.buy-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.buy-amount-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem 1.5rem;
}

/* A big amount on a line. app.js sizes the field to what's in it */
.buy-amount {
    display: flex;
    align-items: baseline;
    padding-bottom: 0.2rem;
    font-family: var(--font-display);
    font-size: 2.75rem;
    line-height: 1;
    border-bottom: 1px solid var(--color-text-muted);
    cursor: text;
    transition: border-color var(--transition-fast);
}

.buy-amount:focus-within {
    border-color: var(--color-accent);
}

.buy-amount input {
    width: 1.25ch;
    margin-left: 0.1em;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    outline: none;
}

/* Quick amounts: plain text, the chosen one underlined */
.buy-quick {
    display: flex;
    gap: 0.9rem;
}

.buy-quick button {
    padding: 0.4rem 0.15rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-text-muted);
    background: none;
    border: none;
    border-bottom: 1px solid transparent;
    cursor: pointer;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.buy-quick button:hover,
.buy-quick button[aria-pressed="true"] {
    color: var(--color-text);
}

.buy-quick button[aria-pressed="true"] {
    border-bottom-color: var(--color-text);
}

.buy-consent {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    max-width: 30rem;
    margin: var(--space-md) 0 1.25rem;
    font-size: 0.85rem;
    line-height: 1.55;
    cursor: pointer;
}

.buy-consent input {
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 0.1rem;
    accent-color: var(--color-accent);
}

/* Names the amount, in sentence case. Stays white on hover */
.buy .cta-button {
    padding: 1rem 1.75rem;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    text-transform: none;
}

.buy .cta-button:hover {
    background-color: var(--color-accent);
    color: var(--color-bg);
}

.buy .cta-button:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

.buy-methods {
    margin-top: 1rem;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--color-text-muted);
}

.buy-fine {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.buy .pwyw-message {
    margin-left: 0;
    margin-right: 0;
}

.nowrap {
    white-space: nowrap;
}

/* ============================================
   STATUS BOXES AND FORM TEXT
   On the watch page and the links page
   ============================================ */
.watch-status {
    padding: var(--space-lg) var(--space-md);
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
}

.pwyw-text {
    max-width: 520px;
    margin: 0 auto var(--space-md);
}

.pwyw-text:last-child {
    margin-bottom: 0;
}

.pwyw-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}

.pwyw-hint {
    max-width: 520px;
    margin: 0 auto;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.pwyw-message {
    max-width: 440px;
    margin: var(--space-sm) auto 0;
    padding: 0.75rem var(--space-sm);
    font-size: 0.875rem;
    color: var(--color-error);
    background-color: var(--color-bg);
    border: 1px solid var(--color-error);
}

.pwyw-message:empty {
    display: none;
}

/* Access check, payment pending and errors */
.watch-status.is-loading .pwyw-text:first-child::before {
    content: '';
    display: inline-block;
    width: 0.9em;
    height: 0.9em;
    margin-right: 0.75rem;
    vertical-align: -0.1em;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.watch-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
}


/* ============================================
   WATCH PAGE
   watch.html, after paying or from a shared
   link (rendered by watch.js)
   ============================================ */

/* Footer at the bottom, also when there is little to show */
.watch-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
}

.watch-page {
    flex: 1;
    padding-top: var(--space-lg);
    text-align: center;
}

.watch-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: 0.75rem var(--space-md);
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.watch-header-logo img {
    display: block;
    width: auto;
    height: 48px;
}

.watch-header .back {
    margin-bottom: 0;
}

.watch-hero {
    margin-bottom: var(--space-md);
}

.watch-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: var(--space-sm);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.watch-kicker.is-error {
    color: var(--color-error);
}

.watch-kicker-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--color-text);
}

/* The check of "Rental confirmed" draws itself: first the circle, then the tick.
   pathLength="1" on both makes 1 the length of the whole line */
.watch-check circle,
.watch-check path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1;
    animation: draw-line 0.5s ease-out both;
}

.watch-check path {
    animation-duration: 0.3s;
    animation-delay: 0.4s;
}

@keyframes draw-line {
    from { stroke-dashoffset: 1; }
}

.watch-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: var(--space-sm);
}

.watch-status .watch-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: var(--space-md);
}

.watch-lead {
    max-width: 560px;
    margin: 0 auto;
    color: var(--color-text-muted);
}

/* Paid rentals: the link is only shown here, so it has to be saved */
.watch-save {
    max-width: 640px;
    margin: 0 auto var(--space-md);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.9rem;
    text-align: left;
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-text-muted);
}

.watch-save-title {
    margin-bottom: 0.25rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
}

/* Watch until and payment reference, under the player */
.watch-facts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm) var(--space-lg);
    margin: var(--space-md) 0;
}

.watch-fact dt {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.watch-fact dd {
    display: flex;
    flex-direction: column;
    font-family: var(--font-display);
    font-size: 1.25rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.watch-fact-note {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.watch-tips {
    list-style: none;
    display: grid;
    gap: var(--space-sm);
    max-width: 640px;
    margin: 0 auto;
    padding: var(--space-md);
    font-size: 0.9rem;
    text-align: left;
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
}

.watch-tips strong {
    font-weight: 600;
}

.inline-icon {
    width: 1.2em;
    height: 1.2em;
    vertical-align: -0.25em;
}

.watch-copy {
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: var(--color-text);
    background: none;
    border: none;
    border-bottom: 1px solid currentColor;
    cursor: pointer;
}

.watch-copy:hover {
    color: var(--color-text-muted);
}

.watch-help {
    max-width: 520px;
    margin: var(--space-md) auto 0;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.watch-help a,
.watch-tips a {
    color: var(--color-text);
    border-bottom: 1px solid currentColor;
    overflow-wrap: anywhere;
}


/* ============================================
   CONTENT BLOCKS
   ============================================ */
.content-block {
    max-width: 700px;
}


.body-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.body-text:last-child {
    margin-bottom: 0;
}

/* Film specifications */
.film-specs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs) var(--space-sm);
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: var(--space-md);
}

.spec-divider {
    color: var(--color-border);
}

/* Links row */
.links-row {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.text-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color var(--transition-fast);
}

.text-link:hover {
    color: var(--color-text-muted);
}

.link-arrow {
    transition: transform var(--transition-fast);
}

.text-link:hover .link-arrow {
    transform: translateX(4px);
}

/* SVG icon sprite in index.html: only its symbols are used */
.icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.link-icon {
    width: 1.1em;
    height: 1.1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
}


/* ============================================
   SLIDESHOW
   Isolde's photos in About the Director, between
   the text and the links. Each photo (.slide) has
   its place and year below it; they share one grid
   cell and script.js crossfades from one to the
   next, and adds the dots and arrows. --focus is the
   object-position for a photo that isn't 3:2
   ============================================ */
.slides {
    display: grid;
}

.slide {
    grid-area: 1 / 1;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.slide.is-active {
    opacity: 1;
}

.slide img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    object-position: var(--focus, 50% 50%);
    background-color: var(--color-bg-alt);
}

/* Place and year, and the credit on the line below */
.slideshow figcaption {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
}

.slide figcaption {
    margin-top: var(--space-xs);
}

/* The dots, in the same grid cell. As big as a photo, so they sit
   on its bottom edge and not under the captions. Positioned to stay
   above the photos while they fade */
.slide-dots {
    grid-area: 1 / 1;
    align-self: start;
    position: relative;
    z-index: 1;
    aspect-ratio: 3 / 2;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 0.25rem;
    pointer-events: none;
}

/* A bigger button than the dot, to hit it more easily */
.slide-dot {
    padding: 8px;
    border: 0;
    background: none;
    cursor: pointer;
    pointer-events: auto;
}

.slide-dot::before {
    content: '';
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
    transition: background-color var(--transition-fast);
}

.slide-dot:hover::before {
    background-color: rgba(255, 255, 255, 0.8);
}

.slide-dot[aria-current]::before {
    background-color: var(--color-accent);
}

/* Previous and next, at the left and right halfway up the photo.
   In the same grid cell and as big as a photo, like the dots */
.slide-arrows {
    grid-area: 1 / 1;
    align-self: start;
    position: relative;
    z-index: 1;
    aspect-ratio: 3 / 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.25rem;
    pointer-events: none;
}

.slide-arrow {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.35);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    pointer-events: auto;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.slide-arrow:hover {
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--color-accent);
}

.slide-arrow svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* ============================================
   CTA BUTTONS
   ============================================ */
.cta-wrapper {
    margin-top: var(--space-lg);
    text-align: center;
}

.cta-button {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-bg);
    background-color: var(--color-accent);
    padding: 1rem 2rem;
    border: 2px solid var(--color-accent);
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.cta-button:hover {
    background-color: transparent;
    color: var(--color-accent);
    transform: translateY(-2px);
}

.cta-button:active {
    transform: translateY(0);
}

/* Outline variant */
.cta-button-outline {
    background-color: transparent;
    color: var(--color-accent);
}

.cta-button-outline:hover {
    background-color: var(--color-accent);
    color: var(--color-bg);
}


/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-email {
    display: inline-block;
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 400;
    color: var(--color-text);
    padding-bottom: 2px;
    border-bottom: 1px solid var(--color-border);
    transition: border-color var(--transition-fast);
}

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

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg) var(--space-xl);
    align-items: start;
}


/* ============================================
   FOOTER
   ============================================ */
.footer {
    /* Covers the bottom of the drifting photo in the section above */
    position: relative;
    background-color: var(--color-bg);
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.footer-text {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xs) var(--space-md);
    margin-bottom: var(--space-xs);
}

.footer-link {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--color-text-muted);
}


/* ============================================
   LEGAL PAGES
   privacy.html and terms.html
   ============================================ */
.legal {
    max-width: 700px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
}

.legal h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: var(--space-md);
}

.legal h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin: var(--space-md) 0 var(--space-xs);
}

.legal p,
.legal ul {
    margin-bottom: var(--space-sm);
}

.legal ul {
    padding-left: 1.25rem;
}

.back {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    transition: color var(--transition-fast);
}

.back:hover {
    color: var(--color-text-muted);
}

.placeholder {
    padding: var(--space-sm);
    border: 1px dashed var(--color-border);
    color: var(--color-text-muted);
}

/* links.html: making shared links */
.links-form,
.links-result {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
}

.links-form input,
.links-form select,
.links-url {
    display: block;
    width: 100%;
    padding: 0.75rem var(--space-sm);
    margin-bottom: var(--space-xs);
    font: inherit;
    color: var(--color-text);
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    outline: none;
}

.links-form input:focus,
.links-form select:focus,
.links-url:focus {
    border-color: var(--color-accent);
}

.links-form select {
    margin-bottom: var(--space-md);
}

.legal .links-form .pwyw-hint {
    max-width: none;
    margin-bottom: var(--space-md);
}

.links-form .pwyw-message {
    max-width: none;
    margin: var(--space-sm) 0 0;
}

.links-url {
    font-size: 0.875rem;
}

.links-result h2 {
    margin-top: 0;
}

.links-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin: var(--space-sm) 0;
}

.links-expires {
    color: var(--color-text-muted);
}


/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

/* Mobile */
@media (max-width: 600px) {
    :root {
        --space-lg: 3rem;
        --space-xl: 4rem;
    }

    /* Keeps the longest quote between the logo and the bottom edge */
    .quotes blockquote {
        font-size: 1rem;
        line-height: 1.45;
    }

    .cta-button {
        width: 100%;
        text-align: center;
    }
    
    .links-row {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .buy,
    .watch-status {
        padding: var(--space-md) var(--space-sm);
    }

    .watch-header .back {
        font-size: 0.75rem;
    }

    .watch-tips,
    .watch-save,
    .links-form,
    .links-result {
        padding: var(--space-md) var(--space-sm);
    }
    
    /* Two rows of three */
    .laurels {
        --laurel-size: min(48px, 10.5vw);
        display: grid;
        grid-template-columns: repeat(3, auto);
        justify-content: center;
        justify-items: center;
        gap: var(--space-md) 1.25rem;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .container {
        max-width: 1000px;
    }
}


/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus states */
a:focus-visible,
button:focus-visible,
.cta-button:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* Print styles */
@media print {
    .nav,
    .cta-wrapper,
    .embed-container,
    .photo-band,
    #watch {
        display: none;
    }
    
    .section {
        padding: var(--space-md) 0;
        page-break-inside: avoid;
    }
}
