/**
 * Pilbe - Home Management landing page (/home-management/).
 *
 * Ground-up redesign (the "dashboard-preview" direction) crafted through the
 * impeccable skill. Scoped to the phome- prefix; depends on pilbe-tokens so
 * every --pilbe-* var resolves.
 *
 * SYSTEM LOCKS HELD HERE
 *   - COLOUR: one accent (sky-blue brand). Icon medallions, links, chips and the
 *     EPC badge use brand-*. The reserved --pilbe-gradient appears ONLY on the
 *     single primary CTA per viewport. Green appears in exactly one place: the
 *     semantic "Low crime" status (success-700), which clears AA. No second
 *     decorative accent family anywhere.
 *   - SHAPE: surfaces/cards = radius-xl (16px), inner chips/tiles = radius-md
 *     (8px), buttons = pill. Nothing mixed.
 *   - THEME: the whole page is light. No section inverts.
 *   - MOTION: CSS hover + a single hero entrance + a scroll-driven reveal where
 *     supported. All gated by prefers-reduced-motion.
 *
 * COLOUR DISCIPLINE: no new hex literals, no new linear gradients. Soft glows
 * use rgba() of EXISTING token colours (brand-500 #25ADDE -> rgba(37,173,222),
 * gradient-start #3F65F3 -> rgba(63,101,243)). Lato 400/700/900 only. UK English
 * copy, zero em-dashes.
 */

/* =====================================================================
   Layout primitives
   ===================================================================== */
.phome-page {
	background: var(--pilbe-bg-surface);
	color: var(--pilbe-text-primary);
	font-family: var(--pilbe-font);
	font-weight: 400;
	line-height: 1.55;
	overflow-x: hidden;
}

.phome-container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding-inline: clamp(20px, 5vw, 40px);
}

.phome-section { padding-block: clamp(64px, 10vw, 120px); }

.phome-h2 {
	font-weight: 900;
	font-size: clamp(28px, 4vw, 42px);
	line-height: 1.12;
	letter-spacing: -0.025em;
	color: var(--pilbe-text-primary);
	margin: 0 0 16px;
	text-wrap: balance;
}

.phome-h2--center { text-align: center; max-width: 22ch; margin-inline: auto; }

.phome-lede {
	font-size: var(--pilbe-text-lg);
	line-height: 1.65;
	color: var(--pilbe-text-primary);
	margin: 0;
}

.phome-lede--center { text-align: center; max-width: 56ch; margin-inline: auto; }

/* Eyebrow: rationed to ONE on the page (the capability section). */
.phome-eyebrow {
	display: inline-block;
	font-size: var(--pilbe-text-sm);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--pilbe-brand-800);
	margin-bottom: 14px;
}

/* Shared icon medallion: the ONE accent, used identically everywhere. */
.phome-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	flex: none;
	border-radius: var(--pilbe-radius-md);
	background: var(--pilbe-brand-50);
	color: var(--pilbe-brand-600);
	font-size: 22px;
}

/* =====================================================================
   Buttons (pill shape lock)
   ===================================================================== */
.phome-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-family: var(--pilbe-font);
	font-weight: 700;
	font-size: 15px;
	line-height: 1;
	padding: 15px 26px;
	border: none;
	border-radius: var(--pilbe-radius-pill);
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	transition: transform var(--pilbe-duration-base) var(--pilbe-ease-standard),
	            background var(--pilbe-duration-base) var(--pilbe-ease-standard),
	            color var(--pilbe-duration-base) var(--pilbe-ease-standard),
	            box-shadow var(--pilbe-duration-base) var(--pilbe-ease-standard);
}

.phome-btn--lg { padding: 17px 30px; font-size: 16px; }
.phome-btn--sm { padding: 11px 18px; font-size: 14px; }

/* The ONLY gradient on the page: the primary CTA. */
.phome-btn--primary {
	background: var(--pilbe-gradient);
	color: var(--pilbe-text-inverse);
	box-shadow: var(--pilbe-shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.phome-btn--primary:hover {
	background: var(--pilbe-gradient-hover);
	color: var(--pilbe-text-inverse);
	transform: translateY(-2px);
	box-shadow: 0 16px 32px -8px rgba(63, 101, 243, 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.phome-btn--primary:active { transform: translateY(0); }

.phome-btn--ghost {
	background: var(--pilbe-bg-surface);
	border: 1px solid var(--pilbe-border-strong);
	color: var(--pilbe-text-primary);
}

.phome-btn--ghost:hover {
	background: var(--pilbe-bg-subtle);
	border-color: var(--pilbe-brand-400);
	color: var(--pilbe-brand-700);
}

/* Hero pill (no decorative status dot). */
.phome-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 16px;
	border-radius: var(--pilbe-radius-pill);
	font-size: var(--pilbe-text-sm);
	font-weight: 700;
	background: var(--pilbe-brand-50);
	color: var(--pilbe-brand-800);
}

.phome-pill i { font-size: 12px; }

/* =====================================================================
   Hero (split: copy + live home-record card)
   ===================================================================== */
.phome-hero {
	position: relative;
	background: var(--pilbe-bg-surface);
	padding-block: clamp(48px, 7vw, 96px);
	overflow: hidden;
	isolation: isolate;
}

.phome-hero__glow {
	position: absolute;
	top: -32%;
	right: -12%;
	width: min(760px, 92%);
	height: 660px;
	background: radial-gradient(ellipse at center, rgba(37, 173, 222, 0.16) 0%, transparent 68%);
	pointer-events: none;
	z-index: -1;
}

.phome-hero__grid {
	display: grid;
	grid-template-columns: 1.02fr 0.98fr;
	align-items: center;
	gap: clamp(36px, 6vw, 80px);
}

.phome-hero__copy { max-width: 560px; }

.phome-hero__title {
	font-weight: 900;
	font-size: clamp(40px, 6vw, 66px);
	line-height: 1.02;
	letter-spacing: -0.035em;
	color: var(--pilbe-text-primary);
	margin: 18px 0 0;
	text-wrap: balance;
}

.phome-hero__title-accent { color: var(--pilbe-brand-600); }

.phome-hero__lede {
	font-size: var(--pilbe-text-lg);
	line-height: 1.6;
	color: var(--pilbe-text-primary);
	max-width: 48ch;
	margin: 20px 0 0;
}

.phome-hero__ctas {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 30px;
}

.phome-hero__media {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* =====================================================================
   The home-record card (the product, as the hero image)
   ===================================================================== */
.phome-record {
	width: 100%;
	max-width: 420px;
	background: var(--pilbe-bg-surface);
	border: 1px solid var(--pilbe-border-default);
	border-radius: var(--pilbe-radius-xl);
	box-shadow: var(--pilbe-shadow-xl);
	padding: clamp(18px, 3vw, 24px);
}

.phome-record__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: var(--pilbe-text-sm);
	font-weight: 700;
}

.phome-record__brand { display: inline-flex; align-items: center; gap: 8px; color: var(--pilbe-brand-700); }
.phome-record__verified { display: inline-flex; align-items: center; gap: 6px; color: var(--pilbe-success-700); }

.phome-record__head {
	margin-top: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--pilbe-border-default);
}

.phome-record__addr {
	margin: 0;
	font-weight: 900;
	font-size: 22px;
	letter-spacing: -0.02em;
	color: var(--pilbe-text-primary);
}

.phome-record__place {
	margin: 4px 0 0;
	font-size: var(--pilbe-text-sm);
	color: var(--pilbe-text-secondary);
}

.phome-record__tiles {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-top: 16px;
}

.phome-record__tile {
	background: var(--pilbe-bg-subtle);
	border-radius: var(--pilbe-radius-md);
	padding: 12px 14px;
}

.phome-record__k {
	display: block;
	font-size: var(--pilbe-text-xs);
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--pilbe-text-secondary);
}

.phome-record__v {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
	font-size: 20px;
	font-weight: 900;
	letter-spacing: -0.02em;
	color: var(--pilbe-text-primary);
}

.phome-epc {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: var(--pilbe-radius-sm);
	background: var(--pilbe-brand-50);
	color: var(--pilbe-brand-800);
	font-size: 14px;
	font-weight: 900;
}

.phome-record__rows { margin: 16px 0 0; }

.phome-record__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 0;
	font-size: var(--pilbe-text-sm);
	border-top: 1px solid var(--pilbe-border-default);
}

.phome-record__row:first-child { border-top: none; }
.phome-record__row dt { color: var(--pilbe-text-secondary); margin: 0; }
.phome-record__row dd { margin: 0; font-weight: 700; color: var(--pilbe-text-primary); }

.phome-record__alert {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 16px;
	padding: 12px 14px;
	border-radius: var(--pilbe-radius-md);
	background: var(--pilbe-brand-50);
	font-size: var(--pilbe-text-sm);
	color: var(--pilbe-text-primary);
}

.phome-record__alert i { color: var(--pilbe-brand-600); font-size: 15px; }
.phome-record__alert strong { font-weight: 700; }

.phome-record__note {
	max-width: 420px;
	margin: 14px 0 0;
	font-size: var(--pilbe-text-xs);
	line-height: 1.5;
	text-align: center;
	color: var(--pilbe-text-secondary);
}

/* =====================================================================
   Data-provenance strip (real sources, not vanity metrics)
   ===================================================================== */
.phome-sources {
	border-top: 1px solid var(--pilbe-border-default);
	border-bottom: 1px solid var(--pilbe-border-default);
	background: var(--pilbe-bg-page);
	padding-block: clamp(28px, 4vw, 40px);
}

.phome-sources__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 16px clamp(20px, 4vw, 44px);
}

.phome-sources__lead {
	margin: 0;
	font-size: var(--pilbe-text-sm);
	font-weight: 900;
	letter-spacing: -0.01em;
	color: var(--pilbe-text-primary);
}

.phome-sources__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px clamp(18px, 3vw, 32px);
	list-style: none;
	margin: 0;
	padding: 0;
}

.phome-sources__list li {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-size: var(--pilbe-text-sm);
	font-weight: 700;
	color: var(--pilbe-text-primary);
}

.phome-sources__list i { color: var(--pilbe-brand-600); font-size: 15px; }

/* =====================================================================
   What you get (alternating rows, real UI snippets)
   ===================================================================== */
.phome-caps__head { text-align: center; margin-bottom: clamp(44px, 6vw, 72px); }

.phome-cap {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: clamp(28px, 5vw, 72px);
}

.phome-cap + .phome-cap { margin-top: clamp(48px, 7vw, 96px); }

/* Zig-zag: even rows place the visual first. */
.phome-cap--reverse .phome-cap__copy { order: 2; }
.phome-cap--reverse .phome-cap__visual { order: 1; }

.phome-cap__copy { max-width: 460px; }

.phome-cap__title {
	font-weight: 900;
	font-size: clamp(22px, 2.6vw, 28px);
	line-height: 1.18;
	letter-spacing: -0.02em;
	color: var(--pilbe-text-primary);
	margin: 18px 0 10px;
}

.phome-cap__text {
	font-size: var(--pilbe-text-lg);
	line-height: 1.6;
	color: var(--pilbe-text-secondary);
	margin: 0;
	max-width: 46ch;
}

.phome-cap__visual { display: flex; justify-content: center; }

/* The product snippet card inside each capability row. */
.phome-snip {
	width: 100%;
	max-width: 420px;
	background: var(--pilbe-bg-surface);
	border: 1px solid var(--pilbe-border-default);
	border-radius: var(--pilbe-radius-xl);
	box-shadow: var(--pilbe-shadow-md);
	padding: 20px 22px;
}

.phome-snip__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 11px 0;
	font-size: var(--pilbe-text-base);
	border-top: 1px solid var(--pilbe-border-default);
}

.phome-snip__row:first-child { border-top: none; padding-top: 0; }
.phome-snip__row span { color: var(--pilbe-text-secondary); }
.phome-snip__row strong { font-weight: 700; color: var(--pilbe-text-primary); }
.phome-snip__good { color: var(--pilbe-success-700) !important; }

.phome-snip__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 14px;
	margin-bottom: 6px;
	border-bottom: 1px solid var(--pilbe-border-default);
	font-size: var(--pilbe-text-sm);
	font-weight: 700;
}

.phome-snip__bar > span:first-child { display: inline-flex; align-items: center; gap: 8px; color: var(--pilbe-text-primary); }
.phome-snip__bar i { color: var(--pilbe-brand-600); }

.phome-snip__tag {
	padding: 4px 10px;
	border-radius: var(--pilbe-radius-pill);
	background: var(--pilbe-brand-50);
	color: var(--pilbe-brand-800);
	font-size: var(--pilbe-text-xs);
	letter-spacing: 0.02em;
}

.phome-snip__docs { list-style: none; margin: 0; padding: 0; }

.phome-snip__docs li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 0;
	font-size: var(--pilbe-text-base);
	font-weight: 700;
	color: var(--pilbe-text-primary);
	border-top: 1px solid var(--pilbe-border-default);
}

.phome-snip__docs li:first-child { border-top: none; }
.phome-snip__docs i { color: var(--pilbe-text-secondary); font-size: 15px; }

.phome-snip__remind {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 0;
	font-size: var(--pilbe-text-base);
	border-top: 1px solid var(--pilbe-border-default);
}

.phome-snip__remind:first-child { border-top: none; padding-top: 2px; }

.phome-snip__dot {
	width: 10px;
	height: 10px;
	flex: none;
	border-radius: 50%;
	border: 2px solid var(--pilbe-border-strong);
}

.phome-snip__dot--soon { background: var(--pilbe-brand-500); border-color: var(--pilbe-brand-500); }

.phome-snip__r-name { font-weight: 700; color: var(--pilbe-text-primary); }
.phome-snip__r-when { margin-left: auto; font-size: var(--pilbe-text-sm); color: var(--pilbe-text-secondary); }

.phome-snip__save {
	display: flex;
	align-items: center;
	gap: 9px;
	margin-top: 14px;
	padding: 11px 14px;
	border-radius: var(--pilbe-radius-md);
	background: var(--pilbe-brand-50);
	font-size: var(--pilbe-text-sm);
	font-weight: 700;
	color: var(--pilbe-brand-800);
}

/* =====================================================================
   How it works (step flow with a connecting line)
   ===================================================================== */
.phome-how { background: var(--pilbe-bg-page); border-top: 1px solid var(--pilbe-border-default); }

.phome-how__head { text-align: center; margin-bottom: clamp(44px, 5vw, 64px); }

.phome-how__flow {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(24px, 4vw, 48px);
	position: relative;
}

.phome-how__flow::before {
	content: "";
	position: absolute;
	top: 26px;
	left: 16%;
	right: 16%;
	height: 2px;
	background: var(--pilbe-border-strong);
	z-index: 0;
}

.phome-how__step { position: relative; z-index: 1; text-align: center; }

.phome-how__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--pilbe-brand-500);
	color: var(--pilbe-text-inverse);
	font-weight: 900;
	font-size: 20px;
	box-shadow: 0 6px 16px rgba(37, 173, 222, 0.30);
	margin-bottom: 18px;
}

.phome-how__title {
	font-weight: 700;
	font-size: var(--pilbe-text-h4);
	line-height: var(--pilbe-lh-h4);
	margin: 0 0 6px;
}

.phome-how__text {
	font-size: var(--pilbe-text-base);
	line-height: 1.55;
	color: var(--pilbe-text-secondary);
	margin: 0 auto;
	max-width: 30ch;
}

/* =====================================================================
   Trust and privacy
   ===================================================================== */
.phome-trust__grid {
	display: grid;
	grid-template-columns: 0.85fr 1.15fr;
	gap: clamp(32px, 6vw, 80px);
	align-items: start;
}

.phome-trust__intro { max-width: 30ch; }
.phome-trust__intro .phome-h2 { margin-bottom: 14px; }

.phome-trust__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 28px; }

.phome-trust__item { display: flex; gap: 18px; }

.phome-trust__h {
	font-weight: 700;
	font-size: var(--pilbe-text-h4);
	line-height: var(--pilbe-lh-h4);
	margin: 4px 0 6px;
}

.phome-trust__p {
	font-size: var(--pilbe-text-base);
	line-height: 1.6;
	color: var(--pilbe-text-secondary);
	margin: 0;
	max-width: 52ch;
}

/* =====================================================================
   Closing CTA band
   ===================================================================== */
.phome-cta {
	position: relative;
	background: var(--pilbe-brand-50);
	overflow: hidden;
	isolation: isolate;
}

.phome-cta__glow {
	position: absolute;
	bottom: -45%;
	left: 50%;
	transform: translateX(-50%);
	width: min(760px, 120%);
	height: 540px;
	background: radial-gradient(ellipse at center, rgba(63, 101, 243, 0.16) 0%, transparent 68%);
	pointer-events: none;
	z-index: -1;
}

.phome-cta__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	text-align: center;
}

.phome-cta__trust {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 28px;
	justify-content: center;
	padding: 0;
	margin: 4px 0 0;
}

.phome-cta__trust li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: var(--pilbe-text-sm);
	font-weight: 700;
	color: var(--pilbe-text-primary);
}

.phome-cta__trust i { color: var(--pilbe-brand-600); }

.phome-cta__legal {
	margin: 12px 0 0;
	font-size: var(--pilbe-text-xs);
	color: var(--pilbe-neutral-600);
}

/* =====================================================================
   Sticky mobile bar
   ===================================================================== */
.phome-sticky {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: var(--pilbe-z-sticky);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 12px 18px;
	background: var(--pilbe-bg-surface);
	border-top: 1px solid var(--pilbe-border-default);
	box-shadow: var(--pilbe-shadow-lg);
}

.phome-sticky__copy { display: flex; flex-direction: column; min-width: 0; }
.phome-sticky__copy strong { font-weight: 700; font-size: var(--pilbe-text-base); color: var(--pilbe-text-primary); }
.phome-sticky__copy span { font-size: var(--pilbe-text-xs); color: var(--pilbe-text-secondary); }

@media (min-width: 768px) { .phome-sticky { display: none; } }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 900px) {
	/* Hero collapses; copy + CTA lead so the primary action stays in view. */
	.phome-hero__grid { grid-template-columns: 1fr; }
	.phome-hero__copy { max-width: 100%; order: 1; }
	.phome-hero__media { order: 2; }
	.phome-record, .phome-record__note { max-width: 460px; }

	/* Capability rows stack; visual always follows its copy. */
	.phome-cap { grid-template-columns: 1fr; gap: 24px; }
	.phome-cap__copy, .phome-cap--reverse .phome-cap__copy { order: 1; max-width: 100%; }
	.phome-cap__visual, .phome-cap--reverse .phome-cap__visual { order: 2; justify-content: flex-start; }
	.phome-snip { max-width: 460px; }

	/* Trust stacks. */
	.phome-trust__grid { grid-template-columns: 1fr; gap: 28px; }
	.phome-trust__intro { max-width: 100%; }

	/* Step flow: drop the connecting line, stack. */
	.phome-how__flow { grid-template-columns: 1fr; gap: 36px; }
	.phome-how__flow::before { display: none; }
}

@media (max-width: 560px) {
	.phome-hero__ctas .phome-btn { width: 100%; }
	.phome-sources__inner { justify-content: flex-start; }
	/* Room for the sticky bar at the foot of the scroll. */
	.phome-page { padding-bottom: 76px; }
}

/* =====================================================================
   Motion: hero entrance + scroll reveal. All gated by reduced-motion.
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) {
	@keyframes phome-rise {
		from { opacity: 0; transform: translateY(16px); }
		to   { opacity: 1; transform: translateY(0); }
	}

	/* Hero copy + record card enter once on load (above the fold). */
	.phome-hero__copy > * {
		animation: phome-rise 0.6s var(--pilbe-ease-entrance) backwards;
	}
	.phome-hero__copy > *:nth-child(2) { animation-delay: 0.06s; }
	.phome-hero__copy > *:nth-child(3) { animation-delay: 0.12s; }
	.phome-hero__copy > *:nth-child(4) { animation-delay: 0.18s; }
	.phome-hero__media { animation: phome-rise 0.7s var(--pilbe-ease-entrance) 0.12s backwards; }

	/* Progressive scroll reveal where supported. No JS, no scroll listeners;
	   the content is visible by default and simply rises into place. */
	@supports (animation-timeline: view()) {
		.phome-cap,
		.phome-how__step,
		.phome-trust__item {
			animation: phome-rise linear both;
			animation-timeline: view();
			animation-range: entry 0% cover 20%;
		}
	}
}
