/* Cinematisk Cases — den enkelte case. Samme sprog som oversigten: varm grå flade, sorte piller, rolig bevægelse. */

body.cine-case-page {
	--cc-ground: #f1f0ec;
	--cc-ink: #141413;
	--cc-muted: #86847b;
	--cc-line: #d8d7d2;
	--cc-card: #e3e2dd;
	--cc-pill: #161615;
	--cc-pill-ink: #f1f0ec;
	--cc-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--cc-spring: cubic-bezier(0.32, 0.72, 0, 1);
	--cc-pad: 22px;
	--cc-top: 88px;
	margin: 0;
	background: var(--cc-ground);
	color: var(--cc-ink);
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.cine-case-page *,
.cine-case-page *::before,
.cine-case-page *::after {
	box-sizing: border-box;
}

.cine-case-page a,
.cine-case-page a:hover {
	color: inherit;
	text-decoration: none;
}

/* Hello Elementor farver alle knapper; nulstil inden for siden. */
.cine-case-page button {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-transform: none;
	cursor: pointer;
}

.cine-case-page button:hover,
.cine-case-page button:focus {
	background-color: transparent;
	color: inherit;
}

.cine-case-page a:focus-visible,
.cine-case-page button:focus-visible {
	outline: 2px solid var(--cc-ink);
	outline-offset: 3px;
}

.cine-case-page img,
.cine-case-page video {
	display: block;
	max-width: none;
}

/* ---------- Top ---------- */

.cc-top {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 18px var(--cc-pad);
	transition: background-color 500ms var(--cc-ease), box-shadow 500ms var(--cc-ease);
}

.cc-top.is-scrolled {
	background: rgba(241, 240, 236, 0.78);
	box-shadow: 0 1px 0 rgba(20, 20, 19, 0.08);
	-webkit-backdrop-filter: saturate(1.4) blur(18px);
	backdrop-filter: saturate(1.4) blur(18px);
}

body.admin-bar .cc-top {
	top: 32px;
}

.cc-logo {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.cc-actions {
	display: flex;
	gap: 8px;
}

.cine-case-page .cc-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 36px;
	padding: 0 16px;
	border-radius: 999px;
	background: var(--cc-pill);
	color: var(--cc-pill-ink);
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	white-space: nowrap;
	transition: transform 500ms var(--cc-spring), box-shadow 300ms var(--cc-ease);
}

.cine-case-page .cc-pill:hover {
	color: var(--cc-pill-ink);
	transform: translateY(-1px);
}

.cine-case-page .cc-pill--ghost,
.cine-case-page .cc-pill--ghost:hover {
	background: rgba(241, 240, 236, 0.6);
	color: var(--cc-ink);
	box-shadow: inset 0 0 0 1px var(--cc-line);
}

.cine-case-page .cc-pill--ghost:hover {
	box-shadow: inset 0 0 0 1px var(--cc-ink);
}

.cc-arrow {
	display: inline-block;
	transition: transform 500ms var(--cc-spring);
}

.cc-pill--ghost:hover .cc-arrow {
	transform: translateX(-3px);
}

/* ---------- Indhold ---------- */

.cc {
	max-width: 1540px;
	margin: 0 auto;
	padding: var(--cc-top) var(--cc-pad) 0;
}

.cc-frame {
	position: absolute;
	inset: 0;
	display: block;
	transition: transform 1200ms var(--cc-ease);
}

.cine-case-page .cc-frame img,
.cine-case-page .cc-frame video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

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

.cc-hero {
	position: relative;
}

.cine-case-page .cc-hero-media {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 6px;
	background: var(--cc-card);
	cursor: zoom-in;
	isolation: isolate;
	view-transition-name: cine-case-media;
}

.cc-eyebrow {
	display: block;
	margin: 0 0 18px;
	color: var(--cc-muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.cine-case-page .cc-title {
	margin: 0;
	color: inherit;
	font-family: inherit;
	font-size: clamp(46px, 8.2vw, 132px);
	font-weight: 700;
	letter-spacing: -0.055em;
	line-height: 0.86;
	text-wrap: balance;
}

.cc-title-sub {
	display: block;
	color: var(--cc-muted);
}

/* Bredt billede: titlen ligger på billedet. */
.cc-hero.is-wide .cc-hero-media {
	width: 100%;
	height: min(calc(100svh - var(--cc-top) - 24px), calc((min(100vw, 1540px) - 2 * var(--cc-pad)) / var(--r)));
	min-height: 380px;
}

.cc-hero.is-wide .cc-hero-media::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(to top, rgba(10, 10, 9, 0.66), rgba(10, 10, 9, 0) 58%);
	pointer-events: none;
}

.cc-hero.is-wide .cc-hero-text {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: clamp(22px, 3vw, 44px);
	color: #fff;
	pointer-events: none;
}

.cc-hero.is-wide .cc-eyebrow {
	color: rgba(255, 255, 255, 0.82);
}

.cc-hero.is-wide .cc-title-sub {
	color: rgba(255, 255, 255, 0.6);
}

/* Højt billede eller film: tekst til venstre, billedet i sit eget format til højre. */
.cc-hero.is-tall {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
	gap: clamp(24px, 4vw, 72px);
}

.cc-hero.is-tall .cc-hero-text {
	order: -1;
	max-width: 780px;
	padding-bottom: 6px;
}

.cc-hero.is-tall .cc-hero-media {
	--cc-h: max(420px, min(calc(100svh - var(--cc-top) - 24px), 880px));
	width: calc(var(--cc-h) * var(--r));
	height: var(--cc-h);
}

.cc-play {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 40px;
	padding: 0 16px 0 6px;
	border-radius: 999px;
	background: rgba(241, 240, 236, 0.92);
	color: var(--cc-ink);
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	transition: transform 600ms var(--cc-spring);
}

.cc-play-icon {
	position: relative;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--cc-pill);
}

.cc-play-icon::after {
	content: "";
	position: absolute;
	top: 9px;
	left: 11px;
	border-style: solid;
	border-width: 5px 0 5px 8px;
	border-color: transparent transparent transparent var(--cc-pill-ink);
}

/* ---------- Fakta og tekst ---------- */

.cc-lead {
	max-width: 46ch;
	margin: 28px 0 0;
	font-size: clamp(17px, 1.5vw, 21px);
	line-height: 1.45;
}

.cc-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 18px 48px;
	margin: 36px 0 0;
	padding-top: 20px;
	border-top: 1px solid var(--cc-line);
}

.cc-facts dt {
	margin: 0 0 6px;
	color: var(--cc-muted);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.cc-facts dd {
	margin: 0;
	font-size: 15px;
	font-variant-numeric: tabular-nums;
}

.cc-intro {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 28px 64px;
	padding-top: clamp(28px, 4vw, 56px);
}

.cc-intro .cc-lead,
.cc-intro .cc-facts {
	margin: 0;
}

.cc-intro .cc-facts {
	padding-top: 0;
	border-top: 0;
}

.cc-body {
	max-width: 68ch;
	margin: clamp(64px, 8vw, 112px) 0 0;
	font-size: 17px;
	line-height: 1.6;
}

.cc-body > * {
	margin: 0 0 1em;
}

/* ---------- Galleri ---------- */

.cc-gallery {
	display: grid;
	gap: 12px;
	margin-top: clamp(56px, 8vw, 120px);
}

.cc-row {
	display: flex;
	gap: 12px;
}

.cine-case-page .cc-fig {
	position: relative;
	display: block;
	flex: var(--r) 1 0%;
	min-width: 0;
	aspect-ratio: var(--r);
	overflow: hidden;
	border-radius: 4px;
	background: var(--cc-card);
	cursor: zoom-in;
	isolation: isolate;
}

.cine-case-page .cc-row.is-solo .cc-fig {
	flex: none;
	width: 100%;
	max-width: min(100%, calc(88svh * var(--r)));
	margin-inline: auto;
}

@media (hover: hover) and (pointer: fine) {
	.cc-fig:hover .cc-frame {
		transform: scale(1.025);
	}

	.cc-hero-media:hover .cc-frame {
		transform: scale(1.015);
	}

	.cc-hero-media:hover .cc-play {
		transform: scale(1.05);
	}
}

/* ---------- Næste case ---------- */

.cine-case-page .cc-next {
	position: relative;
	display: block;
	min-height: 320px;
	margin-top: clamp(96px, 12vw, 180px);
	aspect-ratio: 2.39 / 1;
	overflow: hidden;
	border-radius: 6px;
	background: var(--cc-pill);
	color: #fff;
	isolation: isolate;
}

.cine-case-page .cc-next:hover {
	color: #fff;
}

.cc-next-media {
	position: absolute;
	inset: 0;
	overflow: hidden;
	border-radius: 6px;
}

.cc-next-media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(10, 10, 9, 0.7), rgba(10, 10, 9, 0.1) 70%);
}

.cc-next .cc-frame {
	transition: transform 1400ms var(--cc-ease);
}

.cc-next-text {
	position: absolute;
	left: clamp(22px, 3vw, 44px);
	right: 30%;
	bottom: clamp(22px, 3vw, 44px);
	z-index: 2;
}

.cc-next .cc-eyebrow {
	color: rgba(255, 255, 255, 0.8);
}

.cc-next-title {
	display: block;
	font-size: clamp(34px, 6vw, 96px);
	font-weight: 700;
	letter-spacing: -0.05em;
	line-height: 0.88;
	text-wrap: balance;
}

.cc-next-meta {
	display: block;
	margin-top: 14px;
	color: rgba(255, 255, 255, 0.72);
	font-size: 12px;
}

.cc-next-go {
	position: absolute;
	right: clamp(22px, 3vw, 44px);
	bottom: clamp(22px, 3vw, 44px);
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 18px;
	border-radius: 999px;
	background: var(--cc-pill-ink);
	color: var(--cc-ink);
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

@media (hover: hover) and (pointer: fine) {
	.cc-next:hover .cc-frame {
		transform: scale(1.04);
	}

	.cc-next:hover .cc-next-go .cc-arrow {
		transform: translateX(4px);
	}
}

.cc-foot {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	margin-top: 40px;
	padding: 36px 0 56px;
	border-top: 1px solid var(--cc-line);
}

.cc-foot p {
	margin: 0;
	font-size: clamp(22px, 2.4vw, 34px);
	font-weight: 700;
	letter-spacing: -0.03em;
}

/* ---------- Bevægelse ved åbning og scroll ---------- */

@keyframes cc-rise {
	from {
		opacity: 0;
		transform: translate3d(0, 26px, 0);
	}
}

@keyframes cc-settle {
	from {
		transform: scale(1.08);
	}
}

.cc-js .cc-hero-text > * {
	animation: cc-rise 1100ms var(--cc-spring) backwards;
}

.cc-js .cc-hero-text > :nth-child(1) { animation-delay: 160ms; }
.cc-js .cc-hero-text > :nth-child(2) { animation-delay: 240ms; }
.cc-js .cc-hero-text > :nth-child(3) { animation-delay: 340ms; }

.cc-js .cc-intro {
	animation: cc-rise 1100ms var(--cc-spring) 420ms backwards;
}

.cc-js .cc-hero-media .cc-frame {
	animation: cc-settle 1800ms var(--cc-ease) backwards;
}

.cc-js .cc-reveal {
	opacity: 0;
	transform: translate3d(0, 40px, 0);
	transition: opacity 1000ms var(--cc-ease), transform 1200ms var(--cc-spring);
}

.cc-js .cc-reveal.is-in {
	opacity: 1;
	transform: none;
}

@supports (animation-timeline: view()) {
	@keyframes cc-drift {
		to {
			transform: translate3d(0, 7%, 0) scale(1.06);
		}
	}

	.cine-case-page .cc-hero-media .cc-frame img,
	.cine-case-page .cc-hero-media .cc-frame video {
		animation: cc-drift linear both;
		animation-timeline: view();
		animation-range: exit 0% exit 100%;
	}
}

/* ---------- Fuld skærm ---------- */

.cine-case-page .cc-viewer {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	background: transparent;
	color: var(--cc-pill-ink);
}

.cc-viewer::backdrop {
	background: transparent;
}

.cc-viewer-bg {
	position: absolute;
	inset: 0;
	background: rgba(11, 11, 10, 0.95);
	opacity: 0;
	transition: opacity 500ms var(--cc-ease);
}

.cc-viewer-ui {
	opacity: 0;
	transition: opacity 400ms var(--cc-ease) 120ms;
}

.cc-viewer.is-open .cc-viewer-bg,
.cc-viewer.is-open .cc-viewer-ui {
	opacity: 1;
}

.cc-viewer-stage {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.cc-viewer-item {
	position: absolute;
	overflow: hidden;
	border-radius: 4px;
	background: #000;
	transform-origin: 50% 50%;
	pointer-events: auto;
	will-change: transform;
}

.cine-case-page .cc-viewer-item img,
.cine-case-page .cc-viewer-item video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	user-select: none;
	-webkit-user-drag: none;
}

.cc-viewer-bar {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 3;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 18px var(--cc-pad);
}

.cc-viewer-count {
	color: rgba(241, 240, 236, 0.7);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	font-variant-numeric: tabular-nums;
}

.cine-case-page button.cc-viewer-close,
.cine-case-page button.cc-viewer-nav {
	background: rgba(241, 240, 236, 0.12);
	color: var(--cc-pill-ink);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	transition: background-color 300ms var(--cc-ease), transform 500ms var(--cc-spring), opacity 400ms var(--cc-ease) 120ms;
}

.cine-case-page button.cc-viewer-close:hover,
.cine-case-page button.cc-viewer-nav:hover,
.cine-case-page button.cc-viewer-close:focus-visible,
.cine-case-page button.cc-viewer-nav:focus-visible {
	background: rgba(241, 240, 236, 0.24);
	color: var(--cc-pill-ink);
}

.cine-case-page button.cc-viewer-close {
	min-height: 36px;
	padding: 0 16px;
	border-radius: 999px;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.cine-case-page button.cc-viewer-nav {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 48px;
	height: 48px;
	margin-top: -24px;
	border-radius: 50%;
	font-size: 18px;
}

.cine-case-page button.cc-viewer-nav.is-prev { left: 16px; }
.cine-case-page button.cc-viewer-nav.is-next { right: 16px; }

.cine-case-page button.cc-viewer-nav[hidden] {
	display: none;
}

.cine-case-page .cc-viewer:focus-visible,
.cine-case-page .cc-viewer button:focus-visible {
	outline-color: var(--cc-pill-ink);
}

/* ---------- Mobil ---------- */

@media (max-width: 782px) {
	body.admin-bar .cc-top {
		top: 46px;
	}
}

@media (max-width: 760px) {
	body.cine-case-page {
		--cc-pad: 12px;
		--cc-top: 72px;
	}

	.cc-top {
		padding: 14px var(--cc-pad);
	}

	.cc-hero.is-wide .cc-hero-media {
		height: auto;
		min-height: 0;
		aspect-ratio: var(--r);
	}

	.cc-hero.is-wide .cc-hero-media::after {
		display: none;
	}

	.cc-hero.is-wide .cc-hero-text {
		position: static;
		padding: 26px 0 0;
		color: var(--cc-ink);
	}

	.cc-hero.is-wide .cc-eyebrow,
	.cc-hero.is-wide .cc-title-sub {
		color: var(--cc-muted);
	}

	.cc-hero.is-tall {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 26px;
	}

	.cc-hero.is-tall .cc-hero-text {
		order: 0;
	}

	.cc-hero.is-tall .cc-hero-media {
		order: -1;
		width: min(100%, calc(74svh * var(--r)));
		height: auto;
		margin-inline: auto;
		aspect-ratio: var(--r);
	}

	.cc-row {
		flex-direction: column;
		gap: 12px;
	}

	.cine-case-page .cc-fig,
	.cine-case-page .cc-row.is-solo .cc-fig {
		flex: none;
		width: 100%;
		max-width: 100%;
	}

	.cine-case-page .cc-next {
		aspect-ratio: 4 / 5;
	}

	.cc-next-text {
		right: 22px;
	}

	.cc-next-go {
		display: none;
	}

	.cine-case-page button.cc-viewer-nav {
		top: auto;
		bottom: 20px;
		margin-top: 0;
	}
}

@media (max-width: 360px) {
	.cine-case-page .cc-pill--ghost {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cine-case-page *,
	.cine-case-page *::before,
	.cine-case-page *::after {
		animation: none !important;
		transition: none !important;
	}

	.cc-js .cc-reveal {
		opacity: 1;
		transform: none;
	}
}
