/**
 * ZAI COFFEE — Homepage
 * -----------------------------------------------------------------------------
 * Editorial homepage sections. Loaded only on the front page (see
 * inc/assets.php), so these rules never reach the shop, product or legal views.
 *
 * All values resolve through tokens from 01-tokens.css. No raw colour, font
 * family, easing or z-index is declared here.
 *
 * Composition rules:
 *   - Asymmetric two-column layouts, not centred card grids.
 *   - Hairline borders and whitespace carry the hierarchy; shadows are absent.
 *   - Photography is cropped to a fixed ratio so nothing shifts on load.
 *   - Every grid track uses minmax(0, 1fr) so no child can force overflow.
 *
 * @package zaicoffeetheme
 * @since   1.1.0
 */

/* ==========================================================================
   1. Home shell
   ========================================================================== */

.zai-home {
	/* The hero sits directly under the header, so no top padding. */
	padding-block-start: 0;
}

/* Sections that directly follow another section read as one continuous
   editorial strip rather than stacked boxes. */
.zai-home > .zai-section + .zai-section {
	border-block-start: var(--zai-border-width) solid var(--zai-border-color);
}

.zai-home > .zai-section--alt + .zai-section,
.zai-home > .zai-section + .zai-section--alt {
	border-block-start-color: transparent;
}

.zai-home > .zai-section--inverse,
.zai-home > .zai-section--inverse + .zai-section,
.zai-home > .zai-section--brand,
.zai-home > .zai-section--brand + .zai-section {
	border-block-start-color: transparent;
}

/* ==========================================================================
   2. Section heading
   ========================================================================== */

.zai-section-heading {
	margin-block-end: var(--zai-space-8);
	padding-block-end: var(--zai-space-4);
	border-block-end: var(--zai-border-width) solid var(--zai-border-color);
}

.zai-section-heading--split {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--zai-space-4);
}

.zai-section-heading__text {
	min-width: 0;
}

.zai-section-heading .eyebrow {
	margin-block-end: var(--zai-space-2);
}

.zai-section-heading__title {
	font-family: var(--zai-font-display);
	font-size: var(--zai-fs-h2);
	font-weight: var(--zai-fw-light);
	line-height: var(--zai-lh-tight);
	letter-spacing: var(--zai-ls-tighter);
	margin: 0;
}

/* Optional supporting sentence below the heading.
 *
 * PHASE 8.5 FIX — this selector used to be `.zai-section-heading__text`, which
 * section-heading.php also puts on the WRAPPER div around the eyebrow and title.
 * The wrapper was therefore silently constrained to a 52ch measure and given the
 * muted colour and top margin meant for one sentence, which is what made every
 * homepage heading read as a narrow block with an unused right side. The child
 * combinator binds these properties to the paragraph only; the wrapper keeps its
 * own (min-width: 0) rule above and can now span the column. */
.zai-section-heading__text > .zai-section-heading__text {
	max-width: 52ch;
	margin: var(--zai-space-3) 0 0;
	font-family: var(--zai-font-body);
	font-size: var(--zai-fs-md);
	line-height: var(--zai-lh-relaxed);
	color: var(--zai-text-muted);
	text-wrap: pretty;
}

.zai-section-heading__action {
	display: inline-flex;
	align-items: center;
	gap: var(--zai-space-2);
	min-height: var(--zai-touch-target);
	font-family: var(--zai-font-body);
	font-size: var(--zai-fs-sm);
	font-weight: var(--zai-fw-medium);
	letter-spacing: var(--zai-ls-wide);
	color: var(--zai-green);
	text-decoration: none;
	white-space: nowrap;
}

.zai-section-heading__action .zai-icon {
	transition: transform var(--zai-dur-fast) var(--zai-ease);
}

.zai-section-heading__action:hover {
	color: var(--zai-green-hover);
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

.zai-section-heading__action:hover .zai-icon {
	transform: translateX(3px);
}

/* Inverse sections (brewing) need inverted divider and text. */
.zai-section--inverse .zai-section-heading {
	border-block-end-color: var(--zai-border-color-inverse);
}

/* ==========================================================================
   2b. Brand-green surface — Coffee Ritual (Phase 8.5)
   -----------------------------------------------------------------------------
   The owner asked for this one section to move from Anthracite to ZAI Green.
   It is a distinct modifier rather than a redefinition of
   `.zai-section--inverse`, so no other inverse section anywhere in the theme
   changes colour.

   CONTRAST (measured against --zai-green #447350, relative luminance 0.1407):
     --zai-surface (#f3f0ec, Lületaşı)   4.93:1  AA  <- all text here
     --zai-text-inverse          #ffffff 5.51:1  AA
     --zai-text-inverse-muted    #b9b4ad 2.67:1  FAILS

   That last row is why the existing "muted inverse" token is deliberately NOT
   used for copy on green: it would ship unreadable text. Lületaşı is both the
   colour the owner named and the only existing token that clears 4.5:1, so no
   new token is introduced and 01-tokens.css stays untouched.
   ========================================================================== */

.zai-section--brand {
	background-color: var(--zai-green);
	color: var(--zai-surface);
}

.zai-section--brand h1,
.zai-section--brand h2,
.zai-section--brand h3,
.zai-section--brand h4,
.zai-section--brand h5,
.zai-section--brand h6 {
	color: var(--zai-surface);
}

/* The eyebrow keeps the full Lületaşı tone.
 *
 * An opacity of 0.82 was considered to make it read as a lighter accent, but it
 * blends toward the green and drops effective contrast to 3.85:1 — below AA for
 * small uppercase text. Full --zai-surface holds 4.93:1, so hierarchy is carried
 * by size, tracking and opacity-free colour instead. */
.zai-section--brand .eyebrow {
	color: var(--zai-surface);
}

.zai-section--brand .zai-section-heading {
	border-block-end-color: var(--zai-border-color-inverse);
}

/* Links on green: Lületaşı, with a lightened hover. No new accent colour. */
.zai-section--brand a {
	color: var(--zai-surface);
}

.zai-section--brand a:hover {
	color: var(--zai-text-inverse);
}

/* ==========================================================================
   3. Hero
   ========================================================================== */

.zai-hero {
	position: relative;
	background-color: var(--zai-surface);
	overflow: hidden;
}

.zai-hero__inner {
	display: grid;
	gap: var(--zai-space-8);
	padding-block: var(--zai-space-9) var(--zai-space-10);
	align-items: center;
}

.zai-hero__content {
	max-width: 34rem;
	min-width: 0;
}

.zai-hero__eyebrow {
	margin-block-end: var(--zai-space-4);
}

.zai-hero__title {
	margin: 0 0 var(--zai-space-5);
	font-family: var(--zai-font-display);
	font-size: var(--zai-fs-display);
	font-weight: var(--zai-fw-light);
	line-height: var(--zai-lh-tight);
	letter-spacing: var(--zai-ls-tighter);
	color: var(--zai-ink);
	text-wrap: balance;
}

.zai-hero__text {
	max-width: 44ch;
	margin: 0 0 var(--zai-space-7);
	font-family: var(--zai-font-body);
	font-size: var(--zai-fs-md);
	line-height: var(--zai-lh-relaxed);
	color: var(--zai-text-muted);
}

.zai-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--zai-space-5);
}

.zai-hero__cta {
	min-width: 12rem;
}

.zai-hero__link {
	display: inline-flex;
	align-items: center;
	gap: var(--zai-space-2);
	min-height: var(--zai-touch-target);
	font-family: var(--zai-font-body);
	font-size: var(--zai-fs-sm);
	font-weight: var(--zai-fw-medium);
	letter-spacing: var(--zai-ls-wide);
	color: var(--zai-ink);
	text-decoration: none;
}

.zai-hero__link .zai-icon {
	transition: transform var(--zai-dur-fast) var(--zai-ease);
}

.zai-hero__link:hover {
	color: var(--zai-green);
}

.zai-hero__link:hover .zai-icon {
	transform: translateX(3px);
}

/* --- Media ---------------------------------------------------------------- */

.zai-hero__media {
	position: relative;
	overflow: hidden;
	border-radius: var(--zai-radius);
	background-color: var(--zai-surface-deep);
}

.zai-hero__image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

/* Text-only variant: a single centred measure, still asymmetric in feel
   because the text block stays left-aligned inside a narrower column. */
.zai-hero--text-only .zai-hero__inner {
	padding-block: var(--zai-space-10);
}

.zai-hero--text-only .zai-hero__content {
	max-width: 46rem;
}

.zai-hero--text-only .zai-hero__title {
	max-width: 24ch;
}

/* ==========================================================================
   4. Product grid and cards
   ========================================================================== */

.zai-product-grid {
	align-items: start;
}

.zai-product-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.zai-product-card__media {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	background-color: var(--zai-surface);
	border-radius: var(--zai-radius);
	text-decoration: none;
}

.zai-product-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--zai-dur-slow) var(--zai-ease);
}

/* Restrained hover: a slow, small scale. No shadow, no lift. */
.zai-product-card:hover .zai-product-card__image,
.zai-product-card:focus-within .zai-product-card__image {
	transform: scale(1.035);
}

/* Neutral surface when a product genuinely has no image. */
.zai-product-card__noimage {
	display: block;
	width: 100%;
	height: 100%;
	background-color: var(--zai-surface-deep);
}

.zai-product-card__flag {
	position: absolute;
	inset-block-start: var(--zai-space-3);
	inset-inline-start: var(--zai-space-3);
}

.zai-product-card__body {
	padding-block-start: var(--zai-space-4);
}

.zai-product-card__category {
	margin: 0 0 var(--zai-space-1);
	font-family: var(--zai-font-body);
	font-size: var(--zai-fs-eyebrow);
	font-weight: var(--zai-fw-medium);
	letter-spacing: var(--zai-ls-caps);
	text-transform: uppercase;
	color: var(--zai-text-subtle);
}

.zai-product-card__title {
	margin: 0 0 var(--zai-space-2);
	font-family: var(--zai-font-display);
	font-size: var(--zai-fs-h5);
	font-weight: var(--zai-fw-regular);
	line-height: var(--zai-lh-snug);
	letter-spacing: var(--zai-ls-tight);
}

.zai-product-card__link {
	color: var(--zai-ink);
	text-decoration: none;
}

.zai-product-card__link:hover {
	color: var(--zai-green);
}

.zai-product-card__link:focus-visible {
	outline: var(--zai-focus-width) solid var(--zai-focus-color);
	outline-offset: var(--zai-focus-offset);
}

.zai-product-card__price {
	font-family: var(--zai-font-body);
	font-size: var(--zai-fs-sm);
	font-weight: var(--zai-fw-medium);
	font-variant-numeric: tabular-nums;
	color: var(--zai-text);
}

/* WooCommerce price markup: keep the sale/regular pair on one line. */
.zai-product-card__price del {
	color: var(--zai-text-subtle);
	text-decoration-thickness: 1px;
}

.zai-product-card__price ins {
	color: var(--zai-green);
	text-decoration: none;
	font-weight: var(--zai-fw-semibold);
}

/* --- 4b. Featured product CTA — premium ZAI Green button (Phase 8.5) ------
   ROOT CAUSE
   ----------
   `.zai-product-card__action` is styled ONLY in 10-shop.css, which
   inc/assets.php enqueues exclusively on shop archives. On the homepage the
   anchor therefore fell through to the global `a { text-decoration: underline }`
   rule and rendered as a plain link. Because every catalogued product is a
   VARIABLE product, zai_get_card_action() returns type `options` for all of
   them, so all six cards showed that bare link.

   WHY THE SELECTORS ARE SCOPED TO .zai-featured
   ---------------------------------------------
   The shop archive and the single-product page must keep their current
   appearance, and they load 10-shop.css instead. Every rule below is therefore
   qualified by `.zai-featured`, which exists on the homepage section only. The
   archive's `.zai-product-card__action` styling is left completely untouched.

   The element stays a real anchor with its original href: no JavaScript click
   handler, no interception — the product destination is unchanged.
   ------------------------------------------------------------------------- */

/* Equal card heights so the six buttons share one baseline even when a title
   wraps to a second line. The body absorbs the slack and the actions are pushed
   to the bottom; nothing is clipped and no fixed height is imposed. */
.zai-featured .zai-product-grid {
	align-items: stretch;
}

.zai-featured .zai-product-card {
	height: 100%;
}

.zai-featured .zai-product-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}

.zai-featured .zai-product-card__actions {
	margin-block-start: auto;
	padding-block-start: var(--zai-space-4);
}

/* The button itself. */
.zai-featured .zai-product-card__action {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--zai-space-2);
	width: 100%;
	min-height: var(--zai-control-height);
	padding: var(--zai-space-3) var(--zai-space-5);
	border: var(--zai-border-width) solid var(--zai-green);
	border-radius: var(--zai-radius);
	background-color: var(--zai-green);
	color: var(--zai-text-inverse);
	font-family: var(--zai-font-body);
	font-size: var(--zai-fs-sm);
	font-weight: var(--zai-fw-semibold);
	line-height: var(--zai-lh-normal);
	letter-spacing: var(--zai-ls-wide);
	text-align: center;
	text-decoration: none;
	white-space: normal;
	overflow-wrap: anywhere;
	cursor: pointer;
	transition:
		background-color var(--zai-dur-fast) var(--zai-ease),
		border-color var(--zai-dur-fast) var(--zai-ease),
		color var(--zai-dur-fast) var(--zai-ease);
}

/* Hover: one step deeper on the existing token. No scale, no shadow, no lift. */
.zai-featured .zai-product-card__action:hover,
.zai-featured .zai-product-card__action:focus-visible {
	background-color: var(--zai-green-hover);
	border-color: var(--zai-green-hover);
	color: var(--zai-text-inverse);
}

.zai-featured .zai-product-card__action:active {
	background-color: var(--zai-green-active);
	border-color: var(--zai-green-active);
}

/* Keyboard focus: the shared focus ring, offset so it stays visible on green.
   `outline-offset` is positive, so the ring never sits on the button edge. */
.zai-featured .zai-product-card__action:focus-visible {
	outline: var(--zai-focus-width) solid var(--zai-focus-color);
	outline-offset: var(--zai-focus-offset);
}

/* A restrained arrow. Drawn in CSS on a pseudo-element instead of an inline
   icon so the shared product-card component stays untouched for the archive.
   Scoped to `--options`: WooCommerce uses ::after for its own `.added` tick and
   `.is-busy` spinner on add-to-cart buttons, which these rules must not clobber. */
.zai-featured .zai-product-card__action--options::after {
	content: "";
	display: block;
	width: 0.45em;
	height: 0.45em;
	margin-inline-start: var(--zai-space-1);
	border-block-start: var(--zai-border-width-strong) solid currentColor;
	border-inline-end: var(--zai-border-width-strong) solid currentColor;
	transform: rotate(45deg);
	transition: transform var(--zai-dur-fast) var(--zai-ease);
}

/* Below 480px each product card is roughly 140px wide, so "Seçenekleri Gör"
   plus the full padding and the arrow wrapped onto two lines and made the row
   ragged. The button is tightened — smaller padding, the `xs` step and a
   slightly reduced tracking — while keeping the 48px control height, the green
   fill and the whole label. The arrow is dropped at this width only: it is
   decorative and the entire card is already a link.
   The min-height is preserved so the touch target never shrinks. */
@media (max-width: 479px) {

	.zai-featured .zai-product-card__action {
		padding-inline: var(--zai-space-3);
		font-size: var(--zai-fs-xs);
		letter-spacing: var(--zai-ls-normal);
	}

	.zai-featured .zai-product-card__action--options::after {
		display: none;
	}
}

@media (min-width: 480px) and (max-width: 639px) {

	/* Three-word labels still fit at this size, but the arrow is dropped to keep
	   one line. */
	.zai-featured .zai-product-card__action {
		font-size: var(--zai-fs-xs);
	}
}

@media (min-width: 480px) {

	.zai-featured .zai-product-card__action--options:hover::after,
	.zai-featured .zai-product-card__action--options:focus-visible::after {
		transform: rotate(45deg) translate(2px, -2px);
	}
}

/* ==========================================================================
   5. Category tiles
   ========================================================================== */

.zai-category-grid {
	align-items: stretch;
}

.zai-category-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: var(--zai-radius);
	background-color: var(--zai-bg);
	text-decoration: none;
	min-width: 0;
}

.zai-category-tile__media {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 3 / 4;
	background-color: var(--zai-surface-deep);
}

.zai-category-tile__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--zai-dur-slow) var(--zai-ease);
}

.zai-category-tile:hover .zai-category-tile__image,
.zai-category-tile:focus-visible .zai-category-tile__image {
	transform: scale(1.04);
}

.zai-category-tile__body {
	display: flex;
	flex-direction: column;
	gap: var(--zai-space-1);
	padding-block: var(--zai-space-4) var(--zai-space-1);
}

.zai-category-tile__name {
	font-family: var(--zai-font-display);
	font-size: var(--zai-fs-h5);
	font-weight: var(--zai-fw-regular);
	line-height: var(--zai-lh-snug);
	letter-spacing: var(--zai-ls-tight);
	color: var(--zai-ink);
}

.zai-category-tile__count {
	font-family: var(--zai-font-body);
	font-size: var(--zai-fs-xs);
	letter-spacing: var(--zai-ls-wide);
	color: var(--zai-text-subtle);
}

.zai-category-tile:hover .zai-category-tile__name {
	color: var(--zai-green);
}

.zai-category-tile:focus-visible {
	outline: var(--zai-focus-width) solid var(--zai-focus-color);
	outline-offset: var(--zai-focus-offset);
}

/* --- 5b. Collection card refinement (Phase 8.5) --------------------------
   The three collection cards are the shopping destinations for the catalogue,
   so they are promoted from a photo with a caption into a designed card with a
   real call to action.

   ALIGNMENT STRATEGY
   ------------------
   The tiles are grid items, so `align-items: stretch` already makes them equal
   height in a row. What still drifted was the CONTENT: the product count is
   conditional, so a card without one put its CTA one line higher. The body is
   therefore a flex column and the CTA is pushed to the bottom with
   `margin-block-start: auto`. That keeps every CTA on one baseline regardless of
   how many lines the title or count occupy — with no fixed heights, so text can
   never be clipped.

   The CTA is a <span> inside the existing single anchor: no nested links, one tab
   stop, and the real category URL is untouched.
   ------------------------------------------------------------------------- */

.zai-category-tile {
	height: 100%;
	background-color: var(--zai-bg);
	border: var(--zai-border-width) solid var(--zai-border-color);
	transition:
		border-color var(--zai-dur) var(--zai-ease),
		background-color var(--zai-dur) var(--zai-ease);
}

/* A single, consistent image frame across all three cards. */
.zai-category-tile__media {
	aspect-ratio: 3 / 4;
}

.zai-category-tile__body {
	flex: 1 1 auto;
	justify-content: flex-start;
	gap: var(--zai-space-2);
	padding: var(--zai-space-5) var(--zai-space-5) var(--zai-space-5);
}

.zai-category-tile__name {
	font-size: var(--zai-fs-h4);
	line-height: var(--zai-lh-heading);
}

.zai-category-tile__count {
	font-size: var(--zai-fs-xs);
	letter-spacing: var(--zai-ls-wide);
	color: var(--zai-text-subtle);
}

/* The CTA. Filled ZAI Green, identical proportions to the featured product
   button so the two homepage grids read as one system. */
.zai-category-tile__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--zai-space-2);
	width: 100%;
	min-height: var(--zai-control-height);
	margin-block-start: auto;
	padding: var(--zai-space-3) var(--zai-space-4);
	border: var(--zai-border-width) solid var(--zai-green);
	border-radius: var(--zai-radius);
	background-color: var(--zai-green);
	color: var(--zai-text-inverse);
	font-family: var(--zai-font-body);
	font-size: var(--zai-fs-sm);
	font-weight: var(--zai-fw-semibold);
	line-height: var(--zai-lh-normal);
	letter-spacing: var(--zai-ls-wide);
	text-align: center;
	text-decoration: none;
	transition:
		background-color var(--zai-dur-fast) var(--zai-ease),
		border-color var(--zai-dur-fast) var(--zai-ease);
}

.zai-category-tile__cta .zai-icon {
	width: var(--zai-icon-size-sm);
	height: var(--zai-icon-size-sm);
	flex-shrink: 0;
	transition: transform var(--zai-dur-fast) var(--zai-ease);
}

/* Refined hover: the whole tile responds, so the card reads as one destination
   rather than a photo and a separate button. The existing image zoom carries the
   motion; the shell gains a green hairline and the CTA deepens one token step. */
.zai-category-tile:hover,
.zai-category-tile:focus-visible {
	border-color: var(--zai-green-line);
}

.zai-category-tile:hover .zai-category-tile__cta,
.zai-category-tile:focus-visible .zai-category-tile__cta {
	background-color: var(--zai-green-hover);
	border-color: var(--zai-green-hover);
}

.zai-category-tile:hover .zai-category-tile__cta .zai-icon,
.zai-category-tile:focus-visible .zai-category-tile__cta .zai-icon {
	transform: translateX(3px);
}

/* Below 480px the grid is two columns, so each card is only about 150px wide.
   The full button label plus padding and the arrow overflowed that space and
   the text was clipped ("bleksiyonu Keşfet"). The CTA is therefore tightened
   here rather than removed: it keeps its 44px touch target, its green fill and
   its label, and simply drops the horizontal padding and the arrow so the
   words fit. The whole tile remains the tap target, so nothing is lost
   functionally — the arrow was decorative. */
@media (max-width: 479px) {

	.zai-category-tile__body {
		padding: var(--zai-space-4) var(--zai-space-3) var(--zai-space-4);
	}

	.zai-category-tile__name {
		font-size: var(--zai-fs-h5);
	}

	.zai-category-tile__cta {
		padding-inline: var(--zai-space-2);
		font-size: var(--zai-fs-xs);
		letter-spacing: var(--zai-ls-normal);
	}

	.zai-category-tile__cta .zai-icon {
		display: none;
	}
}

/* ==========================================================================
   6. Brand story
   ========================================================================== */

.zai-story__inner {
	display: grid;
	gap: var(--zai-space-8);
	align-items: center;
}

.zai-story__media {
	margin: 0;
	overflow: hidden;
	border-radius: var(--zai-radius);
	background-color: var(--zai-surface);
}

/* 4:5 editorial crop. `height: auto` plus the ratio keeps the frame stable, so
   the image can never change the section height after it loads. */
.zai-story__image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

.zai-story__content {
	max-width: 34rem;
	min-width: 0;
}

.zai-story__title {
	margin: 0 0 var(--zai-space-5);
	font-family: var(--zai-font-display);
	font-size: var(--zai-fs-h2);
	font-weight: var(--zai-fw-light);
	line-height: var(--zai-lh-tight);
	letter-spacing: var(--zai-ls-tighter);
	color: var(--zai-ink);
	text-wrap: balance;
}

.zai-story__text {
	margin: 0 0 var(--zai-space-6);
	font-family: var(--zai-font-body);
	font-size: var(--zai-fs-base);
	line-height: var(--zai-lh-relaxed);
	color: var(--zai-text-muted);
}

/* The pull quote is the visual anchor when no photograph is supplied. */
.zai-story__quote {
	margin: 0 0 var(--zai-space-6);
	padding-inline-start: var(--zai-space-5);
	border-inline-start: var(--zai-border-width-strong) solid var(--zai-green);
}

.zai-story__quote p {
	margin: 0;
	font-family: var(--zai-font-display);
	font-size: var(--zai-fs-h4);
	font-weight: var(--zai-fw-light);
	line-height: var(--zai-lh-snug);
	color: var(--zai-ink);
}

.zai-story__actions {
	margin: 0;
}

/* Text-only: the measure narrows and the whole block is centred in the page. */
.zai-story--text-only .zai-story__content {
	max-width: 46rem;
	margin-inline: auto;
}


/* ==========================================================================
   7. Brewing culture
   ========================================================================== */

.zai-brewing__inner {
	display: grid;
	gap: var(--zai-space-8);
	align-items: center;
}

.zai-brewing__content {
	max-width: 34rem;
	min-width: 0;
}

/* PHASE 8.5 — text-only composition on the green surface.
 *
 * With no section image the content column was capped at 34rem, which left a
 * large flat rectangle of green on the right of a 1440px viewport. That is the
 * "poorly spaced solid block" the brief asks to avoid.
 *
 * Two columns are used instead: the heading and intro on the left, the method
 * list on the right. This fills the band with real content, keeps the line
 * lengths comfortable, and needs no new markup. Below 1024px it collapses back
 * to a single column and the original reading order is unchanged. */
.zai-brewing--text-only .zai-brewing__inner {
	gap: var(--zai-space-7);
}

@media (min-width: 1024px) {

	.zai-brewing--text-only .zai-brewing__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}

	.zai-brewing--text-only .zai-brewing__content {
		display: grid;
		grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
		align-items: start;
		gap: var(--zai-space-3) var(--zai-space-10);
		max-width: none;
	}

	/* Heading block: eyebrow, title and intro stack in the first column. */
	.zai-brewing--text-only .zai-brewing__content > .eyebrow,
	.zai-brewing--text-only .zai-brewing__content > .zai-brewing__title,
	.zai-brewing--text-only .zai-brewing__content > .zai-brewing__text {
		grid-column: 1;
	}

	.zai-brewing--text-only .zai-brewing__title {
		font-size: var(--zai-fs-h3);
	}

	.zai-brewing--text-only .zai-brewing__text {
		margin-block-end: 0;
	}

	/* The method list occupies the second column and spans all three rows. */
	.zai-brewing--text-only .zai-brewing__methods {
		grid-column: 2;
		grid-row: 1 / span 3;
		align-self: start;
	}
}

.zai-brewing__title {
	margin: 0 0 var(--zai-space-5);
	font-family: var(--zai-font-display);
	font-size: var(--zai-fs-h2);
	font-weight: var(--zai-fw-light);
	line-height: var(--zai-lh-tight);
	letter-spacing: var(--zai-ls-tighter);
	/* Lületaşı: 4.93:1 on ZAI Green. */
	color: var(--zai-surface);
	text-wrap: balance;
}

.zai-brewing__text {
	margin: 0 0 var(--zai-space-7);
	font-family: var(--zai-font-body);
	font-size: var(--zai-fs-base);
	line-height: var(--zai-lh-relaxed);
	/* Body copy sits directly on the green surface, so it uses the same Lületaşı
	   as the headings. The muted inverse token was deliberately not carried over:
	   at 2.67:1 it would have shipped unreadable text. Lületaşı measures 4.93:1.
	   No opacity is applied — see the note on .zai-section--brand .eyebrow. */
	color: var(--zai-surface);
}

.zai-brewing__methods {
	margin: 0;
	padding: 0;
	list-style: none;
	border-block-start: var(--zai-border-width) solid var(--zai-border-color-inverse);
}

.zai-brewing__method {
	display: grid;
	gap: var(--zai-space-1) var(--zai-space-5);
	padding-block: var(--zai-space-4);
	border-block-end: var(--zai-border-width) solid var(--zai-border-color-inverse);
}

.zai-brewing__method-name {
	font-family: var(--zai-font-display);
	font-size: var(--zai-fs-h5);
	font-weight: var(--zai-fw-regular);
	line-height: var(--zai-lh-snug);
	color: var(--zai-surface);
}

.zai-brewing__method-text {
	font-family: var(--zai-font-body);
	font-size: var(--zai-fs-sm);
	line-height: var(--zai-lh-normal);
	/* Full Lületaşı, 4.93:1 on green — no opacity, for the reason documented
	   above the brand-surface block. */
	color: var(--zai-surface);
}

.zai-brewing__media {
	margin: 0;
	overflow: hidden;
	border-radius: var(--zai-radius);
}

.zai-brewing__image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

/* ==========================================================================
   8. Brand values
   ========================================================================== */

.zai-values__grid {
	display: grid;
	gap: var(--zai-space-7) var(--zai-space-6);
	margin: 0;
	padding: 0;
	list-style: none;
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
	.zai-values__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.zai-value {
	display: flex;
	flex-direction: column;
	gap: var(--zai-space-3);
	min-width: 0;
	padding-block-start: var(--zai-space-5);
	border-block-start: var(--zai-border-width) solid var(--zai-border-color);
}

.zai-value__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	color: var(--zai-green);
}

.zai-value__icon .zai-icon {
	width: 1.5rem;
	height: 1.5rem;
}

.zai-value__title {
	margin: 0;
	font-family: var(--zai-font-display);
	font-size: var(--zai-fs-h5);
	font-weight: var(--zai-fw-regular);
	line-height: var(--zai-lh-snug);
	letter-spacing: var(--zai-ls-tight);
	color: var(--zai-ink);
}

.zai-value__text {
	margin: 0;
	max-width: 34ch;
	font-family: var(--zai-font-body);
	font-size: var(--zai-fs-sm);
	line-height: var(--zai-lh-relaxed);
	color: var(--zai-text-muted);
}

/* ==========================================================================
   9. Administrator setup hints
   -----------------------------------------------------------------------------
   Visible only to users who can edit products, rendered inline where a section
   has nothing to show yet. Never reaches a visitor.
   ========================================================================== */

.zai-admin-hint {
	max-width: 62ch;
	margin: 0;
	padding: var(--zai-space-3) var(--zai-space-4);
	border: var(--zai-border-width) dashed var(--zai-border-color-strong);
	border-radius: var(--zai-radius);
	background-color: var(--zai-bg-soft);
	font-family: var(--zai-font-body);
	font-size: var(--zai-fs-xs);
	line-height: var(--zai-lh-normal);
	color: var(--zai-text-muted);
}

.zai-admin-hint__label {
	font-weight: var(--zai-fw-semibold);
	letter-spacing: var(--zai-ls-caps);
	text-transform: uppercase;
	color: var(--zai-notice);
}


/* ==========================================================================
   10. Desktop composition (≥1024px)
   -----------------------------------------------------------------------------
   PHASE 8.5 — comment repair only.

   This header used to be terminated immediately, so the following
   `13. Coffee discovery` banner's closing marker was the only thing ending *this*
   comment. The `11. Large desktop` header below therefore lost its own opening
   marker and its `@media (min-width: 1280px)` block appeared to hang off section
   10. Browsers recovered, but the file did not parse as written. Nothing about
   the rules changed — only the comment delimiters.
   ========================================================================== */

/* ==========================================================================
   11. Large desktop (≥1280px)
   ========================================================================== */
/* ==========================================================================
   13. Coffee discovery — "Kahvenizi Tanıyın"
   --------------------------------------------------------------------------
   A definition grid for the attribute vocabulary used on product pages.
   Cards are deliberately flat: the section explains language, it does not
   sell, so no shadow or accent border competes with the product grid above.
   ========================================================================== */

.zai-discovery__grid {
	display: grid;
	gap: var(--zai-grid-gap);
	margin: 0;
	padding: 0;
	list-style: none;
	grid-template-columns: 1fr;
}

.zai-discovery__item {
	display: flex;
	align-items: flex-start;
	gap: var(--zai-space-4);
	margin: 0;
	padding: var(--zai-space-5);
	background-color: var(--zai-bg);
	border: var(--zai-border-width) solid var(--zai-border-color);
	border-radius: var(--zai-radius);
	transition: border-color var(--zai-dur) var(--zai-ease);
}

.zai-discovery__item:hover {
	border-color: var(--zai-border-color-strong);
}

.zai-discovery__icon {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	color: var(--zai-green);
	background-color: var(--zai-green-soft);
	border-radius: var(--zai-radius-pill);
}

.zai-discovery__body {
	display: flex;
	flex-direction: column;
	gap: var(--zai-space-1);
	min-width: 0;
}

.zai-discovery__label {
	font-family: var(--zai-font-body);
	font-size: var(--zai-fs-sm);
	font-weight: var(--zai-fw-semibold);
	line-height: var(--zai-lh-snug);
	letter-spacing: var(--zai-ls-wide);
	color: var(--zai-ink);
	text-transform: uppercase;
}

.zai-discovery__text {
	font-size: var(--zai-fs-sm);
	line-height: var(--zai-lh-relaxed);
	color: var(--zai-text-muted);
}

@media (min-width: 40em) {
	.zai-discovery__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 64em) {
	.zai-discovery__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	/* Seven rows: let the last card span the remaining two columns so the
	   grid never ends on a lonely single tile. */
	.zai-discovery__item:last-child:nth-child(3n + 1) {
		grid-column: span 2;
	}
}

/* ==========================================================================
   14. Closing call-to-action cards
   ========================================================================== */

.zai-home-cta__grid {
	display: grid;
	gap: var(--zai-grid-gap);
	grid-template-columns: 1fr;
}

.zai-home-cta__card {
	display: flex;
	flex-direction: column;
	gap: var(--zai-space-3);
	margin: 0;
	padding: var(--zai-space-7) var(--zai-space-6);
	background-color: var(--zai-bg);
	border: var(--zai-border-width) solid var(--zai-border-color);
	border-radius: var(--zai-radius);
}

.zai-home-cta__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3.25rem;
	height: 3.25rem;
	color: var(--zai-green);
	background-color: var(--zai-green-soft);
	border-radius: var(--zai-radius-pill);
}

.zai-home-cta__title {
	margin: 0;
	font-family: var(--zai-font-display);
	font-size: var(--zai-fs-h4);
	font-weight: var(--zai-fw-medium);
	line-height: var(--zai-lh-heading);
	color: var(--zai-ink);
}

.zai-home-cta__text {
	max-width: 42ch;
	margin: 0;
	font-size: var(--zai-fs-sm);
	line-height: var(--zai-lh-relaxed);
	color: var(--zai-text-muted);
}

.zai-home-cta__actions {
	margin: var(--zai-space-2) 0 0;
}

@media (min-width: 48em) {
	.zai-home-cta__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ==========================================================================
   15. Vertical rhythm (Phase 8.5)
   -----------------------------------------------------------------------------
   The owner asked for a more natural flow between consecutive bands.

   Root cause: `.zai-section` applies `padding-block` to every section, so two
   adjacent sections stack BOTH paddings. With --zai-section-y at its 6rem
   ceiling that produced up to 192px of dead space between bands at 1440px.

   The fix overrides the token LOCALLY, on the homepage shell only. It is
   deliberately not a new global value: 01-tokens.css keeps --zai-section-y as it
   is, so the shop, product, cart, account and content pages are untouched and
   nothing outside the front page can shift.

   Section ORDER is unchanged and no content is removed — only the gap between
   consecutive bands tightens from ~192px to ~136px at 1440px.
   ========================================================================== */

.zai-home {
	--zai-section-y: clamp(2.75rem, 4.8vw, 4.25rem);
}

/* ==========================================================================
   16. Scroll reveal (Phase 8.5)
   -----------------------------------------------------------------------------
   PROGRESSIVE ENHANCEMENT — the rule that matters most here is what is NOT
   written: there is no rule that hides a `[data-zai-reveal]` element on its own.
   The hidden starting state is bound to `.is-reveal-pending`, and ONLY
   assets/js/home-reveal.js adds that class, and only after it has confirmed that
   IntersectionObserver exists and reduced motion is not requested.

   The consequences, by failure mode:
     JS disabled / blocked / 404   -> no class  -> fully visible, no motion
     prefers-reduced-motion:reduce -> no class  -> fully visible, no motion
     IntersectionObserver missing  -> no class  -> fully visible, no motion
     script throws mid-init        -> pending stripped -> fully visible
     observer never fires          -> watchdog reveals everything after 8s
     printing                      -> beforeprint reveals everything

   Only `opacity` and `transform` animate, both compositor-friendly. No filter,
   no background animation, no scroll listener, and the hero slider carries no
   reveal marker at all, so its autoplay and video are unaffected.
   ========================================================================== */

[data-zai-reveal].is-reveal-pending,
[data-zai-reveal-group] > .is-reveal-pending {
	opacity: 0;
	will-change: opacity, transform;
}

/* Restrained offsets: 32px, inside the 24–40px brief. */
[data-zai-reveal="fade-up"].is-reveal-pending,
[data-zai-reveal-group="fade-up"] > .is-reveal-pending {
	transform: translate3d(0, 32px, 0);
}

[data-zai-reveal="fade-left"].is-reveal-pending,
[data-zai-reveal-group="fade-left"] > .is-reveal-pending {
	transform: translate3d(-32px, 0, 0);
}

[data-zai-reveal="fade-right"].is-reveal-pending,
[data-zai-reveal-group="fade-right"] > .is-reveal-pending {
	transform: translate3d(32px, 0, 0);
}

/* `fade` needs no transform at all. */

[data-zai-reveal].is-revealed,
[data-zai-reveal-group] > .is-revealed {
	opacity: 1;
	transform: none;
	will-change: auto;
	transition:
		opacity 640ms var(--zai-ease) var(--zai-reveal-delay, 0ms),
		transform 640ms var(--zai-ease) var(--zai-reveal-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {

	/* Belt and braces: even if a stale pending class somehow survived, nothing
	   stays hidden and nothing moves. */
	[data-zai-reveal].is-reveal-pending,
	[data-zai-reveal-group] > .is-reveal-pending {
		opacity: 1;
		transform: none;
		will-change: auto;
	}

	[data-zai-reveal].is-revealed,
	[data-zai-reveal-group] > .is-revealed {
		transition: none;
		/* Stagger delays are discarded so nothing is held back. */
		transition-delay: 0ms;
	}
}

@media (min-width: 1024px) {

	/* Hero: text column narrower than the visual column. */
	.zai-hero__inner {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		gap: var(--zai-space-9);
		padding-block: var(--zai-space-10);
		min-height: 34rem;
	}

	.zai-hero--text-only .zai-hero__inner {
		grid-template-columns: minmax(0, 1fr);
		min-height: 0;
	}

	.zai-hero__media {
		align-self: stretch;
	}

	.zai-hero__image {
		height: 100%;
	}

	/* Story: text on the LEFT, photograph on the RIGHT (Phase 8.5).
	 *
	 * The document order is content-then-media, which is what puts the image
	 * BELOW the text on mobile. Here the two blocks are placed explicitly, so the
	 * desktop composition is the mirror image of the DOM: content in the first
	 * column, media in the second. Doing it with grid placement rather than
	 * `order` means the visual order can differ from the source order without
	 * creating a keyboard or screen-reader mismatch, because neither block is
	 * focusable before the other.
	 *
	 * 52 / 48 is the split the specification asks for. */
	.zai-story__inner {
		grid-template-columns: minmax(0, 52fr) minmax(0, 48fr);
		gap: var(--zai-space-10);
	}

	.zai-story--has-image .zai-story__content {
		grid-column: 1;
		grid-row: 1;
		/* The column is wider now, so the measure is allowed to breathe. */
		max-width: 40rem;
	}

	.zai-story--has-image .zai-story__media {
		grid-column: 2;
		grid-row: 1;
		align-self: center;
	}

	/* A restrained ceiling so a portrait photograph can never tower over the
	   copy or dictate the section height. */
	.zai-story--has-image .zai-story__image {
		max-height: 40rem;
		object-position: center;
	}

	.zai-story--text-only .zai-story__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Brewing: text left, image right. */
	.zai-brewing__inner {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		gap: var(--zai-space-10);
	}

	/* Values in as many columns as there are values, capped at four. */
	.zai-values__grid--4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.zai-values__grid--3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	/* Brewing methods read as a two-column definition list. */
	.zai-brewing__method {
		grid-template-columns: minmax(0, 10rem) minmax(0, 1fr);
		align-items: baseline;
	}
}

/* ==========================================================================
   11. Large desktop (≥1280px)
   ========================================================================== */

@media (min-width: 1280px) {

	.zai-hero__inner {
		gap: var(--zai-space-11);
	}

	.zai-hero__content {
		max-width: 36rem;
	}

	/*
	 * Text-only hero composition.
	 *
	 * Without a photograph the hero is a single column. At 1440px and above the
	 * 36rem measure left roughly half the viewport empty on the right, which reads
	 * as an unfinished layout rather than deliberate whitespace. Widening the
	 * measure here lets the headline and supporting copy occupy the composition
	 * evenly while staying inside a comfortable reading length.
	 */
	.zai-hero--text-only .zai-hero__content {
		max-width: 46rem;
	}

	.zai-hero--text-only .zai-hero__text {
		max-width: 52ch;
	}

	.zai-product-grid,
	.zai-category-grid {
		gap: var(--zai-space-6);
	}
}

/* ==========================================================================
   12. Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	.zai-product-card__image,
	.zai-category-tile__image,
	.zai-section-heading__action .zai-icon,
	.zai-hero__link .zai-icon {
		transition: none;
	}

	/* No zoom at all when the visitor asked for less motion. */
	.zai-product-card:hover .zai-product-card__image,
	.zai-product-card:focus-within .zai-product-card__image,
	.zai-category-tile:hover .zai-category-tile__image,
	.zai-category-tile:focus-visible .zai-category-tile__image {
		transform: none;
	}
}

