/*
 * TOMMY homepage (Divi sections, one text module each). Uses the tokens from base.css.
 * Section order: hero, why, categories (cats), catalogue (doc), about, get in touch (touch).
 * Images are theme files referenced root-relative (assets/img, assets/img/bg).
 */

/* ------------------------------------------------------------------ resets */

/* Divi adds percentage padding/margins to sections, rows and modules; the
   layout here is driven by the tokens in base.css instead. */
.et_pb_section.tm-sec {
	padding: 0;
	font-family: var(--font);
}

.et_pb_row.tm-row {
	width: 100%;
	max-width: calc(var(--container) + var(--gutter) * 2);
	margin: 0 auto;
	padding: 0 var(--gutter);
	box-sizing: border-box;
}

.tm-sec .et_pb_column {
	margin-right: 0;
}

.et_pb_section.tm-sec .et_pb_column .et_pb_module {
	margin-bottom: 0 !important;
	margin-right: 0 !important;
}

.tm-sec :is(p, h1, h2, h3, h4) {
	margin: 0;
	padding: 0;
	font-family: var(--font);
}

.tm-sec :where(p, li) {
	text-wrap: pretty;
}

.tm-why-card p,
.tm-stat .tm-stat__label,
.tm-cat .et_pb_module_header {
	text-wrap: balance;
}

.tm-sec .et_pb_text_inner {
	font-family: var(--font);
}

/* Divi buttons: use the shared .tm-btn look */
.et_pb_section .et_pb_button.tm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 28px;
	border-width: 2px;
	border-radius: var(--r-pill);
	font-family: var(--font);
	font-size: var(--fs-sm);
	line-height: 1;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	white-space: nowrap;
}

.et_pb_section .et_pb_button.tm-btn::after {
	display: none;
}

.et_pb_section .et_pb_button.tm-btn:hover {
	padding: 0 28px;
}

.et_pb_section .et_pb_button.tm-btn--accent {
	background: var(--c-teal);
	border-color: var(--c-teal);
	color: var(--c-navy);
}

.et_pb_section .et_pb_button.tm-btn--accent:hover {
	background: #fff;
	border-color: #fff;
	color: var(--c-royal);
}

.et_pb_section .et_pb_button.tm-btn--ghost {
	background: rgba(4, 18, 62, 0.55);
	border-color: #fff;
	color: #fff;
}

.et_pb_section .et_pb_button.tm-btn--ghost:hover {
	background: #fff;
	border-color: #fff;
	color: var(--c-deep);
}

.tm-sec .et_pb_button_module_wrapper {
	margin: 0;
}

/* shared section heading */
.tm-h2 {
	font-size: var(--fs-h2);
	line-height: 1.15;
	font-weight: 800;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.tm-sec .tm-label {
	font-size: clamp(0.8125rem, 0.7rem + 0.5vw, 1.25rem);
	letter-spacing: 0.14em;
}

/* ------------------------------------------------------------ shared bits */

.tm-sec {
	color: var(--c-ink);
	line-height: 1.6;
}

.tm-sec a {
	text-decoration: none;
}

.tm-sec :is(.tm-btn, .tm-btn:hover) {
	text-decoration: none;
}

.tm-sec .tm-btn--accent {
	background: var(--c-teal);
	color: var(--c-navy);
}

.tm-sec .tm-btn--accent:hover {
	background: #fff;
	color: var(--c-royal);
}

.tm-sec .tm-btn--ghost {
	border-color: #fff;
	background: transparent;
	color: #fff;
}

.tm-sec .tm-btn--ghost:hover {
	background: #fff;
	color: var(--c-royal);
}

.tm-sec .tm-btn--deep {
	background: var(--c-royal);
	color: #fff;
}

.tm-sec .tm-btn--deep:hover {
	background: #fff;
	color: var(--c-royal);
}

.tm-label--teal {
	color: var(--c-teal-ink);
}

/* ------------------------------------------------------------------- hero */

.tm-hero {
	background: #1b4f87 url('/wp-content/themes/tommy-child/assets/img/bg/hero-v2.webp') no-repeat right center / cover;
	position: relative;
	color: #fff;
}

.tm-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(0, 83, 153, 0.92) 0%, rgba(0, 83, 153, 0.72) 28%, rgba(0, 83, 153, 0.18) 56%, rgba(0, 83, 153, 0) 70%);
	pointer-events: none;
}

.tm-hero .et_pb_row {
	position: relative;
}

.tm-hero__copy {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: clamp(440px, 43.8vw, 842px);
	padding-block: clamp(40px, 6vw, 96px);
	max-width: 46rem;
}

.tm-sec .tm-hero__title {
	color: #fff;
	font-size: clamp(2.75rem, 1.2rem + 5.6vw, 6.25rem);
	line-height: 1.02;
	font-weight: 800;
	letter-spacing: -0.015em;
	text-shadow: 0 2px 18px rgba(0, 40, 80, 0.25);
}

.tm-hero__title span {
	display: block;
	color: var(--c-teal);
}

.tm-sec .tm-hero__text {
	max-width: 34rem;
	margin-top: clamp(14px, 2vw, 28px);
	color: #fff;
	font-size: clamp(0.9375rem, 0.85rem + 0.35vw, 1.125rem);
	line-height: 1.6;
	font-weight: 500;
}

.tm-sec .tm-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: clamp(18px, 2.4vw, 32px);
}

@media (max-width: 767px) {
	.tm-hero {
		background-position: 78% center;
		background-image: url('/wp-content/themes/tommy-child/assets/img/bg/hero-960-v2.webp');
	}

	.tm-hero::before {
		background: linear-gradient(180deg, rgba(0, 83, 153, 0.9) 0%, rgba(0, 83, 153, 0.7) 55%, rgba(0, 83, 153, 0.3) 100%);
	}
}

/* -------------------------------------------------------------------- why */

.tm-why {
	background: #00488a url('/wp-content/themes/tommy-child/assets/img/bg/why.webp') no-repeat center / cover;
	color: #fff;
}

.tm-why__inner {
	padding-block: clamp(40px, 5.5vw, 88px);
	text-align: center;
}

.tm-sec .tm-why__title {
	margin-top: 10px;
	color: #fff;
	font-size: clamp(1.5rem, 1rem + 2vw, 2.75rem);
	line-height: 1.15;
	font-weight: 700;
}

.tm-sec .tm-why__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: clamp(24px, 4vw, 72px);
	margin: clamp(28px, 4vw, 56px) 0 0;
	padding: 0;
	list-style: none;
}

.tm-sec .tm-why__item {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
	padding: 0;
	text-align: left;
	list-style: none;
}

.tm-why__ico {
	width: clamp(44px, 4vw, 60px);
	height: auto;
	flex: none;
	color: #fff;
}

.tm-why__item strong {
	display: block;
	font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.5rem);
	line-height: 1.15;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.tm-why__item span {
	display: block;
	margin-top: 4px;
	font-size: var(--fs-sm);
	font-weight: 500;
}

.tm-sec .tm-why__cta {
	margin-top: clamp(28px, 3.5vw, 52px);
}

.tm-sec .tm-why__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	color: var(--c-yellow);
	font-size: clamp(0.9375rem, 0.85rem + 0.4vw, 1.25rem);
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.tm-sec .tm-why__link:hover {
	color: #fff;
}

.tm-why__link .tm-ico {
	width: 1.1em;
	height: 1.1em;
}

/* ------------------------------------------------------------- categories */

.tm-range {
	background: var(--c-grey);
}

.tm-range__inner {
	padding-block: clamp(40px, 5.5vw, 88px);
	text-align: center;
}

.tm-sec .tm-range__title {
	margin-top: 8px;
	color: var(--c-mid);
	font-size: clamp(1.75rem, 1.1rem + 2.4vw, 3rem);
	line-height: 1.1;
	font-weight: 800;
	text-transform: uppercase;
}

.tm-sec .tm-range__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(12px, 1.6vw, 24px);
	max-width: 1000px;
	margin: clamp(24px, 3.5vw, 48px) auto 0;
	padding: 0;
	list-style: none;
}

.tm-sec .tm-cat {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tm-sec .tm-cat__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	height: 100%;
	box-sizing: border-box;
	padding: clamp(14px, 2vw, 28px) 12px clamp(14px, 1.8vw, 24px);
	border-radius: var(--r-lg);
	background: #fff;
	color: var(--c-royal);
	box-shadow: var(--shadow-sm);
	transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.tm-sec .tm-cat__link:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-md);
}

.tm-cat__img {
	display: block;
	width: 100%;
	max-width: 190px;
	aspect-ratio: 1;
	object-fit: contain;
	margin-block: auto;
}

.tm-cat:last-child .tm-cat__img {
	aspect-ratio: auto;
	max-width: 210px;
}

.tm-cat__name {
	display: block;
	font-size: clamp(0.8125rem, 0.72rem + 0.4vw, 1.0625rem);
	line-height: 1.25;
	font-weight: 800;
	text-align: center;
	text-transform: uppercase;
	text-wrap: balance;
}

/* --------------------------------------------------------- catalogue band */

.tm-doc {
	background: #3aa9c8 url('/wp-content/themes/tommy-child/assets/img/bg/catalogue.webp') no-repeat right center / cover;
	color: #fff;
}

.tm-doc__inner {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: clamp(260px, 28.6vw, 550px);
	padding-block: clamp(36px, 5vw, 80px);
}

.tm-sec .tm-doc__title {
	max-width: 22ch;
	margin: 8px 0 clamp(18px, 2.4vw, 32px);
	color: #fff;
	font-size: clamp(1.625rem, 1rem + 2.4vw, 3rem);
	line-height: 1.12;
	font-weight: 700;
	text-shadow: 0 1px 14px rgba(0, 60, 100, 0.3);
}

.tm-doc .tm-label--yellow {
	text-shadow: 0 1px 8px rgba(0, 60, 100, 0.55);
}

@media (max-width: 767px) {
	.tm-doc {
		background-image: linear-gradient(90deg, rgba(0, 109, 176, 0.72) 0%, rgba(0, 109, 176, 0.3) 70%, rgba(0, 109, 176, 0) 100%), url('/wp-content/themes/tommy-child/assets/img/bg/catalogue.webp');
		background-position: 0 0, 70% center;
	}

	.tm-doc__title {
		max-width: 12ch;
	}
}

/* ------------------------------------------------------------------ about */

.tm-about {
	background: #fff url('/wp-content/themes/tommy-child/assets/img/bg/about.webp') no-repeat left center / auto 100%;
}

.tm-about__inner {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) minmax(0, 1fr);
	align-items: center;
	gap: clamp(20px, 4vw, 64px);
	min-height: clamp(300px, 35vw, 672px);
	padding-block: clamp(32px, 4vw, 72px);
}

.tm-about__copy {
	grid-column: 2;
}

.tm-sec .tm-about__title {
	margin-top: 8px;
	color: var(--c-deep);
	font-size: clamp(1.5rem, 1rem + 1.8vw, 2.5rem);
	line-height: 1.15;
	font-weight: 700;
}

.tm-sec .tm-about__text {
	margin-top: 14px;
	max-width: 36rem;
	color: var(--c-ink);
	font-size: var(--fs-sm);
	line-height: 1.7;
}

.tm-sec .tm-about__ticks {
	grid-column: 3;
	display: grid;
	gap: clamp(14px, 2vw, 28px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.tm-sec .tm-about__ticks li {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	padding: 0;
	color: var(--c-royal);
	font-size: clamp(0.8125rem, 0.7rem + 0.45vw, 1.125rem);
	font-weight: 800;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	list-style: none;
}

.tm-tick__ico {
	width: clamp(28px, 2.4vw, 40px);
	height: auto;
	flex: none;
	color: var(--c-royal);
}

@media (max-width: 899px) {
	.tm-about {
		background-size: auto 240px;
		background-position: left top;
	}

	.tm-about__inner {
		grid-template-columns: minmax(0, 1fr);
		min-height: 0;
		padding-top: 256px;
	}

	.tm-about__copy,
	.tm-sec .tm-about__ticks {
		grid-column: 1;
	}
}

/* ----------------------------------------------------------- get in touch */

.tm-touch {
	position: relative;
	background: var(--c-teal) url('/wp-content/themes/tommy-child/assets/img/wave-touch.svg') no-repeat 0 0 / 100% 100%;
}

.tm-touch__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
	gap: clamp(28px, 6vw, 96px);
	align-items: center;
	padding-block: clamp(40px, 6vw, 96px);
}

.tm-sec .tm-touch__title {
	margin-top: 8px;
	color: #fff;
	font-size: clamp(1.625rem, 1rem + 2.2vw, 3rem);
	line-height: 1.12;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.tm-touch__title span {
	display: block;
	color: var(--c-royal);
}

@media (max-width: 899px) {
	.tm-touch__inner {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 599px) {
	.tm-sec .tm-range__grid {
		gap: 10px;
	}

	.tm-sec .tm-why__list {
		flex-direction: column;
		align-items: flex-start;
		max-width: 22rem;
		margin-inline: auto;
	}
}

/* copy sits in the light-teal part of the wave, as in the mock-up */
.tm-touch__copy {
	align-self: start;
	padding-top: clamp(8px, 6vw, 110px);
}

/* in-page links (hero "Contact us", menu "About") land clear of the sticky header */
#about {
	scroll-margin-top: var(--header-h);
}
