/**
 * Home page mobile rework — hero, decklist import, how-it-works.
 *
 * Only enqueued on is_front_page(). Everything here is scoped to <=1025px;
 * above that the stock page-hero + the_content() (wrapped in
 * .pc-desktop-home by astra-child/front-page.php) is untouched and this
 * file's rules never apply.
 *
 * Design tokens (--accent, --pc-parchment, --radius-lg, etc.) are defined
 * once in nav-shell.css, loaded sitewide and declared as this file's
 * dependency in pcf_enqueue_styles() — not redeclared here.
 */

/* Server-rendered at all widths; hidden above 1025px so the untouched
   desktop content (.pc-desktop-home) is what shows there. */
.pc-mobile-home {
	display: none;
}

@media (max-width: 1025px) {
	.pc-desktop-home {
		display: none;
	}

	.pc-mobile-home {
		display: block;
		background: var(--pc-parchment);
	}

	/* Top identity strip — removed for this page only (see front-page.php's
	   docblock and the design handoff README): the tab bar now owns
	   navigation/identity on mobile, and the wordmark moves into the hero
	   itself below. Scoped to body.home (WP's front-page body class) so
	   every other page keeps the bare-logo header chunk 1 already left in
	   place there. */
	body.home header[role="banner"] {
		display: none;
	}

	/* ---------- Hero ---------- */

	.pc-home-hero {
		position: relative;
		display: flex;
		flex-direction: column;
		min-height: 300px;
		overflow: hidden;
		/* --pc-home-hero-bg (the image url()) is set inline in front-page.php,
		   which already knows get_stylesheet_directory_uri() — avoids a
		   hardcoded relative path reaching out of this plugin into the theme. */
		background-image:
			linear-gradient(180deg, rgba(26, 23, 18, 0.08) 0%, rgba(26, 23, 18, 0.12) 45%, rgba(26, 23, 18, 0.55) 78%, var(--pc-parchment) 100%),
			var(--pc-home-hero-bg);
		background-size: cover;
		background-position: center 72%;
		background-repeat: no-repeat;
	}

	.pc-home-hero__clouds {
		position: absolute;
		inset: 0;
		pointer-events: none;
	}

	.pc-home-hero__cloud {
		position: absolute;
		opacity: 0.88;
	}

	.pc-home-hero__cloud--1 {
		top: 16px;
		right: 10px;
		width: 125px;
	}

	.pc-home-hero__cloud--2 {
		top: 60px;
		left: 12px;
		width: 108px;
		opacity: 0.85;
	}

	.pc-home-hero__logo {
		/* .pc-home-hero is a column flexbox, whose default align-items:stretch
		   would otherwise stretch this to the container's full width instead
		   of sizing to its own intrinsic aspect ratio. */
		align-self: flex-start;
		position: relative;
		/* The same 42px the header logo renders at on every other page.
		   Spacing is margin, not padding: under the theme's border-box
		   sizing, padding comes out of the fixed height, and the old
		   17px-tall box with 16px of top padding left the logo 1px tall. */
		height: 42px;
		width: auto;
		margin: 14px 18px 0;
	}

	.pc-home-hero__copy {
		position: relative;
		margin-top: auto;
		padding: 0 20px 28px;
	}

	.pc-home-hero__headline {
		margin: 0 0 8px;
		font-family: var(--font-display);
		font-weight: 600;
		text-transform: uppercase;
		/* !important: Astra's customizer typography CSS sets h1 { font-size: ...
		   !important }, which otherwise beats this rule regardless of selector
		   specificity. */
		font-size: 1.9rem !important;
		line-height: 1.08;
		color: #fff;
		letter-spacing: 0.01em;
	}

	.pc-home-hero__headline-line {
		display: block;
	}

	.pc-home-hero__subhead {
		margin: 0;
		max-width: 280px;
		font-family: var(--font-body);
		font-size: 0.85rem;
		line-height: 1.42;
		color: rgba(249, 223, 190, 0.96);
		text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55), 0 2px 10px rgba(0, 0, 0, 0.35);
	}

	/* ---------- Koi transition graphic ---------- */

	.pc-home-koi {
		display: flex;
		justify-content: center;
		padding: 12px 0 16px;
	}

	.pc-home-koi img {
		width: 82px;
		transform: rotate(-6deg);
		filter: drop-shadow(0 6px 14px rgba(67, 47, 31, 0.35));
	}

	/* ---------- Import decklist ---------- */

	.pc-home-import {
		padding: 0 20px 32px;
	}

	.pc-home-import__eyebrow {
		margin: 0 0 8px;
		font-family: var(--font-ui);
		font-size: 0.72rem;
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: 0.1em;
		color: var(--accent);
	}

	.pc-home-import__desc {
		margin: 0 0 12px;
		font-family: var(--font-body);
		font-size: 0.78rem;
		color: var(--text-muted);
	}

	.pc-home-import__example {
		margin-bottom: 16px;
	}

	.pc-home-import__example summary {
		font-family: var(--font-ui);
		font-size: 0.75rem;
		font-weight: 700;
		color: var(--text-heading);
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}

	.pc-home-import__sample {
		margin: 10px 0 0;
		padding: 12px;
		background: var(--pc-brown-08);
		border-radius: var(--radius-md);
		font-family: var(--font-body);
		font-size: 0.75rem;
		line-height: 1.5;
		color: var(--text-body);
		white-space: pre-wrap;
		word-break: break-word;
	}

	.pc-home-import__textarea {
		display: block;
		width: 100%;
		min-height: 70px;
		margin: 0 0 16px;
		padding: 12px 14px;
		box-sizing: border-box;
		border: 2px solid var(--border-default);
		border-radius: var(--radius-lg);
		background: var(--surface-card);
		font-family: var(--font-body);
		font-size: 0.85rem;
		color: var(--text-body);
		resize: vertical;
	}

	.pc-home-import__textarea::placeholder {
		color: var(--pc-brown-30);
	}

	/* Same off-palette default-focus-border leak documented at length in
	   decklist-importer.css's own .pc-decklist__editor:focus-within — this
	   textarea never had any :focus rule of its own to contest it. The
	   leaking rule sets border-style (not just color), so the full
	   shorthand is reasserted here too, not just border-color. */
	.pc-home-import__textarea:focus {
		outline: none !important;
		border: 2px solid var(--accent) !important;
	}

	.pc-home-import__submit {
		width: 100%;
		min-height: 55px;
		-webkit-tap-highlight-color: transparent;
	}

	/* ---------- How it works ---------- */

	.pc-home-how {
		display: flex;
		flex-direction: column;
		gap: 20px;
		padding: 0 20px 40px;
	}

	.pc-home-how__step {
		display: flex;
		align-items: flex-start;
		gap: 14px;
	}

	.pc-home-how__num {
		display: flex;
		align-items: center;
		justify-content: center;
		flex: none;
		width: 26px;
		height: 26px;
		border-radius: var(--radius-pill);
		background: var(--accent);
		font-family: var(--font-ui);
		font-weight: 700;
		font-size: 0.8rem;
		color: #fff;
	}

	.pc-home-how__title {
		margin: 0 0 2px;
		font-family: var(--font-display);
		font-weight: 600;
		/* !important: same Astra customizer h3 { font-size: ... !important } as
		   the headline above. */
		font-size: 0.9rem !important;
		color: var(--text-heading);
	}

	.pc-home-how__desc {
		margin: 0;
		font-family: var(--font-body);
		font-size: 0.8rem;
		color: var(--text-body);
	}
}

/* ---------- Tablets ----------
   A taller hero with display-sized type, and everything under it in
   nav-shell.css's centred column: the import form, then How it works as
   three steps across. */
@media (min-width: 600px) and (max-width: 1025px) {
	.pc-home-hero {
		min-height: 460px;
		background-position: center 62%;
	}

	.pc-home-hero__cloud--1 {
		top: 28px;
		right: 32px;
		width: 190px;
	}

	.pc-home-hero__cloud--2 {
		top: 110px;
		left: 28px;
		width: 160px;
	}

	.pc-home-hero__logo {
		height: 52px;
		margin: 22px var(--pc-measure-inset) 0;
	}

	.pc-home-hero__copy {
		padding: 0 var(--pc-measure-inset) 44px;
	}

	.pc-home-hero__headline {
		margin-bottom: 14px;
		font-size: 3.1rem !important;
	}

	.pc-home-hero__subhead {
		max-width: 440px;
		font-size: 1.05rem;
	}

	.pc-home-koi {
		padding: 8px 0 24px;
	}

	.pc-home-koi img {
		width: 112px;
	}

	.pc-home-import,
	.pc-home-how {
		max-width: var(--pc-measure);
		margin-inline: auto;
		padding-inline: 24px;
		box-sizing: border-box;
	}

	.pc-home-import {
		padding-bottom: 48px;
	}

	.pc-home-import__eyebrow {
		font-size: 0.8rem;
	}

	.pc-home-import__desc {
		font-size: 0.9rem;
	}

	.pc-home-import__textarea {
		min-height: 140px;
		font-size: 0.95rem;
	}

	.pc-home-how {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 24px;
		padding-bottom: 56px;
	}

	.pc-home-how__step {
		flex-direction: column;
		gap: 10px;
	}

	.pc-home-how__num {
		width: 32px;
		height: 32px;
		font-size: 0.9rem;
	}

	.pc-home-how__title {
		font-size: 1rem !important;
	}

	.pc-home-how__desc {
		font-size: 0.85rem;
	}
}
