/*
 * Hubka Theme
 *
 * Phase: 12A — Hero Experience (Editorial Redesign)
 * Purpose: Homepage Hero visual identity. The prior static placeholder
 * box has been replaced with a real, hand-picked featured book (via
 * WooCommerce Product Collection, hand-picked, one product) — its cover
 * is the dominant visual element, with a quiet caption (optional badge,
 * title, author) beneath it. Content column carries the eyebrow
 * collection label, headline, supporting copy, and CTAs.
 *
 * Revision note: this is the first stylesheet to reference the
 * `--wp--custom--book-cover` tokens (radius / shadow / shadow-hover),
 * defined in theme.json since Phase 2 but never adopted by any
 * stylesheet until now — a single large showcased cover is exactly
 * their intended use case.
 *
 * Reconciled against HOMEPAGE_EDITORIAL_SPEC.md's prior "Editorial
 * Hero" section, which this phase followed except where the current
 * phase brief's explicit requirements took precedence (documented in
 * CHANGELOG.md's Phase 12A entry): kicker uses muted + letter-spacing,
 * no caps, as the spec specifies; mobile keeps text-before-cover order,
 * as the spec specifies; column split is 48/52 (spec proposed 55/45)
 * and both Primary and Secondary CTAs are present (spec proposed one) —
 * both per this phase's explicit brief.
 *
 * Rules:
 * - Reuse theme.json tokens.
 * - Use logical properties.
 * - Keep selectors shallow.
 * - Do not duplicate component styling.
 */

/* Kicker label: muted color + letter-spacing carries the "label" role
 * without small caps — HOMEPAGE_EDITORIAL_SPEC.md's typography rule
 * avoids caps here, unlike Section Heading's eyebrow (accent + caps),
 * which is a deliberately different, louder treatment for that context. */
.hubka-hero__eyebrow {
	letter-spacing: 0.04em;
	margin-block-end: var(--wp--preset--spacing--30);
}

.hubka-hero__title {
	line-height: 1.15;
	margin-block-end: var(--wp--preset--spacing--40);
}

.hubka-hero__description {
	line-height: 1.5;
	margin-block-end: var(--wp--preset--spacing--50);
	max-inline-size: 34rem;
}

.hubka-hero__actions {
	margin-block-start: var(--wp--preset--spacing--20);
}

.hubka-hero__content,
.hubka-hero__media {
	padding-block: var(--wp--preset--spacing--30);
}

/* Featured book: the visual hero of the Hero. Centered within its
 * column so the cover reads as a single showcased object — distinct
 * from Book Card's left-aligned, grid-oriented presentation. Per the
 * Component Class Rule, the cover itself is WooCommerce-owned dynamic
 * markup (`wc-block-components-product-image`, the same stable class
 * Book Card scopes under `.hubka-book-card`) — scoped under
 * `.hubka-hero__book` here rather than given a redundant Hubka class. */
.hubka-hero__book {
	text-align: center;
}

.hubka-hero__book .wc-block-components-product-image {
	display: flex;
	justify-content: center;
}

.hubka-hero__book .wc-block-components-product-image img {
	max-inline-size: min(100%, 22rem);
	block-size: auto;
	border-radius: var(--wp--custom--book-cover--radius);
	box-shadow: var(--wp--custom--book-cover--shadow);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hubka-hero__book:hover .wc-block-components-product-image img {
	transform: translateY(-4px);
	box-shadow: var(--wp--custom--book-cover--shadow-hover);
}

.hubka-hero__caption {
	margin-block-start: var(--wp--preset--spacing--30);
}

/* Badge and author are the quietest tier — the cover and its title
 * carry the attention, per DESIGN_SYSTEM.md's "cover dominant, title
 * next, author subordinate" rule. */
.hubka-hero__badge {
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-block-end: var(--wp--preset--spacing--20);
}

.hubka-hero__book-title {
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	line-height: 1.4;
	margin-block-end: var(--wp--preset--spacing--20);
}

.hubka-hero__book-title a {
	color: var(--wp--preset--color--text);
}

.hubka-hero__book-author {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

@media (max-width: 782px) {
	/* Stacking order intentionally kept as-is (kicker → headline → copy
	 * → CTAs → cover): HOMEPAGE_EDITORIAL_SPEC.md's Hero section
	 * deliberately has text set the frame before the book appears,
	 * rather than leading with the image. */
	.hubka-hero__content {
		padding-block-start: var(--wp--preset--spacing--40);
	}

	.hubka-hero__title {
		margin-block-end: var(--wp--preset--spacing--30);
	}

	.hubka-hero__book .wc-block-components-product-image img {
		max-inline-size: min(100%, 16rem);
	}
}
