/**
 * Liberty Web Kits - homepage and shared section components.
 *
 * Depends on tokens.css and layout.css. No colour literals.
 */

/* -------------------------------------------------------------------------
 * Shared section primitives
 * ---------------------------------------------------------------------- */

.lwk-section {
	padding-block: var(--lwk-section-y);
}

.lwk-section--alt {
	background: var(--lwk-bg-2);
	border-block: 1px solid var(--lwk-border);
}

.lwk-eyebrow {
	margin: 0 0 12px;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--lwk-cyan);
}

.lwk-sechead {
	max-width: 62ch;
}

.lwk-sechead--center {
	max-width: 62ch;
	margin-inline: auto;
	text-align: center;
}

.lwk-sechead__title {
	margin: 0;
	font-family: var(--lwk-font-display);
	font-size: var(--lwk-fs-h2);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -0.025em;
	color: var(--lwk-text);
	text-wrap: balance;
}

.lwk-sechead__lead {
	margin: 14px 0 0;
	font-size: var(--lwk-fs-lead);
	line-height: 1.6;
	color: var(--lwk-text-2);
}

.lwk-sechead-row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 28px;
	margin-bottom: 44px;
}

.lwk-sechead-row .lwk-sechead {
	margin: 0;
}

.lwk-sechead-row__cta {
	flex: 0 0 auto;
}

.lwk-sechead--center + .lwk-grid,
.lwk-sechead--center + .lwk-cats {
	margin-top: 48px;
}

.lwk-note {
	margin: 28px 0 0;
	text-align: center;
	font-size: 0.875rem;
	color: var(--lwk-text-3);
}

.lwk-grad {
	background: linear-gradient(100deg, var(--lwk-violet) 0%, var(--lwk-blue) 55%, var(--lwk-cyan) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.lwk-icon {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
}

.lwk-btn--lg {
	min-height: 52px;
	padding: 0 26px;
	font-size: 1rem;
}

.lwk-btn--sm {
	min-height: 38px;
	padding: 0 14px;
	font-size: 0.875rem;
}

.lwk-link {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--lwk-cyan);
	text-decoration: none;
}

.lwk-link:hover {
	text-decoration: underline;
}

.lwk-grid {
	display: grid;
	gap: 24px;
}

.lwk-grid--3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.lwk-grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.lwk-grid--tight { gap: 18px; }

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

.lwk-hero {
	position: relative;
	overflow: hidden;
	padding-block: clamp(56px, 7vw, 104px) clamp(64px, 8vw, 120px);
}

/* One soft light source, positioned behind the device cluster. */
.lwk-hero__glow {
	position: absolute;
	top: -22%;
	right: -6%;
	width: min(780px, 82vw);
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(circle,
		color-mix(in srgb, var(--lwk-purple) 34%, transparent) 0%,
		color-mix(in srgb, var(--lwk-blue) 16%, transparent) 42%,
		transparent 68%);
	filter: blur(38px);
	pointer-events: none;
}

.lwk-hero__inner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
	align-items: center;
	gap: 56px;
}

.lwk-badge {
	display: inline-block;
	margin: 0 0 22px;
	padding: 7px 14px;
	border: 1px solid color-mix(in srgb, var(--lwk-violet) 38%, transparent);
	border-radius: 999px;
	background: color-mix(in srgb, var(--lwk-purple) 12%, transparent);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--lwk-text);
}

.lwk-hero__title {
	margin: 0 0 20px;
	font-family: var(--lwk-font-display);
	font-size: var(--lwk-fs-hero);
	font-weight: 700;
	line-height: 1.02;
	letter-spacing: -0.035em;
	color: var(--lwk-text);
}

.lwk-hero__lead {
	margin: 0 0 30px;
	max-width: 52ch;
	font-size: var(--lwk-fs-lead);
	line-height: 1.62;
	color: var(--lwk-text-2);
}

.lwk-hero__cta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 34px;
}

.lwk-hero__points {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 26px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lwk-hero__points li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.875rem;
	color: var(--lwk-text-3);
}

.lwk-hero__points .lwk-icon {
	color: var(--lwk-violet);
}

/* ---- device composition ---- */

.lwk-hero__devices {
	position: relative;
	min-height: 400px;
}

.lwk-dev__screen {
	overflow: hidden;
	border-radius: 10px;
	background: var(--lwk-surface);
	line-height: 0;
}

.lwk-dev__screen img {
	display: block;
	width: 100%;
	height: auto;
}

.lwk-dev--laptop {
	position: relative;
	width: 88%;
	margin-left: auto;
	padding: 10px 10px 0;
	border: 1px solid var(--lwk-border-strong);
	border-radius: 14px 14px 4px 4px;
	background: var(--lwk-surface-2);
	box-shadow: var(--lwk-shadow-lift);
}

.lwk-dev--laptop .lwk-dev__base {
	display: block;
	height: 10px;
	margin: 8px -18px -1px;
	border-radius: 0 0 12px 12px;
	background: linear-gradient(180deg, var(--lwk-surface-2), var(--lwk-bg-2));
	border: 1px solid var(--lwk-border);
	border-top: none;
}

.lwk-dev--tablet {
	position: absolute;
	left: 0;
	bottom: -6%;
	width: 40%;
	padding: 8px;
	border: 1px solid var(--lwk-border-strong);
	border-radius: 14px;
	background: var(--lwk-surface-2);
	box-shadow: var(--lwk-shadow-lift);
}

.lwk-dev--phone {
	position: absolute;
	right: 2%;
	bottom: -14%;
	width: 19%;
	padding: 6px;
	border: 1px solid var(--lwk-border-strong);
	border-radius: 18px;
	background: var(--lwk-surface-2);
	box-shadow: var(--lwk-shadow-lift);
}

.lwk-dev--phone .lwk-dev__screen {
	border-radius: 13px;
}

/* A single, slow, low-amplitude drift. Motion is decorative only. */
@media (prefers-reduced-motion: no-preference) {
	.lwk-dev--tablet { animation: lwk-float 9s ease-in-out infinite; }
	.lwk-dev--phone  { animation: lwk-float 11s ease-in-out infinite reverse; }
}

@keyframes lwk-float {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-9px); }
}

/* -------------------------------------------------------------------------
 * Product card
 * ---------------------------------------------------------------------- */

.lwk-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--lwk-border);
	border-radius: var(--lwk-radius);
	background: var(--lwk-surface);
	box-shadow: var(--lwk-shadow-card);
	transition: transform var(--lwk-dur) var(--lwk-ease),
	            border-color var(--lwk-dur) var(--lwk-ease),
	            box-shadow var(--lwk-dur) var(--lwk-ease);
}

.lwk-card:hover,
.lwk-card:focus-within {
	transform: translateY(-3px);
	border-color: color-mix(in srgb, var(--lwk-violet) 42%, transparent);
	box-shadow: var(--lwk-shadow-lift);
}

.lwk-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--lwk-surface-2);
	border-bottom: 1px solid var(--lwk-border);
}

.lwk-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 400ms var(--lwk-ease);
}

.lwk-card:hover .lwk-card__media img {
	transform: scale(1.02);
}

.lwk-chip {
	display: inline-block;
	padding: 5px 11px;
	border-radius: 999px;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.4;
}

.lwk-chip--soon {
	position: absolute;
	top: 12px;
	left: 12px;
	border: 1px solid color-mix(in srgb, var(--lwk-gold) 46%, transparent);
	background: color-mix(in srgb, var(--lwk-bg) 84%, transparent);
	color: var(--lwk-gold);
	backdrop-filter: blur(6px);
}

.lwk-chip--static {
	position: static;
	margin: 0 0 16px;
}

.lwk-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: 10px;
	padding: 20px;
}

.lwk-card__cat {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--lwk-violet);
	text-decoration: none;
}

.lwk-card__cat:hover { text-decoration: underline; }

.lwk-card__title {
	margin: 0;
	font-family: var(--lwk-font-display);
	font-size: var(--lwk-fs-product);
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.02em;
}

.lwk-card__title a {
	color: var(--lwk-text);
	text-decoration: none;
}

.lwk-card__excerpt {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.55;
	color: var(--lwk-text-2);
}

.lwk-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 2px 0 0;
	padding: 0;
	list-style: none;
}

.lwk-card__meta li {
	padding: 4px 10px;
	border: 1px solid var(--lwk-border);
	border-radius: 6px;
	font-size: 0.75rem;
	color: var(--lwk-text-3);
}

.lwk-card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid var(--lwk-border);
}

.lwk-card__price {
	font-family: var(--lwk-font-display);
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--lwk-text);
}

.lwk-card__price del { color: var(--lwk-text-3); font-weight: 400; margin-right: 6px; }
.lwk-card__price ins { text-decoration: none; }

.lwk-card__actions {
	display: inline-flex;
	align-items: center;
	gap: 12px;
}

/* -------------------------------------------------------------------------
 * Categories
 * ---------------------------------------------------------------------- */

.lwk-cats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lwk-cats a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 18px;
	border: 1px solid var(--lwk-border);
	border-radius: var(--lwk-radius);
	background: var(--lwk-surface);
	text-decoration: none;
	transition: border-color var(--lwk-dur) var(--lwk-ease),
	            background-color var(--lwk-dur) var(--lwk-ease);
}

.lwk-cats a:hover,
.lwk-cats a:focus-visible {
	border-color: color-mix(in srgb, var(--lwk-violet) 44%, transparent);
	background: var(--lwk-surface-2);
}

.lwk-cats .lwk-icon { color: var(--lwk-violet); width: 20px; height: 20px; }

.lwk-cats__name {
	font-family: var(--lwk-font-display);
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--lwk-text);
	line-height: 1.3;
}

.lwk-cats__count {
	margin-left: auto;
	font-size: 0.75rem;
	color: var(--lwk-text-3);
	white-space: nowrap;
}

/* -------------------------------------------------------------------------
 * Feature cards
 * ---------------------------------------------------------------------- */

.lwk-feature {
	padding: 24px;
	border: 1px solid var(--lwk-border);
	border-radius: var(--lwk-radius);
	background: var(--lwk-surface);
	transition: border-color var(--lwk-dur) var(--lwk-ease);
}

.lwk-feature:hover {
	border-color: color-mix(in srgb, var(--lwk-violet) 34%, transparent);
}

.lwk-feature__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin-bottom: 16px;
	border-radius: 10px;
	border: 1px solid color-mix(in srgb, var(--lwk-violet) 30%, transparent);
	background: color-mix(in srgb, var(--lwk-purple) 12%, transparent);
	color: var(--lwk-violet);
}

.lwk-feature__title {
	margin: 0 0 8px;
	font-family: var(--lwk-font-display);
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--lwk-text);
	letter-spacing: -0.01em;
}

.lwk-feature__text {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--lwk-text-2);
}

.lwk-feature--sm { padding: 20px; }

/* -------------------------------------------------------------------------
 * Bundle
 * ---------------------------------------------------------------------- */

.lwk-bundle {
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	align-items: center;
	gap: 44px;
	padding: 36px;
	border: 1px solid var(--lwk-border);
	border-radius: var(--lwk-radius-lg);
	background:
		radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--lwk-purple) 15%, transparent) 0%, transparent 58%),
		var(--lwk-surface);
}

.lwk-bundle__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--lwk-radius);
	border: 1px solid var(--lwk-border);
}

.lwk-bundle__title {
	margin: 0 0 14px;
	font-family: var(--lwk-font-display);
	font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.25rem);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.025em;
	color: var(--lwk-text);
	text-wrap: balance;
}

.lwk-bundle__text {
	margin: 0 0 14px;
	font-size: 1rem;
	line-height: 1.62;
	color: var(--lwk-text-2);
}

.lwk-bundle__text--muted {
	font-size: 0.9375rem;
	color: var(--lwk-text-3);
	margin-bottom: 22px;
}

/* -------------------------------------------------------------------------
 * Documentation
 * ---------------------------------------------------------------------- */

.lwk-docs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	align-items: center;
}

.lwk-docs__title {
	margin: 0 0 14px;
	font-family: var(--lwk-font-display);
	font-size: var(--lwk-fs-h2);
	font-weight: 600;
	line-height: 1.14;
	letter-spacing: -0.025em;
	color: var(--lwk-text);
	text-wrap: balance;
}

.lwk-docs__text {
	margin: 0 0 24px;
	font-size: var(--lwk-fs-lead);
	line-height: 1.6;
	color: var(--lwk-text-2);
	max-width: 46ch;
}

.lwk-docs__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lwk-docs__list li {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 12px 14px;
	border: 1px solid var(--lwk-border);
	border-radius: 10px;
	background: var(--lwk-surface);
	font-size: 0.875rem;
	color: var(--lwk-text-2);
}

.lwk-docs__list .lwk-icon { color: var(--lwk-cyan); width: 15px; height: 15px; }

/* -------------------------------------------------------------------------
 * Final CTA
 * ---------------------------------------------------------------------- */

.lwk-cta {
	position: relative;
	overflow: hidden;
	border-top: 1px solid var(--lwk-border);
	background:
		radial-gradient(70% 120% at 50% 0%, color-mix(in srgb, var(--lwk-purple) 20%, transparent) 0%, transparent 62%),
		var(--lwk-bg);
}

.lwk-cta__inner {
	text-align: center;
	max-width: 720px;
}

.lwk-cta__title {
	margin: 0 0 16px;
	font-family: var(--lwk-font-display);
	font-size: var(--lwk-fs-h2);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.03em;
	color: var(--lwk-text);
	text-wrap: balance;
}

.lwk-cta__text {
	margin: 0 auto 30px;
	max-width: 54ch;
	font-size: var(--lwk-fs-lead);
	line-height: 1.6;
	color: var(--lwk-text-2);
}

.lwk-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
}

/* -------------------------------------------------------------------------
 * Responsive
 * ---------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.lwk-hero__inner { gap: 40px; }
	.lwk-bundle { gap: 32px; padding: 28px; }
	.lwk-docs { gap: 36px; }
}

@media (max-width: 900px) {
	.lwk-hero__inner {
		grid-template-columns: 1fr;
	}

	/* Devices sit below the copy; the cluster needs breathing room for the
	   absolutely-positioned tablet and phone. */
	.lwk-hero__devices {
		min-height: 0;
		margin-top: 12px;
		padding-bottom: 16%;
	}

	.lwk-dev--laptop { width: 82%; margin-inline: auto 0; }

	.lwk-bundle,
	.lwk-docs {
		grid-template-columns: 1fr;
	}

	.lwk-sechead-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 20px;
	}
}

@media (max-width: 600px) {
	.lwk-docs__list { grid-template-columns: 1fr; }
	.lwk-hero__cta .lwk-btn,
	.lwk-cta__actions .lwk-btn { width: 100%; }
	.lwk-card__foot { flex-direction: column; align-items: flex-start; gap: 14px; }
	.lwk-bundle { padding: 20px; }
}

@media (max-width: 420px) {
	.lwk-hero__devices { padding-bottom: 20%; }
	.lwk-dev--laptop { width: 88%; }
}
