/*
Theme Name: Videomakeriet
Theme URI: https://www.videomakeriet.no
Author: Elemental Web
Author URI: https://www.eleweb.no
Description: Block theme for videomakeriet.no: the site's tokens, logo, header/footer, templates and patterns. Shared functionality comes from the plugin elemental-core.
Requires at least: 6.6
Requires PHP: 8.1
Version: 0.10.8
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: videomakeriet
*/

/* Design direction: docs/decisions/0007-three-directions.md, B «Høylytt» (chosen by Videomakeriet
   2026-11-22). As loud as their slogan: poster type in capitals, whole sections in one colour
   (cobalt, yellow, pink, paper, ink, orange), ink borders and hard ink shadows like stickers, the
   showreel still inside the headline's letters. Tokens live in theme.json; this file holds the
   layout classes and what theme.json can't express. Spacing comes from the layout classes, never
   per block. Vocabulary: the Elemental Web design system (font roles display/body, spacing 20–80,
   custom line-height/letter-spacing/gutter/box/control tokens), and only these breakpoints,
   always as max-width (width − 1px):
     xs  360px   small phones                            @media (max-width: 360px)
     sm  600px   phone / tablet                          @media (max-width: 599px)
     md  782px   WordPress stacks columns below this     @media (max-width: 781px)
     lg  1024px  tablet / desktop                        @media (max-width: 1023px)
     xl  1600px  fluid type and spacing stop growing (theme.json typography.fluid)

   Motion: everything that moves follows the scroll (scroll-driven animations), inside @supports
   and only without reduced motion. Without support the page is simply in place. */

/* Web fonts are self-hosted (assets/fonts/, registered in theme.json). Fallback faces with the
   fonts' metrics ("<Font> Fallback": size-adjust, ascent-override …) are not computed yet; the
   stacks already name them, so adding the @font-face rules here is enough. */

/* Boxes inside columns and query loops are padded by the width of that column, not the screen:
   --wp--custom--box--padding uses cqi. Outside a container cqi measures the viewport. */
.wp-block-column,
.wp-block-post-template > li {
	container-type: inline-size;
}

/* Header, main and footer sit flush: sections bring their own spacing. */
.wp-site-blocks > * {
	margin-block-start: 0;
}

/* A wide poster line never makes the page scroll sideways. */
body {
	overflow-x: clip;
}

h1,
h2,
h3 {
	text-wrap: balance;
}

p,
li {
	text-wrap: pretty;
}

/* Visible keyboard focus everywhere: yellow on cobalt and ink, ink on the light and coloured
   sections. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 4px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

.has-paper-background-color :focus-visible,
.has-accent-background-color :focus-visible,
.has-pink-background-color :focus-visible,
.has-orange-background-color :focus-visible {
	outline-color: var(--wp--preset--color--ink);
}

/* For a heading that's there for screen readers and search engines, not for the eye. */
.videomakeriet-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Text links: a thick underline that gets thicker under the pointer. */
a {
	text-decoration-thickness: 2px;
	text-underline-offset: 0.25em;
}

a:hover {
	text-decoration-thickness: 4px;
}

/* Highlighted words (the editor's Highlight format) carry only their colour. */
mark.has-inline-color {
	background: none;
}

/* ---------------------------------------------------------------------------------------
   Buttons: stickers. Yellow is the default; pink and paper are the other two. An ink border, a
   hard ink shadow, and the button sits down when pressed. At least 52px high.
   --------------------------------------------------------------------------------------- */

.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--wp--custom--control--height);
	white-space: nowrap;
}

.wp-block-button__link:hover {
	translate: 3px 3px;
}

.wp-block-button__link:active {
	translate: 6px 6px;
	box-shadow: none;
}

.wp-block-button.is-style-pink .wp-block-button__link {
	background: var(--wp--preset--color--pink);
}

.wp-block-button.is-style-paper .wp-block-button__link {
	background: var(--wp--preset--color--paper);
}

@media (prefers-reduced-motion: no-preference) {
	.wp-block-button__link {
		transition: translate 0.12s, box-shadow 0.12s;
	}
}

/* ---------------------------------------------------------------------------------------
   Layout system. Templates and patterns use these classes instead of per-block padding.
   `.wp-block-group.` raises specificity above WordPress's layout rules.
   --------------------------------------------------------------------------------------- */

/* Full-width section in one colour: spacing-80 top and bottom (fluid), gutter at the sides, an
   ink line where it meets the section above. */
.wp-block-group.videomakeriet-section {
	padding: var(--wp--preset--spacing--80) var(--wp--custom--gutter);
	border-top: var(--wp--custom--border--edge) solid var(--wp--preset--color--ink);
}

/* No strip of page ground between full-width sections. */
.wp-block-post-content > .alignfull,
.wp-block-post-content > .alignfull + .alignfull {
	margin-block: 0;
}

/* The lead: one or two lines beside or under a large heading. */
.videomakeriet-lead {
	max-width: 40ch;
	font-weight: 600;
	line-height: var(--wp--custom--line-height--normal);
}

/* WordPress centres a narrow child of a constrained section. A lead that stands alone starts at
   the section grid's left edge instead, like everything else. */
.videomakeriet-section > .videomakeriet-lead {
	margin-left: max(0px, calc((100% - var(--wp--style--global--wide-size)) / 2)) !important;
}

/* A section's head: the heading, and one line beside it on wide screens. */
.videomakeriet-head {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--60);
}

.videomakeriet-head > * {
	margin-block: 0;
}

/* Hero: the cobalt screen, the poster headline at its foot. The header lies over it. */
.wp-block-group.videomakeriet-hero {
	position: relative;
	display: grid;
	align-content: end;
	min-height: 100svh;
	padding: var(--wp--custom--spacing--hero-top) var(--wp--custom--gutter) var(--wp--preset--spacing--60);
	overflow: clip;
}

/* The poster: four short lines in capitals. The first two are cut out of the showreel still (the
   picture shows through the letters, with a paper outline); the last two are yellow (a Highlight
   on those words). Sized so the longest line holds on a 320px phone and all four fit the screen's
   height. The lines sit just far enough apart for the ring of an Å to clear the line above
   (the `display` line height): tighter, and "FÅ" reads as "FA". */
/* The English headline's lines are longer ("AND EVERYONE" against "HA VIDEO,"), so on narrow
   screens its type is set smaller; on wide screens the height limit decides, as in Norwegian. */
:lang(en) .videomakeriet-poster {
	font-size: var(--wp--custom--font-size--poster-long);
}

/* The ring of an Å is taller than the gap between two lines (Anton: 1.23em above the baseline, the
   lines 1.1em apart), so the line that has one gets the missing room above it and no more. */
.videomakeriet-poster__ring {
	display: inline-block;
	padding-top: 0.18em;
}

.videomakeriet-poster {
	width: fit-content;
	margin: 0;
	color: var(--wp--preset--color--paper);
	font-size: var(--wp--custom--font-size--poster);
	line-height: var(--wp--custom--line-height--display);
	letter-spacing: var(--wp--custom--letter-spacing--display);
	white-space: nowrap;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
	.videomakeriet-poster {
		background: var(--wp--preset--color--paper) url(assets/images/hero-poster.webp) 50% 0 / 150% auto no-repeat;
		-webkit-background-clip: text;
		background-clip: text;
		color: transparent;
		-webkit-text-stroke: 2px var(--wp--preset--color--paper);
		paint-order: stroke fill;
	}

	.videomakeriet-poster mark {
		-webkit-text-stroke: 0;
	}
}

/* WordPress centres a constrained group's children with auto margins, which in a grid also
   shrinks them. The hero's children start at the section grid's left edge instead. */
.wp-block-group.videomakeriet-hero > * {
	margin-inline: max(0px, calc((100% - var(--wp--style--global--wide-size)) / 2)) !important;
}

.videomakeriet-hero__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--60);
	margin-top: var(--wp--preset--spacing--50);
}

.videomakeriet-hero__foot > * {
	margin-block: 0;
}

.videomakeriet-hero__actions {
	gap: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
}

/* The star: a pink sticker in the hero's corner that plays the showreel. The whole star is the
   link. */
.wp-block-group.videomakeriet-hero > .videomakeriet-star {
	margin: 0 !important;
}

.videomakeriet-star {
	position: absolute;
	top: clamp(6rem, 16vh, 11rem);
	right: clamp(1rem, 6vw, 7rem);
	width: var(--wp--custom--spacing--star);
	aspect-ratio: 1;
	margin: 0;
	rotate: 12deg;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--custom--font-size--star);
	line-height: 1;
	text-align: center;
	text-transform: uppercase;
}

.videomakeriet-star a {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: var(--wp--preset--color--pink);
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	/* Twelve even points: every point is a point (the hand-drawn shape had a flat top). */
	clip-path: polygon(50% 0%, 60.5% 10.9%, 75% 6.7%, 78.6% 21.4%, 93.3% 25%, 89.1% 39.5%, 100% 50%, 89.1% 60.5%, 93.3% 75%, 78.6% 78.6%, 75% 93.3%, 60.5% 89.1%, 50% 100%, 39.5% 89.1%, 25% 93.3%, 21.4% 78.6%, 6.7% 75%, 10.9% 60.5%, 0% 50%, 10.9% 39.5%, 6.7% 25%, 21.4% 21.4%, 25% 6.7%, 39.5% 10.9%);
}

.videomakeriet-star a:hover,
.videomakeriet-star a:focus-visible {
	background: var(--wp--preset--color--accent);
}

/* The band of words under the hero: what they make, on ink. */
.videomakeriet-band {
	margin: 0;
	padding: var(--wp--preset--spacing--30) 0;
	overflow: clip;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--accent);
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--custom--font-size--band);
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
	word-spacing: 0.6em;
}

/* Films: stills as stickers, each tilted a little. The frame is one link target. */
.videomakeriet-work .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
	gap: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50);
	margin: var(--wp--preset--spacing--70) 0 var(--wp--preset--spacing--60);
	padding: 0;
	list-style: none;
}

.videomakeriet-work .wp-block-post-template > li {
	--tilt: -1.5deg;
	position: relative;
	margin: 0;
	rotate: var(--tilt);
	border: var(--wp--custom--border--edge) solid var(--wp--preset--color--ink);
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	box-shadow: var(--wp--preset--shadow--sticker);
}

.videomakeriet-work .wp-block-post-template > li:nth-child(2n) {
	--tilt: 1.75deg;
}

.videomakeriet-work .wp-block-post-template > li:nth-child(3n) {
	--tilt: -0.75deg;
}

.videomakeriet-work .wp-block-post-template > li:hover {
	rotate: calc(var(--tilt) * -1);
}

.videomakeriet-work .wp-block-post-featured-image {
	margin: 0;
	border-bottom: var(--wp--custom--border--edge) solid var(--wp--preset--color--ink);
	background: var(--wp--preset--color--ink);
}

.videomakeriet-work .wp-block-post-featured-image img {
	display: block;
}

.videomakeriet-card__text {
	padding: var(--wp--custom--box--padding);
}

.videomakeriet-card__text > * {
	margin-block: 0;
}

.videomakeriet-card__text > * + * {
	margin-top: var(--wp--custom--spacing--tight);
}

/* The whole card follows the title's link. */
.videomakeriet-work .wp-block-post-title a {
	text-decoration: none;
}

.videomakeriet-work .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

/* Where a section shows a fixed handful of films (the front page's six, three under a project or
   on Film), they sit three across on desktops and two on tablets, so a row is never left with a
   lone pair. The full list (Tidligere arbeid) fills the width instead. */
@media (min-width: 1024px) {
	.videomakeriet-work:not(.videomakeriet-work--all) .wp-block-post-template {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 600px) and (max-width: 1023px) {
	.videomakeriet-work:not(.videomakeriet-work--all) .wp-block-post-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Tags: the film's type, a news post's source. A pill with an ink line. */
.videomakeriet-tag {
	display: inline-block;
	padding: var(--wp--custom--control--padding-small);
	border: var(--wp--custom--border--tag) solid var(--wp--preset--color--ink);
	border-radius: var(--wp--custom--radius--button);
	background: var(--wp--preset--color--pink);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	line-height: var(--wp--custom--line-height--normal);
}

.videomakeriet-tag a {
	text-decoration: none;
}

.videomakeriet-work li:nth-child(4n + 2) .videomakeriet-tag {
	background: var(--wp--preset--color--orange);
}

.videomakeriet-work li:nth-child(4n + 3) .videomakeriet-tag {
	background: var(--wp--preset--color--accent);
}

.videomakeriet-work li:nth-child(4n) .videomakeriet-tag {
	background: var(--wp--preset--color--mint);
}

@media (prefers-reduced-motion: no-preference) {
	.videomakeriet-work .wp-block-post-template > li {
		transition: rotate 0.2s;
	}
}

/* What we make: rows of poster type between ink lines; the whole row is the link. */
.videomakeriet-make__row {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
	align-items: baseline;
	gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--60);
	margin: 0;
	padding-block: var(--wp--preset--spacing--50);
	border-bottom: var(--wp--custom--border--edge) solid var(--wp--preset--color--ink);
}

.videomakeriet-make__row:first-child {
	border-top: var(--wp--custom--border--edge) solid var(--wp--preset--color--ink);
}

.videomakeriet-make__row > * {
	margin-block: 0;
}

.videomakeriet-make__name a {
	display: block;
	text-decoration: none;
}

.videomakeriet-make__name a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.videomakeriet-make__row:hover .videomakeriet-make__name {
	translate: 1.5rem 0;
}

.videomakeriet-make__what {
	font-weight: 600;
	line-height: var(--wp--custom--line-height--normal);
}

@media (prefers-reduced-motion: no-preference) {
	.videomakeriet-make__name {
		transition: translate 0.2s;
	}
}

@media (max-width: 781px) {
	.videomakeriet-make__row {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Customers: the names at poster size, each in a colour (Highlights on the names). */
.videomakeriet-clients__names {
	margin: var(--wp--preset--spacing--30) 0 0;
	font-family: var(--wp--preset--font-family--display);
	line-height: 1;
	overflow-wrap: anywhere;
	text-transform: uppercase;
	text-wrap: balance;
}

/* News: posts as speech bubbles on ink, each with a coloured shadow. */
.videomakeriet-news .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
	gap: var(--wp--preset--spacing--50);
	margin: var(--wp--preset--spacing--60) 0 0;
	padding: 0;
	list-style: none;
}

.videomakeriet-news .wp-block-post-template > li {
	position: relative;
	margin: 0;
	padding: var(--wp--custom--box--padding);
	border: var(--wp--custom--border--edge) solid var(--wp--preset--color--ink);
	border-radius: var(--wp--custom--radius--bubble) var(--wp--custom--radius--bubble) var(--wp--custom--radius--bubble) 0;
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	box-shadow: 6px 6px 0 var(--wp--preset--color--pink);
}

.videomakeriet-news .wp-block-post-template > li:nth-child(3n + 2) {
	box-shadow: 6px 6px 0 var(--wp--preset--color--accent);
}

.videomakeriet-news .wp-block-post-template > li:nth-child(3n) {
	box-shadow: 6px 6px 0 var(--wp--preset--color--orange);
}

.videomakeriet-news .wp-block-post-template > li > * {
	margin-block: 0;
}

.videomakeriet-news .wp-block-post-template > li > * + * {
	margin-top: var(--wp--custom--spacing--tight);
}

.videomakeriet-news__meta {
	align-items: center;
	gap: var(--wp--custom--spacing--tight);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.videomakeriet-news__meta > * {
	margin: 0;
}

.videomakeriet-news .videomakeriet-tag {
	background: var(--wp--preset--color--ground);
	color: var(--wp--preset--color--paper);
}

.videomakeriet-news .wp-block-post-title {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--lead);
	font-weight: 600;
	line-height: var(--wp--custom--line-height--normal);
	letter-spacing: 0;
	text-transform: none;
}

.videomakeriet-news .wp-block-post-title a {
	text-decoration: none;
}

.videomakeriet-news .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.videomakeriet-news li:hover .wp-block-post-title a {
	text-decoration: underline;
	text-decoration-thickness: 3px;
}

/* A post's picture fills the top of its bubble, edge to edge, with an ink line under it. A post
   without one is a bubble of text as before. */
.videomakeriet-news .wp-block-post-template > li {
	overflow: clip;
}

.videomakeriet-news .videomakeriet-news__image {
	margin: calc(-1 * var(--wp--custom--box--padding)) calc(-1 * var(--wp--custom--box--padding)) var(--wp--custom--box--padding);
	border-bottom: var(--wp--custom--border--edge) solid var(--wp--preset--color--ink);
	background: var(--wp--preset--color--ink);
}

.videomakeriet-news .videomakeriet-news__image img {
	display: block;
	width: 100%;
}

/* On the plain archive (index.html) the bubbles sit on cobalt. */
.videomakeriet-page .videomakeriet-news .wp-block-post-template > li {
	box-shadow: var(--wp--preset--shadow--sticker);
}

/* Facts: three short columns under ink lines (the studio section). */
.videomakeriet-facts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	margin-block: var(--wp--preset--spacing--60);
}

.videomakeriet-facts > * {
	max-width: 40ch;
	margin: 0;
	padding-top: var(--wp--preset--spacing--30);
	border-top: var(--wp--custom--border--edge) solid currentColor;
}

.videomakeriet-facts h3 {
	margin: 0 0 var(--wp--preset--spacing--20);
}

.videomakeriet-facts p {
	margin: 0;
}

@media (max-width: 781px) {
	.videomakeriet-facts {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Contact: the orange section, the line at poster size. */
.videomakeriet-call__title {
	margin: 0;
	font-size: var(--wp--custom--font-size--poster);
	line-height: var(--wp--custom--line-height--display);
}

.videomakeriet-call__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--60);
	margin-top: var(--wp--preset--spacing--60);
}

.videomakeriet-call__foot > * {
	margin-block: 0;
}

/* Plain pages (page.html, index, single, 404, the policies): cobalt, with room for the header
   that lies over the top of every page. */
.wp-block-group.videomakeriet-page {
	padding: calc(var(--wp--custom--spacing--hero-top) + var(--wp--preset--spacing--60)) var(--wp--custom--gutter) var(--wp--preset--spacing--80);
}

/* A long word or a web address in a page's text breaks instead of pushing the page sideways on
   a small phone. */
.videomakeriet-page {
	overflow-wrap: break-word;
}

/* Inside a page's own text the second-level headings step down, so the page title stays the
   loudest line. */
.videomakeriet-page .wp-block-post-content h2 {
	font-size: var(--wp--custom--font-size--subhead);
	line-height: var(--wp--custom--line-height--snug);
}

/* ---------------------------------------------------------------------------------------
   Page head: the cobalt top of a page that isn't the front page (Tidligere arbeid, a project
   type, a project). Room for the header that lies over it, then the title.
   --------------------------------------------------------------------------------------- */

.wp-block-group.videomakeriet-pagehead {
	padding: calc(var(--wp--custom--spacing--hero-top) + var(--wp--preset--spacing--60)) var(--wp--custom--gutter) var(--wp--preset--spacing--70);
}

.videomakeriet-pagehead > * {
	margin-block: 0;
}

.videomakeriet-pagehead > * + * {
	margin-top: var(--wp--preset--spacing--40);
}

/* Everything in the head starts at the section grid's left edge (WordPress centres narrow
   children of a constrained group). */
.wp-block-group.videomakeriet-pagehead > :not(.alignfull) {
	margin-left: max(0px, calc((100% - var(--wp--style--global--wide-size)) / 2)) !important;
}

/* All the films, and one type: the chips sit above the cards. */
.videomakeriet-work--all .wp-block-post-template {
	margin-top: var(--wp--preset--spacing--50);
}

/* Chips: "Alle" and one per type. A row of ink-lined pills; the chosen one is ink. */
.videomakeriet-chips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--custom--spacing--tight);
}

.videomakeriet-chips > *,
.videomakeriet-chips li {
	flex: 0 0 auto;
	margin: 0;
}

.videomakeriet-chips ul {
	display: contents;
	list-style: none;
}

.videomakeriet-chips a {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--control--height);
	padding: 0 var(--wp--custom--control--padding-inline);
	border: var(--wp--custom--border--edge) solid var(--wp--preset--color--ink);
	border-radius: var(--wp--custom--radius--button);
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	font-weight: 600;
	text-decoration: none;
}

.videomakeriet-chips a:hover {
	background: var(--wp--preset--color--pink);
}

.videomakeriet-chips .is-current a,
.videomakeriet-chips .current-cat a {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}

/* On phones the chips are one row that scrolls sideways, edge to edge, fading where there is
   more (recipe scroll-fade-chips). */
@property --videomakeriet-chips-fade-l { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --videomakeriet-chips-fade-r { syntax: "<length>"; inherits: false; initial-value: 32px; }

@media (max-width: 599px) {
	.videomakeriet-chips {
		flex-wrap: nowrap;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scrollbar-width: none;
		margin-inline: calc(-1 * var(--wp--custom--gutter));
		padding: var(--wp--preset--spacing--20) var(--wp--custom--gutter);
		scroll-padding-inline: var(--wp--custom--gutter);
		-webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--videomakeriet-chips-fade-l), #000 calc(100% - var(--videomakeriet-chips-fade-r)), transparent 100%);
		mask-image: linear-gradient(to right, transparent 0, #000 var(--videomakeriet-chips-fade-l), #000 calc(100% - var(--videomakeriet-chips-fade-r)), transparent 100%);
	}

	.videomakeriet-chips::-webkit-scrollbar {
		display: none;
	}

	@supports (animation-timeline: scroll()) {
		.videomakeriet-chips {
			animation: videomakeriet-chips-fade linear both;
			animation-timeline: scroll(self inline);
		}
	}
}

@keyframes videomakeriet-chips-fade {
	0% { --videomakeriet-chips-fade-l: 0px; --videomakeriet-chips-fade-r: 32px; }
	8%, 92% { --videomakeriet-chips-fade-l: 32px; --videomakeriet-chips-fade-r: 32px; }
	100% { --videomakeriet-chips-fade-l: 32px; --videomakeriet-chips-fade-r: 0px; }
}

/* Older and newer films. */
.videomakeriet-pagination {
	align-items: center;
	gap: var(--wp--preset--spacing--30);
	font-weight: 600;
}

.videomakeriet-pagination a,
.videomakeriet-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--control--height);
	padding-inline: var(--wp--custom--spacing--tight);
}

/* A project: the type, the title, then the film in an ink frame. */
.videomakeriet-project__title {
	max-width: 22ch;
	font-size: var(--wp--custom--font-size--title);
	line-height: var(--wp--custom--line-height--tight);
}

/* A wide film is never taller than the screen has room for under the header and the title. */
.videomakeriet-film {
	position: relative;
	width: min(100%, (100svh - 16rem) * 16 / 9);
	min-width: min(100%, 20rem);
	max-width: var(--wp--style--global--wide-size);
	aspect-ratio: 16 / 9;
	border: var(--wp--custom--border--edge) solid var(--wp--preset--color--ink);
	background: var(--wp--preset--color--ink);
	box-shadow: var(--wp--preset--shadow--sticker);
}

/* A film made standing or square keeps its shape, no wider than it needs. */
.videomakeriet-film.is-tall {
	width: min(100%, 26rem, (100svh - 10rem) * 9 / 16);
	max-width: min(100%, 26rem);
	aspect-ratio: 9 / 16;
}

.videomakeriet-film.is-square {
	width: min(100%, 44rem, 100svh - 12rem);
	max-width: min(100%, 44rem);
	aspect-ratio: 1;
}

.videomakeriet-film__play,
.videomakeriet-film iframe,
.videomakeriet-film figure,
.videomakeriet-film img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	border: 0;
}

/* The still fills the frame whatever shape the film has (the block writes 16:9 inline). */
.videomakeriet-film figure,
.videomakeriet-film img {
	aspect-ratio: auto !important;
}

.videomakeriet-film img {
	object-fit: cover;
}

/* A still that YouTube padded with black at the sides is enlarged until the bars are outside its
   frame (inc/stills.php measures them and writes the factor on the image). */
.videomakeriet-film figure,
.wp-block-post-featured-image:has(> a > img[style*="--videomakeriet-still-zoom"]),
.wp-block-post-featured-image:has(> img[style*="--videomakeriet-still-zoom"]) {
	overflow: clip;
}

.wp-block-post-featured-image img[style*="--videomakeriet-still-zoom"] {
	scale: var(--videomakeriet-still-zoom);
}

/* The play button: a yellow sticker in the frame's corner; the whole still is the link. */
.videomakeriet-film__button {
	position: absolute;
	left: var(--wp--preset--spacing--40);
	bottom: var(--wp--preset--spacing--40);
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--control--height);
	padding: 0 var(--wp--custom--control--padding-inline);
	border: var(--wp--custom--border--edge) solid var(--wp--preset--color--ink);
	border-radius: var(--wp--custom--radius--button);
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--ink);
	box-shadow: var(--wp--preset--shadow--sticker);
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1;
	letter-spacing: var(--wp--custom--letter-spacing--wide);
	text-transform: uppercase;
}

.videomakeriet-film__play:hover .videomakeriet-film__button,
.videomakeriet-film__play:focus-visible .videomakeriet-film__button {
	background: var(--wp--preset--color--pink);
}

/* The project's own text, on paper. */
.videomakeriet-project__text .wp-block-post-content {
	font-size: var(--wp--preset--font-size--lead);
	line-height: var(--wp--custom--line-height--relaxed);
}

.videomakeriet-project__text .wp-block-post-date {
	color: var(--wp--preset--color--muted-ink);
}

/* Who made the film: the credit lines under a project's text, set apart by an ink line. One
   paragraph per line, as in the film's description on YouTube. */
.videomakeriet-credits {
	margin-top: var(--wp--preset--spacing--50);
	padding-top: var(--wp--preset--spacing--40);
	border-top: var(--wp--custom--border--edge) solid var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	line-height: var(--wp--custom--line-height--normal);
}

/* With no text above them, the credits need no line. */
.videomakeriet-credits:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.videomakeriet-credits > * {
	margin-block: 0;
}

.videomakeriet-credits > * + * {
	margin-top: var(--wp--preset--spacing--20);
}

/* A heading on the left and its text on the right; one column on tablets and phones. */
.videomakeriet-split {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--70);
	align-items: start;
}

.videomakeriet-split > *,
.videomakeriet-split__text > * {
	margin-block: 0;
}

.videomakeriet-split > :first-child > * + *,
.videomakeriet-split__text > * + * {
	margin-top: var(--wp--preset--spacing--40);
}

/* The heading shares the row, so it is a step smaller than a section's own heading and a long
   word (Kampanjefilmer) holds on one line. */
.videomakeriet-split h2 {
	font-size: var(--wp--custom--font-size--title);
	overflow-wrap: break-word;
	hyphens: auto;
}

.videomakeriet-split__text {
	max-width: 46rem;
}

.videomakeriet-split__text .has-lead-font-size {
	font-weight: 600;
	line-height: var(--wp--custom--line-height--normal);
}

/* A long button label beside text (a customer's own wording) may take two lines on a narrow phone
   instead of pushing the page sideways. */
.videomakeriet-split__text .wp-block-button__link {
	white-space: normal;
	text-align: center;
}

@media (max-width: 1023px) {
	.videomakeriet-split {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* A section that has a split and then films or a button under it. */
.videomakeriet-section > .videomakeriet-split + * {
	margin-top: var(--wp--preset--spacing--60);
}

.videomakeriet-work > .wp-block-query .wp-block-post-template {
	margin-block: 0 var(--wp--preset--spacing--60);
}

/* A row of photos in ink frames: three across, two on tablets, one on phones. Every photo is cut
   to the same 3:2 shape so the rows line up. */
.videomakeriet-photos {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--50);
}

.videomakeriet-photos > .wp-block-image {
	margin: 0;
}

.videomakeriet-photos img {
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

@media (max-width: 1023px) {
	.videomakeriet-photos {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 599px) {
	.videomakeriet-photos {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* A phone number, an e-mail address or a price at poster size. */
.videomakeriet-bigline {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--custom--font-size--subhead);
	line-height: var(--wp--custom--line-height--snug);
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

/* News page: the bubbles carry the first lines too. */
.videomakeriet-news .wp-block-post-excerpt__excerpt {
	margin: 0;
}

.videomakeriet-news .wp-block-post-excerpt__more-text {
	display: none;
}

/* Long words in a card's title break with a hyphen, never mid-word without one. */
.videomakeriet-work .wp-block-post-title {
	overflow-wrap: break-word;
	hyphens: auto;
}

/* A card's title is a card's title whatever its level: h2 where the cards come straight after
   the page's h1 (Tidligere arbeid, a type page), h3 under a section heading. */
.videomakeriet-work h2.wp-block-post-title {
	font-size: var(--wp--preset--font-size--x-large);
	line-height: var(--wp--custom--line-height--snug);
}

/* ---------------------------------------------------------------------------------------
   Forms (JetFormBuilder; the contact form). Labels above the fields, always visible; ink-lined
   fields on paper, at least 52px tall with 18px text (no zoom on iPhone); one sticker button; the
   answer in a box right under it (recipe forms-and-feedback).
   --------------------------------------------------------------------------------------- */

.jet-form-builder {
	display: grid;
	gap: var(--wp--preset--spacing--40);
	max-width: 40rem;
}

.jet-form-builder .jet-form-builder-row {
	display: block;
	margin: 0;
	padding: 0;
}

.jet-form-builder .jet-form-builder__label {
	margin: 0 0 var(--wp--preset--spacing--20);
}

.jet-form-builder .jet-form-builder__label-text {
	font-weight: 600;
}

.jet-form-builder .jet-form-builder__required {
	color: inherit;
}

.jet-form-builder input.jet-form-builder__field,
.jet-form-builder textarea.jet-form-builder__field,
.jet-form-builder select.jet-form-builder__field {
	box-sizing: border-box;
	display: block;
	width: 100%;
	min-height: var(--wp--custom--control--height);
	padding: var(--wp--custom--control--field-padding);
	border: var(--wp--custom--border--edge) solid var(--wp--preset--color--ink);
	border-radius: var(--wp--custom--radius--frame);
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 500;
	line-height: var(--wp--custom--line-height--normal);
}

.jet-form-builder textarea.jet-form-builder__field {
	min-height: 10rem;
	resize: vertical;
}

/* Where the typing goes: the field lifts like a sticker. */
.jet-form-builder .jet-form-builder__field:focus-visible {
	outline: 0;
	box-shadow: var(--wp--preset--shadow--sticker);
}

/* A field that was left wrong: a dashed line, and the reason in words right under it. */
.jet-form-builder .jet-form-builder__field.field-has-error,
.jet-form-builder .field-has-error .jet-form-builder__field {
	border-style: dashed;
}

.jet-form-builder .error-message {
	margin-top: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--caption);
	font-weight: 600;
}

/* The button: the same sticker as every other button. */
.jet-form-builder .jet-form-builder__action-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--wp--custom--control--height);
	padding: var(--wp--custom--control--padding-block) var(--wp--custom--control--padding-inline);
	border: var(--wp--custom--border--edge) solid var(--wp--preset--color--ink);
	border-radius: var(--wp--custom--radius--button);
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--ink);
	box-shadow: var(--wp--preset--shadow--sticker);
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 400;
	line-height: 1;
	letter-spacing: var(--wp--custom--letter-spacing--wide);
	text-transform: uppercase;
	cursor: pointer;
}

.jet-form-builder .jet-form-builder__action-button:hover {
	translate: 3px 3px;
	box-shadow: var(--wp--preset--shadow--sticker-near);
}

.jet-form-builder .jet-form-builder__action-button:active {
	translate: 6px 6px;
	box-shadow: none;
}

.jet-form-builder .jet-form-builder__action-button:disabled,
.jet-form-builder.is-loading .jet-form-builder__action-button {
	cursor: progress;
	background: var(--wp--preset--color--paper);
}

/* The answer: sent, or what went wrong. */
.jet-form-builder-messages-wrap:empty {
	display: none;
}

.jet-form-builder-message {
	margin: 0;
	padding: var(--wp--preset--spacing--30);
	border: var(--wp--custom--border--edge) solid var(--wp--preset--color--ink);
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	font-weight: 600;
}

.jet-form-builder-message--success {
	background: var(--wp--preset--color--mint);
}

.jet-form-builder-message--error {
	background: var(--wp--preset--color--orange);
}

/* A live stream with its chat beside it (Perrigokurs): both in the ink frame with the hard
   shadow, the chat under the stream on tablets and phones. */
.videomakeriet-stream {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 2fr);
	gap: var(--wp--preset--spacing--50);
}

.videomakeriet-stream > * {
	margin: 0;
	border: var(--wp--custom--border--edge) solid var(--wp--preset--color--ink);
	background: var(--wp--preset--color--ink);
	box-shadow: var(--wp--preset--shadow--sticker);
}

.videomakeriet-stream iframe {
	display: block;
	border: 0;
}

.videomakeriet-stream > :last-child {
	height: 100%;
	min-height: 500px;
}

.videomakeriet-section > .videomakeriet-stream + * {
	margin-top: var(--wp--preset--spacing--60);
}

/* Share and company links under a stream: words in a row, each a full tap target. */
.videomakeriet-stream__share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 var(--wp--preset--spacing--40);
	font-weight: 600;
}

.videomakeriet-stream__share a {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--control--height);
}

/* A customer's logo: a cut-out, so no frame. */
.videomakeriet-stream__logo img {
	display: block;
	width: auto;
	max-width: min(100%, 16rem);
	height: auto;
}

@media (max-width: 1023px) {
	.videomakeriet-stream {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* The language picker (decision 0008): NO and EN beside the menu, the full names in the footer.
   The current language is underlined; each link is a full tap target. */
.videomakeriet-langs {
	display: flex;
	align-items: center;
	gap: var(--wp--custom--spacing--tight);
	font-size: var(--wp--custom--font-size--nav);
	font-weight: 600;
}

.videomakeriet-langs a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--wp--custom--control--height);
	min-height: var(--wp--custom--control--height);
	color: inherit;
	text-decoration: none;
}

.videomakeriet-langs a:hover,
.videomakeriet-langs a[aria-current] {
	text-decoration: underline;
	text-decoration-thickness: 3px;
	text-underline-offset: 0.3em;
}


/* On phones the logo needs the room: the languages move into the opened menu, as its last rows,
   a step smaller than the pages and set apart by an ink-thick line. */
@media (max-width: 599px) {
	.videomakeriet-header__bar .videomakeriet-langs {
		display: none;
	}

	.videomakeriet-header .is-menu-open .wp-block-navigation-item.videomakeriet-menu-lang {
		display: flex;
	}

	.videomakeriet-header .is-menu-open .videomakeriet-menu-lang .wp-block-navigation-item__content {
		font-size: var(--wp--preset--font-size--x-large);
	}

	.videomakeriet-header .is-menu-open .videomakeriet-menu-lang:not(.videomakeriet-menu-lang ~ .videomakeriet-menu-lang) {
		margin-top: var(--wp--preset--spacing--40);
		padding-top: var(--wp--preset--spacing--30);
		border-top: var(--wp--custom--border--edge) solid currentColor;
	}

	.videomakeriet-header .is-menu-open .videomakeriet-menu-lang.is-current .wp-block-navigation-item__content {
		text-decoration: underline;
		text-decoration-thickness: 3px;
		text-underline-offset: 0.2em;
	}
}

/* Opening the phone menu: the panel drops like a curtain and the lines land one after another.
   A press answered by a quick, hard move, no fades. Closing is instant on purpose: the moment the
   block removes its open class the links are a desktop row again, and an animated close shows it. Progressive: without @starting-style and
   discrete transitions the menu opens at once, as before; none of it under reduced motion. */
@supports (transition-behavior: allow-discrete) {
	@media (max-width: 1023px) and (prefers-reduced-motion: no-preference) {
		.videomakeriet-header .wp-block-navigation__responsive-container.is-menu-open {
			clip-path: inset(0);
			transition: clip-path 0.24s cubic-bezier(0.2, 0, 0, 1);
		}

		.videomakeriet-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item {
			transition: translate 0.3s cubic-bezier(0.2, 0, 0, 1);
			transition-delay: calc(0.06s + var(--videomakeriet-row, 0) * 0.035s);
		}

		.videomakeriet-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item:nth-child(2) { --videomakeriet-row: 1; }
		.videomakeriet-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item:nth-child(3) { --videomakeriet-row: 2; }
		.videomakeriet-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item:nth-child(4) { --videomakeriet-row: 3; }
		.videomakeriet-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item:nth-child(5) { --videomakeriet-row: 4; }
		.videomakeriet-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item:nth-child(6) { --videomakeriet-row: 5; }
		.videomakeriet-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item:nth-child(7) { --videomakeriet-row: 6; }
		.videomakeriet-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item:nth-child(n + 8) { --videomakeriet-row: 7; }

		@starting-style {
			.videomakeriet-header .wp-block-navigation__responsive-container.is-menu-open {
				clip-path: inset(0 0 100% 0);
			}

			.videomakeriet-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item {
				translate: 0 1.2em;
			}
		}
	}
}

.videomakeriet-footer .videomakeriet-langs {
	gap: var(--wp--preset--spacing--40);
	font-size: var(--wp--preset--font-size--small);
}

/* Image edges: no image sits on the page as a bare rectangle. Every image uses one of
   - the ink frame (`.videomakeriet-edge`, the film cards' own border, and a project's film),
   - the headline's letters (the hero still, which shows only through the type).
   Logos are cut-outs and need none. Keep this list in step with decision 0007. */
.videomakeriet-edge {
	border: var(--wp--custom--border--edge) solid var(--wp--preset--color--ink);
	box-shadow: var(--wp--preset--shadow--sticker);
}

.videomakeriet-edge img {
	display: block;
}

/* ---------------------------------------------------------------------------------------
   Scroll-driven motion (Baseline newly available: progressive enhancement). The picture pans
   inside the poster's letters, the star turns, the band of words slides, and the film cards land
   as they come into view. All of it follows the scroll position; nothing plays by itself.
   --------------------------------------------------------------------------------------- */

@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
	@media (prefers-reduced-motion: no-preference) {
		.videomakeriet-poster {
			animation: videomakeriet-pan linear both;
			animation-timeline: scroll(root);
			animation-range: 0 100vh;
		}

		@keyframes videomakeriet-pan {
			from { background-position: 40% 0; }
			to { background-position: 60% 60%; }
		}

		.videomakeriet-star {
			animation: videomakeriet-turn linear both;
			animation-timeline: scroll(root);
			animation-range: 0 120vh;
		}

		@keyframes videomakeriet-turn {
			to { rotate: 190deg; }
		}

		.videomakeriet-band {
			animation: videomakeriet-slide linear both;
			animation-timeline: view();
		}

		@keyframes videomakeriet-slide {
			from { text-indent: 4vw; }
			to { text-indent: -28vw; }
		}
	}

	/* The cards land only where there is a pointer: on touch screens they are simply in place. */
	@media (prefers-reduced-motion: no-preference) and (hover: hover) {
		.videomakeriet-work .wp-block-post-template > li {
			animation: videomakeriet-land linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 90%;
		}

		@keyframes videomakeriet-land {
			from {
				rotate: calc(var(--tilt) * 4);
				translate: 0 4rem;
			}
		}
	}
}

/* The editor shows everything in place. */
.editor-styles-wrapper .videomakeriet-poster,
.editor-styles-wrapper .videomakeriet-star,
.editor-styles-wrapper .videomakeriet-band,
.editor-styles-wrapper .videomakeriet-work .wp-block-post-template > li {
	animation: none;
}

/* ---------------------------------------------------------------------------------------
   Header and navigation: the header lies over the top of the page (the hero, or a plain page's
   top padding), paper on cobalt.
   --------------------------------------------------------------------------------------- */

.wp-block-group.videomakeriet-header {
	position: absolute;
	inset: 0 0 auto 0;
	z-index: 10;
	padding: var(--wp--preset--spacing--30) var(--wp--custom--gutter);
	color: var(--wp--preset--color--paper);
}

.admin-bar .wp-block-group.videomakeriet-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.videomakeriet-header__bar,
.videomakeriet-header__menu {
	gap: var(--wp--preset--spacing--30) var(--wp--custom--spacing--nav);
}

.videomakeriet-logo {
	margin: 0;
	flex: none;
}

/* The logo link is at least a 48px tap target, whatever the logo's own height. */
.videomakeriet-logo a {
	display: flex;
	align-items: center;
	min-height: var(--wp--custom--control--height);
}

/* 176px beside the menu at 1024px, growing to 240px on wide screens (the Image block writes its
   own width inline). */
.videomakeriet-logo img {
	display: block;
	width: var(--wp--custom--spacing--logo) !important;
	height: auto;
}

/* The menu speaks like the headings: the display face in capitals, small beside the logo and
   poster-size in the phone menu. */
.videomakeriet-header .wp-block-navigation-item__content {
	padding-block: 12px;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	letter-spacing: var(--wp--custom--letter-spacing--wide);
	text-transform: uppercase;
}

.videomakeriet-header .videomakeriet-langs {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	letter-spacing: var(--wp--custom--letter-spacing--wide);
}

/* The languages as the phone menu's last rows: only there, and only on phones. */
.videomakeriet-header .wp-block-navigation-item.videomakeriet-menu-lang {
	display: none;
}

.videomakeriet-header .wp-block-navigation-item__content:hover {
	text-decoration: underline;
	text-decoration-thickness: 3px;
	text-underline-offset: 0.3em;
}

/* The phone menu button gets a 48px tap target. */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	box-sizing: content-box;
	padding: 12px;
}

/* WordPress's own icons are hairlines. The buttons are drawn instead, in the design's line weight:
   three bars for the menu, a cross for closing (the buttons keep their accessible names). */
.videomakeriet-header .wp-block-navigation__responsive-container-open svg,
.videomakeriet-header .wp-block-navigation__responsive-container-close svg {
	display: none;
}

.videomakeriet-header .wp-block-navigation__responsive-container-open {
	position: relative;
}

/* The top and bottom bars are the box's own edges; the middle bar is laid over its centre. */
.videomakeriet-header .wp-block-navigation__responsive-container-open::before {
	content: "";
	display: block;
	box-sizing: border-box;
	width: 30px;
	height: 21px;
	border-block: var(--wp--custom--border--edge) solid currentColor;
}

.videomakeriet-header .wp-block-navigation__responsive-container-open::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 30px;
	height: var(--wp--custom--border--edge);
	background: currentColor;
	translate: -50% -50%;
}

.videomakeriet-header .wp-block-navigation__responsive-container-close {
	width: 30px;
	height: 30px;
}

.videomakeriet-header .wp-block-navigation__responsive-container-close::before,
.videomakeriet-header .wp-block-navigation__responsive-container-close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 34px;
	height: var(--wp--custom--border--edge);
	background: currentColor;
	translate: -50% -50%;
	rotate: 45deg;
}

.videomakeriet-header .wp-block-navigation__responsive-container-close::after {
	rotate: -45deg;
}

.wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--40) var(--wp--custom--gutter);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 400;
	line-height: 1;
	text-transform: uppercase;
}

/* WordPress switches the menu to its button below 600px. Six links and the logo need more room
   than a tablet has, so the button also shows from 600px up to 1023px. */
@media (min-width: 600px) and (max-width: 1023px) {
	.videomakeriet-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}

	.videomakeriet-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}
}

@media (max-width: 599px) {
	.videomakeriet-logo img {
		width: var(--wp--custom--spacing--logo-phone) !important;
	}

	.videomakeriet-star {
		top: 5.5rem;
		right: 1rem;
	}
}

/* ---------------------------------------------------------------------------------------
   Footer: ink. The two offices and the profiles, then the company line and the legal links.
   --------------------------------------------------------------------------------------- */

.wp-block-group.videomakeriet-footer {
	padding: var(--wp--preset--spacing--70) var(--wp--custom--gutter) var(--wp--preset--spacing--40);
	border-top: var(--wp--custom--border--edge) solid var(--wp--preset--color--ink);
}

.videomakeriet-footer-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 14rem)) minmax(0, 1fr);
	gap: var(--wp--preset--spacing--50);
}

.videomakeriet-footer-grid > *,
.videomakeriet-footer-grid p {
	margin-block: 0;
}

.videomakeriet-footer__heading {
	margin: 0 0 var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--accent);
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1;
	text-transform: uppercase;
}

.videomakeriet-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--wp--preset--spacing--40);
}

.videomakeriet-footer-grid > .videomakeriet-footer__links {
	justify-content: flex-end;
	align-content: start;
}

.videomakeriet-footer__links a {
	display: inline-block;
	padding-block: 12px;
}

.videomakeriet-footer__end {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0 var(--wp--custom--spacing--loose);
	margin-top: var(--wp--preset--spacing--60);
	padding-top: var(--wp--preset--spacing--30);
	border-top: var(--wp--custom--border--tag) solid var(--wp--preset--color--paper);
}

.videomakeriet-footer__end > * {
	margin-block: 0;
}

/* Two things are fixed in the page's bottom corners: the "to the top" button on the right and the
   consent tool's round button on the left. The footer's last row keeps both corners free, so
   nothing in it (the company line, the languages, the legal links) ends up under either. */
.videomakeriet-footer__end {
	padding-inline: var(--wp--custom--control--height) calc(var(--wp--custom--control--height) + var(--wp--preset--spacing--40));
}

@media (max-width: 781px) {
	.videomakeriet-footer-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.videomakeriet-footer-grid > .videomakeriet-footer__links {
		grid-column: 1 / -1;
		justify-content: flex-start;
	}
}

/* ---------------------------------------------------------------------------------------
   "To the top" (elemental-core's module, platform decision 0008; core sets position and the
   hidden state): a round yellow sticker; the right edge on the section grid.
   --------------------------------------------------------------------------------------- */

.elemental-to-top {
	--elemental-to-top-inset: var(--wp--custom--gutter);
	--elemental-to-top-size: var(--wp--custom--control--height);
	border: var(--wp--custom--border--edge) solid var(--wp--preset--color--ink);
	border-radius: var(--wp--custom--radius--button);
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--ink);
	box-shadow: var(--wp--preset--shadow--sticker-near);
}

.elemental-to-top:hover {
	background: var(--wp--preset--color--pink);
}

@media (prefers-reduced-motion: no-preference) {
	.elemental-to-top {
		transition: opacity 0.15s linear, visibility 0.15s;
	}
}

@media (max-width: 360px) {
	.videomakeriet-footer-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}
