/*
 * Shared components: buttons, rich text, breath line, video + lightbox, cards.
 */

/* Buttons ------------------------------------------------------------------ */
.ls-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--s2);
	min-height: 52px;
	padding: 0.85em 1.9em;
	border: 1px solid var(--wine);
	border-radius: 999px;
	background-color: var(--wine);
	font-family: var(--sans);
	font-size: var(--fs-eyebrow);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.14em;
	text-align: center;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--white);
	transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}

.ls-btn:hover,
.ls-btn:focus-visible {
	background-color: var(--wine-deep);
	border-color: var(--wine-deep);
}

.ls-btn:active {
	transform: translateY(1px);
}

/* Outline on light backgrounds */
.ls-btn--outline {
	background-color: transparent;
	color: var(--wine);
}

.ls-btn--outline:hover,
.ls-btn--outline:focus-visible {
	background-color: var(--wine);
	border-color: var(--wine);
	color: var(--white);
}

/* Outline on dark/photo backgrounds */
.ls-btn--light,
.ls-btn--sage {
	border-color: rgba(255, 255, 255, 0.85);
	background-color: transparent;
	color: var(--white);
}

.ls-btn--light:hover,
.ls-btn--light:focus-visible,
.ls-btn--sage:hover,
.ls-btn--sage:focus-visible {
	border-color: var(--white);
	background-color: var(--white);
	color: var(--wine);
}

/* Legacy name used by migrated content: solid wine */
.ls-btn--solid {
	background-color: var(--wine);
	color: var(--white);
}

.ls-btn span {
	line-height: inherit;
}

/* Text link with arrow */
.ls-link {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	font-size: var(--fs-eyebrow);
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--wine);
}

.ls-link::after {
	content: "";
	width: 1.6em;
	height: 1px;
	background: currentColor;
	transition: width 0.35s ease;
}

.ls-link:hover::after,
.ls-link:focus-visible::after {
	width: 2.6em;
}

/* Rich text --------------------------------------------------------------- */
.ls-text {
	color: var(--ink-soft);
}

.ls-text > :last-child {
	margin-bottom: 0;
}

.ls-text strong,
.ls-text b {
	color: var(--ink);
}

/* Breath line: a slow wave that draws itself in ------------------------------ */
.ls-breath {
	display: block;
	width: 120px;
	height: 14px;
	color: var(--ochre);
	overflow: visible;
}

.ls-breath path {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.25;
	stroke-linecap: round;
}

@media (prefers-reduced-motion: no-preference) {
	.ls-js .ls-breath path {
		stroke-dasharray: 260;
		stroke-dashoffset: 260;
		transition: stroke-dashoffset 2.6s cubic-bezier(0.45, 0, 0.2, 1) 0.2s;
	}

	.ls-js .is-revealed .ls-breath path,
	.ls-js .ls-breath.is-revealed path {
		stroke-dashoffset: 0;
	}
}

/* Video with thumbnail; the video opens in a lightbox ------------------------- */
.ls-video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--radius);
	background-color: var(--ink);
}

.ls-video__thumb {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: 50% 50%;
	cursor: pointer;
	transition: transform 1.2s ease;
}

.ls-video__thumb::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(43, 29, 31, 0.05), rgba(43, 29, 31, 0.45));
}

.ls-video__play {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 84px;
	height: 84px;
	border: 1px solid rgba(255, 255, 255, 0.8);
	border-radius: 50%;
	color: var(--white);
	transition: background-color 0.35s ease, transform 0.35s ease;
}

.ls-video__play svg {
	width: 100%;
	height: auto;
}

.ls-video__play path,
.ls-video__play .st0 {
	fill: currentColor;
}

.ls-video__thumb:hover .ls-video__play,
.ls-video__thumb:focus-visible .ls-video__play {
	background-color: rgba(255, 255, 255, 0.15);
	transform: scale(1.05);
}

.ls-lightbox {
	width: 100vw;
	max-width: none;
	height: 100vh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(43, 29, 31, 0.92);
}

.ls-lightbox::backdrop {
	background: transparent;
}

.ls-lightbox__frame {
	position: absolute;
	top: 50%;
	left: 50%;
	width: min(88vw, calc(80vh * 16 / 9));
	transform: translate(-50%, -50%);
}

.ls-lightbox__frame video {
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
}

.ls-lightbox__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 48px;
	height: 48px;
	font-size: 36px;
	line-height: 48px;
	color: var(--linen);
}

/* Card -------------------------------------------------------------------------- */
.ls-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--white);
	text-decoration: none;
	color: inherit;
}

.ls-card__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	background: var(--linen-deep);
}

.ls-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ls-card:hover .ls-card__media img,
.ls-card:focus-within .ls-card__media img {
	transform: scale(1.04);
}

.ls-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--s3);
	padding: var(--s5) var(--s5) var(--s6);
}

.ls-card__title {
	font-size: var(--fs-h4);
}

.ls-card__title a {
	text-decoration: none;
}

/* Whole card clickable via the title link. */
.ls-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.ls-card__text {
	font-size: var(--fs-small);
	color: var(--ink-soft);
}

.ls-card__text > :last-child {
	margin-bottom: 0;
}

.ls-card .ls-link {
	margin-top: auto;
	padding-top: var(--s3);
}

/* Comfortable tap targets for text links in header and footer. */
.ls-header__brand,
.ls-footer__brand,
.ls-footer__handle a {
	display: inline-block;
	padding-block: 0.55rem;
}

/* Pop-up (Site instellingen > Pop-up) --------------------------------------------- */
.ls-popup {
	width: 100vw;
	max-width: none;
	height: 100vh;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: var(--s4);
	border: 0;
	background: transparent;
	color: var(--ink-soft);
}

.ls-popup[open] {
	display: grid;
	place-items: center;
}

.ls-popup::backdrop {
	background: rgba(43, 29, 31, 0.55);
}

html:has(.ls-popup[open]) {
	overflow: hidden;
}

.ls-popup__panel {
	position: relative;
	display: grid;
	width: min(100%, 34rem);
	max-height: 100%;
	overflow: auto;
	background: var(--linen);
	border-radius: var(--radius);
	box-shadow: 0 30px 80px rgba(43, 29, 31, 0.25);
}

.ls-popup__panel.has-image {
	width: min(100%, 54rem);
}

.ls-popup__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ls-popup__body {
	padding: clamp(var(--s6), 5vw, var(--s8)) clamp(var(--s5), 5vw, var(--s7));
}

.ls-popup__title {
	margin-bottom: var(--s4);
	font-size: var(--fs-h3);
}

.ls-popup__text > :last-child {
	margin-bottom: 0;
}

.ls-popup__form,
.ls-popup__actions {
	margin: var(--s5) 0 0;
}

.ls-popup__fields {
	display: grid;
	gap: var(--s3);
}

.ls-popup__input {
	width: 100%;
	min-height: 52px;
	padding: 0 var(--s5);
	border: 1px solid rgba(43, 29, 31, 0.25);
	border-radius: 999px;
	background: var(--white);
	font-size: var(--fs-body);
	color: var(--ink);
}

.ls-popup__input:focus {
	outline: none;
	border-color: var(--wine);
}

.ls-popup__input[aria-invalid="true"] {
	border-color: var(--wine);
}

.ls-popup__submit {
	width: 100%;
}

.ls-popup__form .ls-form__message {
	margin-top: var(--s3);
}

.ls-popup__form.is-sent .ls-popup__fields {
	display: none;
}

.ls-popup__form.is-sent .ls-form__message {
	margin-top: 0;
	font-size: var(--fs-body);
}

.ls-popup__close {
	position: absolute;
	top: var(--s3);
	right: var(--s3);
	z-index: 1;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--linen);
	font-size: 28px;
	line-height: 44px;
	color: var(--wine);
	transition: background-color 0.2s ease;
}

.ls-popup__close:hover,
.ls-popup__close:focus-visible {
	background: var(--blush);
}

@media (max-width: 759px) {
	.ls-popup {
		padding: var(--s3);
	}

	.ls-popup__media {
		height: clamp(6.5rem, 18vh, 11rem);
	}

	.ls-popup__body {
		padding: var(--s5);
	}
}

@media (max-width: 759px) and (max-height: 720px) {
	.ls-popup__media {
		display: none; /* short phones: text and form fit without scrolling */
	}

	.ls-popup__close {
		top: var(--s2);
		right: var(--s2);
	}
}

@media (min-width: 760px) {
	.ls-popup__panel.has-image {
		grid-template-columns: 2fr 3fr;
	}

	.ls-popup__media {
		min-height: 100%;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.ls-popup[open] .ls-popup__panel {
		animation: ls-popup-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
	}

	.ls-popup[open]::backdrop {
		animation: ls-popup-fade 0.6s ease both;
	}
}

@keyframes ls-popup-in {
	from {
		opacity: 0;
		transform: translate3d(0, 24px, 0);
	}
}

@keyframes ls-popup-fade {
	from {
		opacity: 0;
	}
}
