/*
 * Lempar — the feature pages (T-392): Turnamen, Seleksi tim, Profil pemain.
 *
 * Turnamen is drawn on the canvas "Feature Showcase Options", artboards
 * "Feature page · Turnamen" at 1280 and at 390; the other two take its
 * shape. The markup is lempar_feature_page() in functions.php, its words
 * patterns/feature-*.php. This file loads with home.css, whose phone frame
 * (`lempar-home__phone`), coloured panels (`lempar-home__panel.is-*`) and
 * screens (`lempar-home__svg`) the pages share with the homepage. home.css's
 * phone-width rules ask its own container, `lempar-home`, which a feature
 * page does not have, so they never reach it. The title's phone size is
 * lempar.css's, shared with the homepage (T-577).
 *
 * Colours as on the homepage: every one a preset, the inverse card's text
 * 20% contrast into base. Layout follows the page's own width (container
 * `lempar-feature`): under 720px of it, the phone's drawing.
 */

/* -------------------------------------------------------------------------
 * 1. The container, and which phrasing shows
 * ---------------------------------------------------------------------- */

.lempar-feature {
	container: lempar-feature / inline-size;
	font-family: var(--wp--preset--font-family--nunito);
	color: var(--wp--preset--color--contrast);
}

@container lempar-feature (min-width: 720px) {
	.lempar-feature .lempar-feature__narrow {
		display: none;
	}
}

@container lempar-feature (max-width: 719.98px) {
	.lempar-feature .lempar-feature__wide {
		display: none;
	}
}

/* -------------------------------------------------------------------------
 * 2. Text and buttons
 * ---------------------------------------------------------------------- */

.lempar-feature :is(h1, h2, p) {
	margin: 0;
	font-family: inherit;
	letter-spacing: 0;
	color: inherit;
}

.lempar-feature__badge {
	align-self: flex-start;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--wp--preset--color--highlight);
	color: var(--wp--preset--color--highlight-contrast);
	font-size: 14px;
	font-weight: 800;
	line-height: 1.4;
	letter-spacing: 0.4px;
}

/*
 * Under the index, the badge leads with "Fitur", a link to /fitur/ (T-392):
 * the link is stretched over the whole pill and 44px down from its top, into
 * the gap above the title (the bar sits on the pill's top on a phone), the
 * name stays text beside it, and the focus ring goes round the pill.
 */
.lempar-feature__badge--trail {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.lempar-feature .lempar-feature__badge-link {
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
	outline: none;
}

.lempar-feature__badge-link::after {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: max(100%, var(--wp--custom--tap-target, 44px));
}

.lempar-feature__badge--trail:has(.lempar-feature__badge-link:focus-visible) {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

.lempar-feature__badge-chevron {
	flex: none;
	width: 1em;
	height: 1em;
}

.lempar-feature .lempar-feature__title {
	font-weight: 900;
	line-height: 1.04;
	text-wrap: balance;
}

/* The wide size only: on a phone the title takes lempar.css's (T-577). */
@container lempar-feature (min-width: 720px) {
	.lempar-feature .lempar-feature__title {
		font-size: 60px;
	}
}

.lempar-feature .lempar-feature__lead {
	max-width: 560px;
	font-size: 20px;
	line-height: 1.55;
	color: var(--wp--preset--color--muted);
}

/* What stands in the hero where a visitor has no button yet (T-586). */
.lempar-feature .lempar-feature__note {
	max-width: 560px;
	font-size: 17px;
	font-weight: 800;
	line-height: 1.45;
	color: var(--wp--preset--color--contrast);
}

.lempar-feature .lempar-feature__heading {
	font-size: 40px;
	font-weight: 900;
	line-height: 1.1;
	text-wrap: balance;
}

.lempar-feature .lempar-feature__text {
	font-size: 18px;
	line-height: 1.55;
	color: var(--wp--preset--color--muted);
}

.lempar-feature__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* The drawing's pills, not wp-element-button. */
.lempar-feature__button {
	display: inline-block;
	padding: 16px 28px;
	border-radius: 999px;
	font-size: 17px;
	font-weight: 800;
	line-height: 1.375;
	text-decoration: none;
	transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* White on the coral, as drawn: the site's accepted primary. */
.lempar-feature__button.is-primary,
.lempar-feature__button.is-primary:hover,
.lempar-feature__button.is-primary:visited {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent-contrast);
}

.lempar-feature__button.is-secondary,
.lempar-feature__button.is-secondary:hover,
.lempar-feature__button.is-secondary:visited {
	background: var(--wp--preset--color--surface-raised);
	color: var(--wp--preset--color--contrast);
}

.lempar-feature__button:hover {
	transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
	.lempar-feature__button {
		transition: none;
	}

	.lempar-feature__button:hover {
		transform: none;
	}
}

/* -------------------------------------------------------------------------
 * 3. The hero
 * ---------------------------------------------------------------------- */

.lempar-feature__hero {
	display: grid;
	/* The art column holds the drawing's 536px panel; the text takes the rest. */
	grid-template-columns: minmax(0, 1fr) minmax(0, 536px);
	align-items: center;
	gap: 40px 56px;
	/* The drawing's 48px above, less main's own top padding. */
	padding-block: max(0px, calc(48px - var(--wp--preset--spacing--50))) 72px;
}

.lempar-feature__intro {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.lempar-feature__art {
	display: flex;
	justify-content: center;
	min-width: 0;
}

/*
 * Two phones rising out of the panel's foot, the first in front and sunk
 * 60px, the second behind it, 440px tall and overlapping by 40: the
 * drawing's panel, 536 by 560 with 476 inside, scaled down with the column.
 * Each length is a share of those 476.
 */
.lempar-feature .lempar-feature__hero-panel {
	display: flex;
	align-items: flex-end;
	width: min(536px, 100%);
	height: auto;
	aspect-ratio: 536 / 560;
	margin: 0;
	padding: 7.46% 5.6% 0;
	border-radius: 48px;
}

.lempar-feature__hero-phone {
	box-sizing: border-box;
	flex: 0 0 56.3%;
	min-width: 0;
	border-width: 9px;
	border-radius: 40px 40px 0 0;
}

.lempar-feature__hero-phone:first-child {
	position: relative;
	z-index: 1;
	margin-bottom: -12.6%;
}

.lempar-feature__hero-phone + .lempar-feature__hero-phone {
	flex-basis: 52.1%;
	height: 84.6%;
	margin-left: -8.4%;
}

/* -------------------------------------------------------------------------
 * 4. Untuk siapa
 * ---------------------------------------------------------------------- */

.lempar-feature__audience {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding-bottom: 80px;
}

.lempar-feature .lempar-feature__audience-title {
	font-size: 34px;
	font-weight: 900;
	line-height: 1.15;
}

.lempar-feature__whos {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

/* As drawn: three across, or two and one where three do not fit at 300px. */
.lempar-feature__who {
	box-sizing: border-box;
	flex: 1 1 300px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 28px;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 28px;
}

.lempar-feature__who-title {
	font-size: 21px;
	font-weight: 800;
	line-height: 1.25;
}

.lempar-feature .lempar-feature__who-text {
	font-size: 16px;
	line-height: 1.55;
	color: var(--wp--preset--color--muted);
}

/* -------------------------------------------------------------------------
 * 5. The band: a wide screen on the surface, edge to edge
 * ---------------------------------------------------------------------- */

/*
 * As the homepage's "Juga" band: the box keeps the page's width and its
 * surface and two hairlines are painted 100vmax out to each side by
 * border-image, which does not widen the page.
 */
.lempar-feature__band {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 28px;
	padding-block: 72px;
	border-image: conic-gradient(var(--wp--preset--color--surface) 0 0) fill 0 / / 0 100vmax;
}

.lempar-feature__band::before,
.lempar-feature__band::after {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 1px;
	border-image: conic-gradient(var(--wp--preset--color--line) 0 0) fill 0 / / 0 100vmax;
}

.lempar-feature__band::after {
	inset: auto 0 0;
}

.lempar-feature__band-head {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 680px;
}

.lempar-feature__scroller {
	overflow-x: auto;
	border-radius: 32px;
}

.lempar-feature__sheet {
	box-sizing: border-box;
	min-width: 760px;
	padding: 28px;
	background: var(--wp--preset--color--base);
	border-radius: 32px;
}

/* -------------------------------------------------------------------------
 * 6. The sections, a phone on alternate sides
 * ---------------------------------------------------------------------- */

.lempar-feature__section {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	align-items: center;
	gap: 32px 56px;
	padding-block: 40px;
}

.lempar-feature__band + .lempar-feature__section,
.lempar-feature__audience + .lempar-feature__section {
	padding-top: 80px;
}

.lempar-feature__section:has(+ .lempar-feature__closing) {
	padding-bottom: 80px;
}

.lempar-feature__copy {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

/* The text stays first in the page, for reading order and for the phone. */
.lempar-feature__section.is-flipped {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
}

.lempar-feature__section.is-flipped .lempar-feature__copy {
	grid-column: 2;
	grid-row: 1;
}

.lempar-feature__section.is-flipped .lempar-feature__art {
	grid-column: 1;
	grid-row: 1;
}

/* A whole phone on its panel, as drawn: 280 wide in a 9px frame, the panel 410. */
.lempar-feature .lempar-feature__panel {
	width: min(410px, 100%);
	height: auto;
	margin: 0;
	padding: 36px 56px;
	border-radius: 44px;
}

.lempar-feature .lempar-feature__phone {
	box-sizing: border-box;
	border-width: 9px;
	border-bottom: 9px solid var(--lempar-home-frame);
	border-radius: 40px;
}

/* -------------------------------------------------------------------------
 * 7. The closing card, in the inverse colours
 * ---------------------------------------------------------------------- */

.lempar-feature__closing {
	/* The drawing's 80px to the footer, less main's bottom padding and the shell's gap before the footer. */
	margin-bottom: calc(80px - (var(--wp--preset--spacing--70) + var(--wp--preset--spacing--50)));
}

.lempar-feature__closing-card {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	padding: 56px;
	/* Inverted in light; in dark the raised surface and the page's ink, as the homepage's organisers' card (T-398). */
	background: light-dark(var(--wp--preset--color--contrast), var(--wp--preset--color--surface-raised));
	border-radius: 40px;
	color: light-dark(var(--wp--preset--color--surface), var(--wp--preset--color--contrast));
}

.lempar-feature__closing-copy {
	flex: 1 1 480px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.lempar-feature .lempar-feature__closing-title {
	font-size: 38px;
	font-weight: 900;
	line-height: 1.1;
	text-wrap: balance;
}

.lempar-feature .lempar-feature__closing-text {
	font-size: 18px;
	line-height: 1.55;
	color: light-dark(color-mix(in srgb, var(--wp--preset--color--contrast) 20%, var(--wp--preset--color--base)), color-mix(in srgb, var(--wp--preset--color--contrast) 80%, var(--wp--preset--color--surface-raised)));
}

/* -------------------------------------------------------------------------
 * 8. Between: the drawing's rows wrap, the text above its picture
 * ---------------------------------------------------------------------- */

/* The hero's two halves, 480 and 440 with 56 between, no longer fit. */
@container lempar-feature (max-width: 975.98px) {
	.lempar-feature__hero {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* A section's, 440 and 400 with 56 between. */
@container lempar-feature (max-width: 895.98px) {
	.lempar-feature__section,
	.lempar-feature__section.is-flipped {
		grid-template-columns: minmax(0, 1fr);
	}

	.lempar-feature__section.is-flipped .lempar-feature__copy,
	.lempar-feature__section.is-flipped .lempar-feature__art {
		grid-column: 1;
		grid-row: auto;
	}
}

/* -------------------------------------------------------------------------
 * 9. The phone's drawing, under 720px of the page
 * ---------------------------------------------------------------------- */

@container lempar-feature (max-width: 719.98px) {
	.lempar-feature__hero {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
		padding-block: max(0px, calc(24px - var(--wp--preset--spacing--50))) 36px;
	}

	.lempar-feature__intro {
		gap: 16px;
	}

	.lempar-feature__badge {
		padding: 5px 12px;
		font-size: 13px;
		letter-spacing: 0;
	}

	.lempar-feature .lempar-feature__lead {
		font-size: 17px;
		line-height: 1.5;
	}

	.lempar-feature__actions {
		flex-direction: column;
	}

	.lempar-feature__button {
		padding: 15px 22px;
		font-size: 16px;
		text-align: center;
	}

	/* One phone, 250 wide, rising from a 380px panel. */
	.lempar-feature .lempar-feature__hero-panel {
		align-items: flex-start;
		justify-content: center;
		width: 100%;
		height: 380px;
		aspect-ratio: auto;
		padding: 28px 0 0;
		border-radius: 34px;
	}

	.lempar-feature__hero-phone,
	.lempar-feature__hero-phone:first-child {
		box-sizing: content-box;
		flex: 0 0 250px;
		max-width: calc(100% - 56px);
		margin: 0;
		border-width: 8px;
		border-bottom: 0;
		border-radius: 34px 34px 0 0;
	}

	.lempar-feature__audience {
		gap: 12px;
		padding-bottom: 36px;
	}

	.lempar-feature .lempar-feature__audience-title {
		margin-bottom: 4px;
		font-size: 26px;
	}

	.lempar-feature__whos {
		gap: 12px;
	}

	.lempar-feature__who {
		gap: 6px;
		padding: 20px;
		border-radius: 22px;
	}

	.lempar-feature__who-title {
		font-size: 18px;
	}

	.lempar-feature .lempar-feature__who-text {
		font-size: 15px;
		line-height: 1.5;
	}

	.lempar-feature__band {
		gap: 14px;
		padding-block: 36px;
	}

	.lempar-feature .lempar-feature__heading {
		font-size: 28px;
		line-height: 1.12;
	}

	.lempar-feature .lempar-feature__text {
		font-size: 16px;
		line-height: 1.5;
	}

	.lempar-feature__scroller {
		border-radius: 24px;
	}

	.lempar-feature__sheet {
		width: 760px;
		padding: 16px;
		border-radius: 24px;
	}

	/* Title, words, then the phone rising from its panel. */
	.lempar-feature__section,
	.lempar-feature__section.is-flipped {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
		padding-block: 20px;
	}

	.lempar-feature__band + .lempar-feature__section,
	.lempar-feature__audience + .lempar-feature__section {
		padding-top: 40px;
	}

	.lempar-feature__section:has(+ .lempar-feature__closing) {
		padding-bottom: 40px;
	}

	.lempar-feature .lempar-feature__panel {
		display: flex;
		justify-content: center;
		width: 100%;
		height: 360px;
		padding: 26px 0 0;
		border-radius: 34px;
	}

	.lempar-feature .lempar-feature__phone {
		box-sizing: content-box;
		flex: 0 0 250px;
		max-width: calc(100% - 56px);
		border-width: 8px;
		border-bottom: 0;
		border-radius: 34px 34px 0 0;
	}

	.lempar-feature__closing {
		margin-bottom: calc(40px - (var(--wp--preset--spacing--70) + var(--wp--preset--spacing--50)));
	}

	.lempar-feature__closing-card {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		padding: 28px 22px;
		border-radius: 30px;
	}

	.lempar-feature__closing-copy {
		flex: none;
	}

	.lempar-feature .lempar-feature__closing-title {
		font-size: 26px;
		line-height: 1.12;
	}

	.lempar-feature .lempar-feature__closing-text {
		font-size: 15px;
		line-height: 1.5;
	}
}

/* -------------------------------------------------------------------------
 * 10. The index, /fitur/ (T-392)
 *
 * patterns/fitur.php: the badge, the title and the lead as a feature page's
 * hero has them, then one card a feature, two across and one under 720px of
 * the page. A card is its page's hero panel with the first phone rising out
 * of it, the page's name, its title, a line where the section is not open,
 * and "Lihat fitur". The name's link is stretched over the whole card, which
 * takes the focus ring; the card says the rest.
 * ---------------------------------------------------------------------- */

.lempar-fitur__head {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding-block: max(0px, calc(48px - var(--wp--preset--spacing--50))) 48px;
}

.lempar-fitur__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	/* 80px to the footer, as a feature page's closing card has. */
	margin: 0 0 calc(80px - (var(--wp--preset--spacing--70) + var(--wp--preset--spacing--50)));
	padding: 0;
	list-style: none;
}

.lempar-fitur__card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 28px;
}

.lempar-fitur__card:has(.lempar-fitur__link:focus-visible) {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

/* The panel: the phone's top 60% in view, cut at the panel's foot. */
.lempar-feature .lempar-fitur__panel {
	display: flex;
	justify-content: center;
	height: auto;
	aspect-ratio: 16 / 10;
	margin: 0;
	padding: 7% 0 0;
}

.lempar-fitur__phone {
	box-sizing: border-box;
	flex: 0 0 52%;
	align-self: flex-start;
	min-width: 0;
	border-width: 7px;
	border-radius: 30px 30px 0 0;
}

.lempar-fitur__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 8px;
	padding: 24px 28px 28px;
}

.lempar-feature .lempar-fitur__name {
	font-size: 26px;
	font-weight: 900;
	line-height: 1.15;
}

.lempar-fitur__link,
.lempar-fitur__link:visited {
	color: inherit;
	text-decoration: none;
}

.lempar-fitur__link:focus-visible {
	outline: none;
}

.lempar-fitur__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.lempar-feature .lempar-fitur__text {
	font-size: 17px;
	line-height: 1.5;
	color: var(--wp--preset--color--muted);
}

.lempar-feature .lempar-fitur__status {
	align-self: flex-start;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--wp--preset--color--surface-raised);
	color: var(--wp--preset--color--contrast);
	font-size: 13px;
	font-weight: 800;
	line-height: 1.4;
}

.lempar-fitur__more {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: auto;
	padding-top: 8px;
	color: var(--wp--preset--color--contrast);
	font-size: 16px;
	font-weight: 800;
}

.lempar-fitur__more svg {
	width: 18px;
	height: 18px;
	transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (hover: hover) {
	.lempar-fitur__card:hover .lempar-fitur__more svg {
		transform: translateX(3px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.lempar-fitur__more svg {
		transition: none;
	}
}

@container lempar-feature (max-width: 719.98px) {
	.lempar-fitur__head {
		gap: 14px;
		padding-bottom: 28px;
	}

	.lempar-fitur__list {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
		margin-bottom: calc(40px - (var(--wp--preset--spacing--70) + var(--wp--preset--spacing--50)));
	}

	.lempar-fitur__card {
		border-radius: 24px;
	}

	.lempar-fitur__body {
		padding: 18px 20px 20px;
	}

	.lempar-feature .lempar-fitur__name {
		font-size: 22px;
	}

	.lempar-feature .lempar-fitur__text {
		font-size: 15px;
	}
}
