/**
 * Global theme styles. Block-specific styles live with each block in src/blocks.
 *
 * Sizes follow the 1920px Figma desktop design through a "design unit":
 * --u is 1/1920 of the viewport width, so calc(120 * var(--u)) is the
 * design's 120px at any desktop width. Small text gets a readable minimum.
 * Below 900px blocks switch to stacked mobile layouts.
 */

:root {
	--u: calc((100vw - var(--diteh-sb, 0px)) / 1920);
	--midnight: var(--wp--preset--color--midnight);
	--royal: var(--wp--preset--color--royal);
	--sapphire: var(--wp--preset--color--sapphire);
	--quicksand: var(--wp--preset--color--quicksand);
	--swan: var(--wp--preset--color--swan);
	--shellstone: var(--wp--preset--color--shellstone);
	--sand: var(--wp--preset--color--sand);
	--taupe: var(--wp--preset--color--taupe);
	--hair: rgb(197 179 167 / 0.4);
	--hair-light: rgb(217 203 194 / 0.5);
	--swan-70: rgb(245 240 234 / 0.7);
	--serif: var(--wp--preset--font-family--serif);
	--sans: var(--wp--preset--font-family--sans);
	--header-h: 68px;
	--t-body: max(15px, calc(17 * var(--u)));
	--t-small: max(13px, calc(14 * var(--u)));
	--t-large: max(19px, calc(25 * var(--u)));
	--t-kicker: max(26px, calc(45 * var(--u)));
	--t-title: max(36px, calc(70 * var(--u)));
	--t-display: max(48px, calc(120 * var(--u)));
	--t-hero: max(54px, calc(150 * var(--u)));
	--ease: cubic-bezier(0.25, 0.8, 0.25, 1);
}

html {
	scroll-behavior: smooth;
}

body {
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
	font-size: var(--t-body);
}

.wp-site-blocks > *,
.diteh-sections > *,
.diteh-sections .wp-block-post-content > * {
	margin-block: 0;
}

.diteh-sections .wp-block-post-content > .alignfull,
.diteh-sections .wp-block-post-content > * {
	max-width: none;
}

.diteh-svg {
	display: block;
	flex: none;
}

@keyframes diteh-marquee {
	to {
		transform: translateX(-50%);
	}
}

/* --------------------------------------------------------------------------
   Type styles from the design (used by blocks and as block style classes)
   -------------------------------------------------------------------------- */

.dt-kicker {
	margin: 0;
	font-family: var(--serif);
	font-size: var(--t-kicker);
	font-style: italic;
	font-weight: 300;
	letter-spacing: -0.03em;
	line-height: 0.77;
}

.dt-display,
.dt-hero,
.dt-title {
	margin: 0;
	font-family: var(--serif);
	font-weight: 300;
	text-transform: uppercase;
}

.dt-hero {
	font-size: var(--t-hero);
	letter-spacing: 0.12em;
	line-height: 0.77;
}

.dt-display {
	font-size: var(--t-display);
	line-height: 0.77;
}

.dt-title {
	font-size: var(--t-title);
	letter-spacing: 0.12em;
	line-height: 0.77;
}

.dt-label {
	font-family: var(--serif);
	font-size: max(16px, calc(20 * var(--u)));
	font-weight: 300;
	letter-spacing: 0.12em;
	line-height: 0.77;
	text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Buttons ("components" set: primary = Quicksand, secondary = outline)
   -------------------------------------------------------------------------- */

.diteh-btn,
.wp-block-button .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 11px;
	min-width: min(246px, 100%);
	padding: 15px 60px;
	border: 1px solid transparent;
	border-radius: 0;
	background: var(--quicksand);
	color: var(--midnight);
	font-family: var(--sans);
	font-size: 17px;
	font-weight: 500;
	line-height: 1.35;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.diteh-btn__icon {
	display: none;
	width: 16px;
	height: auto;
}

.diteh-btn:hover,
.wp-block-button .wp-block-button__link:hover {
	background: var(--midnight);
	color: var(--swan);
	text-decoration: none;
}

.diteh-btn:hover .diteh-btn__icon {
	display: block;
}

.diteh-btn--secondary,
.wp-block-button.is-style-secondary .wp-block-button__link {
	border-color: var(--midnight);
	background: transparent;
	color: var(--midnight);
}

.diteh-btn--secondary-light {
	border-color: rgb(197 179 167 / 0.5);
	background: transparent;
	color: var(--swan);
}

.diteh-btn--secondary:hover,
.diteh-btn--secondary-light:hover,
.wp-block-button.is-style-secondary .wp-block-button__link:hover {
	border-color: var(--quicksand);
	background: var(--quicksand);
	color: var(--midnight);
}

.diteh-btn:focus-visible,
.wp-block-button__link:focus-visible {
	outline: 2px solid var(--sapphire);
	outline-offset: 3px;
}

.diteh-btn:disabled {
	opacity: 0.7;
	cursor: progress;
}

/* --------------------------------------------------------------------------
   Accordions (core/details, style "diteh-accordion") — product page
   -------------------------------------------------------------------------- */

.wp-block-details.diteh-accordion {
	margin: 0 !important;
	padding: 20px 35px;
	border-bottom: 1px solid var(--hair);
}

.wp-block-details.diteh-accordion > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	list-style: none;
	font-size: var(--t-large);
	font-weight: 500;
	text-transform: uppercase;
	cursor: pointer;
}

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

.wp-block-details.diteh-accordion > summary::after {
	content: "";
	width: 24px;
	height: 24px;
	background: currentColor;
	mask: url("../svg/icon-caret-down.svg") center / contain no-repeat;
	transition: transform 0.25s var(--ease);
}

.wp-block-details.diteh-accordion[open] > summary::after {
	transform: rotate(180deg);
}

.wp-block-details.diteh-accordion > :not(summary) {
	max-width: 576.85px;
	margin-block: 20px 0;
	color: var(--sapphire);
}

.wp-block-details.diteh-accordion > :not(summary) strong {
	display: block;
	margin-bottom: 5px;
	color: var(--midnight);
	font-weight: 700;
}

.wp-block-details.diteh-accordion a {
	font-weight: 700;
	text-decoration: underline;
}

.wp-block-details.diteh-accordion > .wp-block-table {
	max-width: none;
	margin-top: 10px;
}

/* Specifications / documents tables */
.wp-block-table.is-style-diteh-specs table,
.wp-block-table.is-style-diteh-documents table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.wp-block-table.is-style-diteh-specs td,
.wp-block-table.is-style-diteh-documents td {
	padding: 13px 10px;
	border: 0;
	border-bottom: 1px solid var(--hair);
	vertical-align: middle;
}

.wp-block-table.is-style-diteh-specs tr:last-child td,
.wp-block-table.is-style-diteh-documents tr:last-child td {
	border-bottom: 0;
}

.wp-block-table.is-style-diteh-specs td:first-child,
.wp-block-table.is-style-diteh-documents td:first-child {
	color: var(--midnight);
	font-weight: 700;
}

.wp-block-table.is-style-diteh-specs td:last-child {
	color: var(--sapphire);
}

.wp-block-table.is-style-diteh-documents td:last-child {
	text-align: right;
}

.wp-block-table.is-style-diteh-documents a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	border-bottom: 1px solid var(--midnight);
	color: var(--sapphire);
	font-weight: 500;
	text-decoration: none;
}

.wp-block-table.is-style-diteh-documents a::after {
	content: "";
	width: 24px;
	height: 24px;
	background: var(--midnight);
	mask: url("../svg/icon-file-arrow-down.svg") center / 18px no-repeat;
}

.wp-block-table.is-style-diteh-specs figcaption,
.wp-block-table.is-style-diteh-documents figcaption {
	display: none;
}

/* --------------------------------------------------------------------------
   Product card + grid (Offer page, related products)
   -------------------------------------------------------------------------- */

.diteh-grid {
	display: grid;
	grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
}

.diteh-card {
	display: flex;
	flex-direction: column;
	box-shadow: inset 0 0 0 0.5px var(--hair), 0 0 0 0.5px var(--hair);
	background: var(--swan);
	color: var(--midnight);
	text-decoration: none;
}

.diteh-card:hover {
	text-decoration: none;
}

.diteh-card__media {
	display: block;
	aspect-ratio: 523.28 / 340.46;
	overflow: hidden;
	background: #d9d9d9;
}

.diteh-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s var(--ease);
}

.diteh-card:hover .diteh-card__img {
	transform: scale(1.02);
}

.diteh-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: 20px;
	border-bottom: 1px solid var(--hair);
}

.diteh-card__tag {
	padding: 5px 15px;
	background: var(--sand);
	font-size: 14px;
}

.diteh-card__title {
	font-size: var(--t-large);
	line-height: 1.35;
}

.diteh-card__more {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 53px;
	padding: 0 25px 0 20px;
	font-size: 17px;
	transition: background-color 0.3s, padding 0.3s;
}

.diteh-card__arrow {
	width: 16px;
	height: auto;
	opacity: 0;
	transition: opacity 0.3s;
}

.diteh-card:hover .diteh-card__more {
	padding-right: 20px;
	background: var(--sand);
}

.diteh-card:hover .diteh-card__arrow {
	opacity: 1;
}

@media (max-width: 1100px) {
	.diteh-grid {
		--cols: 2 !important;
	}
}

@media (max-width: 600px) {
	.diteh-grid {
		--cols: 1 !important;
	}
}

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

.site-footer {
	position: relative;
	background: var(--midnight);
	color: var(--swan);
}

.site-footer__grid {
	display: grid;
	grid-template-columns: 589.31fr 443.56fr 443.57fr 443.56fr;
}

.site-footer__grid > *,
.site-footer__brand > *,
.site-footer__bottom > * {
	margin: 0 !important;
}

.site-footer__col {
	padding: calc(75 * var(--u)) 20px 40px calc(60 * var(--u));
	border-left: 1px solid var(--sapphire);
}

.site-footer__brand {
	display: flex;
	flex-direction: column;
	padding: 0;
	border-left: 0;
}

.site-footer__logo {
	display: flex;
	justify-content: center;
	align-items: center;
	height: calc(158.5 * var(--u));
	min-height: 120px;
	border-bottom: 1px solid var(--sapphire);
}

.site-footer__logo .diteh-logo svg {
	width: max(120px, calc(157.16 * var(--u)));
	height: auto;
}

.site-footer__tagline {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 30px 20px;
}

.site-footer__tagline p {
	max-width: 10em;
	font-family: var(--serif);
	font-size: max(24px, calc(35 * var(--u)));
	font-weight: 300;
	letter-spacing: -0.03em;
	line-height: 1.11;
	text-align: center;
}

.site-footer h2 {
	margin: 0 0 15px;
	color: var(--quicksand);
	font-family: var(--serif);
	font-size: max(22px, calc(30 * var(--u)));
	font-weight: 300;
	letter-spacing: -0.03em;
	line-height: 1.11;
	text-transform: uppercase;
}

.site-footer ul {
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__contact ul {
	gap: 10px;
}

.site-footer li {
	color: var(--swan-70);
	font-size: 17px;
}

.site-footer a {
	color: inherit;
	transition: color 0.2s;
}

.site-footer a:hover {
	color: var(--swan);
	text-decoration: none;
}

.site-footer__bottom {
	display: grid;
	grid-template-columns: 589.31fr 887.13fr 443.56fr;
	border-top: 1px solid var(--sapphire);
	color: rgb(245 240 234 / 0.55);
	font-size: 17px;
}

.site-footer__bottom > * {
	padding: 20px;
	text-align: center;
}

.site-footer__bottom > :nth-child(2) {
	border-left: 1px solid var(--sapphire);
	border-right: 1px solid var(--sapphire);
}

@media (max-width: 900px) {
	.site-footer__grid {
		grid-template-columns: 1fr 1fr;
	}

	.site-footer__brand {
		grid-column: 1 / -1;
	}

	.site-footer__col {
		padding: 32px 20px;
		border-top: 1px solid var(--sapphire);
	}

	.site-footer__grid > :nth-child(2) {
		border-left: 0;
	}

	.site-footer__grid > :last-child {
		grid-column: 1 / -1;
		border-left: 0;
	}

	.site-footer__bottom {
		grid-template-columns: 1fr;
	}

	.site-footer__bottom > :nth-child(2) {
		display: none;
	}

	.site-footer__bottom > * + * {
		border-top: 1px solid var(--sapphire);
	}
}

/* --------------------------------------------------------------------------
   Section helpers (About page) — add as "Additional CSS class"
   -------------------------------------------------------------------------- */

.dt-mt-50 { margin-top: max(32px, calc(50 * var(--u))) !important; }
.dt-mt-60 { margin-top: max(40px, calc(60 * var(--u))) !important; }
.dt-mt-100 { margin-top: max(56px, calc(100 * var(--u))) !important; }
.dt-mt-130 { margin-top: max(64px, calc(130 * var(--u))) !important; }

/* Centred Sapphire intro under a display heading. */
.diteh-lead {
	max-width: max(320px, calc(802 * var(--u)));
	margin-inline: auto !important;
	padding-inline: 20px;
	color: rgb(59 80 125 / 0.7);
	text-align: center;
}

/* About hero photo: 1720 × 761 with 100px side margins. */
.wp-block-image.diteh-about-hero {
	width: calc(1720 * var(--u));
	height: max(260px, calc(761 * var(--u)));
	margin-inline: auto !important;
	overflow: hidden;
	background: var(--shellstone);
}

.wp-block-image.diteh-about-hero img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 44%;
}

/* "our approach": heading 883 wide, 262 gap, text column 401. */
.wp-block-columns.diteh-approach {
	align-items: center !important;
	gap: calc(262 * var(--u));
	padding: 0 calc(251 * var(--u)) 0 calc(123 * var(--u));
}

.wp-block-columns.diteh-approach > .wp-block-column:first-child {
	flex: 0 0 calc(883 * var(--u)) !important;
}

.wp-block-columns.diteh-approach > .wp-block-column:last-child {
	display: flex;
	flex-direction: column;
	gap: 20px;
	max-width: max(300px, calc(401 * var(--u)));
	color: rgb(59 80 125 / 0.7);
}

.wp-block-columns.diteh-approach > .wp-block-column:last-child > * {
	margin: 0;
}

@media (max-width: 900px) {
	.wp-block-image.diteh-about-hero {
		width: auto;
		margin-inline: 20px !important;
	}

	.wp-block-columns.diteh-approach {
		padding: 0 20px;
	}

	.wp-block-columns.diteh-approach > .wp-block-column:first-child {
		flex-basis: auto !important;
	}
}

/* --------------------------------------------------------------------------
   Generic pages
   -------------------------------------------------------------------------- */

.diteh-page {
	padding-block: clamp(3rem, 6vw, 7rem);
}

.diteh-page .wp-block-post-title {
	margin-bottom: 2.5rem;
}

.screen-reader-text:focus {
	clip: auto !important;
	clip-path: none;
	z-index: 1000;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	background: var(--swan);
	color: var(--midnight);
}

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