/* Francis theme: styles that theme.json cannot express. Tokens live in theme.json. */

:root {
	--francis-gutter: clamp(1.25rem, 5.8vw, 5.25rem);
	--francis-header-h: 6rem;
}

/* Trailing letter-spacing would push spaced titles off-centre. */
.is-style-display,
.eyebrow {
	padding-left: 0.5em;
}

/* Spaced decorative title above a descriptive H1 (keeps the old site's look, H1 keeps the search phrase). */
.eyebrow {
	margin-bottom: 0.4em;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--x-large);
	letter-spacing: 0.5em;
	text-transform: uppercase;
	line-height: 1.4;
}

.eyebrow + h1 {
	margin-top: 0;
	font-size: var(--wp--preset--font-size--lead);
}

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

.site-header {
	min-height: var(--francis-header-h);
	padding-inline: var(--francis-gutter) clamp(1.25rem, 2.8vw, 2.5rem);
	align-items: center;
}

.site-logo {
	display: block;
	line-height: 0;
}

.site-logo img {
	width: auto;
	height: clamp(2.75rem, 4.2vw, 3.75rem);
}

.site-header .wp-block-navigation-item.current-menu-item > a,
.site-header .wp-block-navigation-item.current-menu-ancestor > a,
.site-header .wp-block-navigation-item.current-menu-ancestor > button {
	color: var(--wp--preset--color--accent);
}

.wp-block-navigation a:hover,
.wp-block-navigation a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.3em;
	text-decoration-thickness: 1px;
}

/* Dropdowns: black panel with a thin white edge, items stacked with room. */
.site-header .wp-block-navigation__submenu-container {
	border: 1px solid var(--wp--preset--color--contrast) !important;
	padding-block: 0.5rem;
}

.site-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.5rem 1.25rem;
	white-space: nowrap;
}

/* "Anfragen": quiet outlined text button at the end of the menu. */
.wp-block-navigation .is-cta > a {
	border: 1px solid currentColor;
	padding: 0.45em 1em;
}

.wp-block-navigation .is-cta > a:hover,
.wp-block-navigation .is-cta > a:focus-visible {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	text-decoration: none;
}

.wp-block-navigation .is-cta.current-menu-item > a {
	color: inherit;
}

/* ---------- Mobile overlay: full-screen, large type, CTA pinned to the bottom ---------- */

/* Prefixed with .wp-block-navigation: core's navigation CSS loads after this file. */
.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open {
	box-sizing: border-box;
	padding: var(--francis-gutter);
}

.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	box-sizing: border-box;
	width: 100%;
	min-height: calc(100dvh - 2 * var(--francis-gutter));
	padding-top: var(--francis-header-h);
}

/* The header menu is right-justified on desktop; the overlay reads left-aligned. */
.wp-block-navigation__responsive-container.is-menu-open :is(
	.wp-block-navigation__responsive-container-content,
	.wp-block-navigation__container,
	.wp-block-navigation-item,
	.wp-block-navigation__submenu-container
) {
	align-items: flex-start !important;
	text-align: left;
}

.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	flex: 1;
	width: 100%;
	gap: 1.25rem;
	font-size: var(--wp--preset--font-size--lead);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	border: 0 !important;
	padding: 0.75rem 0 0 1rem !important;
	gap: 0.75rem;
	font-size: var(--wp--preset--font-size--medium);
}

.wp-block-navigation__responsive-container.is-menu-open .is-cta {
	margin-top: auto;
	align-self: stretch;
}

.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .is-cta > a {
	display: block;
	box-sizing: border-box;
	width: 100%;
	text-align: center;
	padding: 0.9em 1em;
}

.wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg {
	width: 2rem;
	height: 2rem;
}

/* ---------- Footer ---------- */

.site-footer {
	margin-top: var(--wp--preset--spacing--60);
	padding-block: var(--wp--preset--spacing--50);
	border-top: 1px solid rgb(255 255 255 / 0.2);
	font-size: var(--wp--preset--font-size--small);
}

.site-footer p {
	margin-block: 0 1em;
}

.site-footer a {
	text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.3em;
}

.site-footer__brand {
	font-family: var(--wp--preset--font-family--brand);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--medium);
}

.site-footer__nav {
	font-family: inherit;
	font-weight: inherit;
	font-size: inherit;
	gap: 0.4rem;
}

.site-footer__legal {
	margin-top: var(--wp--preset--spacing--50) !important;
	opacity: 0.7;
}

/* ---------- Page rhythm ---------- */

.site-main {
	padding-top: var(--wp--preset--spacing--50);
}

/* Sections breathe: one idea per screen. */
.site-main > .wp-block-post-content > :where(section, .wp-block-columns, .wp-block-gallery, .wp-block-group) {
	margin-block-start: var(--wp--preset--spacing--60);
}

.site-main > .wp-block-post-content > :first-child {
	margin-block-start: 0;
}

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

.hero {
	gap: var(--wp--preset--spacing--50);
}

.hero__image img {
	width: 100%;
	max-height: 85vh;
	object-fit: cover;
}

.hero__text h1 {
	margin-block: 0 0.5em;
}

.hero__text .wp-block-buttons {
	margin-top: var(--wp--preset--spacing--40);
	gap: 1.5rem;
}

/* Extended logo floating over the upper part of the hero image, centred horizontally.
   Front end only, so it doesn't cover the gallery in the editor. */
:where(body:not(.editor-styles-wrapper)) .wp-block-column:has(> .hero__logo) {
	position: relative;
}

:where(body:not(.editor-styles-wrapper)) .hero__logo {
	position: absolute;
	z-index: 1;
	top: 8%;
	left: 50%;
	width: min(16rem, 50%);
	margin: 0;
	transform: translateX(-50%);
	pointer-events: none;
}

.hero__logo img {
	width: 100%;
	height: auto;
}

/* Text right below the hero, e.g. the home page's introduction. */
.site-main > .wp-block-post-content > .intro {
	margin-block: var(--wp--preset--spacing--60);
	margin-inline: auto;
	max-width: 44rem;
	line-height: 1.6;
}

/* ---------- Slideshow (core/gallery, style "Diashow") ---------- */

/* Front end only: in the editor it stays a normal gallery. */
:where(body:not(.editor-styles-wrapper)) .wp-block-gallery.is-style-slideshow {
	display: grid !important;
	gap: 0;
}

:where(body:not(.editor-styles-wrapper)) .wp-block-gallery.is-style-slideshow > .wp-block-image {
	grid-area: 1 / 1;
	width: 100% !important;
	margin: 0 !important;
	opacity: 0;
	transition: opacity 1.2s ease-in-out;
}

:where(body:not(.editor-styles-wrapper)) .wp-block-gallery.is-style-slideshow > .wp-block-image:first-child,
:where(body:not(.editor-styles-wrapper)) .wp-block-gallery.is-style-slideshow > .wp-block-image.is-active {
	opacity: 1;
}

:where(body:not(.editor-styles-wrapper)) .wp-block-gallery.is-style-slideshow:has(.is-active) > .wp-block-image:first-child:not(.is-active) {
	opacity: 0;
}

/* The frame sets the size (same space as a single hero image); core's cropped-gallery
   rules then make each image fill it. */
:where(body:not(.editor-styles-wrapper)) .wp-block-gallery.is-style-slideshow > .wp-block-image {
	aspect-ratio: 3 / 2;
	max-height: 85vh;
}

.wp-block-gallery.is-style-slideshow > .wp-block-image img {
	object-fit: cover;
}

/* ---------- Text buttons ---------- */

.wp-block-button.is-style-text .wp-block-button__link {
	padding-inline: 0;
	text-underline-offset: 0.3em;
	text-decoration-thickness: 1px;
}

.wp-block-button.is-style-text .wp-block-button__link:hover {
	background: transparent;
	color: inherit;
	text-decoration: none;
}

/* ---------- Fact box ---------- */

.fact-box {
	border: 1px solid rgb(255 255 255 / 0.4);
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
}

.fact-box__title {
	margin-top: 0;
	font-size: var(--wp--preset--font-size--medium);
}

.fact-box__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.75rem;
}

.fact-box__list li {
	display: grid;
	grid-template-columns: minmax(6rem, 30%) 1fr;
	gap: 1rem;
}

.fact-box__list strong {
	font-weight: 400;
	opacity: 0.7;
}

/* ---------- Galleries (core/gallery): square edges, generous gap like the original ---------- */

.wp-block-gallery.has-nested-images {
	--wp--style--unstable-gallery-gap: var(--wp--preset--spacing--40);
	gap: var(--wp--preset--spacing--40);
}

.wp-block-gallery.has-nested-images figure.wp-block-image img {
	border-radius: 0;
}

.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img {
	aspect-ratio: 3 / 4;
}

/* Style "Mosaik": masonry columns, every image keeps its own ratio (turn off "Crop images"). */
.wp-block-gallery.has-nested-images.is-style-mosaic {
	display: block;
	column-count: 3;
	column-gap: var(--wp--preset--spacing--40);
}

.wp-block-gallery.has-nested-images.is-style-mosaic figure.wp-block-image:not(#individual-image) {
	display: block;
	width: 100%;
	margin: 0 0 var(--wp--preset--spacing--40);
	break-inside: avoid;
}

.wp-block-gallery.has-nested-images.is-style-mosaic figure.wp-block-image:not(#individual-image) img {
	width: 100%;
	height: auto;
	aspect-ratio: auto;
}

@media (max-width: 600px) {
	.wp-block-gallery.has-nested-images.is-style-mosaic {
		column-count: 2;
	}
}

/* Two-column galleries hold film stills: keep them widescreen. */
.wp-block-gallery.has-nested-images.columns-2.is-cropped figure.wp-block-image:not(#individual-image) img {
	aspect-ratio: 16 / 9;
}

.service-section > .wp-block-heading,
.service-section > p {
	max-width: 42rem;
	margin-inline: auto;
}

/* ---------- Meet Francis ---------- */

.meet-francis {
	gap: var(--wp--preset--spacing--50);
}

.meet-francis img {
	filter: grayscale(1);
}

.meet-francis__name {
	font-family: var(--wp--preset--font-family--display);
	text-transform: uppercase;
	letter-spacing: 0.15em;
	font-size: var(--wp--preset--font-size--small);
}

/* ---------- Process ---------- */

.process__steps {
	list-style: none;
	counter-reset: step;
	margin: var(--wp--preset--spacing--50) 0 0;
	padding: 0;
	display: grid;
	gap: var(--wp--preset--spacing--50);
}

@media (min-width: 782px) {
	.process .process__steps {
		max-width: var(--wp--style--global--wide-size);
		grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	}
}

.process__steps li {
	counter-increment: step;
	text-align: center;
}

.process__steps li::before {
	content: counter(step, decimal-leading-zero);
	display: block;
	margin-bottom: 0.75rem;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--x-large);
	letter-spacing: 0.15em;
	padding-left: 0.15em; /* balances the trailing letter-spacing when centred */
	line-height: 1;
}

.process__steps strong {
	display: block;
	margin-bottom: 0.35rem;
	font-family: var(--wp--preset--font-family--brand);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--lead);
}

/* ---------- FAQ (core/details; answers stay in the HTML when closed) ---------- */

.wp-block-details {
	border-bottom: 1px solid rgb(255 255 255 / 0.3);
	padding-block: 1.1rem;
}

.wp-block-details summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	font-family: var(--wp--preset--font-family--brand);
	font-size: var(--wp--preset--font-size--lead);
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.wp-block-details summary::after {
	content: "+";
	font-family: var(--wp--preset--font-family--body);
	transition: rotate 0.2s ease;
}

.wp-block-details[open] summary::after {
	rotate: 45deg;
}

.wp-block-details > :not(summary) {
	margin-block: 0.75rem 0;
	max-width: 38rem;
}

/* ---------- CTA ---------- */

.cta {
	text-align: center;
	padding-block: var(--wp--preset--spacing--50);
}

/* ---------- Cards (stories, film projects, pillars) ---------- */

.cards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--wp--preset--spacing--40);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
}

.cards--wide {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
}

.card__link {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	text-decoration: none;
}

.card__image {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	margin-bottom: 0.6rem;
	transition: opacity 0.2s ease;
}

.cards--wide .card__image {
	aspect-ratio: 16 / 9;
}

.card__image--empty {
	display: block;
	background: #111;
}

.card__link:hover .card__image {
	opacity: 0.8;
}

.card__title {
	font-family: var(--wp--preset--font-family--display);
	text-transform: uppercase;
	letter-spacing: 0.15em;
}

.card__meta {
	font-size: var(--wp--preset--font-size--small);
	opacity: 0.7;
}

.pillar img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

.pillar__title {
	margin-block: 1rem 0.25rem;
	font-size: var(--wp--preset--font-size--lead);
	overflow-wrap: normal;
	hyphens: manual;
}

.pillar__title a {
	text-decoration: none;
}

/* ---------- Project pages ---------- */

.project-header {
	margin-bottom: var(--wp--preset--spacing--50);
}

.project-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem 2rem;
	margin: 1rem 0 0;
	font-size: var(--wp--preset--font-size--small);
}

.project-meta div {
	display: flex;
	gap: 0.4rem;
}

.project-meta dt {
	opacity: 0.7;
}

.project-meta dd {
	margin: 0;
}

.design-project + .design-project {
	margin-top: var(--wp--preset--spacing--60);
}

.design-project__meta {
	opacity: 0.7;
	font-size: var(--wp--preset--font-size--small);
}

.testimonials--single {
	max-width: 42rem;
	margin-inline: auto;
}

/* ---------- Mobile ---------- */

@media (max-width: 781px) {
	.hero > .wp-block-column,
	.meet-francis > .wp-block-column {
		flex-basis: 100% !important;
	}
}

/* ---------- Accessibility ---------- */

:where(a, button, input, select, textarea):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

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

.business-address {
	font-style: normal;
}
