/*
Theme Name: WAY
Theme URI: https://waycommunication.se/
Author: Isak
Description: ACF block theme for WAY Communication.
Version: 0.2.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
Text Domain: acf-blocks
*/

*,
*::before,
*::after {
	box-sizing: border-box;
}

:root {
	--acf-font-heading: "Krona One", sans-serif;
	--acf-font-body: "Montserrat", sans-serif;
	--brand-morkbla: #002a3a;
	--brand-vit: #ffffff;
	--brand-beige: #f5ebd7;
	--brand-gul: #ffc72c;
	--brand-rod: #e63242;
	--brand-turkos: #2ad2c9;
	--brand-petrol: #64b1bd;
	--brand-lila: #615e9b;
	--brand-bla: #005a8c;
}

body {
	margin: 0;
	font-family: var(--acf-font-body), system-ui, sans-serif;
	font-size: var(--acf-text-medium-size, 18px);
	font-weight: var(--acf-text-medium-weight, 400);
	line-height: var(--acf-text-line-height, 1.4);
	background: var(--wp--preset--color--base, #ffffff);
	color: var(--wp--preset--color--contrast, #002a3a);
}

a {
	color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--acf-font-heading), sans-serif;
	font-weight: 400;
	text-transform: uppercase;
	line-height: 1.2;
}

h1 {
	font-size: var(--acf-h1-size, clamp(42px, 5vw, 50px));
	font-weight: var(--acf-h1-weight, 400);
}

h2 {
	font-size: var(--acf-h2-size, clamp(37px, 4.5vw, 42px));
	font-weight: var(--acf-h2-weight, 400);
}

h3 {
	font-size: var(--acf-h3-size, clamp(32px, 3.5vw, 35px));
	font-weight: var(--acf-h3-weight, 400);
	line-height: 1.3;
}

h4 {
	font-size: var(--acf-h4-size, clamp(29px, 3vw, 29px));
	font-weight: var(--acf-h4-weight, 400);
	line-height: 1.3;
}

h5 {
	font-size: var(--acf-h5-size, clamp(24px, 2.5vw, 24px));
	font-weight: var(--acf-h5-weight, 400);
	line-height: 1.4;
}

h6 {
	font-size: var(--acf-h6-size, clamp(20px, 2vw, 20px));
	font-weight: var(--acf-h6-weight, 400);
	line-height: 1.4;
}

.acf-text-small {
	font-size: var(--acf-text-small-size, clamp(14px, 1.2vw, 15px));
	font-weight: var(--acf-text-small-weight, 400);
}

.acf-text-medium {
	font-size: var(--acf-text-medium-size, clamp(16px, 1.5vw, 18px));
	font-weight: var(--acf-text-medium-weight, 400);
}

.acf-text-large {
	font-size: var(--acf-text-large-size, clamp(18px, 2vw, 22px));
	font-weight: var(--acf-text-large-weight, 400);
}

.acf-text-xlarge {
	font-size: var(--acf-text-xlarge-size, clamp(22px, 3vw, 28px));
	font-weight: var(--acf-text-xlarge-weight, 400);
}

/* Heading component: visual size is decoupled from the HTML tag */
.acf-heading {
	margin: 0;
	line-height: 1.2;
	max-width: var(--acf-heading-max-width, none);
	font-family: var(--acf-font-heading), sans-serif;
	text-transform: uppercase;
}

.acf-heading--size-h1 {
	font-size: var(--acf-h1-size, clamp(42px, 5vw, 50px));
	font-weight: var(--acf-h1-weight, 400);
}

.acf-heading--size-h2 {
	font-size: var(--acf-h2-size, clamp(37px, 4.5vw, 42px));
	font-weight: var(--acf-h2-weight, 400);
}

.acf-heading--size-h3 {
	font-size: var(--acf-h3-size, clamp(22px, 3vw, 32px));
	font-weight: var(--acf-h3-weight, 700);
}

.acf-heading--size-h4 {
	font-size: var(--acf-h4-size, clamp(20px, 2.5vw, 26px));
	font-weight: var(--acf-h4-weight, 700);
}

.acf-heading--size-h5 {
	font-size: var(--acf-h5-size, clamp(18px, 2vw, 22px));
	font-weight: var(--acf-h5-weight, 700);
}

.acf-heading--size-h6 {
	font-size: var(--acf-h6-size, clamp(16px, 1.5vw, 18px));
	font-weight: var(--acf-h6-weight, 700);
}

/* Body text component wrapper */
.acf-body-text {
	max-width: var(--acf-body-text-max-width, none);
}

.acf-body-text > :first-child {
	margin-top: 0;
}

.acf-body-text > :last-child {
	margin-bottom: 0;
}

/* Intro content groups */
.acf-intro {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.acf-intro__copy {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.acf-intro__titles {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.acf-intro--align-left {
	align-items: flex-start;
	text-align: left;
}

.acf-intro--align-center {
	align-items: center;
	margin-right: auto;
	margin-left: auto;
	text-align: center;
}

.acf-intro--align-right {
	align-items: flex-end;
	margin-left: auto;
	text-align: right;
}

html.is-transitioning,
body.is-transitioning {
	overflow: hidden;
}

body.is-transitioning {
	padding-right: var(--scrollbar-width, 0);
}

.barba-transition-cover {
	position: fixed;
	bottom: 0;
	left: 0;
	z-index: 9999;
	width: 100vw;
	height: 0;
	background: var(--wp--preset--color--contrast, #111111);
	pointer-events: none;
}

.barba-transition-title {
	position: fixed;
	top: 50%;
	left: 50%;
	z-index: 10000;
	padding: 16px;
	color: var(--wp--preset--color--base, #ffffff);
	font-size: clamp(32px, 7vw, 96px);
	font-weight: 800;
	line-height: 1;
	text-align: center;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.site {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	overflow-x: clip;
	background: var(--wp--preset--color--base, #ffffff);
}

.site-header,
.site-footer {
	padding: 24px clamp(20px, 4vw, 50px);
}

.site-shell-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--brand-morkbla, #002a3a);
	color: var(--brand-vit, #ffffff);
}

.site-shell-header__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	width: min(100% - calc(clamp(20px, 4vw, 50px) * 2), var(--acf-container-default, 1500px));
	margin: 0 auto;
	padding: 24px clamp(20px, 4vw, 50px);
}

.site-shell-header__brand .custom-logo-link,
.site-shell-logo {
	display: inline-flex;
	background: var(--brand-vit, #ffffff);
	padding: 12px 16px;
}

.site-shell-header__brand img,
.site-shell-logo img {
	display: block;
	width: auto;
	height: 34px;
}

.site-shell-header__toggle {
	display: none;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.site-shell-header__toggle-bar {
	display: block;
	width: 24px;
	height: 2px;
	margin: 6px auto;
	background: currentColor;
	transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.site-shell-nav {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}

.site-shell-nav__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px 46px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-shell-nav__link {
	color: inherit;
	font-family: var(--acf-font-heading), sans-serif;
	font-size: 14px;
	line-height: 1.2;
	text-decoration: none;
	text-transform: uppercase;
	transition: opacity 0.2s ease-in-out;
}

.site-shell-nav__link:hover,
.site-shell-nav__link:focus-visible {
	opacity: 0.75;
}

.site-shell-footer {
	background: var(--brand-morkbla, #002a3a);
	color: var(--brand-vit, #ffffff);
	padding: 80px clamp(20px, 4vw, 50px) 40px;
}

.site-shell-footer__inner {
	width: min(100%, 1127px);
	margin: 0 auto;
}

.site-shell-footer__cta {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	margin-bottom: clamp(80px, 12vw, 160px);
	text-align: center;
}

.site-shell-footer__cta-link {
	margin-top: 20px;
}

.site-shell-footer__heading {
	margin: 0;
	font-family: var(--acf-font-heading), sans-serif;
	font-size: clamp(36px, 6vw, 62px);
	font-weight: 400;
	line-height: 1.2;
	text-transform: uppercase;
}

.site-shell-footer__text {
	max-width: 839px;
	margin: 0;
	opacity: 0.5;
	font-size: var(--acf-text-xlarge-size, 24px);
	line-height: 1.4;
}

.site-shell-footer__columns {
	display: flex;
	flex-direction: column;
	gap: 40px;
	margin-bottom: 80px;
}

.site-shell-footer__label {
	margin: 0 0 20px;
	font-family: var(--acf-font-heading), sans-serif;
	font-size: 18px;
	line-height: 1.2;
	text-transform: uppercase;
}

.site-shell-footer__office-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 30px 60px;
}

.site-shell-footer__office-city {
	margin: 0 0 4px;
	font-size: 18px;
	line-height: 1.4;
}

.site-shell-footer__office-address {
	margin: 0;
	opacity: 0.5;
	font-size: 18px;
	line-height: 1.4;
}

.site-shell-footer__links {
	display: grid;
	grid-template-columns: 1fr;
	gap: 40px;
}

.site-shell-footer__nav-list,
.site-shell-footer__social-list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 15px 25px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-shell-footer__nav-list a,
.site-shell-footer__social-list a {
	color: inherit;
	opacity: 0.5;
	font-size: 18px;
	line-height: 1.4;
	text-decoration: none;
	transition: opacity 0.2s ease-in-out;
}

.site-shell-footer__nav-list a:hover,
.site-shell-footer__nav-list a:focus-visible,
.site-shell-footer__social-list a:hover,
.site-shell-footer__social-list a:focus-visible {
	opacity: 1;
}

.site-shell-footer__decoration {
	display: flex;
	justify-content: center;
	margin-bottom: 40px;
}

.site-shell-footer__decoration-image {
	width: 100%;
	max-width: 500px;
	height: auto;
}

.site-shell-footer__legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	font-size: 16px;
	line-height: 1.4;
}

.site-shell-footer__legal a,
.site-shell-footer__copyright {
	opacity: 0.5;
	color: inherit;
	text-decoration: none;
	transition: opacity 0.2s ease-in-out;
}

.site-shell-footer__legal a:hover,
.site-shell-footer__legal a:focus-visible {
	opacity: 1;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 200;
	width: auto;
	height: auto;
	padding: 12px 16px;
	clip: auto;
	background: var(--brand-vit, #ffffff);
	color: var(--brand-morkbla, #002a3a);
}

@media (max-width: 1023px) {
	.site-shell-header__toggle {
		display: inline-flex;
		flex-direction: column;
		justify-content: center;
	}

	.site-shell-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		display: none;
		transform: none;
		padding: 24px clamp(20px, 4vw, 50px) 32px;
		background: var(--brand-morkbla, #002a3a);
	}

	.site-shell-header.is-nav-open .site-shell-nav {
		display: block;
	}

	.site-shell-nav__list {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.site-shell-header__cta {
		display: none;
	}

	.site-shell-footer__nav-list,
	.site-shell-footer__social-list {
		grid-template-columns: 1fr 1fr;
	}
}

@media (min-width: 1024px) {
	.site-shell-footer__columns {
		flex-direction: row;
		gap: 80px;
		align-items: stretch;
	}

	.site-shell-footer__offices,
	.site-shell-footer__links {
		flex: 1;
	}

	.site-shell-footer__links {
		grid-template-columns: 1fr;
		padding-left: 80px;
		border-left: 1px solid color-mix(in srgb, currentColor 20%, transparent);
	}
}

.site-main {
	flex: 1;
}

/* Standard block section */
.acf-section {
	position: relative;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
}

.acf-section--has-bg {
	overflow: hidden;
}

.acf-section__bg,
.acf-section__overlay {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.acf-section__overlay {
	background-color: #000;
	opacity: 0.5;
}

.acf-section__bg--image {
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
}

.acf-section__poster {
	position: absolute;
	inset: 0;
	z-index: 2;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	opacity: 1;
	transition: opacity 0.6s ease-in-out;
	pointer-events: none;
}

.acf-section__bg--video.is-playing .acf-section__poster {
	opacity: 0;
	transition-delay: 0.6s;
}

.acf-section__bg--video video {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100vw;
	height: 56.25vw;
	min-width: 177.78vh;
	min-height: 100vh;
	border: 0;
	transform: translate(-50%, -50%);
	pointer-events: none;
	object-fit: cover;
}

.acf-section > .acf-container {
	position: relative;
	z-index: 1;
}

.acf-section--pt-none {
	padding-top: 0;
}

.acf-section--pt-small {
	padding-top: var(--acf-space-small, clamp(24px, 4vw, 40px));
}

.acf-section--pt-medium {
	padding-top: var(--acf-space-medium, clamp(40px, 6vw, 80px));
}

.acf-section--pt-large {
	padding-top: var(--acf-space-large, clamp(64px, 8vw, 112px));
}

.acf-section--pb-none {
	padding-bottom: 0;
}

.acf-section--pb-small {
	padding-bottom: var(--acf-space-small, clamp(24px, 4vw, 40px));
}

.acf-section--pb-medium {
	padding-bottom: var(--acf-space-medium, clamp(40px, 6vw, 80px));
}

.acf-section--pb-large {
	padding-bottom: var(--acf-space-large, clamp(64px, 8vw, 112px));
}

.acf-section--mt-small {
	margin-top: var(--acf-space-small, clamp(24px, 4vw, 40px));
}

.acf-section--mt-medium {
	margin-top: var(--acf-space-medium, clamp(40px, 6vw, 80px));
}

.acf-section--mt-large {
	margin-top: var(--acf-space-large, clamp(64px, 8vw, 112px));
}

.acf-section--mb-small {
	margin-bottom: var(--acf-space-small, clamp(24px, 4vw, 40px));
}

.acf-section--mb-medium {
	margin-bottom: var(--acf-space-medium, clamp(40px, 6vw, 80px));
}

.acf-section--mb-large {
	margin-bottom: var(--acf-space-large, clamp(64px, 8vw, 112px));
}

/* Components */
.acf-container {
	width: min(100% - calc(clamp(20px, 4vw, 50px) * 2), var(--acf-container-max, 1500px));
	margin: 0 auto;
}

.acf-container--default {
	--acf-container-max: var(--acf-container-default, 1500px);
}

.acf-container--large {
	--acf-container-max: var(--acf-container-large, 1740px);
}

.acf-container--frame {
	--acf-container-max: 100%;
}

.acf-container--full {
	width: 100%;
	max-width: none;
}

.acf-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 15px;
	padding: var(--acf-btn-medium-py, 16px) var(--acf-btn-medium-px, 20px);
	border: 0;
	border-radius: var(--acf-btn-medium-radius, 0);
	background: var(--acf-btn-primary-bg, #002a3a);
	color: var(--acf-btn-primary-text, #ffffff);
	font-family: var(--acf-font-body), sans-serif;
	font-size: var(--acf-btn-medium-font, 18px);
	font-weight: 400;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
}

.acf-button--secondary {
	background: var(--acf-btn-secondary-bg, #ffffff);
	color: var(--acf-btn-secondary-text, #002a3a);
}

/* Text style: no background or padding; the fill color becomes the text + icon color.
   Higher specificity so it wins over the size modifiers' padding. */
.acf-button.acf-button--text {
	padding: 0;
	border-radius: 0;
	background: transparent;
	color: var(--acf-btn-primary-bg, #002a3a);
}

.acf-button.acf-button--text.acf-button--secondary {
	color: var(--acf-btn-secondary-bg, #ffffff);
}

/* Dimmed style: static, reduced-opacity arrow link (no hover animation). */
.acf-button--dimmed {
	opacity: 0.5;
}

.acf-button--small {
	padding: var(--acf-btn-small-py, 16px) var(--acf-btn-small-px, 20px);
	border-radius: var(--acf-btn-small-radius, 0);
	font-size: var(--acf-btn-small-font, 16px);
}

.acf-button--large {
	padding: var(--acf-btn-large-py, 16px) var(--acf-btn-large-px, 20px);
	border-radius: var(--acf-btn-large-radius, 0);
	font-size: var(--acf-btn-large-font, 20px);
}

.acf-button__icon {
	display: inline-flex;
	align-items: center;
}

.acf-button__icon svg {
	width: 1em;
	height: auto;
}

/* Recolor the icon to the button text color whether it uses fill or stroke,
   while leaving any explicit "none" values untouched. */
.acf-button__icon [fill]:not([fill="none"]) {
	fill: currentColor;
}

.acf-button__icon [stroke]:not([stroke="none"]) {
	stroke: currentColor;
}

.acf-buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
}

.acf-buttons--align-center {
	justify-content: center;
}

.acf-buttons--align-right {
	justify-content: flex-end;
}

.acf-image-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 20px;
	background: var(--wp--preset--color--base, #ffffff);
	color: inherit;
	text-decoration: none;
	transition: transform 0.3s ease-in-out;
}

.acf-image-card:hover,
.acf-image-card:focus-visible {
	transform: translateY(-10px);
}

.acf-image-card__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 10;
}

.acf-image-card__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease-in-out;
}

.acf-image-card:hover .acf-image-card__media img,
.acf-image-card:focus-visible .acf-image-card__media img {
	transform: scale(1.05);
}

.barba-demo {
	width: min(100% - calc(clamp(20px, 4vw, 50px) * 2), 1440px);
}

.barba-demo__hero {
	padding: clamp(48px, 8vw, 112px);
	border-radius: 32px;
	background: linear-gradient(135deg, #111827, var(--wp--preset--color--accent, #2563eb));
	color: var(--wp--preset--color--base, #ffffff);
}

.barba-demo__eyebrow {
	margin: 0 0 16px;
	color: #bfdbfe;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 2px;
	text-transform: uppercase;
}

.barba-demo__title {
	max-width: 800px;
	margin: 0;
	font-size: clamp(48px, 8vw, 104px);
	line-height: 0.95;
}

.barba-demo__content {
	max-width: 640px;
	margin-top: 24px;
	color: #dbeafe;
	font-size: 18px;
	line-height: 1.7;
}

.barba-demo__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 32px;
}

.barba-demo__button,
.barba-demo__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 20px;
	border-radius: 999px;
	font-weight: 800;
	text-decoration: none;
	transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.barba-demo__button:hover,
.barba-demo__button:focus-visible,
.barba-demo__link:hover,
.barba-demo__link:focus-visible {
	transform: translateY(-2px);
}

.barba-demo__button {
	background: var(--wp--preset--color--base, #ffffff);
	color: #111827;
}

.barba-demo__link {
	border: 1px solid rgba(255, 255, 255, 0.35);
	color: #ffffff;
}

.barba-demo__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	margin-top: 16px;
}

.barba-demo__card {
	padding: 24px;
	border: 1px solid #e5e7eb;
	border-radius: 20px;
	background: var(--wp--preset--color--base, #ffffff);
	box-shadow: 0 16px 40px rgba(17, 24, 39, 0.08);
	transition: transform 0.3s ease-in-out;
}

.barba-demo__card:hover,
.barba-demo__card:focus-within {
	transform: translateY(-10px);
}

.barba-demo__card h2 {
	margin: 0 0 12px;
	font-size: 18px;
}

.barba-demo__card p {
	margin: 0;
	color: #4b5563;
	line-height: 1.6;
}

@media (min-width: 768px) {
	.barba-demo__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
