/*
 * Home - Investing.
 *
 * Read from cp-all-designer/index.html:427-472 and css/app.css:1575-1586,
 * 1835-1959, 3004-3010.
 *
 * Drawn at 1440 (app.css:113): a fixed measure carries across unchanged.
 * Colour, type, padding, the sizes and the corners arrive from the Style tab
 * and are not repeated here.
 *
 * Left behind — app.css declares `.ilink` and its parts twice, and the second
 * declaration wins on every property the two share, so the first reaches this
 * page and settles nothing:
 * - `.ilink` (1905) against `.ilink` (1926): border, radius, ground, padding,
 *   gap, align-content and transition are all overridden.
 * - `.ilink:hover` (1910) against (1932); `.ilink__ico` (1911) against (1933);
 *   `.ilink:hover .ilink__ico` (1912) against (1938), which cancels its scale
 *   outright; `.ilink > span:last-child` (1913) against (1958).
 * The later rule is what is written here; the earlier one is not carried.
 *
 * The mark is the client's, so it is printed as an icon rather than painted
 * through `--icon` and a mask (app.css:1944-1956).
 */

.custom-home-investing {
	position: relative;
	display: block;
	overflow: clip;
	box-sizing: border-box;
	background: linear-gradient(180deg,
		var(--band-from, #F0F9FD) 0%,
		var(--band-from, #F0F9FD) 42%,
		var(--band-to, #FFFFFF) 100%);     /* app.css:1576 */
}

/* app.css:1835-1858 — the photograph panel, one column and two rows. */
.custom-home-investing__panel {
	position: relative;
	isolation: isolate;
	overflow: clip;
	box-sizing: border-box;
	display: grid;
	grid-template-columns: 1fr;
	grid-template-rows: auto auto;
	align-content: center;
	margin: 0 auto;
	max-width: 1920px;                     /* the content cap, every band */
}

.custom-home-investing__panel-bg {
	position: absolute;
	inset: 0;
	z-index: -2;
	display: block;
	overflow: hidden;
}

.custom-home-investing__panel-picture {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

/* app.css:1869-1874 — one veil across the photograph. */
.custom-home-investing__panel::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(95deg,
		var(--veil-from, rgba(0, 0, 0, 0.7)) 0%,
		rgba(0, 0, 0, 0.5) 46%,
		rgba(0, 0, 0, 0.3) 100%);
}

/* ------------------------------------------------------------------ */
/* The copy                                                            */
/* ------------------------------------------------------------------ */

.custom-home-investing__copy {
	position: relative;
	margin-inline: auto;
	text-align: center;
	color: #FFFFFF;
}

.custom-home-investing__eyebrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin: 0 0 22px;
	font-size: 12px;
	font-weight: 600;
	/* app.css:190 measures 1.15px; every px value here is even. */
	letter-spacing: 2px;
	text-transform: uppercase;
}

.custom-home-investing__title {
	margin: 0 0 18px;                      /* app.css:1877 */
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
}

.custom-home-investing__title em {
	position: relative;
	display: inline-block;
	font-style: normal;                    /* app.css:255-260: upright, a step larger than its line */
	font-weight: 700;
	font-size: 108%;  
}

.custom-home-investing__title em::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 4px;
	height: 8px;
	border-radius: 4px;
	background: currentColor;
	opacity: 0.28;                         /* app.css:1879 */
}

.custom-home-investing__description {
	margin: 0 auto;
	font-size: 16px;
	font-weight: 300;
	line-height: 1.75;                     /* app.css:1885 */
}

/* ------------------------------------------------------------------ */
/* The panel of quick links                                            */
/* ------------------------------------------------------------------ */

.custom-home-investing__finder {
	position: relative;
	align-self: end;
	justify-self: center;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	min-height: 0;
	width: max-content;
	max-width: 100%;
	border-width: 2px;                     /* app.css:1895 measures 1px */
	border-style: solid;
	-webkit-backdrop-filter: blur(20px) saturate(1.3);
	        backdrop-filter: blur(20px) saturate(1.3);
	box-shadow: 0 18px 50px rgba(10, 22, 60, 0.28);
}

.custom-home-investing__finder-title {
	margin: 0 0 18px;
	font-size: 16px;
	font-weight: 600;
	/* app.css:1899 measures .01em, which is 0.16px here: the nearest even is 0. */
	letter-spacing: 0;
	color: rgba(255, 255, 255, 0.85);
}

/* app.css:1900-1904 — all items on one row. */
.custom-home-investing__links {
	flex: 0 0 auto;
	min-height: 0;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: start;
}

/* app.css:1926-1931 — the second declaration, which is the one that draws. */
.custom-home-investing__link {
	flex: 0 0 var(--track, 168px);
	display: grid;
	justify-items: center;
	align-content: start;
	text-align: center;
	gap: 12px;
	padding: 14px 8px 12px;
	border: 0;
	border-radius: 0;
	background: none;
	text-decoration: none;
	transition: transform 250ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-home-investing__link:hover {
	transform: translateY(-4px);           /* app.css:1932 measures -3px */
}

.custom-home-investing__mark {
	display: grid;
	place-items: center;
	border-width: 2px;                     /* app.css:1935 measures 1.5px */
	border-style: solid;
	border-radius: 50%;
	color: #FFFFFF;
	transition: background-color 300ms cubic-bezier(0.2, 0.8, 0.2, 1),
	            border-color 300ms cubic-bezier(0.2, 0.8, 0.2, 1),
	            color 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-home-investing__link:hover .custom-home-investing__mark {
	background-color: #FFFFFF;
	border-color: #FFFFFF;                 /* app.css:1938 */
	color: #16418C;                        /* navy — icon follows currentColor */
}

/* Default icon visible; hover icon hidden.
   Swap only when a hover icon exists (mark--has-hover class set by PHP). */
.custom-home-investing__mark-ico {
	display: contents;
}

.custom-home-investing__mark--has-hover .custom-home-investing__mark-ico--hover {
	display: none;
}

.custom-home-investing__link:hover .custom-home-investing__mark--has-hover .custom-home-investing__mark-ico--default {
	display: none;
}

.custom-home-investing__link:hover .custom-home-investing__mark--has-hover .custom-home-investing__mark-ico--hover {
	display: contents;
}

.custom-home-investing__mark svg,
.custom-home-investing__mark img,
.custom-home-investing__mark i {
	width: 28px;                           /* app.css:1957 measures 27px */
	height: 28px;
	font-size: 28px;
	line-height: 1;
	display: block;
}

.custom-home-investing__link-text {
	font-weight: 500;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.94);      /* app.css:1958 */
	transition: color 250ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-home-investing__link:hover .custom-home-investing__link-text {
	color: #FFFFFF;                        /* app.css:1959 */
}

/* ------------------------------------------------------------------ */
/* Tablet — 768px to 1024px                                            */
/* ------------------------------------------------------------------ */

@media (max-width: 1024px) {
	.custom-home-investing__panel {
		align-items: start;                /* app.css:1919 */
	}
	.custom-home-investing__finder {
		justify-self: stretch;             /* app.css:1920 */
		width: auto;
	}
	.custom-home-investing__links {
		flex-wrap: wrap;   /* app.css:1921 — allow wrapping on narrow tablet */
	}

	.custom-home-investing__link {
		flex: 1 1 104px;
	}
	/* app.css:903 — the author's own line breaks close up below the wide tier. */
	.custom-home-investing__description br {
		display: none;
	}
}

/* ------------------------------------------------------------------ */
/* Mobile — up to 767px                                                */
/* ------------------------------------------------------------------ */

@media (max-width: 767px) {
	.custom-home-investing__link {
		gap: 6px;
		padding: 8px 4px;                  /* app.css:3007 */
	}
	.custom-home-investing__mark svg,
	.custom-home-investing__mark img,
	.custom-home-investing__mark i {
		width: 20px;                       /* app.css:3009 measures 19px */
		height: 20px;
		font-size: 20px;
	}
	.custom-home-investing__description {
		font-size: 14px;
		line-height: 1.5;
	}
	.custom-home-investing__title em::after {
		bottom: 2px;
		height: 4px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.custom-home-investing__link,
	.custom-home-investing__mark,
	.custom-home-investing__link-text {
		transition: none;
	}
	.custom-home-investing__link:hover {
		transform: none;
	}
}

/* ------------------------------------------------------------------ */
/* One band, one screen — desktop only                                 */
/* ------------------------------------------------------------------ */

/* app.css:336-338 (.sec) gives this band the window's height, and app.css:2830 hands it back
   at 1024 and below, where the content sets the height as it does everywhere
   else. min-height, so a band that outgrows the window takes the room it needs
   and the page scrolls rather than cutting anything off. */
@media (min-width: 1025px) {
	.custom-home-investing {
		min-height: 100vh;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}

	/* A flex item with auto side margins shrinks to its own content, so the
	   content box is told its width again: the whole band, up to the cap. */
	.custom-home-investing > .custom-home-investing__panel {
		width: 100%;
	}
}
