/* ==========================================================================
   SJSFF theme: component styles
   Tokens (colours, type sizes, spacing, gutter) live in theme.json and arrive as
   --wp--preset--* / --wp--custom--* variables. Block settings (font size, weight,
   colour) are set on the blocks themselves; this file only styles components.
   ========================================================================== */

:root {
	--sjsff-gutter: var(--wp--custom--gutter);
	--sjsff-header-h: 102px;
	--sjsff-line: var(--wp--preset--color--silver); /* hairlines use the palette's Silver */
	--sjsff-measure: 78ch;
}
@media (max-width: 999px) { :root { --sjsff-header-h: 84px; } }

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
@media (max-width: 690px) { body { font-size: 16px; } }
:where(.wp-site-blocks) :focus-visible { outline: 2px solid var(--wp--preset--color--red); outline-offset: 3px; }
:where(.has-white-color) a:where(:not([class])) { color: inherit; }
:where(h1, h2, h3, h4, h5, h6) a:where(:not([class])) { color: inherit; text-decoration: none; }
:where(h1, h2, h3, h4, h5, h6) a:where(:not([class])):hover { color: var(--wp--preset--color--red); }
.sjsff-content a:where(:not([class])) { text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Readable line length for running text; centred text stays centred */
.sjsff-content :where(p, li) { max-width: var(--sjsff-measure); }
.sjsff-content p.has-text-align-center { margin-inline: auto; }
.sjsff-content :where(.wp-block-cover, .sjsff-program, .sjsff-sched-table, .sjsff-flip) :where(p, li) { max-width: none; }


/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.sjsff-header {
	position: fixed; inset: 0 0 auto; z-index: 1000;
	height: var(--sjsff-header-h);
	background: var(--wp--preset--color--white); color: var(--wp--preset--color--charcoal);
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--black) 8%, transparent);
	transition: background-color var(--wp--custom--motion--standard) var(--wp--custom--motion--ease), color var(--wp--custom--motion--standard) var(--wp--custom--motion--ease), height var(--wp--custom--motion--standard) var(--wp--custom--motion--ease), border-color var(--wp--custom--motion--standard) var(--wp--custom--motion--ease);
}
body.admin-bar .sjsff-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .sjsff-header { top: 46px; } }
.sjsff-header__inner { height: 100%; padding-inline: var(--sjsff-gutter); align-items: center; gap: 24px; }
.sjsff-logo { display: block; flex: none; line-height: 0; color: var(--wp--preset--color--black); }
.sjsff-logo__svg { display: block; height: 65px; width: auto; transition: height var(--wp--custom--motion--standard) var(--wp--custom--motion--ease); }
.sjsff-header__nav { height: 100%; align-items: center; gap: 0; }
@media (min-width: 1000px) {
	body.sjsff-has-hero .sjsff-header:not(.is-scrolled) { background: color-mix(in srgb, var(--wp--preset--color--screen) 78%, transparent); color: var(--wp--preset--color--white); border-bottom-color: color-mix(in srgb, var(--wp--preset--color--white) 25%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
	body.sjsff-has-hero .sjsff-header:not(.is-scrolled) .sjsff-logo { color: var(--wp--preset--color--white); }
	.sjsff-header.is-scrolled { height: 80px; }
	.sjsff-header.is-scrolled .sjsff-logo__svg { height: 52px; }
}
@media (max-width: 690px) { .sjsff-logo__svg { height: 59px; } }

/* Navigation (desktop): links, dropdowns */
.sjsff-nav { height: 100%; }
.sjsff-nav .wp-block-navigation__container { height: 100%; align-items: center; }
.sjsff-nav .wp-block-navigation__container > .wp-block-navigation-item { height: 100%; align-items: center; }
@media (min-width: 1000px) {
	.sjsff-nav.wp-block-navigation .wp-block-navigation__submenu-container { top: 100%; left: 0; min-width: 240px; padding: 20px; border: 0; background: var(--wp--preset--color--white); color: var(--wp--preset--color--charcoal); box-shadow: var(--wp--preset--shadow--menu); }
	.sjsff-nav.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content { display: block; width: 100%; padding: 6px; font-size: 15px; line-height: 14px; }
	.sjsff-nav.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
	.sjsff-nav.wp-block-navigation .wp-block-navigation__submenu-container .current-menu-item > .wp-block-navigation-item__content { background: var(--wp--preset--color--red); color: var(--wp--preset--color--white); }
}

/* Navigation (phones and tablets): menu button, full-screen dark menu */
@media (max-width: 999px) {
	.sjsff-header__nav { flex-direction: row-reverse; gap: 4px; }
	.sjsff-nav .wp-block-navigation__responsive-container-open { display: flex; padding: 6px; color: var(--wp--preset--color--charcoal); }
	.sjsff-nav .wp-block-navigation__responsive-container-open svg { width: 30px; height: 30px; }
	.sjsff-nav .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none; }
}
/* Phone menu: one left edge (the header gutter), the close button where the menu button was, each section a heading
   with its links in two columns, hairlines between sections. WordPress sets the nav's "justify right" on the list
   itself, so the alignment variables are reset on the list. The "… Overview" links repeat their section heading
   (same page), so the phone menu hides them; the desktop dropdowns keep them. */
.sjsff-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 0; text-align: left; }
.sjsff-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding: var(--sjsff-header-h) var(--sjsff-gutter) 48px; align-items: stretch; }
.sjsff-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close { top: calc((var(--sjsff-header-h) - 42px) / 2); right: var(--sjsff-gutter); padding: 6px; }
.sjsff-nav .is-menu-open .wp-block-navigation__responsive-container-close svg { width: 30px; height: 30px; }
.sjsff-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container { --navigation-layout-justification-setting: flex-start; --navigation-layout-justify: flex-start; width: 100%; height: auto; gap: 0; align-items: stretch; }
.sjsff-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container > .wp-block-navigation-item { width: 100%; height: auto; align-items: flex-start; padding-block: 18px; border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--white) 14%, transparent); }
.sjsff-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content { font-size: 22px; font-weight: 600; line-height: 1.25; }
.sjsff-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; align-self: stretch; width: 100%; padding: 8px 0 0; }
.sjsff-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container .wp-block-navigation-item__content { display: block; padding: 7px 0; font-size: 16px; line-height: 1.4; color: var(--wp--preset--color--silver); }
.sjsff-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container .current-menu-item > .wp-block-navigation-item__content,
.sjsff-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--white); }
.sjsff-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .sjsff-nav__overview { display: none; }

/* Search: icon button (divider before it on desktop); the field opens inline */
.sjsff-search { display: flex; align-items: center; margin: 0; }
.sjsff-search .wp-block-search__inside-wrapper { padding: 0; border: 0; background: transparent; }
.sjsff-search .wp-block-search__button { margin: 0; padding: 6px; border: 0; background: transparent; color: inherit; }
.sjsff-search .wp-block-search__button svg { width: 22px; height: 22px; fill: currentColor; }
.sjsff-search .wp-block-search__input { width: 200px; padding: 6px 4px; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: inherit; font: inherit; font-size: 15px; }
@media (min-width: 1000px) { .sjsff-search::before { content: ""; width: 1px; height: 24px; margin: 0 16px 0 12px; background: currentColor; opacity: .25; } }
@media (max-width: 999px) { .sjsff-search .wp-block-search__button svg { width: 26px; height: 26px; } .sjsff-search .wp-block-search__input { width: 140px; } }

/* Page shell: header, main and footer stack with no gap (WordPress puts its block gap between them);
   the space inside a page comes from its sections. */
.wp-site-blocks > * + * { margin-block-start: 0; }

/* Content starts below the fixed header, except under a page hero on desktop */
.sjsff-main { padding-top: var(--sjsff-header-h); }
body.admin-bar .sjsff-main { padding-top: calc(var(--sjsff-header-h) + 32px); }
@media (min-width: 1000px) {
	body.sjsff-has-hero .sjsff-main { padding-top: 0; }
	body.sjsff-has-hero.admin-bar .sjsff-main { padding-top: 32px; }
}
@media (max-width: 782px) { body.admin-bar .sjsff-main { padding-top: calc(var(--sjsff-header-h) + 46px); } }

/* --------------------------------------------------------------------------
   Page hero (every page except the homepage): 500px including the header
   -------------------------------------------------------------------------- */
.sjsff-hero {
	position: relative; isolation: isolate; display: flex; align-items: center; overflow: hidden; box-sizing: border-box;
	height: 500px; padding: var(--sjsff-header-h) var(--sjsff-gutter) 0;
	background: var(--wp--preset--color--overlay); color: var(--wp--preset--color--white);
}
.sjsff-hero.has-image::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--hero-img) center / cover no-repeat; filter: saturate(.82) brightness(.96); }
.sjsff-hero.has-image::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, color-mix(in srgb, var(--wp--preset--color--black) 55%, transparent), color-mix(in srgb, var(--wp--preset--color--black) 25%, transparent) 70%); }
.sjsff-hero__inner { max-width: 900px; }
.sjsff-hero__title { margin: 0; font-size: var(--wp--preset--font-size--h-1); font-weight: 600; line-height: 1.1; color: var(--wp--preset--color--white); }
.sjsff-hero__sub { margin: 10px 0 0; font-size: 22px; line-height: 1.4; color: var(--wp--preset--color--white); }
@media (max-width: 999px) { .sjsff-hero { height: auto; min-height: 280px; padding-block: 48px 40px; } }
@media (max-width: 690px) { .sjsff-hero.has-image::after { background: color-mix(in srgb, var(--wp--preset--color--black) 62%, transparent); } .sjsff-hero { min-height: 220px; } .sjsff-hero__title { font-size: 28px; } .sjsff-hero__sub { font-size: 16px; } }

/* --------------------------------------------------------------------------
   Page content
   -------------------------------------------------------------------------- */
/* Images in page content show at their own size (logos and posters are never stretched to fill a column)
   and never grow taller than the screen. Images cropped to a shape fill their space as set on the block. */
:where(.sjsff-content .wp-block-image:not(.wp-block-gallery .wp-block-image)) img:where(:not([style*="aspect-ratio"], [src$=".svg"])) { width: auto; max-height: min(80vh, 760px); }

/* Split (Columns block style "Split" / "Split (compact)"): a photo half and a text half. The photo fills
   its half and, beside long text, stays in view; on phones the halves stack and the photo is square.
   Padding, centring and spacing of the text half are that column's own settings. */
:is(.is-style-split, .is-style-split-compact) > .wp-block-column:has(> .wp-block-cover > .wp-block-cover__inner-container:empty) { display: flex; min-height: min(50vw, 720px); }
.is-style-split-compact > .wp-block-column:has(> .wp-block-cover > .wp-block-cover__inner-container:empty) { min-height: min(36vw, 520px); }
:is(.is-style-split, .is-style-split-compact) > .wp-block-column > .wp-block-cover:has(> .wp-block-cover__inner-container:empty) { flex: 1 1 auto; min-height: 0; padding: 0; }
@media (min-width: 782px) {
	:is(.is-style-split, .is-style-split-compact) > .wp-block-column > .wp-block-cover:has(> .wp-block-cover__inner-container:empty) { position: sticky; top: var(--sjsff-header-h); align-self: flex-start; height: 100%; max-height: calc(100vh - var(--sjsff-header-h)); }
}
@media (max-width: 781px) { .is-style-split > .wp-block-column:has(> .wp-block-cover > .wp-block-cover__inner-container:empty) { min-height: 100vw; } }

/* Tiles (Columns block style): two photo cards side by side; the tint deepens and the photo eases in on hover */
.is-style-tiles > .wp-block-column { display: flex; }
.is-style-tiles > .wp-block-column > .wp-block-cover { flex: 1 1 auto; min-height: min(42vw, 600px); }
.is-style-tiles .wp-block-cover__background { transition: opacity var(--wp--custom--motion--standard) var(--wp--custom--motion--ease); }
.is-style-tiles .wp-block-cover:hover .wp-block-cover__background { opacity: .5; }
.is-style-tiles .wp-block-cover__image-background { transition: transform var(--wp--custom--motion--slow) var(--wp--custom--motion--ease); }
.is-style-tiles .wp-block-cover:hover .wp-block-cover__image-background { transform: scale(1.03); }
@media (max-width: 781px) { .is-style-tiles > .wp-block-column > .wp-block-cover { min-height: 100vw; } }

/* Scroller (Gallery block style): a row of square photos you scroll sideways */
.wp-block-gallery.is-style-scroller { flex-wrap: nowrap; gap: 12px; padding-bottom: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--wp--preset--color--red) color-mix(in srgb, currentColor 15%, transparent); }
/* Safari: the same thin red bar on a faint track */
@supports not (scrollbar-color: red blue) {
	.wp-block-gallery.is-style-scroller::-webkit-scrollbar { height: 6px; }
	.wp-block-gallery.is-style-scroller::-webkit-scrollbar-track { border-radius: 3px; background: color-mix(in srgb, currentColor 15%, transparent); }
	.wp-block-gallery.is-style-scroller::-webkit-scrollbar-thumb { border-radius: 3px; background: var(--wp--preset--color--red); }
}
.wp-block-gallery.is-style-scroller figure.wp-block-image { flex: 0 0 calc((100% - 36px) / 4); aspect-ratio: 1; scroll-snap-align: start; }
.wp-block-gallery.is-style-scroller figure.wp-block-image img { height: 100%; object-fit: cover; }
@media (max-width: 999px) { .wp-block-gallery.is-style-scroller figure.wp-block-image { flex-basis: calc((100% - 12px) / 2); } }

/* Sponsors pattern: one row of logos (two per row on phones) */
.sjsff-sponsors { padding-block: 90px 70px; }
.sjsff-sponsors h2 { margin-bottom: 40px; font-weight: 400; }
.sjsff-logo-row { gap: 24px; align-items: center; }
.sjsff-logo-cell { display: flex; justify-content: center; margin: 0; }
.sjsff-logo-cell img { width: 100%; max-width: 192px; height: 108px; object-fit: contain; }
@media (max-width: 781px) { .sjsff-logo-row.is-layout-grid { grid-template-columns: repeat(2, 1fr); } }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
/* Flip card: photo + title in front; details slide over the whole card on hover or keyboard focus */
.sjsff-cards { gap: 20px; }
.sjsff-cards > .sjsff-flip { flex: 0 0 calc((100% - 40px) / 3); }
@media (max-width: 999px) { .sjsff-cards > .sjsff-flip { flex-basis: calc((100% - 20px) / 2); } }
@media (max-width: 600px) { .sjsff-cards > .sjsff-flip { flex-basis: 100%; } }
.sjsff-flip { position: relative; isolation: isolate; overflow: hidden; width: 100%; min-height: 400px; }
.sjsff-flip__front { height: 100%; min-height: 400px; color: var(--wp--preset--color--white); }
.sjsff-flip__front .wp-block-cover__inner-container,
.sjsff-flip > .sjsff-flip__front:not(.wp-block-cover) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.sjsff-flip > .sjsff-flip__front:not(.wp-block-cover) { padding: 28px; }
.sjsff-flip__title { margin: 0; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; }
.sjsff-flip__back {
	position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px;
	padding: 28px; text-align: center; transform: translateY(100%); transition: transform var(--wp--custom--motion--standard) var(--wp--custom--motion--ease);
}
.sjsff-flip:hover .sjsff-flip__back, .sjsff-flip:focus-within .sjsff-flip__back { transform: none; }
.sjsff-flip__back > * { margin: 0; }
@media (hover: none) { .sjsff-flip { min-height: 0; } .sjsff-flip__back { position: static; transform: none; } }
/* Titles keep the line breaks typed in the editor (Awards: year / Award Winners / edition) */
.sjsff-flip__title { white-space: pre-line; }
/* A card that leads to one page (the Awards years): its link takes the back's white text, and stretches over the
   whole card, so a click anywhere on it goes there (the flipped back on desktop, front and back on phones) */
.sjsff-card-link, .sjsff-card-link:hover, .sjsff-card-link:focus { color: inherit; font-weight: 600; }
.sjsff-card-link::after { position: absolute; inset: 0; z-index: 3; content: ""; }

/* Icon (inline SVG line icon in the site red) */
.sjsff-icon { display: inline-flex; line-height: 0; color: var(--wp--preset--color--red); }
.sjsff-icon__svg { width: 44px; height: 44px; stroke-width: 1.5; }
.wp-block-column > .sjsff-icon + * { margin-top: 10px; }
.wp-block-column > * + .sjsff-icon { margin-top: 28px; }

/* Story cards (press features) */
/* Story cards sit in a WordPress grid; its gap is the theme block gap. */
.sjsff-story { display: flex; flex-direction: column; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--sjsff-line); }
.sjsff-story > * { margin: 0; }
/* Outlet logos share one box (Metro Silicon Valley's width, a max height): wide logos fill the width, tall ones the height; bottoms line up. */
.sjsff-story__logo { display: flex; align-items: flex-end; height: 56px; }
.sjsff-story__logo img { width: auto; height: auto; max-width: 210px; max-height: 56px; }

/* Membership plans: photo, name, price, what's included, PayPal button */
.sjsff-plans { align-items: stretch; margin-top: 36px; }
.sjsff-plan { --sjsff-plan-pad: 36px; display: flex; flex-direction: column; padding: 0 var(--sjsff-plan-pad) var(--sjsff-plan-pad); background: var(--wp--preset--color--white); color: var(--wp--preset--color--charcoal); box-shadow: var(--wp--preset--shadow--soft); transition: transform var(--wp--custom--motion--quick) var(--wp--custom--motion--ease), box-shadow var(--wp--custom--motion--quick) var(--wp--custom--motion--ease); }
.sjsff-plan:hover { transform: translateY(-4px); box-shadow: var(--wp--preset--shadow--lifted); }
.sjsff-plan > * { margin: 0; }
.sjsff-plan > .wp-block-image { margin: 0 calc(-1 * var(--sjsff-plan-pad)) 30px; border-bottom: 4px solid var(--wp--preset--color--red); overflow: hidden; }
.sjsff-plan > .wp-block-image img { display: block; width: 100%; transition: transform var(--wp--custom--motion--slow) var(--wp--custom--motion--ease); }
.sjsff-plan:hover > .wp-block-image img { transform: scale(1.04); }
.sjsff-plan__name { margin-bottom: 14px; font-size: var(--wp--preset--font-size--h-3); line-height: 1.35; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--wp--preset--color--red); }
.sjsff-plan__price { margin-bottom: 26px; padding-bottom: 26px; border-bottom: 1px solid var(--wp--preset--color--silver); font-size: 56px; line-height: 1; font-weight: 300; }
.sjsff-plan__price sup { margin-right: 2px; font-size: 26px; line-height: 1.3; vertical-align: top; }
.sjsff-plan > .wp-block-list { flex: 1 1 auto; margin-bottom: 32px; }
.sjsff-plan__form .wp-element-button { width: 100%; cursor: pointer; }
.sjsff-plan.is-featured { background: var(--wp--preset--color--black); color: var(--wp--preset--color--white); }
.sjsff-plan.is-featured .sjsff-plan__name { color: var(--wp--preset--color--cream); }
.sjsff-plan.is-featured .sjsff-plan__price { border-bottom-color: color-mix(in srgb, var(--wp--preset--color--white) 15%, transparent); }
@media (prefers-reduced-motion: reduce) { .sjsff-plan, .sjsff-plan > .wp-block-image img { transition: none; } .sjsff-plan:hover, .sjsff-plan:hover > .wp-block-image img { transform: none; } }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.sjsff-faq { display: flex; flex-direction: column; gap: 10px; max-width: 1100px; margin-inline: auto; }
.sjsff-toggle { margin: 0; background: var(--wp--preset--color--paper); }
.sjsff-toggle > summary { display: flex; align-items: center; gap: 14px; padding: 14px 20px; cursor: pointer; list-style: none; font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--wp--preset--color--charcoal); }
.sjsff-toggle > summary::-webkit-details-marker { display: none; }
.sjsff-toggle > summary::before { content: "+"; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--wp--preset--color--charcoal); color: var(--wp--preset--color--white); font: 700 14px/18px Arial, sans-serif; text-align: center; }
.sjsff-toggle[open] > summary { background: var(--wp--preset--color--red); color: var(--wp--preset--color--white); }
.sjsff-toggle[open] > summary::before { content: "–"; background: var(--wp--preset--color--white); color: var(--wp--preset--color--red); }
.sjsff-toggle > :not(summary) { padding-inline: 20px; }
.sjsff-toggle > summary + * { margin-top: 18px; }
.sjsff-toggle > :last-child { margin-bottom: 0; padding-bottom: 18px; }
.sjsff-toggle p { font-size: 16px; line-height: 27px; }

/* Fluent Forms: Fluent's own stylesheets are not loaded (functions.php), so these rules are the whole form style.
   Forms use "Inherit Theme Style" (set per form). States the form script adds: .ff-el-is-error on a group with an
   .error message inside, .ff_submitting + .ff-working while sending, .ff-message-success after it, .ff_force_hide. */
.fluentform * { box-sizing: border-box; }
.fluentform .ff-hpsf-container, .fluentform .ff_force_hide, .ff-errors-in-stack { display: none; }
.fluentform .ff-el-group { margin-bottom: 20px; }
.fluentform .ff-el-input--label { display: inline-block; margin-bottom: 6px; }
.fluentform .ff-el-input--label label { font-size: 15px; font-weight: 600; }
.fluentform .ff-el-is-required.asterisk-right label::after { margin-left: 3px; color: var(--wp--preset--color--red); content: "*" / ""; }
.fluentform .ff-el-form-control { display: block; width: 100%; max-width: 100%; padding: 11px 14px; border: 1px solid var(--wp--preset--color--silver); border-radius: 0; background: var(--wp--preset--color--white); color: var(--wp--preset--color--charcoal); font: inherit; font-size: 15px; line-height: 22px; }
.fluentform .ff-el-form-control:focus { border-color: var(--wp--preset--color--charcoal); outline: 2px solid var(--wp--preset--color--red); outline-offset: 1px; }
.fluentform textarea.ff-el-form-control { min-height: 140px; }
.fluentform .ff-el-is-error .ff-el-form-control { border-color: var(--wp--preset--color--deep-red); }
.fluentform .error, .fluentform .text-danger { margin-top: 6px; color: var(--wp--preset--color--deep-red); font-size: var(--wp--preset--font-size--fine); }
.fluentform .ff_submitting { pointer-events: none; }
.fluentform .ff-btn-submit:disabled { opacity: .65; cursor: progress; }
.ff-message-success { margin-top: 10px; padding: 16px 20px; border: 1px solid var(--sjsff-line); border-left: 4px solid var(--wp--preset--color--red); }
.ff-message-success > :last-child { margin-bottom: 0; }

/* Fluent Forms buttons follow the theme's button (all forms) */
.fluentform .ff-btn-submit { padding: 13px 42px; border: 2px solid var(--wp--preset--color--red); border-radius: 0; background: var(--wp--preset--color--red); color: var(--wp--preset--color--white); font-family: inherit; font-size: 14px; font-weight: 400; letter-spacing: 2px; line-height: 20px; text-transform: uppercase; }
.fluentform .ff-btn-submit:hover { background: var(--wp--preset--color--deep-red); border-color: var(--wp--preset--color--deep-red); }

/* Forms (Fluent Forms) on a colour: light labels, white fields, dark button */
:where(.has-red-background-color, .has-deep-red-background-color, .has-black-background-color, .has-screen-background-color, .has-overlay-background-color) .fluentform .ff-el-input--label label { color: var(--wp--preset--color--white); }
:where(.has-red-background-color, .has-deep-red-background-color) .fluentform .ff-el-form-control { border: 0; background: var(--wp--preset--color--white); color: var(--wp--preset--color--screen); }
:where(.has-red-background-color, .has-deep-red-background-color) .fluentform .ff-btn-submit { background: var(--wp--preset--color--screen); border-color: var(--wp--preset--color--screen); }
:where(.has-red-background-color, .has-deep-red-background-color) .fluentform .ff-btn-submit:hover { background: var(--wp--preset--color--black); border-color: var(--wp--preset--color--black); }

/* --------------------------------------------------------------------------
   Festival programme pages (Winners, Film Schedule, Schedule at a Glance)
   -------------------------------------------------------------------------- */
.sjsff-day { max-width: none; margin: 48px 0 0; padding-bottom: 10px; border-bottom: 2px solid var(--wp--preset--color--charcoal); font-size: var(--wp--preset--font-size--h-3); scroll-margin-top: calc(var(--sjsff-header-h) + 16px); }
.sjsff-jumpbar { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 12px; margin-block: 24px; }
.sjsff-jumpbar a { display: inline-block; padding: 10px 18px; border: 2px solid var(--wp--preset--color--charcoal); color: var(--wp--preset--color--charcoal); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; text-decoration: none; }
.sjsff-jumpbar a:hover { background: var(--wp--preset--color--charcoal); color: var(--wp--preset--color--white); }
.sjsff-sched-day { margin-bottom: 48px; }
.sjsff-sched-dayname { display: flex; align-items: baseline; gap: 12px; max-width: none; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--wp--preset--color--charcoal); }
.sjsff-sched-date { font-size: 17px; font-weight: 400; color: var(--wp--preset--color--slate); }
.sjsff-sched-table { margin: 0; }
.sjsff-sched-table table { width: 100%; border-collapse: collapse; }
.sjsff-sched-table td { padding: 12px 8px; border: 0; border-bottom: 1px solid var(--sjsff-line); vertical-align: top; font-size: 15px; line-height: 1.45; }
.sjsff-sched-table td:first-child { width: 90px; white-space: nowrap; font-weight: 700; color: var(--wp--preset--color--red); }
.sjsff-sched-table em { font-size: var(--wp--preset--font-size--fine); color: var(--wp--preset--color--slate); }
.sjsff-sched-event { margin-top: 24px; padding: 20px 24px; }
.sjsff-sched-event > * { margin: 0 0 4px; }

/* --------------------------------------------------------------------------
   Homepage
   -------------------------------------------------------------------------- */
.sjsff-home-hero { min-height: clamp(560px, 48vw, 760px); padding-top: calc(var(--sjsff-header-h) + 40px); color: var(--wp--preset--color--white); cursor: pointer; }
.sjsff-home-hero__play:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.sjsff-home-hero__play:focus { display: inline-block; margin-top: 20px; color: var(--wp--preset--color--white); }
@keyframes sjsffHeroPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--wp--preset--color--red) 55%, transparent); } 70% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--wp--preset--color--red) 0%, transparent); } 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--wp--preset--color--red) 0%, transparent); } }
@media (max-width: 690px) {
	.sjsff-home-hero { padding-top: 60px; }
	.sjsff-home-hero__play, .sjsff-home-hero__play:not(:focus) { position: relative; display: block; width: 56px; height: 56px; margin: 26px auto 0; overflow: visible; clip: auto; border-radius: 50%; background: var(--wp--preset--color--red); color: transparent; font-size: 0; animation: sjsffHeroPulse 2.4s ease-out infinite; }
	.sjsff-home-hero__play::before { content: ""; position: absolute; left: 22px; top: 17px; border-style: solid; border-width: 11px 0 11px 17px; border-color: transparent transparent transparent var(--wp--preset--color--white); }
}

/* --------------------------------------------------------------------------
   News: article and listing
   -------------------------------------------------------------------------- */
/* "Keep reading" cards in posts: the whole card opens the article (the title's link stretched over the card). */
.sjsff-kr-card { position: relative; }
.sjsff-kr-card a::after { position: absolute; inset: 0; content: ""; }
.sjsff-meta { gap: 0; font-size: var(--wp--preset--font-size--fine); line-height: 20px; color: var(--wp--preset--color--slate); }
.sjsff-meta > * + *::before { content: ""; display: inline-block; width: 1px; height: 12px; margin: 0 12px; background: var(--wp--preset--color--silver); vertical-align: -1px; }
.sjsff-meta .wp-block-post-author-name::before { content: "By "; display: inline; width: auto; height: auto; margin: 0; background: none; }
.sjsff-meta a { color: var(--wp--preset--color--slate); text-underline-offset: 3px; }
.sjsff-meta a:hover { color: var(--wp--preset--color--red); }

/* Share links (posts and film pages) */
.sjsff-share { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 48px 0 0; padding-top: 28px; border-top: 1px solid var(--sjsff-line); }
.sjsff-share__label { margin: 0; font-size: var(--wp--preset--font-size--label); line-height: 26px; letter-spacing: 2px; text-transform: uppercase; color: var(--wp--preset--color--slate); }
.sjsff-share__list { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }
.sjsff-share__link { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--wp--preset--color--silver); border-radius: 50%; color: var(--wp--preset--color--charcoal); transition: background-color var(--wp--custom--motion--quick) var(--wp--custom--motion--ease), border-color var(--wp--custom--motion--quick) var(--wp--custom--motion--ease), color var(--wp--custom--motion--quick) var(--wp--custom--motion--ease); }
.sjsff-share__link svg { width: 18px; height: 18px; fill: currentColor; }
.sjsff-share__link:hover, .sjsff-share__link:focus-visible { border-color: var(--wp--preset--color--red); background: var(--wp--preset--color--red); color: var(--wp--preset--color--white); }
/* On film pages the share row sits on black, under the film */
.sjsff-film-body .sjsff-share { max-width: 1425px; margin: 0 auto; padding: 28px var(--sjsff-gutter) 64px; border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--white) 15%, transparent); }
.sjsff-film-body .sjsff-share__label { color: var(--wp--preset--color--silver); }
.sjsff-film-body .sjsff-share__link { border-color: color-mix(in srgb, var(--wp--preset--color--white) 35%, transparent); color: var(--wp--preset--color--white); }


.sjsff-listing { padding-block: var(--wp--preset--spacing--50); }
.sjsff-listing__cols { gap: 48px; }
.sjsff-listing-head { padding-top: 48px; }
.sjsff-posts__list { margin: 0; padding: 0; list-style: none; }
@media (min-width: 1500px) { .sjsff-posts__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; } .sjsff-posts__list > li { margin-block-start: 0; } } /* the grid spaces the cards; the list's block gap would push every card but the first down */
.sjsff-card { display: grid; grid-template-columns: 64px 1fr; gap: 0 24px; margin-bottom: 56px; }
.sjsff-card__date { align-self: start; padding-right: 14px; border-right: 1px solid var(--sjsff-line); text-align: center; text-transform: uppercase; color: var(--wp--preset--color--charcoal); line-height: 1.1; }
.sjsff-card__month { font-size: var(--wp--preset--font-size--fine); letter-spacing: 1px; }
.sjsff-card__day { font-size: 26px; font-weight: 700; line-height: 1.15; }
.sjsff-card__image { margin: 0 0 16px; }
.sjsff-card__title { margin: 0 0 4px; font-size: 26px; line-height: 1.25; }
.sjsff-card__title a { color: var(--wp--preset--color--red); text-decoration: none; }
.sjsff-card__title a:hover { color: var(--wp--preset--color--deep-red); }
.sjsff-card .sjsff-meta { margin-bottom: 12px; }
.sjsff-card__excerpt p { margin: 0 0 16px; font-size: 16px; line-height: 27px; }
@media (max-width: 690px) { .sjsff-card { grid-template-columns: 1fr; } .sjsff-card__date { display: none; } .sjsff-card__title { font-size: 22px; } }
.sjsff-pager { margin-top: 24px; }
.sjsff-pager a { display: inline-block; padding: 13px 28px; background: var(--wp--preset--color--red); color: var(--wp--preset--color--white); font-size: 14px; letter-spacing: 2px; text-transform: uppercase; text-decoration: none; }
.sjsff-pager a:hover { background: var(--wp--preset--color--deep-red); }
.sjsff-sidebar h2 { margin-top: 40px; }
.sjsff-sidebar-list { margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 22px; }
.sjsff-sidebar-list li { margin: 0 0 12px; }
.sjsff-sidebar-list a { color: var(--wp--preset--color--red); text-decoration: none; }
.sjsff-sidebar-list a:hover { color: var(--wp--preset--color--deep-red); text-decoration: underline; }
.sjsff-sidebar-search .wp-block-search__input { padding: 10px 4px; border: 0; border-bottom: 1px solid var(--wp--preset--color--silver); border-radius: 0; font: inherit; font-size: 14px; }
.sjsff-sidebar-search .wp-block-search__button { margin-left: 0; padding: 10px 20px; font-size: 13px; letter-spacing: 1px; text-transform: none; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.sjsff-footer { padding: var(--wp--preset--spacing--50) var(--sjsff-gutter) 0; font-size: 14px; line-height: 26px; }
.sjsff-footer p { margin: 0 0 16px; }
.sjsff-footer h2 { margin: 0 0 14px; }
.sjsff-footer__cols { gap: 25px; }
.sjsff-footer a { color: var(--wp--preset--color--silver); }
.sjsff-footer a:hover { color: var(--wp--preset--color--white); }
.sjsff-footer__logo { display: block; margin-top: 28px; line-height: 0; }
.sjsff-footer-logo { width: 266px; max-width: 100%; height: auto; }
.sjsff-footer__links { margin: 0; padding: 0; list-style: none; }
.sjsff-footer__links li { margin: 0 0 8px; }
.sjsff-footer__links a { text-decoration: none; }
.sjsff-footer__links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sjsff-footer__bottom { margin-top: var(--wp--preset--spacing--50); padding-block: 20px; border-top: 1px solid var(--wp--preset--color--overlay); }
.sjsff-footer__bottom .sjsff-footer__copy { margin: 0; font-size: var(--wp--preset--font-size--fine); line-height: 22px; color: var(--wp--preset--color--slate); }
.sjsff-footer__copy a { color: var(--wp--preset--color--slate); text-underline-offset: 3px; }
.sjsff-footer__copy a:hover { color: var(--wp--preset--color--silver); }
.sjsff-footer__credit { text-decoration: none; }
/* Social Icons: WordPress's own layout rules for the block (its stylesheet also carries a brand colour for every
   network, which our Silver icons never use, so functions.php drops that stylesheet and keeps only these). */
.wp-block-social-links { box-sizing: border-box; margin-left: 0; padding-left: 0; padding-right: 0; text-indent: 0; background: none; }
.wp-block-social-links, .wp-block-social-links.has-normal-icon-size { font-size: 24px; }
.wp-block-social-links.has-small-icon-size { font-size: 16px; }
.wp-block-social-links.has-large-icon-size { font-size: 36px; }
.wp-block-social-links .wp-block-social-link.wp-social-link { display: inline-block; margin: 0; padding: 0; height: auto; border-radius: 9999px; }
.wp-block-social-links .wp-social-link a { display: flex; align-items: center; line-height: 0; text-decoration: none; }
.wp-block-social-links .wp-social-link .wp-block-social-link-anchor { color: currentColor; fill: currentColor; }
.wp-block-social-links .wp-social-link svg { width: 1em; height: 1em; }
.wp-block-social-links .wp-social-link span:not(.screen-reader-text) { margin: 0 .5em; font-size: .65em; }
/* Icon size is the block's own Size setting (Normal, 24px). Each icon gets a 44px click/tap area; the row is pulled out
   by the area's spare 10px on both sides, so the icons line up with the gutter on the right (one row) or the text on the left (wrapped). */
.sjsff-social.wp-block-social-links { gap: 0; margin-inline: -10px; }
.sjsff-social .wp-social-link a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0; }
/* Footer email signup: underlined field and the red button */
.sjsff-footer .fluentform .ff-el-input--label label { font-size: 14px; font-weight: 400; color: var(--wp--preset--color--silver); }
.sjsff-footer .fluentform .ff-el-is-required.asterisk-right label::after { color: var(--wp--preset--color--red); }
.sjsff-footer .fluentform .ff-el-form-control { padding: 10px; border: 0; border-bottom: 2px solid var(--wp--preset--color--silver); border-radius: 0; background: color-mix(in srgb, var(--wp--preset--color--white) 3%, transparent); color: var(--wp--preset--color--white); font: inherit; font-size: 14px; }
.sjsff-footer .fluentform .ff-el-form-control::placeholder { color: var(--wp--preset--color--silver); opacity: 1; }
@keyframes sjsffHeartPulse { 0% { transform: scale(1); } 14% { transform: scale(1.3); } 28% { transform: scale(1); } 42% { transform: scale(1.15); } 60%, 100% { transform: scale(1); } }
.sjsff-heart { display: inline-block; color: var(--wp--preset--color--red); transform-origin: 50% 60%; }
@media (max-width: 999px) {
	.sjsff-footer__links a { display: inline-block; padding: 9px 0; }
}
@media (max-width: 690px) {
	.sjsff-footer__about { display: flex; flex-direction: column; }
	.sjsff-footer__about .sjsff-footer__logo { order: -1; margin: 0 0 28px; }
	.sjsff-footer-logo { width: 100%; filter: brightness(0) invert(1); opacity: .14; }
	.sjsff-footer__rights { display: block; margin-top: 2px; }
	.sjsff-footer__copy br { display: none; }
	.sjsff-footer__credit { display: block; margin-top: 12px; }
	.sjsff-heart { animation: sjsffHeartPulse 2.4s ease-out infinite; }
}

/* --------------------------------------------------------------------------
   Video pop-up (trailers and films)
   -------------------------------------------------------------------------- */
.sjsff-player { position: fixed; inset: 0; z-index: 100000; display: none; align-items: center; justify-content: center; background: var(--wp--preset--color--black); }
.sjsff-player.is-on { display: flex; }
.sjsff-player__frame { position: relative; width: 100vw; height: 56.25vw; max-width: 177.78vh; max-height: 100vh; }
.sjsff-player__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sjsff-player__close { position: fixed; top: 18px; right: 20px; z-index: 2; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--wp--preset--color--overlay) 85%, transparent); color: var(--wp--preset--color--white); font: 28px/48px Arial, sans-serif; text-align: center; cursor: pointer; }
.sjsff-player__close:hover { background: var(--wp--preset--color--red); }
html.sjsff-player-open, html.sjsff-player-open body { overflow: hidden; }

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.sjsff-header, .sjsff-logo__svg, .sjsff-flip__back, .is-style-tiles .wp-block-cover__background, .is-style-tiles .wp-block-cover__image-background { transition: none; }
	.sjsff-heart, .sjsff-home-hero__play { animation: none; }
}

/* --------------------------------------------------------------------------
   Motion (durations and easing are theme.json tokens: --wp--custom--motion--*)
   -------------------------------------------------------------------------- */
/* Page transitions: pages cross-fade as you move around the site and the header stays put
   (browsers without cross-document view transitions just load the page). */
@view-transition { navigation: auto; }
.sjsff-header { view-transition-name: site-header; }
::view-transition-group(root) { animation-duration: var(--wp--custom--motion--standard); animation-timing-function: var(--wp--custom--motion--ease); }

/* Page sections ease in as they enter the screen (CSS scroll-driven animation, no script);
   off for reduced motion and in print. */
/* Buttons: on hover or keyboard focus, viewfinder corner brackets frame the button (a camera's framing marks).
   One rule for every call-to-action button: WordPress buttons, the Fluent form buttons, the membership plan buttons and
   anything marked .sjsff-frame (the SJSFF Films plugin's buttons). The bracket colour is --sjsff-frame (red by default):
   black on outline buttons (which also fill black), white on light outline buttons and on dark-section form buttons. */
:is(.wp-block-button__link, .fluentform .ff-btn-submit, .sjsff-plan__form .wp-element-button) { position: relative; }
.wp-block-button.is-style-outline > .wp-block-button__link { --sjsff-frame: var(--wp--preset--color--black); }
.wp-block-button.is-style-outline-light > .wp-block-button__link,
:where(.has-red-background-color, .has-deep-red-background-color) .fluentform .ff-btn-submit { --sjsff-frame: var(--wp--preset--color--white); }
:is(.wp-block-button__link, .fluentform .ff-btn-submit, .sjsff-plan__form .wp-element-button, .sjsff-frame)::after {
	content: ""; position: absolute; inset: -4px; pointer-events: none; opacity: 0;
	--c: var(--sjsff-frame, var(--wp--preset--color--red)); --l: 12px; --w: 2px;
	background:
		linear-gradient(var(--c), var(--c)) top left / var(--l) var(--w), linear-gradient(var(--c), var(--c)) top left / var(--w) var(--l),
		linear-gradient(var(--c), var(--c)) top right / var(--l) var(--w), linear-gradient(var(--c), var(--c)) top right / var(--w) var(--l),
		linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--w), linear-gradient(var(--c), var(--c)) bottom left / var(--w) var(--l),
		linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--w), linear-gradient(var(--c), var(--c)) bottom right / var(--w) var(--l);
	background-repeat: no-repeat;
	transition: inset var(--wp--custom--motion--standard) var(--wp--custom--motion--ease), opacity var(--wp--custom--motion--quick) linear;
}
:is(.wp-block-button__link, .fluentform .ff-btn-submit, .sjsff-plan__form .wp-element-button, .sjsff-frame):is(:hover, :focus-visible)::after { inset: -8px; opacity: 1; }
@media (prefers-reduced-motion: reduce) { :is(.wp-block-button__link, .fluentform .ff-btn-submit, .sjsff-plan__form .wp-element-button, .sjsff-frame)::after { transition: none; inset: -8px; } }

/* Links to a spot on the same page glide there (not for reduced motion) and stop below the fixed header. */
html { scroll-padding-top: calc(var(--sjsff-header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
/* A fade only: no slide, so a section never leaves a gap below the one before it. Only sections that start below the first screen fade (site.js adds .sjsff-reveal), so nothing visible when the page opens is ever faint; the fade completes within 120px. */
@keyframes sjsffReveal { from { opacity: 0; } }
@media screen and (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		.sjsff-content > .sjsff-reveal { animation: sjsffReveal linear both; animation-timeline: view(); animation-range: entry 0% entry 120px; }
	}
}

@media (prefers-reduced-motion: reduce) {
	::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none; }
}
