/* =====================================================================
 e *'ome · healthcare page
 Visual identity carried over from the partner brochure
 ===================================================================== */

:root {
	--ink:         #0e1a2b;
	--ink-light:   #5a6677;
	--line:        #d9e2e6;
	--accent:      #12b39a;
	--accent-deep: #0b8673;   /* accent darkened for icons and small text */
	--grey:        #b8c2cc;
	--paper:       #ffffff;

	/* brochure "soften()": ~4.4% tint over #f8f8f8 */
	--accent-soft: color-mix(in srgb, var(--accent) 4.4%, #f8f8f8);
	--grey-soft:   color-mix(in srgb, var(--grey) 4.4%, #f8f8f8);
	--accent-edge: color-mix(in srgb, var(--accent) 22%, #ffffff);

	--head-font: "Liberation Sans", Arial, Helvetica, sans-serif;
	--body-font: "Lato", "Liberation Sans", Arial, Helvetica, sans-serif;
	--mono-font: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

	--r-sm: 10px;    /* icon tiles, small boxes */
	--r-md: 14px;    /* cards */
	--r-lg: 20px;    /* large panels */

	/* side margin: half of the first layout's (min 16px on phones) */
	--gutter: max(16px, 2vw, calc((100% - 1120px) / 4 + 24px));
	--topbar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	/* land each section heading ~32px under the sticky bar */
	scroll-padding-top: calc(var(--topbar-h) - clamp(16px, 7vw - 32px, 48px));
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--body-font);
	font-size: 17px;
	line-height: 1.62;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
	margin: 0;
	color: var(--ink);
	text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
a { color: inherit; }

.page {
	padding: 0 var(--gutter);
	overflow-x: clip;   /* keeps the hero glow from widening the page */
}

/* green full stop: always drawn in Lato, whose full stop is round like the wordmark's */
.dot {
	color: var(--accent);
	font-family: "Lato", sans-serif;
	font-weight: 900;
}

.eyebrow {
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--accent-deep);
}

/* section and footer labels: green dash to the left of the text */
.section .eyebrow,
.footer .eyebrow {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
}

.section .eyebrow::before,
.footer .eyebrow::before {
	content: "";
	flex-shrink: 0;
	width: 22px;
	height: 4px;
	border-radius: 2px;
	background: var(--accent);
}

/* ============================== ICONS ============================== */

/* Icon files live in /icons; their colours are set inside each file. */
.icon {
	display: block;
	width: 22px;
	height: 22px;
	flex-shrink: 0;
}

.icon-tile {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	flex-shrink: 0;
	border-radius: var(--r-sm);
	background: var(--accent-soft);
	border: 1px solid var(--accent-edge);
	color: var(--accent-deep);
}

/* ============================== TOP BAR ============================== */

.topbar {
	position: sticky;
	top: 0;
	z-index: 10;
	background: color-mix(in srgb, var(--paper) 90%, transparent);
	backdrop-filter: saturate(1.4) blur(12px);
	-webkit-backdrop-filter: saturate(1.4) blur(12px);
	border-bottom: 1px solid var(--line);
}

.topbar__inner {
	display: grid;
	grid-template-columns: auto auto 1fr;
	align-items: center;
	column-gap: 100px;
	min-height: var(--topbar-h);
	padding: 0 var(--gutter);
}

.topbar__inner > .button { justify-self: end; }

.topbar__logo {
	justify-self: start;
	font-family: "Lato", sans-serif;
	font-weight: 900;
	font-size: 1.6rem;
	letter-spacing: -0.03em;
	text-decoration: none;
	line-height: 1;
	padding: 9px 0;   /* taller tap area without changing the bar's height */
	margin: -9px 0;
}

.topbar__nav {
	display: flex;
	justify-self: start;
	gap: clamp(40px, 3vw, 72px);
	font-family: var(--head-font);
	font-size: 1.20rem;
	font-weight: 700;
	letter-spacing: 0.01em;
}

.topbar__nav a {
	position: relative;
	padding: 6px 0;
	color: var(--ink-light);
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.15s;
}

.topbar__nav a::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 2px;
	border-radius: 1px;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.2s;
}

.topbar__nav a:hover { color: var(--ink); }
.topbar__nav a:hover::after { transform: scaleX(1); }

/* ============================== BUTTONS ============================== */

.button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	padding: 10px 18px;
	border-radius: var(--r-sm);
	background: var(--ink);
	color: #fff;
	font-family: var(--head-font);
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s, color 0.15s;
}

.button:hover { background: var(--accent); color: var(--ink); }

.button--large {
	padding: 14px 26px;
	font-size: 1rem;
}

.textlink {
	font-family: var(--head-font);
	font-weight: 700;
	font-size: 0.98rem;
	text-decoration: none;
	border-bottom: 2px solid var(--accent);
	padding-bottom: 2px;
	transition: color 0.15s;
}

.textlink:hover { color: var(--accent-deep); }

.button:focus-visible,
.textlink:focus-visible,
.topbar__nav a:focus-visible,
.topbar__logo:focus-visible,
.hero__scroll:focus-visible,
.footer a:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 4px;
}

.button:focus-visible { border-radius: var(--r-sm); }

/* ============================== HERO ============================== */

.hero {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 6.5fr);
	align-items: center;
	gap: 40px clamp(24px, 3vw, 44px);
	padding: clamp(32px, 5vw, 64px) 0 clamp(40px, 5vw, 64px);
	/* fill the first screen below the top bar, so What starts below the fold */
	min-height: calc(100vh - var(--topbar-h));
	min-height: calc(100svh - var(--topbar-h));
}

.hero__copy .eyebrow { margin-bottom: 14px; }

.wordmark {
	font-family: "Lato", sans-serif;
	font-weight: 900;
	font-size: clamp(4rem, 8.4vw, 7.25rem);
	line-height: 0.9;
	letter-spacing: -0.035em;
}

.hero__tagline {
	margin-top: clamp(24px, 3vw, 36px);
	padding: 4px 0 4px 23px;   /* indent kept from the old 3px green bar + 20px gap */
	font-family: var(--head-font);
}

.hero__tagline p {
	font-size: clamp(1.1rem, 1.6vw, 1.28rem);
	font-weight: 500;
	line-height: 1.35;
}

.hero__tagline p + p { margin-top: 8px; }

.hero__tagline .tagline--big {
	margin-top: 12px;
	font-size: clamp(1.5rem, 2.4vw, 1.95rem);
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--accent);
}

/* scroll cue: the How chevrons turned downwards, aligned with the tagline */
.hero__scroll {
	display: inline-block;
	padding: 11px;               /* 44px tap area around the 22px icon */
	margin: 17px 0 -11px 12px;   /* = 28px / 23px visual offset minus the padding */
	border-radius: 4px;
	transition: transform 0.2s;
}

.hero__scroll img {
	display: block;
	width: 22px;
	height: 22px;
	transform: rotate(90deg);
}

.hero__scroll:hover { transform: translateY(3px); }

/* the plan sits on a soft accent glow, framed like a mounted drawing */
.hero__visual {
	position: relative;
	margin: 0;
	isolation: isolate;
}

.hero__visual::before {
	content: "";
	position: absolute;
	inset: -12% -8% -14% -10%;
	z-index: -1;
	background:
	radial-gradient(closest-side at 62% 45%, color-mix(in srgb, var(--accent) 16%, transparent), transparent),
	radial-gradient(closest-side at 25% 80%, color-mix(in srgb, var(--accent) 8%, transparent), transparent);
	filter: blur(8px);
	pointer-events: none;
}

.plan {
	display: block;
	width: 100%;
	height: auto;
	padding: 8px;
	border-radius: var(--r-lg);
	background: var(--paper);
	border: 1px solid var(--accent-edge);
	box-shadow:
	0 1px 2px rgb(14 26 43 / 0.04),
	0 12px 28px -8px rgb(14 26 43 / 0.12),
	0 32px 64px -24px rgb(11 134 115 / 0.18);
}

/* ============================== SECTIONS ============================== */

.section {
	padding: clamp(48px, 6vw, 88px) 0 0;
}

/* heading + hairline rule, as in the brochure's section() */
.section__title {
	display: flex;
	align-items: center;
	gap: 20px;
	font-family: var(--head-font);
	font-size: clamp(1.7rem, 3vw, 2.3rem);
	font-weight: 700;
	letter-spacing: -0.015em;
	line-height: 1.2;
}

/* the heading text sits in a <span> so its green full stop stays attached */
.section__title::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--line);
}

.lead {
	max-width: 80ch;   /* line length: raise for longer lines, "none" for full width */
	margin-top: clamp(16px, 2vw, 24px);
	font-size: clamp(1.06rem, 1.5vw, 1.2rem);
	line-height: 1.6;
	color: var(--ink-light);
}

.lead strong { color: var(--ink); font-weight: 700; }

/* ============================== WHAT: FEATURES ============================== */

.features {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(32px, 3.5vw, 48px) clamp(24px, 3vw, 44px);
	margin: clamp(32px, 4vw, 52px) 0 0;
	padding: 0;
	list-style: none;
}

/* hairline with a green start (B2): the brochure's dash, stretched into a rule */
.feature {
	position: relative;
	padding-top: 20px;
	border-top: 1px solid var(--line);
}

.feature::before {
	content: "";
	position: absolute;
	top: -2px;
	left: 0;
	width: 42px;
	height: 3px;
	border-radius: 2px;
	background: var(--accent);
}

.feature h3 {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
	font-family: var(--head-font);
	font-size: 1.08rem;
	font-weight: 700;
	line-height: 1.3;
}

.feature p {
	font-size: 0.95rem;
	color: var(--ink-light);
}

/* ============================== WHY: THREE COLUMNS ============================== */

/* heavy rule on top, hairlines between columns, dash bullets */
.add-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	width: 88%;   /* a little narrower than the page, centred */
	margin: clamp(32px, 4vw, 48px) auto 0;
	border-top: 4px solid var(--ink);
}

.add {
	padding: 32px 32px 8px 0;
}

.add + .add {
	padding-left: 32px;
	border-left: 1px solid var(--line);
}

/* header (label, heading, paragraph) sits on a faint dot grid that fades
   out downwards, filling the column from the heavy rule to the hairline */
.add__head {
	position: relative;
	isolation: isolate;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--line);   /* hairline closing the header */
}

.add__head::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: -32px -32px 0 -32px;   /* reach the column edges through the padding */
	background:
		radial-gradient(color-mix(in srgb, var(--accent) 24%, transparent) 1px,
		transparent 1.4px) 0 0 / 14px 14px;
	-webkit-mask-image: linear-gradient(to bottom, #000, rgb(0 0 0 / 0.5) 58%, transparent);
	mask-image: linear-gradient(to bottom, #000, rgb(0 0 0 / 0.5) 58%, transparent);
	pointer-events: none;
}

.add:first-child .add__head::before { left: 0; }   /* first column has no left padding */

/* icon + mono label on one line */
.add__top {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 18px;
}

.add__top .icon {
	width: 26px;
	height: 26px;
}

.add .num {
	font-family: var(--mono-font);
	font-size: 0.8rem;
	color: var(--accent-deep);
}

.add h3 {
	margin-bottom: 12px;
	font-family: var(--head-font);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

/* bullets follow the header's hairline without lines between them */
.add p {
	font-size: 0.97rem;
	color: var(--ink-light);
}

.add ul {
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.93rem;
	color: var(--ink-light);
}

.add li {
	position: relative;
	padding: 6px 0 6px 22px;
}

.add li::before {
	content: "";
	position: absolute;
	top: 15px;
	left: 0;
	width: 10px;
	height: 3px;
	border-radius: 2px;
	background: var(--accent);
}

/* ============================== HOW: FLOW ============================== */

.flow {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 36px;
	margin: clamp(32px, 4vw, 48px) 0 0;
	padding: 0;
	list-style: none;
}

.flow li {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 20px 20px 22px;
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	background: var(--paper);
	transition: background 0.2s, border-color 0.2s;
}

.flow li:hover {
	background: var(--accent-soft);
	border-color: var(--accent);
}

/* double chevron centred in the gap to the next card */
.flow li:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 50%;
	right: -18px;              /* half the gap */
	width: 20px;
	height: 20px;
	transform: translate(50%, -50%);
	background: url("icons/double-chevron.svg") center / 20px no-repeat;
}

.flow__icon {
	width: 28px;
	height: 28px;
	margin-bottom: 14px;
}

.flow__step {
	margin-bottom: 2px;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--accent-deep);
}

.flow h3 {
	font-family: var(--head-font);
	font-size: 1.02rem;
	font-weight: 700;
	line-height: 1.35;
}

.flow__desc {
	font-size: 0.86rem;
	line-height: 1.55;
	color: var(--ink-light);
}

/* ============================== FOOTER ============================== */

.footer {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: end;
	gap: 32px clamp(32px, 6vw, 80px);
	margin-top: clamp(24px, 4vw, 48px);
	padding: 44px 0 56px;
	border-top: 1px solid var(--line);
}

.footer__cta h2 {
	font-family: var(--head-font);
	font-size: clamp(1.7rem, 3.4vw, 2.3rem);
	font-weight: 700;
	letter-spacing: -0.015em;
	line-height: 1.2;
	margin: 0 0 10px;
}

.footer__cta > p:not(.eyebrow) {
	max-width: 60ch;
	font-size: 0.97rem;
	color: var(--ink-light);
}

.footer__cta .button { margin-top: 24px; }

.footer__contact {
	display: flex;
	flex-direction: column;
	gap: 6px;
	border-left: 3px solid var(--accent);
	padding: 4px 0 4px 18px;
}

.footer__email {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--head-font);
	font-weight: 700;
	font-size: 1.15rem;
	text-decoration: none;
}

.footer__email .icon { width: 20px; height: 20px; }

.footer__url {
	font-size: 0.95rem;
	color: var(--ink-light);
	text-decoration: none;
}

.footer__contact a {
	padding: 6px 0;   /* taller tap areas, same spacing */
	margin: -6px 0;
}

.footer__contact a:hover { color: var(--accent-deep); }

/* ============================== RESPONSIVE ============================== */

@media (max-width: 960px) {
	.hero { grid-template-columns: 1fr; }
	.hero__visual { max-width: 760px; }
	.features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.flow li:nth-child(2)::after { display: none; }
	.add-grid { grid-template-columns: 1fr; width: 100%; }
	.add,
	.add + .add {
		padding: 28px 0;
		border-left: 0;
	}
	.add + .add { border-top: 1px solid var(--line); }
	.add p,
	.add ul { max-width: 64ch; }   /* readable line length when the columns stack */

	.add__head::before,
	.add:first-child .add__head::before { inset: -28px 0 0 0; }
}

@media (max-width: 760px) {
	body { font-size: 16px; }
	.footer { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
	:root { --topbar-h: 104px; }
	.topbar__inner {
		grid-template-columns: 1fr auto;
		column-gap: 16px;   /* the desktop 100px gap pushed the button off small screens */
		padding-top: 10px;
	}
	/* top-bar button: smaller and outlined on phones, so it doesn't shout */
	.topbar__inner > .button {
		position: relative;
		padding: 6px 12px;
		font-size: 0.76rem;
		background: transparent;
		color: var(--ink);
		box-shadow: inset 0 0 0 1.5px var(--ink);
	}
	.topbar__inner > .button::after {   /* invisible 44px-tall tap area */
		content: "";
		position: absolute;
		inset: -7px -4px;
	}
	.topbar__inner > .button:hover {
		background: var(--accent);
		box-shadow: inset 0 0 0 1.5px var(--accent);
	}
	/* hero: text and plan stay together as one group, centred on the screen
	   (otherwise the two rows stretch to fill the screen and drift apart) */
	.hero {
		align-content: center;
		row-gap: 24px;
	}
	.hero__scroll { margin-top: 5px; }   /* 16px visible gap under the tagline */
	.footer { padding-bottom: 28px; }   /* less empty space under the contact block */
	/* footer button: outlined like the top-bar one, a little larger as the final call */
	.footer__cta .button {
		margin-top: 20px;
		padding: 10px 18px;
		font-size: 0.9rem;
		background: transparent;
		color: var(--ink);
		box-shadow: inset 0 0 0 1.5px var(--ink);
	}
	.footer__cta .button:hover {
		background: var(--accent);
		box-shadow: inset 0 0 0 1.5px var(--accent);
	}
	.topbar__nav {
		grid-column: 1 / -1;
		grid-row: 2;
		justify-self: start;
		padding: 6px 0 8px;
	}
	.features { grid-template-columns: 1fr; gap: 32px; }
	.flow { grid-template-columns: 1fr; }
	.flow li:nth-child(2)::after { display: block; }
	.flow li:not(:last-child)::after {
		top: auto;
		right: 50%;
		bottom: -18px;
		transform: translate(50%, 50%) rotate(90deg);
	}
	/* the heading text sits in a <span> so its green full stop stays attached */
	.section__title::after { display: none; }   /* no room for the rule beside the heading */
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}
