/* =========================================================
   FlagFootage — design tokens
   Cinema-dark base, single deliberate gold accent. Flag
   thumbnails themselves supply the color variety, so the
   chrome stays quiet and disciplined around them.
   ========================================================= */
:root {
	--bg: #0B0F16;
	--surface: #131922;
	--surface-2: #1B2330;
	--border: #232B38;
	--text: #EDEFF2;
	--text-muted: #8891A0;
	--accent: #FFAA24;
	--accent-dark: #D98A10;
	--accent-ink: #1A1204;

	--font-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
	--font-body: 'Inter', system-ui, -apple-system, sans-serif;

	--container: 1180px;
	--radius-sm: 8px;
	--radius-md: 14px;
	--radius-lg: 22px;
}

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

html { scroll-behavior: smooth; }

body {
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.15;
	margin: 0 0 0.5em;
	letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--text-muted); }

a:focus-visible, button:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

/* WordPress's own block-library stylesheet ships default link colors
   (browser blue / visited purple) and loads after this file in some
   setups. These two rules are the ones allowed to fight that cascade
   directly, since getting link color right sitewide is a real design
   requirement, not incidental styling. */
a, a:visited { color: inherit !important; }
.ff-page__content a, .ff-page__content a:visited,
.ff-single-download__content a, .ff-single-download__content a:visited {
	color: var(--accent) !important;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.ff-page__content a:hover, .ff-single-download__content a:hover { color: var(--text) !important; }

.ff-main { max-width: var(--container); margin: 0 auto; padding: 0 24px 80px; }

.ff-eyebrow {
	font-family: var(--font-display);
	font-size: 0.8rem;
	color: var(--accent);
	margin: 0 0 10px;
	font-weight: 600;
}

/* =========================================================
   Buttons
   ========================================================= */
.ff-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.95rem;
	border: 1px solid transparent;
	transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
	white-space: nowrap;
}
.ff-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.ff-btn:hover { transform: translateY(-1px); }

.ff-btn--primary { background: var(--accent); color: var(--accent-ink); }
.ff-btn--primary:hover { background: #e0b850; }

.ff-btn--ghost {
	background: transparent;
	color: var(--text);
	border-color: var(--border);
}
.ff-btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.ff-btn--sm { padding: 8px 14px; font-size: 0.85rem; }

.ff-btn--kofi {
	background: var(--surface-2);
	color: var(--accent);
	border: 1px solid var(--accent-dark);
}
.ff-btn--kofi:hover { background: var(--accent); color: var(--accent-ink); }

.ff-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; }
.ff-link svg { width: 16px; height: 16px; }
.ff-link:hover { color: var(--accent); }
.ff-link--back { color: var(--text-muted); margin-bottom: 24px; }

/* =========================================================
   Header / Nav
   ========================================================= */
.ff-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(11, 15, 22, 0.85);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}
.ff-header__inner {
	max-width: var(--container);
	margin: 0 auto;
	padding: 16px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.ff-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.ff-logo__mark { color: var(--accent); display: inline-flex; }
.ff-logo__mark img { border-radius: 6px; display: block; }
.ff-logo__text { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.ff-logo__text em { font-style: normal; color: var(--accent); }
.ff-logo--footer { margin-bottom: 16px; }

.ff-nav__list { display: flex; gap: 28px; }
.ff-nav__list > li { position: relative; }
.ff-nav__list > li > a { font-size: 0.95rem; color: var(--text-muted); font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.ff-nav__list > li > a:hover { color: var(--text); }

/* Items with children get a small caret; WordPress adds this class
   automatically to any menu item that has sub-pages/children. */
.ff-nav__list > li.menu-item-has-children > a::after {
	content: '';
	width: 6px; height: 6px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	opacity: 0.7;
}

.ff-nav__list .sub-menu {
	position: absolute;
	top: calc(100% + 14px);
	left: 0;
	min-width: 230px;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: 8px;
	box-shadow: 0 16px 40px rgba(0,0,0,0.45);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.15s ease, transform 0.15s ease;
	z-index: 60;
}
.ff-nav__list .sub-menu li + li { margin-top: 2px; }
.ff-nav__list .sub-menu a {
	display: block;
	padding: 9px 12px;
	border-radius: var(--radius-sm);
	font-size: 0.88rem;
	color: var(--text-muted);
	white-space: nowrap;
}
.ff-nav__list .sub-menu a:hover { background: var(--surface); color: var(--accent); }

.ff-nav__list > li:hover > .sub-menu,
.ff-nav__list > li:focus-within > .sub-menu,
.ff-nav__list > li.ff-submenu-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.ff-header__actions { display: flex; align-items: center; gap: 14px; }

.ff-nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 36px;
	height: 36px;
	background: transparent;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
}
.ff-nav-toggle span { display: block; height: 2px; width: 16px; background: var(--text); margin: 0 auto; transition: transform 0.2s ease, opacity 0.2s ease; }

.ff-mobile-nav {
	display: none;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.25s ease;
	border-top: 1px solid var(--border);
}
.ff-mobile-nav.is-open { max-height: 480px; overflow-y: auto; }
.ff-mobile-nav__list { padding: 8px 24px 20px; display: flex; flex-direction: column; gap: 4px; }
.ff-mobile-nav__list a { display: block; padding: 10px 0; color: var(--text); border-bottom: 1px solid var(--border); }
.ff-mobile-nav__list li { position: relative; }
.ff-mobile-nav__list .sub-menu { list-style: none; padding: 0 0 0 16px; max-height: 0; overflow: hidden; transition: max-height 0.2s ease; }
.ff-mobile-nav__list .sub-menu.is-open { max-height: 400px; }
.ff-mobile-nav__list .sub-menu a { color: var(--text-muted); font-size: 0.92rem; padding: 8px 0; }
.ff-submenu-toggle {
	position: absolute;
	right: 0; top: 4px;
	width: 32px; height: 32px;
	background: transparent;
	border: none;
	color: var(--text-muted);
	display: flex; align-items: center; justify-content: center;
}
.ff-submenu-toggle::after {
	content: '';
	width: 7px; height: 7px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
}
.ff-submenu-toggle.is-open::after { transform: rotate(225deg); }

@media (max-width: 860px) {
	.ff-nav { display: none; }
	.ff-nav-toggle { display: flex; }
	.ff-mobile-nav { display: block; }
	.ff-header__actions .ff-btn--sm span { display: none; }
}

/* =========================================================
   Hero — broadcast lower-third treatment
   ========================================================= */
.ff-hero {
	position: relative;
	margin: 0 -24px 64px;
	min-height: 560px;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
}
.ff-hero__bg {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(11,15,22,0.2) 0%, rgba(11,15,22,0.55) 55%, rgba(11,15,22,0.96) 100%),
		repeating-linear-gradient(115deg, #1B2330 0px, #1B2330 2px, #131922 2px, #131922 90px),
		linear-gradient(120deg, #23324a 0%, #16202e 45%, #2a1f14 100%);
	background-size: cover, 240px 100%, cover;
	animation: ff-drift 26s linear infinite;
}
@keyframes ff-drift {
	0% { background-position: 0 0, 0 0, 0 0; }
	100% { background-position: 0 0, 480px 0, 0 0; }
}
.ff-hero__lowerthird {
	position: relative;
	z-index: 2;
	max-width: var(--container);
	margin: 0 auto;
	width: 100%;
	padding: 0 24px 56px;
	border-left: 3px solid var(--accent);
	padding-left: 24px;
	max-width: 720px;
	margin-left: 24px;
}
.ff-hero__title { font-size: clamp(2rem, 4.2vw, 3.1rem); color: var(--text); margin-bottom: 0.4em; }
.ff-hero__sub { font-size: 1.05rem; max-width: 52ch; }
.ff-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 20px; }

@media (max-width: 640px) {
	.ff-hero { min-height: 460px; margin: 0 -16px 48px; }
	.ff-main { padding: 0 16px 64px; }
	.ff-hero__lowerthird { margin-left: 0; padding: 0 16px 40px 20px; }
}

/* =========================================================
   Stats strip
   ========================================================= */
.ff-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 64px;
}
.ff-stats__item {
	flex: 1 1 200px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: 22px 24px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.ff-stats__num { font-family: var(--font-display); font-size: 1.7rem; color: var(--accent); font-weight: 700; }
.ff-stats__label { color: var(--text-muted); font-size: 0.9rem; }

/* =========================================================
   Section heads / generic page head
   ========================================================= */
.ff-section { margin-bottom: 72px; }
.ff-section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 28px;
	flex-wrap: wrap;
}
.ff-section__head h2 { font-size: 1.6rem; margin: 0; }

.ff-page-head { padding: 48px 0 32px; max-width: 760px; }
.ff-page-head--center { text-align: center; max-width: 560px; margin: 0 auto; padding: 96px 0; }
.ff-page-head h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.ff-page-head__intro { max-width: 62ch; }

.ff-page__content { max-width: 100%; }
.ff-page__content img { border-radius: var(--radius-md); }

.ff-empty { color: var(--text-muted); padding: 40px 0; }

/* =========================================================
   Filters
   ========================================================= */
.ff-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.ff-filter {
	background: var(--surface);
	border: 1px solid var(--border);
	color: var(--text-muted);
	padding: 8px 16px;
	border-radius: 999px;
	font-size: 0.88rem;
	font-weight: 600;
}
.ff-filter:hover { color: var(--text); border-color: var(--accent); }
.ff-filter.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* =========================================================
   Cards / Grid
   ========================================================= */
.ff-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 22px;
}

.ff-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: border-color 0.2s ease, transform 0.2s ease;
}
.ff-card:hover { border-color: var(--accent-dark); transform: translateY(-2px); }

.ff-card__media { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); display: block; }
.ff-card__media img { width: 100%; height: 100%; object-fit: cover; }
.ff-card__media--placeholder { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-muted); }
.ff-card__play {
	position: absolute; inset: 0;
	display: flex; align-items: center; justify-content: center;
	background: rgba(11,15,22,0.25);
	opacity: 0;
	transition: opacity 0.2s ease;
	color: var(--text);
}
.ff-card__play svg { width: 40px; height: 40px; }
.ff-card:hover .ff-card__play { opacity: 1; }

.ff-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ff-card__title { font-size: 1.05rem; margin: 0; }
.ff-card__title a:hover { color: var(--accent); }
.ff-card__excerpt { font-size: 0.88rem; margin: 0; }

.ff-card__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.ff-card__links--large { margin-top: 0; }

.ff-tag-btn {
	display: inline-flex;
	align-items: center;
	font-size: 0.78rem;
	font-weight: 600;
	padding: 7px 12px;
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	border: 1px solid var(--border);
	color: var(--text);
}
.ff-tag-btn:hover { border-color: var(--accent); color: var(--accent); }
.ff-tag-btn--more { background: transparent; color: var(--text-muted); }
.ff-tag-btn--lg { padding: 12px 18px; font-size: 0.9rem; border-radius: var(--radius-sm); }

.ff-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.ff-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 38px; height: 38px; padding: 0 10px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
	color: var(--text-muted);
}
.ff-pagination .page-numbers.current { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* =========================================================
   Ticket-stub CTA (repository link) — nods to the film/footage
   subject: a torn boarding-pass / cinema-ticket silhouette.
   ========================================================= */
.ff-ticket {
	display: flex;
	align-items: stretch;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	position: relative;
	margin-bottom: 28px;
}
.ff-ticket:hover { border-color: var(--accent-dark); }
.ff-ticket__main { padding: 32px; flex: 1; }
.ff-ticket__main h2 { font-size: 1.5rem; }
.ff-ticket__main p { margin-bottom: 0; }
.ff-ticket__stub {
	flex: 0 0 180px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: var(--surface-2);
	border-left: 2px dashed var(--border);
	color: var(--accent);
	font-weight: 700;
	font-family: var(--font-display);
	text-align: center;
	padding: 20px;
}
.ff-ticket__stub svg { width: 22px; height: 22px; }
.ff-ticket--inline { margin-bottom: 40px; }

@media (max-width: 640px) {
	.ff-ticket { flex-direction: column; }
	.ff-ticket__stub { border-left: none; border-top: 2px dashed var(--border); flex-direction: row; }
}

/* =========================================================
   Single download page
   ========================================================= */
.ff-single-download { max-width: 780px; padding-top: 40px; }
.ff-single-download h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.ff-single-download__media { border-radius: var(--radius-md); overflow: hidden; margin-bottom: 24px; }
.ff-single-download__links { margin: 32px 0; }
.ff-single-download__links h2 { font-size: 1.15rem; }
.ff-single-download__support {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
	padding: 20px 24px; margin-top: 40px;
}
.ff-single-download__support p { margin: 0; color: var(--text); font-weight: 600; }

/* =========================================================
   Footer
   ========================================================= */
.ff-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 40px; }
.ff-footer__top {
	max-width: var(--container);
	margin: 0 auto;
	padding: 56px 24px 40px;
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
	gap: 40px;
}
.ff-footer__brand { max-width: 340px; }
.ff-footer__blurb { font-size: 0.92rem; }
.ff-footer__heading { font-size: 0.95rem; color: var(--text); margin-bottom: 14px; }
.ff-footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.ff-footer__col a { color: var(--text-muted); font-size: 0.92rem; }
.ff-footer__col a:hover { color: var(--accent); }

.ff-social { display: flex; gap: 10px; margin-top: 18px; }
.ff-social a {
	display: flex; align-items: center; justify-content: center;
	width: 38px; height: 38px;
	border-radius: 999px;
	background: var(--surface-2);
	border: 1px solid var(--border);
	color: var(--text-muted);
}
.ff-social a svg { width: 18px; height: 18px; }
.ff-social a:hover { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

.ff-footer__support .ff-btn--kofi { margin-top: 8px; }

.ff-footer__bottom {
	border-top: 1px solid var(--border);
	max-width: var(--container);
	margin: 0 auto;
	padding: 20px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	color: var(--text-muted);
	font-size: 0.85rem;
}
.ff-footer__bottom a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.ff-footer__bottom a:hover { color: var(--accent); }

.ff-back-to-top {
	width: 36px; height: 36px;
	border-radius: 999px;
	background: var(--surface-2);
	border: 1px solid var(--border);
	color: var(--text);
	display: flex; align-items: center; justify-content: center;
}
.ff-back-to-top:hover { color: var(--accent); border-color: var(--accent); }
.ff-back-to-top svg { width: 16px; height: 16px; }

@media (max-width: 900px) {
	.ff-footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
	.ff-footer__top { grid-template-columns: 1fr; }
	.ff-footer__bottom { flex-direction: column; text-align: center; }
}
