/*
 * xcoins-t5.css — T5 "Sell [Coin]" page. Loaded ONLY on T5 (xcoins/layout.php),
 * on top of the shared xcoins-pages.css tokens. Figma file wKngnASKnuyGoMCj5VAIqv —
 * 494:33844 (desktop) / 494:33186 (mobile).
 *
 * Still carries .xc-pricecard (template-parts/coin-price-card.php), since T5 is
 * its only consumer. .xc-pills (template-parts/pill-links.php) has MOVED to
 * sections-shared.css now that T6 uses it too — do the same with the price card
 * if a second template ever renders one, rather than duplicating the block.
 */

.xc-t5 .xc-container {
	max-width: 1240px;
	margin-inline: auto;
	padding-inline: 28px;
	box-sizing: border-box;
}
.xc-t5 section {
	padding: 64px 0;
	border-top: none;
}
.xc-t5 section:first-child { padding-top: 0; }
.xc-t5 .eyebrow {
	display: block;
	font-family: var(--body);
	font-weight: 400;
	font-size: 14px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--bright-blue);
	margin: 0 0 12px;
	line-height: 1.25;
}
.xc-t5 h2 {
	font-family: var(--display);
	font-weight: 800;
	font-size: 44px;
	line-height: 1;
	letter-spacing: 0;
	margin: 0 0 16px;
	color: var(--off-white);
}
.xc-t5 .section-sub {
	color: #cfd6e2;
	margin: 0 0 40px;
	max-width: 820px;
	font-size: 16px;
	line-height: 1.25;
}

/* ---------- Glass border ----------
 * The homepage's .glass-border look (1px flat stroke + a directional glint:
 * bright top-left where light hits, softer bottom-right where it refracts).
 * Values copied 1:1 from front-page.php's inline block — that stylesheet is
 * trapped inside the homepage document, so every per-type sheet carries its own
 * scoped copy (T1–T4 do the same).
 *
 * This was MISSING from T5 until now: page-sell-t5.php already put
 * .glass-border on its "Good to know" cards, but with no rule scoped into this
 * file the class did nothing, so those cards rendered with a flat border only.
 *
 * Both the .glass-border class AND the card classes are listed, because T5's
 * body HTML is generated once and CACHED: a page generated before the class was
 * added still gets the glint from its own class name, with no regenerate needed.
 */
.xc-t5 .glass-border,
.xc-t5 .t5-step,
.xc-t5 .t5-gtk__card {
	position: relative;
	border-radius: 12px;
	border: 1px solid rgba(249, 253, 255, .1);
}
.xc-t5 .glass-border::before,
.xc-t5 .t5-step::before,
.xc-t5 .t5-gtk__card::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 1px;
	pointer-events: none;
	z-index: 2;
	background:
		radial-gradient(circle at 0% 0%, rgba(255,255,255,.32) 0%, rgba(255,255,255,.32) 3%, rgba(255,255,255,.14) 45%, transparent 52%),
		radial-gradient(circle at 100% 100%, rgba(255,255,255,.4) 3%, rgba(255,255,255,.16) 43%, transparent 46%),
		linear-gradient(135deg, rgba(249,253,255,.12) 50%, rgba(249,253,255,.14) 50%, rgba(249,253,255,.22) 100%);
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
}

/* ---------- 1. Hero — Figma 591:1550 (D) ---------- */
.t5-hero {
	position: relative;
	overflow: hidden;
	/*
	 * FLOOR SIZED TO THE WIDGET'S TALLEST STATE, not to the design's resting one.
	 *
	 * The widget changes height in normal use: the "All fees included" panel adds
	 * ~90px when opened (three rows: service, network, total), and buy mode adds another 112px that sell mode does not have. With the hero hugging that, every change resized the
	 * section — and these heroes paint a diagonal gradient / background art scaled
	 * to their own box, so the whole backdrop visibly re-rendered. Sized to the
	 * tallest reachable state, the shorter ones leave hero whitespace instead.
	 *
	 * Raised by 40px on 2026-08-18: the fee panel gained its third row (total) and
	 * the payment dropdown became a two-segment switch. Raise it again if either
	 * grows — and measure in a browser, this was computed from box math.
	 */
	min-height: 930px;
	padding: 0;
	/* Figma 591:1550: Bright Blue → Rich Black (not True Blue). */
	background: linear-gradient(
		233.49deg,
		var(--bright-blue) 12.423%,
		var(--rich-black) 86.271%
	);
}
.t5-hero .xc-container {
	position: relative;
	z-index: 1;
	padding-top: 16px;
	padding-bottom: 64px;
}
.t5-crumbs {
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0 0 72px;
	padding: 0;
	font-family: var(--body);
	font-size: 16px;
	line-height: 1.25;
	color: var(--slate);
	flex-wrap: wrap;
}
.t5-crumbs a { color: var(--slate); text-decoration: none; }
.t5-crumbs a:hover { color: var(--off-white); }
.t5-crumbs [aria-current="page"] { color: var(--off-white); }
.t5-crumbs__sep {
	display: inline-flex;
	flex: 0 0 12px;
	align-items: center;
	justify-content: center;
	width: 12px;
	height: 12px;
	color: var(--slate);
}
.t5-crumbs__sep svg { display: block; width: 100%; height: 100%; }

.t5-hero__grid {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	gap: 48px;
	align-items: start;
}
.t5-hero__art {
	position: absolute;
	/* Figma 560:37435: left 416 / top 39 / 608×736 on 1440×810 */
	left: 28.889%;
	top: 39px;
	width: 42.222%;
	aspect-ratio: 608 / 736;
	z-index: 0;
	pointer-events: none;
	opacity: .8;
}
.xc-t5 .t5-hero__art img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}
.t5-hero__art--placeholder {
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.35), rgba(26,156,252,.25) 45%, rgba(1,90,223,.05) 75%);
	border: 1px solid rgba(255,255,255,.15);
}
.t5-hero__copy {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 656px;
}
.t5-hero__title {
	font-family: var(--display);
	font-weight: 800;
	color: var(--off-white);
	font-size: 76px;
	line-height: 1;
	letter-spacing: 0;
	margin: 0;
}
.t5-hero__answer {
	font-family: var(--body);
	font-size: 16px;
	font-weight: 400;
	color: #cfd6e2;
	line-height: 1.25;
	max-width: 560px;
	margin: 0;
}
.t5-hero__answer p { margin: 0; }
.t5-hero__ctas {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	padding-top: 12px;
	margin: 0;
}
.xcoins-main .t5-hero .xc-btn--primary {
	background: var(--true-blue);
	color: #fff;
	border-color: transparent;
	padding: 17px 33px;
	min-height: 50px;
	font-size: 16px;
}
.xcoins-main .t5-hero .xc-btn--secondary {
	background: transparent;
	color: var(--off-white);
	border-color: var(--off-white);
	padding: 17px 33px;
	min-height: 50px;
	font-size: 16px;
}
.xcoins-main .t5-hero .xc-btn--secondary:hover {
	background: rgba(249, 253, 255, .08);
	text-decoration: none;
}
.t5-hero__trust {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--soft-white);
	font-size: 14px;
	line-height: 1.25;
	margin: 0;
	padding: 6px 0;
}
.t5-hero__trust::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 3px;
	background: var(--bright-blue);
	flex-shrink: 0;
}
.t5-hero__widget {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 536px;
	justify-self: end;
}
.t5-hero__fade {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 160px;
	z-index: 1;
	pointer-events: none;
	/*
	 * Solid by 92%, not 100%. The hero's gradient ends on BRIGHT BLUE, so the last
	 * band of this fade is the only thing standing between it and the flat
	 * rich-black section underneath. A gradient that reaches full opacity exactly
	 * at the edge quantises its final steps right where it meets that flat fill,
	 * and the last band reads as a hairline BORDER across the bottom of the hero.
	 * Landing on solid a few pixels early means the junction is rich-black meeting
	 * rich-black, which cannot band. No visible change otherwise.
	 */
	background: linear-gradient(180deg, rgba(17, 22, 32, 0) 0%, var(--rich-black) 92%, var(--rich-black) 100%);
}

@media (max-width: 1100px) {
	.t5-hero__title { font-size: clamp(40px, 6vw, 64px); }
	.t5-hero__art { width: 40%; left: 34%; }
}

@media (max-width: 960px) {
	/*
	 * Mobile hero — Figma 591:1084 (375×1037):
	 * rich-black → bright-blue vertical, art at x=-45 y=254 w=465 h=387 @ 60%,
	 * bottom fade 180px, stacked full-width CTAs, content-driven height.
	 */
	.t5-hero {
		min-height: 0;
		background: linear-gradient(180deg, var(--rich-black) 0%, var(--bright-blue) 100%);
	}
	/* `.xc-t5 section` (0,2,0) beats `.t5-hero { padding: 0 }` (0,1,0), so the hero
	   was carrying the section rhythm's 64px UNDER the container's own 32. Figma
	   494:33208 pads its hero content 32px at the bottom, full stop. */
	.xc-t5 .t5-hero { padding: 0; }
	.t5-hero .xc-container {
		padding-inline: 16px;
		padding-top: 0;
		padding-bottom: 32px;
	}
	.t5-crumbs {
		margin: 0;
		padding: 16px 0;
		min-height: 52px;
		font-size: 16px;
		box-sizing: border-box;
	}
	.t5-hero__grid {
		/* minmax(0,1fr) — plain 1fr keeps min-content (~widget) and blows past 375. */
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}
	.t5-hero__copy,
	.t5-hero__widget {
		min-width: 0;
		max-width: 100%;
	}
	.t5-hero__art {
		/*
		 * Figma 591:196 (in the current mobile frame 494:33186): 375×454, CENTRED
		 * on the hero — left 50% / top calc(50% − 119.5px), both axes translated
		 * −50% — at 60%. Supersedes the older 853:6196 placement (465×387 hanging
		 * 45px off the left edge), which is what this rule used to describe.
		 * Width is 100% rather than a fixed 375 so it scales on a wider phone
		 * instead of leaving a gutter; the aspect ratio keeps the crop honest.
		 */
		left: 50%;
		right: auto;
		top: calc(50% - 119.5px);
		transform: translate(-50%, -50%);
		width: 100%;
		max-width: none;
		aspect-ratio: 375 / 454;
		height: auto;
		opacity: .6;
		z-index: 0;
	}
	.xc-t5 .t5-hero__art img {
		object-fit: cover;
		object-position: center;
	}
	.t5-hero__copy { max-width: none; gap: 16px; }
	.t5-hero__title { font-size: 40px; }
	.t5-hero__answer { max-width: none; }
	.t5-hero__ctas {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		padding-top: 8px;
		gap: 8px;
	}
	.xcoins-main .t5-hero .xc-btn--primary,
	.xcoins-main .t5-hero .xc-btn--secondary {
		width: 100%;
		justify-content: center;
		text-align: center;
		min-height: 48px;
		padding: 16px 24px;
		box-sizing: border-box;
	}
	.xcoins-main .t5-hero .xc-btn--secondary {
		min-height: 50px;
		padding: 17px 33px;
	}
	.t5-hero__trust {
		gap: 8px;
		padding: 4px 0 0;
	}
	.t5-hero__trust::before {
		width: 5px;
		height: 5px;
		border-radius: 2.5px;
	}
	.t5-hero__widget {
		max-width: none;
		justify-self: stretch;
		margin-top: 0;
	}
	.t5-hero__widget .xcw {
		max-width: 100%;
		min-width: 0;
	}
	.t5-hero__fade {
		height: 180px;
	}
}

/* ---------- 2. Price band (template-parts/coin-price-card.php) ----------
 * Figma 560:37501 (D) / 591:355 (M). Shared partial — see file header. */
.xc-pricecard {
	background: var(--rich-black);
	padding: 64px 0;
}
.xc-pricecard__card {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 33px;
	box-sizing: border-box;
	min-height: 212px;
	padding: 52px 64px;
	border-radius: 12px;
	background: rgba(249, 253, 255, .05);
	overflow: hidden;
}
/* Figma 560:37504 — a large soft ellipse bleeding in from the right edge. */
.xc-pricecard__glow {
	position: absolute;
	right: -12%;
	top: -110%;
	width: 72%;
	height: 320%;
	pointer-events: none;
	background: radial-gradient(ellipse at center, rgba(1, 90, 223, .28) 0%, rgba(1, 90, 223, .10) 45%, transparent 70%);
}
.xc-pricecard__id {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: flex-end;
	gap: 24px;
	min-width: 0;
}
.xc-t5 .xc-pricecard__icon,
.xc-pricecard__icon {
	width: 71px;
	height: 71px;
	flex-shrink: 0;
	object-fit: contain;
}
.xc-pricecard__figures {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}
.xc-pricecard__eyebrow {
	display: block;
	font-family: var(--body);
	font-weight: 400;
	font-size: 14px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--bright-blue);
	line-height: 1.25;
}
.xc-pricecard__row {
	display: flex;
	align-items: flex-end;
	gap: 12px;
	margin: 0;
	flex-wrap: wrap;
}
.xc-pricecard__price {
	font-family: var(--display);
	font-weight: 800;
	font-size: 44px;
	line-height: 1;
	color: var(--off-white);
	font-variation-settings: "wdth" 100;
}
/* Up / down / flat convention matches buy-hub.css's .buy-coin__chg. */
.xc-pricecard__chg {
	font-family: var(--body);
	font-weight: 700;
	font-size: 16px;
	line-height: 1.25;
	white-space: nowrap;
	padding-bottom: 2px;
}
.xc-pricecard__chg.is-up { color: #00b67a; }
.xc-pricecard__chg.is-down { color: #e04848; }
.xc-pricecard__chg.is-flat { color: var(--slate); }
.xc-pricecard__cta {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
	font-family: var(--display);
	font-weight: 700;
	font-size: 16px;
	line-height: 1;
	color: var(--bright-blue);
	text-decoration: none;
	font-variation-settings: "wdth" 100;
}
.xc-pricecard__cta:hover { text-decoration: underline; }
.xc-pricecard__arrow { display: block; width: 16px; height: 16px; flex: 0 0 16px; }

@media (max-width: 960px) {
	/* Mobile 591:421: stacked — icon+figures row, CTA on its own line below. */
	.xc-t5 .xc-pricecard { padding: 32px 0; }
	.xc-pricecard .xc-container { padding-inline: 16px; }
	.xc-pricecard__card {
		flex-direction: column;
		align-items: flex-start;
		gap: 24px;
		min-height: 0;
		padding: 32px 16px;
	}
	.xc-pricecard__glow { right: -30%; width: 120%; }
	.xc-pricecard__id { gap: 24px; }
	.xc-pricecard__price { font-size: 24px; }
	.xc-pricecard__figures { gap: 8px; }
}
@media (max-width: 480px) {
	.xc-pricecard__id { gap: 16px; }
	.xc-t5 .xc-pricecard__icon,
	.xc-pricecard__icon { width: 56px; height: 56px; }
}

/* ---------- 3. How it works — Figma 494:34816 (D) / 494:34742 (M) ---------- */
.t5-steps { background: var(--rich-black); }
.t5-steps .section-sub { margin-bottom: 40px; }
.t5-steps__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}
.t5-step {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	min-height: 266px;
	box-sizing: border-box;
	background: rgba(249, 253, 255, .05);
	border: 1px solid rgba(249, 253, 255, .1);
	border-radius: 12px;
	padding: 24px;
}
.t5-step__copy {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 7px;
}
.t5-step__badge {
	display: block;
	font-family: var(--display);
	font-weight: 700;
	font-size: 16px;
	line-height: 1;
	letter-spacing: 0;
	text-transform: uppercase;
	color: var(--bright-blue);
}
.t5-step__title {
	font-family: var(--display);
	font-weight: 700;
	font-size: 18px;
	line-height: 1;
	margin: 0;
	color: var(--off-white);
}
.t5-step__body {
	margin: 0;
	color: var(--slate);
	font-family: var(--body);
	font-size: 16px;
	line-height: 1.25;
}
.t5-step__visual {
	position: relative;
	flex: 0 0 132px;
	width: 132px;
	align-self: stretch;
	min-height: 170px;
	pointer-events: none;
}
.xc-t5 .t5-step__art {
	position: absolute;
	right: 0;
	bottom: 0;
	width: auto;
	height: auto;
	max-width: 132px;
	object-fit: contain;
}
.t5-step:nth-child(1) .t5-step__art { width: 132px; height: 98px; }
.t5-step:nth-child(2) .t5-step__art { width: 127px; height: 150px; right: 2px; }
.t5-step:nth-child(3) .t5-step__art { width: 130px; height: 205px; bottom: 6px; }
.t5-step__art--ph {
	position: absolute;
	inset: auto 0 0 auto;
	width: 100px;
	height: 120px;
	border-radius: 12px;
	background: linear-gradient(160deg, rgba(26,156,252,.35), transparent 70%);
}

@media (max-width: 960px) {
	.xc-t5 h2 { font-size: 24px; }
	.xc-t5 .t5-steps { padding: 32px 0; }
	.t5-steps .xc-container { padding-inline: 16px; }
	.t5-steps__list { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* ---------- 4. Good to know — Figma 494:34857 (D) / 494:34781 (M) ---------- */
.t5-gtk { background: var(--rich-black); }
.t5-gtk__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin-top: 24px;
}
.t5-gtk__card {
	display: flex;
	align-items: flex-start;
	gap: 18px;
	box-sizing: border-box;
	min-height: 135px;
	padding: 24px;
	border-radius: 12px;
	background: rgba(249, 253, 255, .05);
}
.t5-gtk__icon {
	flex: 0 0 36px;
	width: 36px;
	height: 36px;
}
.t5-gtk__icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.t5-gtk__copy {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.t5-gtk__title {
	font-family: var(--body);
	font-weight: 700;
	font-size: 16px;
	line-height: 1.25;
	margin: 0;
	color: var(--off-white);
}
.t5-gtk__body {
	color: var(--slate);
	font-family: var(--body);
	font-size: 14px;
	line-height: 1.25;
}
.t5-gtk__body p { margin: 0; }
.t5-gtk__body a { color: var(--bright-blue); }

@media (max-width: 1100px) {
	.t5-gtk__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
	.xc-t5 .t5-gtk { padding: 32px 0; }
	.t5-gtk .xc-container { padding-inline: 16px; }
	.t5-gtk__grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.t5-gtk__card { min-height: 130px; }
}

/* ---------- 7. Related pills — .xc-pills now lives in sections-shared.css ----------
 * Figma 591:851 (D) / 591:537 (M). Moved there when T6 became the second
 * consumer of template-parts/pill-links.php, per this file's header rule. */
.t5-related { background: var(--rich-black); }

@media (max-width: 960px) {
	.xc-t5 .t5-related { padding: 32px 0; }
	.t5-related .xc-container { padding-inline: 16px; }
}
