/* Film Kit front end: hero slider, film cards, film page, trailer lightbox.
   Colours are variables so another client can restyle without touching this file.
   Safari macOS/iOS first: svh with vh fallback, safe-area insets, no background-attachment: fixed, tap targets >= 44px,
   hover effects only on devices that can hover. */
.fk, .fk-dialog, body.fk-dark {
	--fk-bg: #0b0b0c;
	--fk-fg: #f4f1ea;
	--fk-muted: rgba(244, 241, 234, .66);
	--fk-line: rgba(244, 241, 234, .16);
	--fk-accent: #c1121f;
	--fk-accent-hover: #d91a28;
	--fk-radius: 4px;
	--fk-gutter: max(16px, env(safe-area-inset-left));
}
body.fk-dark { background: var(--fk-bg); color: var(--fk-fg); }
.fk { color: var(--fk-fg); -webkit-font-smoothing: antialiased; }
.fk *, .fk *::before, .fk *::after { box-sizing: border-box; }
:where(.fk) img { display: block; max-width: 100%; height: auto; } /* zero-specificity base, so .fk-slide-img etc. win */
.fk a { color: inherit; }

/* Shared bits */
.fk-kicker { margin: 0 0 10px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--fk-muted); }
.fk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.fk-trailer-note { order: 9; flex-basis: 100%; font-size: 12px; line-height: 1.4; color: var(--fk-muted); } /* own line under the buttons */
.fk .fk-btn, .fk-dialog .fk-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 22px;
	border: 1px solid var(--fk-line); border-radius: var(--fk-radius); background: rgba(244, 241, 234, .06);
	color: var(--fk-fg); font: inherit; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
	text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
	transition: background-color .2s, border-color .2s, transform .2s;
}
.fk .fk-btn:hover, .fk .fk-btn:focus { color: var(--fk-fg); text-decoration: none; background: rgba(244, 241, 234, .06); border-color: var(--fk-line); }
.fk .fk-btn--primary, .fk .fk-btn--primary:focus { background: var(--fk-accent); border-color: var(--fk-accent); color: var(--fk-fg); }
.fk .fk-btn--ghost, .fk .fk-btn--ghost:focus { background: transparent; }
@media (hover: hover) {
	.fk .fk-btn:hover { background: rgba(244, 241, 234, .14); border-color: rgba(244, 241, 234, .4); }
	.fk .fk-btn--primary:hover { background: var(--fk-accent-hover); border-color: var(--fk-accent-hover); }
}
.fk-btn:focus-visible, .fk-card-link:focus-visible, .fk-dot:focus-visible, .fk-arrow:focus-visible { outline: 2px solid var(--fk-fg); outline-offset: 3px; }
.fk-btn:active { transform: translateY(1px); }
.fk-play { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }
.fk-soon { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--fk-muted); padding: 0 6px; }

/* ---------- Hero slider ---------- */
.fk-hero { position: relative; background: var(--fk-bg); height: 88vh; height: 88svh; min-height: 520px; max-height: 980px; overflow: hidden; }
.fk-hero-track { position: absolute; inset: 0; }
.fk-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s linear .9s; }
.fk-slide.is-active { z-index: 1; opacity: 1; visibility: visible; transition: opacity .9s ease, visibility 0s; }
.fk-slide:not(.is-active) { pointer-events: none; } /* a tap during the fade never lands on the slide that is leaving */
/* The pictures crossfade; the buttons don't, or "Trailer coming soon" shows through "Watch trailer" (same spot on
   phones). The old buttons leave in .2s, the new ones fade in once they are gone. */
.fk-slide .fk-slide-body { opacity: 0; transition: opacity .2s ease; }
.fk-slide.is-active .fk-slide-body { opacity: 1; transition: opacity .45s ease .3s; }
.fk-slide-media { position: absolute; inset: 0; }
.fk-slide-media::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	/* the bottom melts fully into the page colour, so the art never ends in a hard edge */
	background: linear-gradient(to top, var(--fk-bg) 0%, rgba(11, 11, 12, .94) 8%, rgba(11, 11, 12, .72) 20%, rgba(11, 11, 12, .38) 36%, rgba(11, 11, 12, .12) 52%, rgba(11, 11, 12, 0) 66%),
		linear-gradient(to right, rgba(11, 11, 12, .55) 0%, rgba(11, 11, 12, 0) 45%);
}
.fk-slide-media picture { position: absolute; inset: 0; display: block; }
.fk-slide-img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.fk-slide-media.is-poster { display: grid; place-items: center end; padding-right: max(6vw, 24px); }
.fk-slide-blur { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(28px) brightness(.45) saturate(1.2); transform: scale(1.05); }
.fk-slide-poster { position: relative; z-index: 1; width: auto; height: 78%; max-height: 720px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--fk-radius); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.fk-slide-body {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
	padding: 0 var(--fk-gutter) calc(96px + env(safe-area-inset-bottom)); max-width: 980px;
	padding-left: max(5vw, var(--fk-gutter));
}
.fk-slide-title { margin: 0 0 22px; font-size: clamp(32px, 5.4vw, 76px); line-height: .95; font-weight: 800; letter-spacing: .01em; text-transform: uppercase; }
.fk-slide-title a { text-decoration: none; }
.fk-hero-nav { position: absolute; z-index: 3; right: max(5vw, var(--fk-gutter)); bottom: calc(28px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 6px; }
.fk-dots { display: flex; gap: 2px; }
.fk .fk-dot, .fk .fk-arrow, .fk .fk-dot:hover, .fk .fk-dot:focus, .fk .fk-arrow:hover, .fk .fk-arrow:focus { appearance: none; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--fk-fg); cursor: pointer; min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; padding: 0; -webkit-tap-highlight-color: transparent; }
.fk-dot span { display: block; width: 26px; height: 3px; border-radius: 3px; background: rgba(244, 241, 234, .35); transition: background-color .3s, width .3s; }
.fk-dot[aria-current="true"] span { background: var(--fk-fg); width: 40px; }
.fk-arrow { font-size: 28px; line-height: 1; opacity: .75; }
@media (hover: hover) { .fk-arrow:hover { opacity: 1; } }
@media (max-width: 700px) {
	.fk-hero { height: 78vh; height: 78svh; min-height: 480px; }
	.fk-slide-body { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
	.fk-slide-media.is-poster { place-items: start center; padding: 10vh 0 0; }
	.fk-slide-media.has-phone-poster .fk-slide-img { object-position: center top; } /* the poster <source> */
	.fk-slide-poster { height: 52%; }
	.fk-hero-nav { left: var(--fk-gutter); right: var(--fk-gutter); justify-content: space-between; } /* arrows at the edges, dots centred */
	.fk-dots { width: 100%; justify-content: center; }
	.fk-dot { min-width: 36px; }
	.fk-dot span { width: 18px; }
	.fk-dot[aria-current="true"] span { width: 28px; }
}
/* Portrait phones and tablets: the whole poster, its painted title included, with the year line and buttons under it,
   not on it. Matches the poster <source> in phone_poster_source(). */
@media (orientation: portrait) and (max-width: 1100px) {
	.fk-hero:has(.has-phone-poster) { height: calc(150vw + 250px); min-height: 0; max-height: none; }
	.fk-hero--art-titles:has(.has-phone-poster) { height: calc(150vw + 150px); } /* only the buttons under the poster */
	.fk-slide-media.has-phone-poster { bottom: auto; height: 150vw; }
	.fk-slide-media.has-phone-poster .fk-slide-img { object-position: center top; }
	.fk-slide-media.has-phone-poster::after { background: linear-gradient(to top, var(--fk-bg) 0%, rgba(11, 11, 12, 0) 16%); }
}

/* ---------- Film cards ---------- */
.fk-films { padding: clamp(40px, 6vw, 80px) max(5vw, var(--fk-gutter)); background: var(--fk-bg); }
.fk-films-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 24px; }
.fk-films-head .fk-films-title { margin: 0; }
.fk-films-title { margin: 0 0 24px; font-size: clamp(20px, 2.4vw, 28px); font-weight: 700; letter-spacing: .02em; }
.fk-films-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 28px 20px; }
.fk-card-link { display: block; text-decoration: none; -webkit-tap-highlight-color: transparent; border-radius: var(--fk-radius); }
.fk-card-poster { display: block; aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--fk-radius); background: #1a1a1c; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.fk-card-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.fk-card-title { display: block; margin-top: 12px; font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1.25; }
.fk-card-meta { display: block; margin-top: 4px; font-size: 12px; color: var(--fk-muted); }
@media (hover: hover) { .fk-card-link:hover .fk-card-poster img { transform: scale(1.04); } }
.fk-films--row .fk-films-list {
	grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: clamp(150px, 17vw, 240px);
	overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
	padding-bottom: 12px; margin: 0 calc(-1 * max(5vw, var(--fk-gutter))); padding-inline: max(5vw, var(--fk-gutter));
	scroll-padding-inline: max(5vw, var(--fk-gutter)); scrollbar-width: none;
}
.fk-films--row .fk-films-list::-webkit-scrollbar { display: none; }
.fk-films--row .fk-card { scroll-snap-align: start; }
/* Row arrows: only where there is a mouse or trackpad (phones swipe), and only when the row overflows */
.fk-row-nav { display: none; gap: 8px; margin-left: auto; }
@media (hover: hover) and (pointer: fine) { .fk-row-nav:not([hidden]) { display: flex; } }
.fk .fk-row-btn, .fk .fk-row-btn:hover, .fk .fk-row-btn:focus {
	appearance: none; display: inline-grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0;
	border: 1px solid var(--fk-line); border-radius: 50%; background: transparent; box-shadow: none; color: var(--fk-fg); cursor: pointer;
	transition: border-color .25s, background-color .25s, opacity .25s;
}
@media (hover: hover) { .fk .fk-row-btn:hover { border-color: rgba(244, 241, 234, .5); background: rgba(244, 241, 234, .08); } }
.fk .fk-row-btn[aria-disabled="true"] { opacity: .3; cursor: default; }
.fk .fk-row-btn:focus-visible { outline: 2px solid var(--fk-fg); outline-offset: 3px; }

/* ---------- Film page ---------- */
.fk-film-hero { position: relative; min-height: 72vh; min-height: 72svh; display: flex; align-items: flex-end; overflow: hidden; background: var(--fk-bg); }
.fk-film-hero-media { position: absolute; inset: 0; }
.fk-film-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.fk-film-hero.is-poster .fk-film-hero-media img { filter: blur(30px) brightness(.4) saturate(1.2); transform: scale(1.1); }
.fk-film-hero-media::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(to top, var(--fk-bg) 0%, rgba(11, 11, 12, .55) 40%, rgba(11, 11, 12, .1) 75%),
		linear-gradient(to right, rgba(11, 11, 12, .6), rgba(11, 11, 12, 0) 55%);
}
.fk-film-hero-body { position: relative; z-index: 1; width: 100%; max-width: 1200px; margin: 0; padding: 120px max(5vw, var(--fk-gutter)) 48px; }
.fk-film-title { margin: 0 0 16px; font-size: clamp(36px, 6.4vw, 92px); line-height: .92; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; max-width: 14ch; }
.fk-logline { margin: 0 0 26px; max-width: 60ch; font-size: clamp(16px, 1.6vw, 20px); line-height: 1.5; color: rgba(244, 241, 234, .86); }
.fk-film-body { max-width: 1200px; margin: 0; padding: 24px max(5vw, var(--fk-gutter)) 56px; display: grid; grid-template-columns: minmax(220px, 340px) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.fk-film-poster img { width: 100%; border-radius: var(--fk-radius); box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.fk-cinando { display: inline-block; margin-top: 16px; font-size: 13px; color: var(--fk-muted); text-decoration: none; letter-spacing: .06em; }
.fk-h { margin: 0 0 14px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--fk-muted); }
.fk-synopsis { font-size: 17px; line-height: 1.7; color: rgba(244, 241, 234, .9); margin-bottom: 40px; max-width: 68ch; }
.fk-synopsis p { margin: 0 0 1em; }
.fk-credits-list { margin: 0 0 32px; display: grid; gap: 0; border-top: 1px solid var(--fk-line); }
.fk-credits-list > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--fk-line); }
.fk-credits-list dt { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--fk-muted); padding-top: 2px; }
.fk-credits-list dd { margin: 0; font-size: 16px; line-height: 1.5; }
@media (max-width: 760px) {
	.fk-film-body { grid-template-columns: minmax(0, 1fr); }
	.fk-film-poster { max-width: 260px; }
	.fk-credits-list > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
	.fk-film-hero-body { padding-top: 40vh; }
	/* Landscape art often has the title painted in: show all of it, then the text below, instead of cropping. */
	.fk-film-hero:not(.is-poster) { display: block; min-height: 0; }
	.fk-film-hero:not(.is-poster) .fk-film-hero-media { position: relative; }
	.fk-film-hero:not(.is-poster) .fk-film-hero-media img { height: auto; }
	.fk-film-hero:not(.is-poster) .fk-film-hero-media::after { background: linear-gradient(to top, var(--fk-bg) 0%, rgba(11, 11, 12, 0) 30%); }
	.fk-film-hero:not(.is-poster) .fk-film-hero-body { padding-top: 12px; padding-bottom: 32px; }
}

/* ---------- Trailer lightbox ---------- */
.fk-dialog { width: min(94vw, 1180px); max-width: none; padding: 0; border: 0; background: transparent; color: var(--fk-fg); overflow: visible; }
.fk-dialog::backdrop { background: rgba(5, 5, 6, .9); }
.fk-dialog-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--fk-radius); overflow: hidden; box-shadow: 0 40px 120px rgba(0, 0, 0, .7); }
.fk-dialog-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.fk-dialog .fk-dialog-close, .fk-dialog .fk-dialog-close:hover, .fk-dialog .fk-dialog-close:focus { padding: 0; border-radius: 0; box-shadow: none; position: absolute; top: -52px; right: -6px; appearance: none; border: 0; background: none; color: var(--fk-fg); font-size: 34px; line-height: 1; width: 48px; height: 48px; cursor: pointer; }
.fk-dialog-note { margin: 12px 2px 0; font-size: 12px; color: var(--fk-muted); }

@media (prefers-reduced-motion: reduce) {
	.fk-slide, .fk-slide.is-active, .fk-slide .fk-slide-body, .fk-slide.is-active .fk-slide-body, .fk-card-poster img, .fk-btn, .fk-dot span { transition: none; }
}

/* Full width inside themes that box their content (e.g. Hello caps .site-main at 1140px). */
html body.fk-dark main.fk-main { max-width: none; width: 100%; margin: 0; padding: 0; }
.site-main .fk-hero, .site-main .fk-films, .entry-content .fk-hero, .entry-content .fk-films, .page-content .fk-hero, .page-content .fk-films {
	width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
}
body:has(.fk-hero), body:has(.fk-films) { overflow-x: clip; }
