/* Landing Page template (offer + thank-you variants).
   Reuses .hl-split / .hl-card / .hl-form* / .hl-btn tokens from main.css —
   only landing-specific layout and CF7 styling live here. */

.hl-landing-hero {
	position: relative;
	background: linear-gradient(115deg, var(--hl-navy) 0%, var(--hl-grad-mid) 55%, var(--hl-blue) 100%);
	color: #fff;
	padding: 72px 0 88px;
	overflow: hidden;
}

.hl-landing-hero__split {
	position: relative;
	align-items: center;
}

.hl-landing-hero__main .hl-eyebrow { color: var(--hl-sky); }

.hl-landing-hero__title { color: #fff; margin-top: 16px; }

.hl-landing-hero__lead {
	max-width: 620px;
	font-size: 19px;
	line-height: 1.8;
	color: rgba(255, 255, 255, 0.84);
	margin: 20px 0 0;
}

.hl-landing-hero__bullets {
	list-style: none;
	margin: 28px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-width: 560px;
}
.hl-landing-hero__bullets li {
	position: relative;
	padding-left: 30px;
	font-size: 16px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.9);
}
.hl-landing-hero__bullets li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 7px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--hl-blue);
}

.hl-landing-hero__image {
	display: block;
	max-width: 280px;
	width: 100%;
	height: auto;
	border-radius: var(--hl-radius);
	margin-top: 36px;
	box-shadow: var(--hl-shadow-panel);
}

/* On a thank-you page the cover is a reminder of what was requested, not the
   offer itself — the confirmation panel beside it is the point, so the cover
   is scaled back rather than competing with it. */
.hl-landing-hero--ty .hl-landing-hero__image {
	max-width: 180px;
	margin-top: 28px;
}

/* ---- Right column: form / confirmation panel ---- */

.hl-landing-hero__aside { width: 100%; }

/* Webinar thank-you: the replay takes the hero's right column (where the
   confirmation card sits on the ebook pages), so that column gets more of the
   row than a form card needs — the video is the point of the page. The player
   itself reuses the .hl-la__video classes from the article below. */
.hl-landing-hero__split--video { align-items: center; }
.hl-landing-hero__split--video .hl-split__aside { flex: 1.2 1 520px; }
.hl-landing-hero__video { width: 100%; }

.hl-landing-form,
.hl-landing-panel {
	background: #fff;
	color: var(--hl-navy);
	border: none;
	border-radius: var(--hl-radius-btn);
	box-shadow: var(--hl-shadow-panel);
	padding: 40px;
}

.hl-landing-panel__title {
	font-family: var(--hl-serif);
	font-weight: 400;
	font-size: clamp(28px, 4vw, 36px);
	line-height: 1.1;
	letter-spacing: -0.02em;
	margin: 14px 0 0;
	color: var(--hl-navy);
}

.hl-landing-panel__body {
	font-size: 16px;
	line-height: 1.75;
	color: var(--hl-body);
	margin: 16px 0 0;
}

.hl-landing-panel__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 32px;
}

/* ---- HubSpot variant ----
   The shared .hl-hsform rules in main.css already match the CF7 look; these
   only restate where this panel deliberately differs from the sitewide form:
   a slightly roomier field, a shorter textarea, and no top margin on the
   target (the card itself supplies the padding, and there is no heading above
   the form here to space away from). */

.hl-landing-form .hl-hsform__target { margin-top: 0; }

/* !important for the same reason as the shared .hl-hsform rules in main.css:
   HubSpot's injected per-form stylesheet out-specifies ours. */
.hl-landing-form .hl-hsform .hs-input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="image"]) {
	padding: 13px 16px !important;
	border-radius: var(--hl-radius) !important;
}

.hl-landing-form .hl-hsform textarea.hs-input {
	height: 76px !important;
	min-height: 76px !important;
	line-height: 1.6 !important;
}

.hl-landing-form .hl-hsform .hs-input[type="checkbox"],
.hl-landing-form .hl-hsform .hs-input[type="radio"] {
	width: 24px !important;
	height: 24px !important;
	margin: 0 8px 0 0;
	display: inline-block;
}

.hl-landing-form .hl-hsform .hs-button {
	display: inline-block;
	padding: 15px 32px;
	border-radius: var(--hl-radius-btn);
}

/* Responsive: mirror .hl-split's own wrap behavior (no extra breakpoint
   needed — flex-wrap with the aside's 400px basis already stacks under
   ~900px); just tighten spacing once stacked. */
@media (max-width: 900px) {
	.hl-landing-hero { padding-top: 52px; padding-bottom: 60px; }
	.hl-landing-form,
	.hl-landing-panel { padding: 32px 24px; }
}

/* ==========================================================================
   Long-form article body: sticky table of contents + per-section sticky
   media. Parsed at render time from real <h2><a name> anchors + <img>/
   <iframe> already in body_content — see inc/site/landing-article.php.
   ========================================================================== */

.hl-la { padding-top: 72px; }

.hl-la__inner {
	max-width: var(--hl-max);
	margin: 0 auto;
	padding: 0 var(--hl-gutter);
	display: grid;
	grid-template-columns: minmax(0, 1fr) 240px; /* content left, TOC right */
	gap: 56px;
	align-items: start;
}

/* No TOC (short page, single section): just the content column.

   The gutter is a fixed-ish clamp here rather than --hl-gutter's 5%, because a
   percentage padding resolves against the VIEWPORT, not this element's own
   max-width — on a wide screen that ate ~190px a side and squeezed the row
   below the width its two columns need, wrapping the image under the text. */
.hl-la__inner:has(> .hl-la__main:only-child) {
	grid-template-columns: minmax(0, 1fr);
	max-width: 1040px;
	padding-left: clamp(20px, 5vw, 48px);
	padding-right: clamp(20px, 5vw, 48px);
}

/* Short pages (thank-you pages especially) read best as text beside the photo
   rather than the media-left layout the long guides use. Explicit grid
   placement, so the two columns don't depend on flex-basis arithmetic. */
@media (min-width: 1000px) {
	.hl-la__inner:has(> .hl-la__main:only-child) .hl-la__row:not(.hl-la__row--full):not(.hl-la__row--video-full) {
		display: grid;
		gap: 48px;
		/* Short sections: the photo sits centred against the text, not hung from
		   the top. That also means no stretch and no sticky — the base rules'
		   full-height sticky rail only earns its keep on the long TOC'd guides,
		   where the text towers over the media. */
		align-items: center;
	}
	.hl-la__inner:has(> .hl-la__main:only-child) .hl-la__row:not(.hl-la__row--full):not(.hl-la__row--video-full) .hl-la__media { align-self: auto; }
	.hl-la__inner:has(> .hl-la__main:only-child) .hl-la__row:not(.hl-la__row--full):not(.hl-la__row--video-full) .hl-la__media-sticky { position: static; }
	/* Track sizes swap with the side, so the media is the same width either
	   way round — placement alone would hand left-side media the 1fr track. */
	.hl-la__inner:has(> .hl-la__main:only-child) .hl-la__row--media-right { grid-template-columns: minmax(0, 1fr) 300px; }
	.hl-la__inner:has(> .hl-la__main:only-child) .hl-la__row--media-left  { grid-template-columns: 300px minmax(0, 1fr); }

	.hl-la__inner:has(> .hl-la__main:only-child) .hl-la__row:not(.hl-la__row--full):not(.hl-la__row--video-full) > * {
		grid-row: 1;
	}

	.hl-la__inner:has(> .hl-la__main:only-child) .hl-la__row:not(.hl-la__row--full):not(.hl-la__row--video-full) .hl-la__media {
		max-width: none;
	}

	/* Sides follow the same alternating modifier as the TOC'd layout below. */
	.hl-la__inner:has(> .hl-la__main:only-child) .hl-la__row--media-right .hl-la__text  { grid-column: 1; }
	.hl-la__inner:has(> .hl-la__main:only-child) .hl-la__row--media-right .hl-la__media { grid-column: 2; }
	.hl-la__inner:has(> .hl-la__main:only-child) .hl-la__row--media-left  .hl-la__text  { grid-column: 2; }
	.hl-la__inner:has(> .hl-la__main:only-child) .hl-la__row--media-left  .hl-la__media { grid-column: 1; }
}

/* ---- Sticky table of contents ---- */

.hl-la__toc {
	position: sticky;
	top: 128px;
	align-self: start;
	/* Never taller than the window: a long contents list could not be seen whole. The label
	   stays, the list scrolls inside itself, and main.js keeps the current entry in view. */
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 128px - 24px);
}

.hl-la__toc-label {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hl-muted);
	margin-bottom: 14px;
}

.hl-la__toc ol {
	list-style: none;
	margin: 0;
	padding: 0;
	border-left: 2px solid var(--hl-line);
	display: flex;
	flex-direction: column;
	min-height: 96px;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
}

.hl-la__toc li { margin: 0; }

.hl-la__toc a {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 9px 0 9px 18px;
	margin-left: -2px;
	border-left: 2px solid transparent;
	font-size: 14px;
	line-height: 1.4;
	color: var(--hl-muted);
	font-weight: 500;
}

.hl-la__toc a:hover { color: var(--hl-blue); }

.hl-la__toc a.is-active {
	color: var(--hl-navy);
	font-weight: 600;
	border-left-color: var(--hl-blue);
}

/* ---- Content column ---- */

.hl-la__main { min-width: 0; }

.hl-la__intro { margin-bottom: 8px; }

.hl-la__section {
	padding-top: 56px;
	scroll-margin-top: 120px; /* keeps the heading clear of the sticky header on #anchor jumps */
}
.hl-la__section:first-child { padding-top: 0; }
.hl-la__section + .hl-la__section { border-top: 1px solid var(--hl-line); }

.hl-la__section-title {
	font-family: var(--hl-serif);
	font-weight: 400;
	font-size: clamp(26px, 2.6vw, 34px);
	line-height: 1.2;
	color: var(--hl-navy);
	margin: 0 0 28px;
}

.hl-la__row {
	display: flex;
	flex-wrap: wrap;
	gap: 36px 48px;
	align-items: flex-start;
}

.hl-la__row--full { display: block; }

/* Alternating media side. The media column comes first in the markup (so it
   leads on a phone, where the row stacks); ordering it after the text is what
   puts it on the right on a wide screen. */
.hl-la__row--media-right .hl-la__media { order: 2; }

/* A section with no media shouldn't reserve space for it. (The no-TOC
   container sizing lives with the other .hl-la__inner rules further up — it
   used to be repeated here too, and the duplicate silently overrode it.) */
.hl-la__row--full .hl-la__text { flex: 1 1 100%; }

/* A section whose only media is a video: one column, player first. The video
   renders large and centred on top (the markup already leads with the media),
   and the text runs the full container width underneath, instead of the two
   being pressed into a text + 300px side rail. Sticky would be meaningless
   here — there's nothing beside the player to scroll against. */
.hl-la__row--video-full { flex-direction: column; }
.hl-la__row--video-full .hl-la__text { flex: 1 1 100%; }
.hl-la__row--video-full .hl-la__media {
	flex: 1 1 100%;
	width: 100%;
	max-width: 820px;
	margin-inline: auto;
	align-self: auto;
}
.hl-la__row--video-full .hl-la__media-sticky { position: static; }

.hl-la__media {
	flex: 1 1 320px;
	min-width: 0;
	max-width: 380px;
	/* Must be FULL ROW HEIGHT (overriding the row's align-items:flex-start).
	   A sticky element can only travel inside its containing block, so if
	   this column shrank to the image's own height there'd be zero range to
	   move and the image would simply scroll away with the text. */
	align-self: stretch;
}

/* Multiple images/videos in one section stack vertically inside the sticky box. */
.hl-la__media-sticky {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

@media (min-width: 760px) {
	.hl-la__media-sticky {
		position: sticky;
		top: 128px;
	}
}

.hl-la__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--hl-radius);
	box-shadow: var(--hl-shadow);
	cursor: zoom-in;
}

.hl-la__video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: var(--hl-radius);
	overflow: hidden;
	box-shadow: var(--hl-shadow);
}
.hl-la__video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.hl-la__video-poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	cursor: pointer;
	background: var(--hl-navy-deep);
}
.hl-la__video-poster:hover { opacity: 0.92; }
.hl-la__video-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hl-la__video-poster--plain { background: var(--hl-navy); }
.hl-la__video-shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(7, 24, 37, 0.7) 0%, rgba(7, 24, 37, 0) 50%);
}
.hl-la__video-play {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--hl-blue);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.hl-la__video-play span {
	width: 0;
	height: 0;
	border-left: 15px solid #fff;
	border-top: 9px solid transparent;
	border-bottom: 9px solid transparent;
	margin-left: 4px;
}

.hl-la__text { flex: 1.4 1 420px; min-width: 0; }

/* ---- Typography inside the article (reuses .entry-content tokens, adds
   styled numbered/bulleted list markers) ---- */

.hl-la .entry-content p { font-size: 17px; line-height: 1.8; color: var(--hl-body); margin: 0 0 20px; }
.hl-la .entry-content p:last-child { margin-bottom: 0; }
.hl-la .entry-content a { font-weight: 600; }
.hl-la .entry-content h3 { font-family: var(--hl-sans); font-size: 20px; font-weight: 600; color: var(--hl-navy); margin: 28px 0 12px; }

/* Markers use padding-left + an absolutely positioned ::before, NOT
   display:flex on the <li> — flex would turn every direct child/text-run
   inside the <li> into its own side-by-side flex item, which shreds normal
   inline text flow whenever a list item mixes plain text with <strong>/
   <span> siblings (exactly what this scraped content does). The top offset
   is tuned to the 17px/1.7 line-height so the marker sits level with the
   first line of ordinary flowing text. */

.hl-la .entry-content ol {
	list-style: none;
	counter-reset: la-ol;
	margin: 0 0 24px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.hl-la .entry-content ol li {
	counter-increment: la-ol;
	position: relative;
	padding-left: 40px;
	font-size: 17px;
	line-height: 1.7;
	color: var(--hl-body);
}
.hl-la .entry-content ol li::before {
	content: counter(la-ol);
	position: absolute;
	left: 0;
	top: 0.1em;
	font-family: var(--hl-serif);
	font-size: 22px;
	line-height: 1;
	color: var(--hl-blue);
}

.hl-la .entry-content ul {
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.hl-la .entry-content ul li {
	position: relative;
	padding-left: 24px;
	font-size: 17px;
	line-height: 1.7;
	color: var(--hl-body);
}
.hl-la .entry-content ul li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.6em;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--hl-blue);
}

/* Checklist: rebuilds the blue tick bullets the original pages used (their
   inline SVG icons don't survive sanitising). */
.hl-la .entry-content ul.hl-check-list { gap: 14px; }
.hl-la .entry-content ul.hl-check-list li { padding-left: 36px; }
.hl-la .entry-content ul.hl-check-list li::before {
	content: "";
	top: 0.15em;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--hl-blue);
	/* White tick, drawn as a mask so it inherits the brand blue. */
	-webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M9.55 17.6 4.4 12.45l1.414-1.415 3.736 3.736 8.636-8.636L19.6 7.55z"/></svg>') center / 120% no-repeat, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M9.55 17.6 4.4 12.45l1.414-1.415 3.736 3.736 8.636-8.636L19.6 7.55z"/></svg>') center / 120% no-repeat, linear-gradient(#000 0 0);
	mask-composite: exclude;
}

@media (max-width: 900px) {
	.hl-la__inner { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	/* TOC is last in the DOM (right column on desktop) — pull it back above
	   the content once stacked so it still reads as a jump-to list. */
	.hl-la__toc { position: static; order: -1; max-height: none; border: 1px solid var(--hl-line); border-radius: var(--hl-radius); padding: 20px 22px; }
	.hl-la__main { order: 1; }
	.hl-la__toc ol { border-left: none; gap: 2px; min-height: 0; overflow: visible; }
	.hl-la__toc a { padding: 7px 0; border-left: none; margin-left: 0; min-height: 44px; }
	.hl-la__toc a.is-active { border-left: none; }
	.hl-la__media { max-width: 100%; }
	.hl-la__media-sticky { position: static; }
}

@media (max-width: 600px) {
	.hl-la { padding-top: 48px; }
	.hl-la__section { padding-top: 40px; }
}
