/* =========================================================
   FC BiH Odense — Motion
   Rolls-Royce: præcis, stille, dyr. Ikke et effektshow.
   ========================================================= */

:root {
	--fcbih-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--fcbih-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
	--fcbih-ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
	--fcbih-ease-land: cubic-bezier(0.22, 1.28, 0.32, 1);
	--fcbih-duration: 900ms;
}

html {
	scroll-behavior: smooth;
}

/* Film-korn over hele sitet — næsten usynligt, men det gør sorten dyrere */
body::after {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 80;
	opacity: 0.035;
	mix-blend-mode: overlay;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Scroll-progress — en gul nerve i toppen */
.fcbih-progress {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 90;
	height: 2px;
	width: 100%;
	background: var(--fcbih-yellow);
	transform: scaleX(0);
	transform-origin: left center;
	pointer-events: none;
	box-shadow: 0 0 12px rgba(246, 200, 0, 0.45);
}

/* Page leave */
html.fcbih-leaving .wp-site-blocks {
	opacity: 0;
	transform: translate3d(0, -16px, 0);
	filter: saturate(0.85);
	transition: opacity 280ms var(--fcbih-ease-soft), transform 280ms var(--fcbih-ease-soft), filter 280ms linear;
}

/* ---------------------------------------------------------
   Hero build
   --------------------------------------------------------- */

.fcbih-hero {
	overflow: hidden;
	isolation: isolate;
}

.fcbih-hero .wp-block-cover__image-background,
.fcbih-hero .wp-block-cover__video-background {
	transform: scale(1.12);
	will-change: transform;
}

.fcbih-js .fcbih-hero .wp-block-cover__image-background {
	animation: fcbih-kenburns 18s var(--fcbih-ease-out) both;
}

.fcbih-hero__spot {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: radial-gradient(
		520px circle at var(--x, 50%) var(--y, 38%),
		rgba(246, 200, 0, 0.14),
		transparent 46%
	);
	opacity: 0;
	transition: opacity 0.6s var(--fcbih-ease-soft);
	mix-blend-mode: screen;
}

.fcbih-hero:hover .fcbih-hero__spot {
	opacity: 1;
}

.fcbih-hero .wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
}

.fcbih-js .fcbih-hero .fcbih-kicker,
.fcbih-js .fcbih-hero .fcbih-hero__title,
.fcbih-js .fcbih-hero .fcbih-hero__identity,
.fcbih-js .fcbih-hero .wp-block-buttons,
.fcbih-js .fcbih-hero .fcbih-next-compact {
	opacity: 0;
	transform: translate3d(0, 28px, 0);
}

.fcbih-hero.is-built .fcbih-kicker,
.fcbih-hero.is-built .fcbih-hero__title,
.fcbih-hero.is-built .fcbih-hero__identity,
.fcbih-hero.is-built .wp-block-buttons,
.fcbih-hero.is-built .fcbih-next-compact,
html:not(.fcbih-js) .fcbih-hero .fcbih-kicker,
html:not(.fcbih-js) .fcbih-hero .fcbih-hero__title,
html:not(.fcbih-js) .fcbih-hero .fcbih-hero__identity,
html:not(.fcbih-js) .fcbih-hero .wp-block-buttons,
html:not(.fcbih-js) .fcbih-hero .fcbih-next-compact {
	opacity: 1;
	transform: none;
}

.fcbih-hero.is-built .fcbih-kicker {
	transition: opacity 700ms var(--fcbih-ease) 80ms, transform 700ms var(--fcbih-ease) 80ms;
}

.fcbih-hero.is-built .fcbih-hero__title {
	transition: opacity 80ms linear 160ms;
}

.fcbih-hero.is-built .fcbih-hero__identity {
	transition: opacity 80ms linear 320ms;
}

.fcbih-hero.is-built .wp-block-buttons {
	transition: opacity 800ms var(--fcbih-ease) 520ms, transform 800ms var(--fcbih-ease) 520ms;
}

.fcbih-hero.is-built .fcbih-next-compact {
	transition: opacity 900ms var(--fcbih-ease) 720ms, transform 900ms var(--fcbih-ease) 720ms;
}

.fcbih-word {
	display: inline-block;
	overflow: hidden;
	vertical-align: bottom;
	padding-bottom: 0.06em;
	margin-bottom: -0.06em;
}

.fcbih-word__inner {
	display: block;
	transform: translate3d(0, 115%, 0);
}

.fcbih-hero.is-built .fcbih-word__inner {
	animation: fcbih-rise 980ms var(--fcbih-ease) calc(180ms + var(--i, 0) * 70ms) both;
}

@keyframes fcbih-rise {
	from { transform: translate3d(0, 115%, 0); }
	to { transform: translate3d(0, 0, 0); }
}

@keyframes fcbih-kenburns {
	from { transform: scale(1.14) translate3d(0, 0, 0); }
	to { transform: scale(1.08) translate3d(0, 0, 0); }
}

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */

.fcbih-header {
	transition: transform 520ms var(--fcbih-ease), background 400ms var(--fcbih-ease-soft), box-shadow 400ms var(--fcbih-ease-soft), border-color 400ms linear;
}

.fcbih-header.is-scrolled {
	background: linear-gradient(180deg, rgba(8, 20, 38, 0.92), rgba(8, 20, 38, 0.86));
	border-bottom-color: rgba(246, 200, 0, 0.18);
	box-shadow: 0 10px 36px rgba(0, 0, 0, 0.42);
}

.fcbih-header.is-hidden {
	transform: translate3d(0, -110%, 0);
}

.fcbih-header .wp-block-site-logo img {
	transition: transform 500ms var(--fcbih-ease);
}

.fcbih-header .wp-block-navigation a {
	position: relative;
	transition: color 250ms var(--fcbih-ease-soft);
}

.fcbih-header .wp-block-navigation a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -0.28em;
	width: 100%;
	height: 1px;
	background: var(--fcbih-yellow);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 420ms var(--fcbih-ease);
}

.fcbih-header .wp-block-navigation a:hover::after,
.fcbih-header .wp-block-navigation .current-menu-item > a::after,
.fcbih-header .wp-block-navigation a[aria-current="page"]::after {
	transform: scaleX(1);
}

.fcbih-header .wp-block-navigation .current-menu-item > a,
.fcbih-header .wp-block-navigation a[aria-current="page"] {
	color: var(--fcbih-yellow);
}

/* ---------------------------------------------------------
   Scroll build + reveals
   --------------------------------------------------------- */

.fcbih-build {
	position: relative;
}

.fcbih-build::before {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	width: min(100%, 1400px);
	height: 1px;
	transform: translateX(-50%) scaleX(0);
	transform-origin: center;
	background: linear-gradient(90deg, transparent, rgba(246, 200, 0, 0.7), transparent);
	opacity: 0;
	pointer-events: none;
}

.fcbih-build.is-visible::before {
	opacity: 1;
	transform: translateX(-50%) scaleX(1);
	transition: transform 1100ms var(--fcbih-ease), opacity 500ms linear;
}

.fcbih-reveal {
	opacity: 0;
	transform: translate3d(0, 36px, 0);
	filter: blur(6px);
	transition:
		opacity var(--fcbih-duration) var(--fcbih-ease) var(--d, 0ms),
		transform var(--fcbih-duration) var(--fcbih-ease) var(--d, 0ms),
		filter 700ms var(--fcbih-ease) var(--d, 0ms);
}

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

.fcbih-img-reveal {
	overflow: hidden;
}

.fcbih-img-reveal img {
	transform: scale(1.1);
	clip-path: inset(12% 12% 12% 12%);
	filter: saturate(0.7);
	transition:
		transform 1400ms var(--fcbih-ease),
		clip-path 1100ms var(--fcbih-ease),
		filter 1100ms var(--fcbih-ease-soft);
}

.fcbih-img-reveal.is-visible img,
.fcbih-reveal.is-visible .fcbih-img-reveal img,
.fcbih-player-card.is-visible .fcbih-player-card__photo img {
	transform: scale(1);
	clip-path: inset(0);
	filter: none;
}

/* ---------------------------------------------------------
   Buttons + links — shine, magnetic host
   --------------------------------------------------------- */

.wp-element-button,
.fcbih-btn {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	transition:
		transform 280ms var(--fcbih-ease),
		background 280ms var(--fcbih-ease-soft),
		color 280ms var(--fcbih-ease-soft),
		box-shadow 280ms var(--fcbih-ease-soft),
		border-color 280ms var(--fcbih-ease-soft);
	will-change: transform;
}

.wp-element-button::after,
.fcbih-btn::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(115deg, transparent 25%, rgba(255, 255, 255, 0.28) 48%, transparent 72%);
	transform: translate3d(-130%, 0, 0);
	pointer-events: none;
	z-index: 1;
}

.wp-element-button:hover::after,
.fcbih-btn:hover::after {
	transform: translate3d(130%, 0, 0);
	transition: transform 750ms var(--fcbih-ease-soft);
}

.wp-element-button:hover,
.fcbih-btn:hover {
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.wp-block-button:not(.is-style-outline) .wp-element-button:hover {
	box-shadow: 0 12px 32px rgba(246, 200, 0, 0.28);
}

.fcbih-link-arrow {
	position: relative;
	transition: color 250ms var(--fcbih-ease-soft), letter-spacing 250ms var(--fcbih-ease);
}

.fcbih-link-arrow:hover {
	letter-spacing: 0.14em;
}

/* ---------------------------------------------------------
   Cards
   --------------------------------------------------------- */

.fcbih-match-card,
.fcbih-info-card,
.fcbih-price-card,
.fcbih-news__item,
.fcbih-archive-card,
.fcbih-match-center__col,
.fcbih-next-match,
.fcbih-news__main {
	transition:
		transform 500ms var(--fcbih-ease),
		border-color 400ms var(--fcbih-ease-soft),
		box-shadow 500ms var(--fcbih-ease);
}

.fcbih-match-card:hover,
.fcbih-info-card:hover,
.fcbih-price-card:hover,
.fcbih-news__item:hover,
.fcbih-archive-card:hover,
.fcbih-match-center__col:hover {
	transform: translate3d(0, -6px, 0);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.fcbih-match-card::after {
	transition: transform 600ms var(--fcbih-ease), width 600ms var(--fcbih-ease);
}

.fcbih-match-card:hover::after {
	width: 140px;
}

.fcbih-player-card__photo img,
.fcbih-news__image img,
.fcbih-news__thumb img {
	transition: transform 900ms var(--fcbih-ease), filter 500ms var(--fcbih-ease-soft);
}

/* ---------------------------------------------------------
   Player cards — land from above, name rises, 3D lift
   --------------------------------------------------------- */

.fcbih-js .fcbih-player-card:not(.is-visible) {
	opacity: 0;
	transform: translate3d(0, -100px, 0);
}

.fcbih-js .fcbih-player-card.is-visible {
	opacity: 1;
	transform: translate3d(0, 0, 0);
	transition:
		opacity 420ms ease var(--d, 0ms),
		transform 880ms var(--fcbih-ease-land) var(--d, 0ms),
		box-shadow 500ms ease var(--d, 0ms);
}

.fcbih-js .fcbih-player-card:not(.is-visible) .fcbih-player-card__firstname,
.fcbih-js .fcbih-player-card:not(.is-visible) .fcbih-player-card__lastname,
.fcbih-js .fcbih-player-card:not(.is-visible) .fcbih-player-card__position {
	opacity: 0;
	transform: translate3d(0, 2.8rem, 0);
}

.fcbih-js .fcbih-player-card.fcbih-land.is-visible .fcbih-player-card__firstname,
.fcbih-js .fcbih-player-card.fcbih-land.is-visible .fcbih-player-card__lastname,
.fcbih-js .fcbih-player-card.fcbih-land.is-visible .fcbih-player-card__position {
	opacity: 1;
	transform: none;
	transition:
		opacity 700ms var(--fcbih-ease) calc(var(--d, 0ms) + 180ms),
		transform 820ms var(--fcbih-ease) calc(var(--d, 0ms) + 180ms);
}

.fcbih-js .fcbih-player-card.fcbih-land.is-settled {
	transition:
		transform 500ms cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 500ms ease;
	transition-delay: 0ms;
}

.fcbih-js .fcbih-player-card.fcbih-land.is-settled:hover {
	transform: perspective(600px) rotateY(-12deg) rotateX(5deg) translateY(-18px) scale(1.04);
	box-shadow:
		inset 0 0 0 1px rgba(255, 255, 255, 0.5),
		inset 0 0 0 6px #081426,
		25px 30px 70px rgba(0, 0, 0, 0.55),
		8px 8px 25px rgba(0, 0, 0, 0.3);
}

/* På mobil glider slider-kortene bare ind. Faldet fra oven bliver på desktop. */
@media (max-width: 781px) {
	.fcbih-js .fcbih-slider .fcbih-player-card,
	.fcbih-js .fcbih-slider .fcbih-player-card:not(.is-visible),
	.fcbih-js .fcbih-slider .fcbih-player-card.is-visible {
		opacity: 1;
		transform: none;
	}

	.fcbih-js .fcbih-slider .fcbih-player-card:not(.is-visible) .fcbih-player-card__firstname,
	.fcbih-js .fcbih-slider .fcbih-player-card:not(.is-visible) .fcbih-player-card__lastname,
	.fcbih-js .fcbih-slider .fcbih-player-card:not(.is-visible) .fcbih-player-card__position,
	.fcbih-js .fcbih-slider .fcbih-player-card.fcbih-land.is-visible .fcbih-player-card__firstname,
	.fcbih-js .fcbih-slider .fcbih-player-card.fcbih-land.is-visible .fcbih-player-card__lastname,
	.fcbih-js .fcbih-slider .fcbih-player-card.fcbih-land.is-visible .fcbih-player-card__position {
		opacity: 1;
		transform: none;
	}
}

.fcbih-player-grid {
	padding-top: 100px;
	margin-top: -100px;
}

/* ---------------------------------------------------------
   Social
   --------------------------------------------------------- */

.wp-block-social-link {
	transition: transform 400ms var(--fcbih-ease), box-shadow 400ms var(--fcbih-ease);
}

.wp-block-social-link:hover {
	transform: translate3d(0, -5px, 0);
	box-shadow: 0 12px 26px rgba(246, 200, 0, 0.32);
}

.wp-block-social-link a {
	display: flex;
	will-change: transform;
}

/* ---------------------------------------------------------
   Partner marquee
   --------------------------------------------------------- */

.fcbih-partner-marquee {
	display: flex;
	overflow: hidden;
	gap: 0.8rem;
	mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.fcbih-partner-marquee__track {
	display: flex;
	flex: 0 0 auto;
	gap: 0.8rem;
	align-items: stretch;
	width: max-content;
}

.fcbih-partner-marquee.is-ready .fcbih-partner-marquee__track {
	animation: fcbih-marquee 38s linear infinite;
}

.fcbih-partner-marquee:hover .fcbih-partner-marquee__track {
	animation-play-state: paused;
}

.fcbih-partner-marquee .fcbih-partner {
	min-height: 74px;
	min-width: 168px;
	padding: 0.9rem 1.4rem;
	flex: 0 0 auto;
}

.fcbih-partner-marquee .fcbih-partner:has(img) {
	padding: 0;
	min-height: 0;
	min-width: 168px;
	aspect-ratio: 3 / 2;
	overflow: hidden;
}

.fcbih-partner-marquee .fcbih-partner img {
	max-height: 46px;
}

.fcbih-partner-marquee .fcbih-partner:has(img) img {
	max-height: none;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Footer: et roligt logo-bånd. Ingen afklippede kanter. */
.fcbih-footer .fcbih-partner-marquee {
	flex-wrap: wrap;
	justify-content: center;
	overflow: visible;
	mask-image: none;
	-webkit-mask-image: none;
	gap: 0.7rem;
}

.fcbih-footer .fcbih-partner-marquee__track {
	flex-wrap: wrap;
	justify-content: center;
	width: 100%;
	animation: none !important;
	gap: 0.7rem;
}

.fcbih-footer .fcbih-partner-marquee__track[aria-hidden="true"] {
	display: none;
}

.fcbih-footer .fcbih-partner-marquee .fcbih-partner {
	background: rgba(255, 255, 255, 0.96);
	min-height: 58px;
	min-width: 0;
	padding: 0.7rem 1.1rem;
	border-radius: 8px;
}

.fcbih-footer .fcbih-partner-marquee .fcbih-partner-slot {
	flex: 0 0 196px;
	width: 196px;
}

.fcbih-footer .fcbih-partner-marquee .fcbih-partner:has(img) {
	width: 100%;
	padding: 0;
	min-height: 0;
	min-width: 0;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: #fff;
}

.fcbih-footer .fcbih-partner__name {
	font-size: 0.95rem;
	line-height: 1.05;
	letter-spacing: 0.03em;
}

@keyframes fcbih-marquee {
	from { transform: translate3d(0, 0, 0); }
	to { transform: translate3d(calc(-100% - 0.8rem), 0, 0); }
}

/* Fallback hvis JS ikke har klonet sporet */
.fcbih-partner-rail {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
	align-items: stretch;
}


/* ---------------------------------------------------------
   Reduced motion — alt synligt, ingen bevægelse
   --------------------------------------------------------- */

/* Footer-logoet hopper som en bold, så længe musen er over det */
.fcbih-footer .wp-block-site-logo img {
	transform-origin: 50% 100%;
}

.fcbih-footer .wp-block-site-logo a:hover img {
	animation: fcbih-logo-bounce 0.72s cubic-bezier(0.3, 0.7, 0.3, 1) infinite;
}

@keyframes fcbih-logo-bounce {
	0%, 100% { transform: translateY(0) scale(1, 1); }
	38% { transform: translateY(-16px) scale(0.9, 1.08); }
	55% { transform: translateY(-18px) scale(0.92, 1.04); }
	78% { transform: translateY(0) scale(1.08, 0.86); }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }

	body::after,
	.fcbih-progress,
	.fcbih-hero__spot,
	.fcbih-build::before,
	.wp-element-button::after,
	.fcbih-btn::after {
		display: none;
	}

	.fcbih-js .fcbih-hero .fcbih-kicker,
	.fcbih-js .fcbih-hero .fcbih-hero__title,
	.fcbih-js .fcbih-hero .fcbih-hero__identity,
	.fcbih-js .fcbih-hero .wp-block-buttons,
	.fcbih-js .fcbih-hero .fcbih-next-compact,
	.fcbih-reveal,
	.fcbih-img-reveal img,
	.fcbih-word__inner,
	.fcbih-hero .wp-block-cover__image-background,
	.fcbih-js .fcbih-player-card.fcbih-land,
	.fcbih-js .fcbih-player-card.fcbih-land .fcbih-player-card__firstname,
	.fcbih-js .fcbih-player-card.fcbih-land .fcbih-player-card__lastname,
	.fcbih-js .fcbih-player-card.fcbih-land .fcbih-player-card__position {
		opacity: 1 !important;
		transform: none !important;
		filter: none !important;
		clip-path: none !important;
		animation: none !important;
		transition: none !important;
	}

	.fcbih-header.is-hidden { transform: none; }

	.fcbih-footer .wp-block-site-logo a:hover img {
		animation: none;
	}

	.fcbih-partner-pop {
		transition: none;
	}

	.fcbih-partner-marquee.is-ready .fcbih-partner-marquee__track {
		animation: none;
		flex-wrap: wrap;
		width: auto;
	}

	html.fcbih-leaving .wp-site-blocks {
		opacity: 1;
		transform: none;
		filter: none;
		transition: none;
	}
}

@media (max-width: 781px) {
	.fcbih-hero__spot { display: none; }
	.fcbih-reveal { filter: none; }
}
