/*
Theme Name: CanCompany
Theme URI: https://www.cancompany.nl/
Author: Can Company
Description: Company website for Can Company, canning and filling services for health and sports drinks, functional drinks and private label drinks. One-page home with editable blocks, a can / packing / labelling chooser and a built-in contact form.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cancompany
*/

/* ---------- Tokens ---------- */

:root {
	--cc-red: #D30708;
	--cc-blue: #0000FE;
	--cc-navy: #0A0A45;
	--cc-fizz: #EEF1FF;
	--cc-alu: #C8CDD9;
	--cc-white: #FFFFFF;
	--cc-text: #1B1B3A;

	--cc-display: "Tw Cen MT", "Century Gothic", "Avenir Next", Avenir, Futura, "Trebuchet MS", system-ui, sans-serif;
	--cc-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--cc-width: 1180px;
	--cc-gutter: clamp(20px, 5vw, 48px);
	--cc-section: clamp(64px, 9vw, 128px);
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 96px;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--cc-white);
	color: var(--cc-text);
	font-family: var(--cc-body);
	font-size: 1.0625rem;
	line-height: 1.6;
}

img,
svg {
	max-width: 100%;
	height: auto;
}

h1,
h2,
h3,
h4 {
	margin: 0 0 0.5em;
	color: var(--cc-blue);
	font-family: var(--cc-display);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

h1 {
	font-size: clamp(2.75rem, 7vw, 5.25rem);
	line-height: 0.95;
}

h2 {
	font-size: clamp(2.1rem, 4.6vw, 3.5rem);
}

h3 {
	font-size: clamp(1.5rem, 2.6vw, 2rem);
}

h4 {
	font-size: 1.5rem;
}

p {
	margin: 0 0 1.1em;
}

a {
	color: var(--cc-blue);
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--cc-red);
}

:focus-visible {
	outline: 3px solid var(--cc-red);
	outline-offset: 3px;
	border-radius: 4px;
}

.cc-wrap {
	width: 100%;
	max-width: calc(var(--cc-width) + 2 * var(--cc-gutter));
	margin-inline: auto;
	padding-inline: var(--cc-gutter);
}

.cc-skip {
	position: absolute;
	left: -9999px;
	top: 8px;
	z-index: 100;
	padding: 10px 16px;
	background: var(--cc-navy);
	color: var(--cc-white);
}

.cc-skip:focus {
	left: 8px;
	color: var(--cc-white);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- Buttons ---------- */

.cc-button,
.cc-content .wp-block-button__link {
	display: inline-block;
	padding: 0.85em 1.5em;
	border: 2px solid var(--cc-red);
	border-radius: 999px;
	background: var(--cc-red);
	color: var(--cc-white);
	font-family: var(--cc-display);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.cc-button:hover,
.cc-content .wp-block-button__link:hover {
	border-color: var(--cc-navy);
	background: var(--cc-navy);
	color: var(--cc-white);
}

.cc-content .is-style-outline .wp-block-button__link {
	border-color: var(--cc-blue);
	background: transparent;
	color: var(--cc-blue);
}

.cc-content .is-style-outline .wp-block-button__link:hover {
	background: var(--cc-blue);
	color: var(--cc-white);
}

.cc-content .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 2em;
}

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

.cc-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--cc-fizz);
}

.cc-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 84px;
}

.cc-brand a {
	display: block;
}

.cc-brand img {
	display: block;
	width: auto;
	height: 76px;
}

.cc-menu {
	display: flex;
	gap: clamp(16px, 2.4vw, 34px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.cc-menu a {
	display: block;
	padding: 8px 0;
	color: var(--cc-navy);
	font-family: var(--cc-display);
	font-size: 1.125rem;
	font-weight: 600;
	text-decoration: none;
	border-bottom: 3px solid transparent;
}

.cc-menu a:hover {
	color: var(--cc-blue);
	border-bottom-color: var(--cc-red);
}

.cc-menu li:last-child a {
	padding: 8px 20px;
	border: 2px solid var(--cc-blue);
	border-radius: 999px;
	color: var(--cc-blue);
}

.cc-menu li:last-child a:hover {
	background: var(--cc-blue);
	color: var(--cc-white);
}

.cc-nav-toggle {
	display: none;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border: 2px solid var(--cc-blue);
	border-radius: 999px;
	background: none;
	color: var(--cc-blue);
	font-family: var(--cc-display);
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
}

.cc-nav-toggle__bars,
.cc-nav-toggle__bars::before {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
}

.cc-nav-toggle__bars::before {
	content: "";
	transform: translateY(6px);
}

.cc-nav-toggle__bars {
	margin-bottom: 6px;
}

@media (max-width: 900px) {
	.cc-nav-toggle {
		display: inline-flex;
	}

	.cc-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		padding: 12px var(--cc-gutter) 24px;
		background: var(--cc-white);
		border-bottom: 1px solid var(--cc-fizz);
		box-shadow: 0 18px 30px rgba(10, 10, 69, 0.12);
	}

	.cc-nav.is-open {
		display: block;
	}

	.cc-menu {
		flex-direction: column;
		gap: 4px;
	}

	.cc-menu a {
		padding: 12px 0;
		font-size: 1.25rem;
	}

	.cc-menu li:last-child a {
		display: inline-block;
		margin-top: 8px;
		padding: 10px 22px;
	}
}

/* ---------- Sections ---------- */

.cc-section {
	position: relative;
	padding-block: var(--cc-section);
	overflow: hidden;
}

.cc-lead {
	max-width: 34em;
	color: var(--cc-navy);
	font-size: clamp(1.2rem, 1.9vw, 1.4rem);
	line-height: 1.45;
}

.cc-content p {
	max-width: 38em;
}

.cc-content .wp-block-columns {
	margin: 0;
}

.cc-content .wp-block-column > :last-child {
	margin-bottom: 0;
}

.cc-content .cc-split.wp-block-columns {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 40px;
}

@media (min-width: 900px) {
	.cc-content .cc-split.wp-block-columns {
		grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
		gap: clamp(48px, 7vw, 110px);
		align-items: start;
	}
}

.cc-content .cc-subhead {
	color: var(--cc-red);
}

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

.cc-hero {
	padding-block: clamp(40px, 6vw, 80px) clamp(56px, 8vw, 104px);
}

.cc-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 48px;
	align-items: center;
}

@media (min-width: 980px) {
	.cc-hero__grid {
		grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
		gap: 56px;
	}
}

.cc-hero h1 {
	margin-bottom: 0.2em;
}

.cc-content .cc-hero__payoff {
	margin-bottom: 1em;
	color: var(--cc-red);
	font-family: var(--cc-display);
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.01em;
}

/* The can line-up */

.cc-lineup {
	position: relative;
	padding: 56px 16px 0;
}

.cc-lineup::before {
	content: "";
	position: absolute;
	inset: 0 0 34px;
	border-radius: 50% 50% 28px 28px / 46% 46% 28px 28px;
	background: var(--cc-fizz);
}

.cc-lineup__cans {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: clamp(8px, 2vw, 22px);
	padding-bottom: 34px;
}

.cc-lineup__can {
	flex: 0 1 auto;
	min-width: 0;
	line-height: 0;
	filter: drop-shadow(0 16px 12px rgba(10, 10, 69, 0.22));
}

.cc-can__svg {
	display: block;
	font-family: var(--cc-display);
}

.cc-content .cc-lineup__caption {
	position: relative;
	max-width: none;
	margin: 12px 0 0;
	color: var(--cc-navy);
	font-size: 0.9375rem;
	text-align: center;
}

.cc-fizz {
	position: absolute;
	border-radius: 50%;
	background: var(--cc-blue);
	animation: cc-rise 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.cc-fizz--1 { top: 9%; left: 16%; width: 30px; height: 30px; animation-delay: 0.1s; }
.cc-fizz--2 { top: 3%; left: 44%; width: 16px; height: 16px; background: var(--cc-red); animation-delay: 0.3s; }
.cc-fizz--3 { top: 14%; left: 62%; width: 44px; height: 44px; background: var(--cc-red); animation-delay: 0.2s; }
.cc-fizz--4 { top: 6%; left: 82%; width: 20px; height: 20px; animation-delay: 0.45s; }
.cc-fizz--5 { top: 24%; left: 33%; width: 12px; height: 12px; animation-delay: 0.55s; }
.cc-fizz--6 { top: 27%; left: 88%; width: 10px; height: 10px; background: var(--cc-red); animation-delay: 0.65s; }

@keyframes cc-rise {
	from {
		opacity: 0;
		transform: translateY(120px) scale(0.4);
	}
}

@media (min-width: 1100px) {
	.cc-lineup__cans {
		zoom: 1.2;
	}
}

/* ---------- Mission ---------- */

.cc-mission {
	background: var(--cc-blue);
	color: var(--cc-white);
}

.cc-mission::before,
.cc-mission::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	background: var(--cc-red);
}

.cc-mission::before {
	top: -90px;
	right: -60px;
	width: 300px;
	height: 300px;
}

.cc-mission::after {
	top: 170px;
	right: 250px;
	width: 46px;
	height: 46px;
}

@media (max-width: 899px) {
	.cc-mission::before {
		top: -70px;
		right: -70px;
		width: 160px;
		height: 160px;
	}

	.cc-mission::after {
		top: 76px;
		right: 104px;
		width: 22px;
		height: 22px;
	}
}

.cc-mission .cc-wrap {
	position: relative;
	z-index: 1;
}

.cc-mission h2 {
	color: var(--cc-white);
	font-size: clamp(1.25rem, 2vw, 1.5rem);
	letter-spacing: 0;
}

.cc-content .cc-statement {
	max-width: 21em;
	margin-bottom: 1.2em;
	font-family: var(--cc-display);
	font-size: clamp(1.9rem, 4.4vw, 3.4rem);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.cc-content .cc-two.wp-block-columns {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
	max-width: 62em;
}

@media (min-width: 800px) {
	.cc-content .cc-two.wp-block-columns {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 48px;
	}
}

/* ---------- Services ---------- */

.cc-services .cc-subhead {
	margin-top: clamp(56px, 7vw, 96px);
	margin-bottom: 1em;
}

.cc-content .cc-options.wp-block-columns {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 36px;
}

@media (min-width: 860px) {
	.cc-content .cc-options.wp-block-columns {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: clamp(28px, 4vw, 56px);
	}
}

.cc-options .wp-block-column {
	padding-top: 20px;
	border-top: 6px solid var(--cc-blue);
}

.cc-options .wp-block-column:nth-child(2) {
	border-top-color: var(--cc-red);
}

/* ---------- Functional drinks ---------- */

.cc-drinks {
	background: var(--cc-fizz);
}

.cc-content .cc-bubbles {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	margin: 1.5em 0 0;
	padding: 0;
	list-style: none;
}

.cc-bubbles li {
	display: grid;
	place-items: center;
	width: 150px;
	aspect-ratio: 1;
	padding: 14px;
	border-radius: 50%;
	background: var(--cc-blue);
	color: var(--cc-white);
	font-family: var(--cc-display);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.05;
	text-align: center;
}

.cc-bubbles li:nth-child(3n + 2) {
	background: var(--cc-red);
}

.cc-bubbles li:nth-child(4n + 3) {
	background: var(--cc-white);
	color: var(--cc-blue);
	box-shadow: inset 0 0 0 3px var(--cc-blue);
}

.cc-bubbles li:nth-child(1),
.cc-bubbles li:nth-child(6) {
	width: 172px;
	font-size: 1.4rem;
}

.cc-bubbles li:nth-child(4),
.cc-bubbles li:nth-child(8) {
	width: 128px;
	font-size: 1.1rem;
}

.cc-bubbles li:nth-child(even) {
	margin-top: 36px;
}

@media (max-width: 520px) {
	.cc-bubbles li,
	.cc-bubbles li:nth-child(n) {
		width: calc(50% - 7px);
		margin-top: 0;
		font-size: 1.1rem;
	}
}

/* ---------- New product development ---------- */

.cc-content .cc-more {
	margin: 1em 0 0;
	padding: 0;
	list-style: none;
	border-top: 2px solid var(--cc-navy);
}

.cc-more li {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 20px 0;
	border-bottom: 2px solid var(--cc-navy);
	color: var(--cc-navy);
	font-family: var(--cc-display);
	font-size: clamp(1.4rem, 2.4vw, 1.9rem);
	font-weight: 700;
	line-height: 1.1;
}

.cc-more li::before {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--cc-red);
}

.cc-more li:nth-child(even)::before {
	background: var(--cc-blue);
}

/* ---------- Chooser ---------- */

.cc-choose {
	background: var(--cc-fizz);
}

.cc-config {
	margin-top: 40px;
}

.cc-config__group {
	margin: 0 0 36px;
	padding: 0;
	border: 0;
	min-width: 0;
}

.cc-config__group legend {
	margin-bottom: 16px;
	padding: 0;
	color: var(--cc-red);
	font-family: var(--cc-display);
	font-size: 1.5rem;
	font-weight: 700;
}

.cc-config__cans,
.cc-config__row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.cc-config__cans {
	align-items: flex-end;
}

.cc-pick {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	padding: 18px 20px 14px;
	border: 2px solid transparent;
	border-radius: 20px;
	background: var(--cc-white);
	cursor: pointer;
	transition: border-color 0.15s, transform 0.15s;
}

.cc-pick input {
	position: absolute;
	opacity: 0;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
}

.cc-pick:hover {
	border-color: var(--cc-alu);
}

.cc-pick:has(input:checked) {
	border-color: var(--cc-blue);
	transform: translateY(-4px);
}

.cc-pick:has(input:focus-visible) {
	outline: 3px solid var(--cc-red);
	outline-offset: 3px;
}

.cc-pick__label {
	color: var(--cc-navy);
	font-family: var(--cc-display);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.2;
}

.cc-pick:has(input:checked) .cc-pick__label {
	color: var(--cc-blue);
}

.cc-pick__note {
	color: var(--cc-text);
	font-size: 0.9375rem;
}

.cc-pick--can {
	min-width: 132px;
}

.cc-pick--pack {
	min-width: 132px;
	min-height: 132px;
}

.cc-pick--label {
	align-items: flex-start;
	gap: 2px;
	min-width: 210px;
	padding: 18px 22px;
}

.cc-pack {
	display: grid;
	grid-template-columns: repeat(var(--cols), 11px);
	gap: 3px;
}

.cc-pack i {
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: var(--cc-alu);
}

.cc-pick:has(input:checked) .cc-pack i {
	background: var(--cc-blue);
}

.cc-config__result {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding-top: 28px;
	border-top: 2px solid var(--cc-navy);
}

.cc-content .cc-config__summary {
	margin: 0;
	color: var(--cc-navy);
	font-size: 1.125rem;
}

.cc-content .cc-config__summary.is-filled {
	font-family: var(--cc-display);
	font-size: 1.4rem;
	font-weight: 700;
}

/* ---------- Contact ---------- */

.cc-contact {
	background: var(--cc-navy);
	color: var(--cc-white);
}

.cc-contact h2 {
	color: var(--cc-white);
}

.cc-contact .cc-lead {
	color: var(--cc-white);
}

.cc-details {
	margin-top: 2em;
	font-style: normal;
	font-size: 1.125rem;
}

.cc-details a {
	color: var(--cc-white);
	font-family: var(--cc-display);
	font-size: 1.5rem;
	font-weight: 700;
}

.cc-details a:hover {
	color: var(--cc-alu);
}

.cc-form-panel {
	padding: clamp(22px, 4vw, 40px);
	border-radius: 24px;
	background: var(--cc-white);
	color: var(--cc-text);
}

.cc-form p {
	max-width: none;
	margin: 0 0 18px;
}

.cc-form__pair {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0 18px;
}

@media (min-width: 620px) {
	.cc-form__pair {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.cc-form label {
	display: block;
	margin-bottom: 6px;
	color: var(--cc-navy);
	font-weight: 600;
}

.cc-form__opt {
	font-weight: 400;
}

.cc-form input[type="text"],
.cc-form input[type="email"],
.cc-form select,
.cc-form textarea {
	display: block;
	width: 100%;
	padding: 12px 14px;
	border: 2px solid var(--cc-alu);
	border-radius: 10px;
	background: var(--cc-white);
	color: var(--cc-text);
	font: inherit;
}

.cc-form input:focus,
.cc-form select:focus,
.cc-form textarea:focus {
	border-color: var(--cc-blue);
	outline: none;
}

.cc-form textarea {
	resize: vertical;
}

.cc-form__hp {
	position: absolute;
	left: -9999px;
}

.cc-content .cc-form__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 20px;
	margin-bottom: 0;
}

.cc-form__privacy {
	flex: 1 1 200px;
	font-size: 0.9375rem;
}

.cc-content .cc-notice {
	max-width: none;
	margin-bottom: 20px;
	padding: 14px 18px;
	border-radius: 10px;
	font-weight: 600;
}

.cc-notice--ok {
	background: #E3F6EA;
	color: #0B4F26;
}

.cc-notice--error {
	background: #FDE8E8;
	color: #8A0405;
}

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

.cc-footer {
	padding-block: 48px 28px;
	background: var(--cc-navy);
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	color: var(--cc-white);
	font-size: 1rem;
}

.cc-footer a {
	color: var(--cc-white);
}

.cc-footer a:hover {
	color: var(--cc-alu);
}

.cc-footer__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 28px;
}

@media (min-width: 800px) {
	.cc-footer__inner {
		grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 2fr);
		gap: 56px;
	}
}

.cc-footer__name {
	margin-bottom: 0.3em;
	font-family: var(--cc-display);
	font-size: 1.5rem;
	font-weight: 700;
}

.cc-footer__brand p:last-child {
	max-width: 26em;
}

.cc-footer__address {
	font-style: normal;
}

.cc-footer__menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.cc-footer__legal {
	margin-top: 36px;
	font-size: 0.9375rem;
	opacity: 0.8;
}

.cc-footer__legal p {
	margin: 0;
}

/* ---------- Regular pages and news ---------- */

.cc-page__head {
	padding-block: clamp(48px, 7vw, 88px) clamp(28px, 4vw, 44px);
	background: var(--cc-fizz);
}

.cc-page__head h1 {
	margin: 0;
	font-size: clamp(2.4rem, 5.5vw, 4rem);
}

.cc-prose {
	padding-block: clamp(36px, 5vw, 64px) var(--cc-section);
}

.cc-prose > * {
	max-width: 44rem;
}

.cc-prose > .alignwide {
	max-width: none;
}

.cc-prose h2 {
	margin-top: 1.4em;
	font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.cc-prose h3 {
	margin-top: 1.4em;
}

.cc-meta {
	color: var(--cc-navy);
	font-size: 0.9375rem;
}

.cc-teaser {
	padding-block: 28px;
	border-bottom: 2px solid var(--cc-fizz);
}

.cc-teaser h2 {
	margin-top: 0;
}

.cc-teaser h2 a {
	text-decoration: none;
}

/* ---------- Reduced motion ---------- */

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

	.cc-fizz {
		animation: none;
	}

	.cc-button,
	.cc-pick,
	.cc-content .wp-block-button__link {
		transition: none;
	}
}
