/* ═══════════════════════════════════════════════════════════════
   home.css — головна «Тріску» (композиція за референсом #2 Mellow)
   Секції чергують папір і свіжий папір; великі заголовки — серифом.
   ═══════════════════════════════════════════════════════════════ */

.ds-wrap {
	max-width: var(--t-container);
	margin-inline: auto;
	padding-inline: var(--t-gutter);
}

/* ── Заголовки секцій: серифом, без надписів над ними ─────────── */
.h-display {
	margin: 0;
	font-family: var(--t-font-serif);
	font-weight: 500;
	font-size: clamp(2.75rem, 1.6rem + 4.2vw, 5.25rem);
	line-height: var(--t-leading-tight);
	letter-spacing: -0.02em;
	text-wrap: balance;
	color: var(--t-ink);
}

.h-title {
	margin: 0;
	font-family: var(--t-font-serif);
	font-weight: 500;
	font-size: var(--t-text-2xl);
	line-height: 1.05;
	letter-spacing: -0.015em;
	text-wrap: balance;
	color: var(--t-ink);
}

.h-head {
	display: grid;
	gap: var(--t-space-3);
	margin-bottom: var(--t-space-7);
}

.h-head .t-lead { margin: 0; }

.h-head--center {
	justify-items: center;
	text-align: center;
}

.h-head--split {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: var(--t-space-5);
	flex-wrap: wrap;
	margin-bottom: var(--t-space-6);
}

/* ── Перший екран: сцена на всю ширину, текст на вільній стіні ── */
.h-hero {
	position: relative;
	isolation: isolate;
	display: grid;
	align-items: center;
	min-height: clamp(34rem, 46vw, 44rem);
	overflow: hidden;
	background: var(--t-paper);
}

.h-hero__photo {
	position: absolute;
	inset: 0;
	z-index: -1;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 72% 50%;
}

.h-hero__inner { width: 100%; }

.h-hero__text {
	display: grid;
	justify-items: start;
	gap: var(--t-space-5);
	max-width: 37.5rem;
	padding-block: var(--t-space-8);
}

.h-hero__text .t-lead {
	margin: 0;
	max-width: 30rem;
	color: var(--t-ink-soft);
}

.h-hero__cta { margin-top: var(--t-space-2); }

.ds-hero__batch {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: var(--t-space-2) var(--t-space-3);
	margin: var(--t-space-2) 0 0;
	padding-top: var(--t-space-4);
	border-top: var(--t-border);
	font-size: var(--t-text-sm);
}

.ds-hero__batch .t-mono { color: var(--t-ink-soft); }

.ds-hero__batch a { font-weight: 600; }

/* ── Три лінії кави ──────────────────────────────────────────── */
.h-lines {
	padding-block: var(--t-space-9) var(--t-space-8);
	background: var(--t-paper-raised);
}

.h-lines__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--t-space-6) var(--t-space-5);
	margin: 0;
	padding: 0;
	list-style: none;
}

.h-line { display: flex; }

.h-line__link {
	display: flex;
	flex-direction: column;
	gap: var(--t-space-3);
	flex: 1;
	color: var(--t-ink);
	text-decoration: none !important;
}

.h-line__photo {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--t-radius-s);
	background: var(--t-kraft);
	transition: filter var(--t-dur-slow) var(--t-ease-out);
}

.h-line__link:hover .h-line__photo { filter: brightness(1.04) saturate(1.06); }

.h-line__name {
	margin: var(--t-space-2) 0 0;
	font-family: var(--t-font-serif);
	font-weight: 500;
	font-size: var(--t-text-xl);
	line-height: var(--t-leading-snug);
	letter-spacing: -0.01em;
}

.h-line__link:hover .h-line__name {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	text-decoration-color: var(--t-line-strong);
}

.h-line__text {
	margin: 0;
	max-width: 36ch;
	color: var(--t-ink-soft);
}

.h-line__more {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--t-space-3);
	margin-top: auto;
	padding-top: var(--t-space-3);
	border-top: var(--t-border);
	font-family: var(--t-font-mono);
	font-size: var(--t-text-xs);
	letter-spacing: var(--t-track-mono);
	text-transform: uppercase;
	color: var(--t-ink-soft);
}

.h-line__link:hover .t-link-arrow .t-icon { transform: translateX(4px); }

/* ── Обсмажено цього тижня ───────────────────────────────────── */
.h-fresh { padding-block: var(--t-space-9) var(--t-space-8); }

ul.products {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--t-space-6) var(--t-space-5);
	margin: 0;
	padding: 0;
	list-style: none;
}

ul.products::before,
ul.products::after { display: none; }

ul.products li.product {
	width: auto;
	margin: 0;
	float: none;
	list-style: none;
}

ul.products .t-plate img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: none;
}

/* ── Як ми обсмажуємо: фото обсмаження поруч із чотирма етапами ─ */
.h-process {
	padding-block: var(--t-space-9);
	background: var(--t-paper-raised);
}

.h-process__inner {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: var(--t-space-8);
	align-items: center;
}

.h-process__photo {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: var(--t-radius-s);
	background: var(--t-kraft);
}

.h-process__text {
	display: grid;
	gap: var(--t-space-5);
}

.h-process__text .t-lead { margin: 0; }

.h-process .t-process {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--t-space-6) var(--t-space-5);
	margin-top: var(--t-space-3);
	color: var(--t-ink);
}

/* шеврони між етапами мають сенс лише в один рядок */
.h-process .t-process li::after { display: none; }

.h-process__demo {
	margin: 0;
	font-size: var(--t-text-sm);
	color: var(--t-ink-soft);
}

/* ── Адаптив ─────────────────────────────────────────────────── */
@media (max-width: 64rem) {
	ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 56rem) {
	.h-hero {
		display: flex;
		flex-direction: column;
		min-height: 0;
	}

	.h-hero__photo {
		position: static;
		order: 2;
		height: auto;
		aspect-ratio: 4 / 3;
		object-position: 80% 60%;
	}

	.h-hero__text { padding-block: var(--t-space-7) var(--t-space-6); }

	.h-lines,
	.h-fresh,
	.h-process { padding-block: var(--t-space-8) var(--t-space-7); }

	.h-lines__grid { grid-template-columns: minmax(0, 1fr); }

	.h-process__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--t-space-6);
	}

	.h-process__photo { aspect-ratio: 4 / 3; }
}

@media (max-width: 40rem) {
	.h-process .t-process { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 30rem) {
	ul.products {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--t-space-5);
	}
}

/* На телефоні лінії — рядки-картки, як мобільний каталог: фото зліва, текст справа */
@media (max-width: 40rem) {
	.h-lines__grid { gap: var(--t-space-5); }

	.h-line__link {
		display: grid;
		grid-template-columns: 6.5rem minmax(0, 1fr);
		column-gap: var(--t-space-4);
		row-gap: var(--t-space-2);
		align-content: start;
	}

	.h-line__photo {
		grid-row: 1 / span 3;
		aspect-ratio: 4 / 5;
	}

	.h-line__name {
		margin: 0;
		font-size: var(--t-text-lg);
	}

	.h-line__text { font-size: var(--t-text-sm); }

	.h-line__more { margin-top: var(--t-space-1); }
}
