/*
Theme Name: TOPHAND
Author: TOPHAND Operations LLC
Description: Custom block theme for TOPHAND Operations LLC. Color, typography, and spacing are defined in theme.json. This file carries only the theme header and CSS that theme.json cannot express.
Version: 0.3.4
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tophand
*/

/* No color values in this file. Every color reference is a theme.json preset variable. */

/* Skip link and screen reader text. */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal;
}

.tophand-skip-link:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	left: 1rem;
	top: 1rem;
	z-index: 100000;
	padding: 0.75rem 1.25rem;
	background: var(--wp--preset--color--stone);
	color: var(--wp--preset--color--denim);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	text-decoration: none;
	outline: 3px solid var(--wp--preset--color--rust);
	outline-offset: 2px;
}

/* Visible focus for keyboard users, on every ground in the palette. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--rust);
	outline-offset: 3px;
}

/* On dark grounds, rust fails. Use the Warm Stone focus ring inside dark sections. */
.is-style-dark-section :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible,
.has-denim-background-color :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible,
.has-iron-background-color :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline-color: var(--wp--preset--color--stone);
}

/* Aged Brass never carries text. Force the separator to render brass as a rule only. */
.wp-block-separator {
	border-color: currentColor;
	opacity: 1;
}

/* Reduced motion. */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Logo lockup. The SVG is 4:1. Width is set on the block, height follows. */
.tophand-logo {
	margin: 0;
}
.tophand-logo img {
	display: block;
	height: auto;
}
.tophand-logo a:focus-visible {
	outline-offset: 6px;
}

/* ------------------------------------------------------------------
   Editorial helpers. Type, rules, and layout that theme.json cannot
   express. Every color is a preset variable.
   ------------------------------------------------------------------ */

h1, h2, h3, .tophand-statement {
	text-wrap: balance;
}

/* Eyebrow: small uppercase Archivo label above a headline or a group. */
.tophand-eyebrow {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.3;
}
h3.tophand-eyebrow {
	color: var(--wp--preset--color--denim);
}

/* Lede: the large paragraph under a headline. Held to a reading measure. */
.tophand-lede {
	max-width: 40rem;
	line-height: 1.45;
}

/* Hero headline width. */
.tophand-hero h1 {
	max-width: 18ch;
	letter-spacing: -0.01em;
}
.tophand-hero .tophand-eyebrow {
	opacity: 0.85;
}
.tophand-hero .tophand-lede {
	max-width: 44rem;
}

/* Short brass rule. Always a graphic, never text. */
.wp-block-separator.tophand-rule-short {
	width: 4rem !important;
	max-width: 4rem;
	border-bottom-width: 4px;
	margin-left: 0;
	margin-right: auto;
}

/* Statement: one-line proposition in Archivo, denim. */
.tophand-statement {
	max-width: 36rem;
	font-weight: 600;
	line-height: 1.3;
}

/* Note: a qualifying line with a brass left rule. */
.tophand-note {
	max-width: 40rem;
	padding-left: var(--wp--preset--spacing--30);
	border-left: 4px solid var(--wp--preset--color--brass);
}

/* Gate zero card. */
.tophand-gate-zero {
	border-left: 4px solid var(--wp--preset--color--brass);
}

/* Rules list: bold leads in Archivo denim, brass hairlines between rules. */
.tophand-rules > p {
	margin-block-start: 0;
	padding-block: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--wp--preset--color--brass);
}
.tophand-rules > p:last-child {
	border-bottom: 1px solid var(--wp--preset--color--brass);
}
.tophand-rules strong {
	display: block;
	margin-bottom: 0.35rem;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	color: var(--wp--preset--color--denim);
	font-size: 1.05em;
}

/* ------------------------------------------------------------------
   Gate and phase cards.
   ------------------------------------------------------------------ */

.tophand-gate__number {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--2-x-large);
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	margin: 0;
}
.tophand-gate h3,
.tophand-gate h4 {
	margin-top: 0;
}
.tophand-gate p.has-small-font-size {
	line-height: 1.45;
}

/* ------------------------------------------------------------------
   Gate sequence grid. Stacked by default, three across on tablets,
   seven across with the brass break on wide screens.
   ------------------------------------------------------------------ */

:root {
	--tophand-gutter: clamp(1.25rem, 5vw, 6rem);
}
.wp-block-group.tophand-gates {
	grid-template-columns: 1fr;
	gap: var(--wp--preset--spacing--30);
	padding-left: var(--tophand-gutter);
	padding-right: var(--tophand-gutter);
}
.tophand-gates__heading {
	padding-left: var(--tophand-gutter);
	padding-right: var(--tophand-gutter);
}
.tophand-gates__label {
	grid-column: 1 / -1;
	margin: 0;
}
.tophand-gates__label--partner {
	position: relative;
	margin-top: var(--wp--preset--spacing--30);
	padding-top: var(--wp--preset--spacing--30);
	border-top: 4px solid var(--wp--preset--color--brass);
}

@media (min-width: 600px) {
	.wp-block-group.tophand-gates {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (min-width: 900px) {
	.wp-block-group.tophand-gates {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
@media (min-width: 1200px) {
	.wp-block-group.tophand-gates {
		grid-template-columns: repeat(7, minmax(0, 1fr));
		grid-template-rows: auto 1fr;
	}
	.tophand-gates__label--self {
		grid-column: 1 / 6;
		grid-row: 1;
	}
	.tophand-gates__label--partner {
		grid-column: 6 / 8;
		grid-row: 1;
		margin-top: 0;
		padding-top: 0;
		border-top: 0;
	}
	.tophand-gate {
		grid-row: 2;
	}
	/* The brass break between Gate 5 and Gate 6, running the full height. */
	.tophand-gates__label--partner::before,
	.tophand-gate--first-partner::before {
		content: "";
		position: absolute;
		left: calc(-1 * var(--wp--preset--spacing--30) / 2 - 2px);
		width: 4px;
		background: var(--wp--preset--color--brass);
	}
	.tophand-gates__label--partner::before {
		top: 0;
		bottom: calc(-1 * var(--wp--preset--spacing--30));
	}
	.tophand-gate--first-partner {
		position: relative;
	}
	.tophand-gate--first-partner::before {
		top: 0;
		bottom: 0;
	}
}

/* ------------------------------------------------------------------
   Phase sequence grid. Stacked, two across, four across.
   ------------------------------------------------------------------ */

.wp-block-group.tophand-phases {
	grid-template-columns: 1fr;
	gap: var(--wp--preset--spacing--30);
}
@media (min-width: 600px) {
	.wp-block-group.tophand-phases {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (min-width: 1024px) {
	.wp-block-group.tophand-phases {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* ------------------------------------------------------------------
   Cards and grids.
   ------------------------------------------------------------------ */

.tophand-card {
	border-top: 4px solid var(--wp--preset--color--brass);
}
.has-white-background-color > .tophand-grid > .tophand-card:not(.has-background),
.has-white-background-color > .tophand-grid > .tophand-method {
	background-color: var(--wp--preset--color--stone);
}
.has-stone-background-color > .tophand-grid > .tophand-card:not(.has-background) {
	background-color: var(--wp--preset--color--white);
}
.tophand-card h2 a,
.tophand-card h3 a,
.tophand-post-card h2 a {
	color: inherit;
	text-decoration: none;
}
.tophand-card h2 a:hover,
.tophand-card h3 a:hover,
.tophand-post-card h2 a:hover {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--rust);
}

.wp-block-group.tophand-grid {
	grid-template-columns: 1fr;
	gap: var(--wp--preset--spacing--30);
}
@media (min-width: 600px) {
	.wp-block-group.tophand-grid--3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (min-width: 782px) {
	.wp-block-group.tophand-grid--2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (min-width: 900px) {
	.wp-block-group.tophand-grid--3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Link line: a standalone link in Archivo. */
.tophand-link-line a {
	font-weight: 600;
	text-decoration: none;
}
.tophand-link-line a:hover {
	text-decoration: underline;
}

/* Method summary on the home page. */
.tophand-method {
	padding: var(--wp--preset--spacing--40);
	border-top: 4px solid var(--wp--preset--color--denim);
}
.tophand-chips {
	gap: 0.5rem;
}
.tophand-chips .tophand-chip {
	margin: 0;
	padding: 0.3rem 0.7rem;
	background-color: var(--wp--preset--color--denim);
	color: var(--wp--preset--color--white);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1.2;
}

/* Placeholder: content pending a dependency. Visibly marked. */
.tophand-placeholder {
	padding: var(--wp--preset--spacing--30);
	border: 2px dashed var(--wp--preset--color--brass);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.4;
}
.is-style-dark-section .tophand-placeholder {
	border-color: var(--wp--preset--color--stone);
}

/* Light hero. */
.tophand-hero--light h1 {
	max-width: 18ch;
	letter-spacing: -0.01em;
}

/* ------------------------------------------------------------------
   Tables. Horizontal rules only. Stack to labeled rows on small screens.
   ------------------------------------------------------------------ */

.tophand-table table {
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--small);
}
.tophand-table th,
.tophand-table td {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--brass);
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--30) var(--wp--preset--spacing--30) 0;
	text-align: left;
	vertical-align: top;
}
.tophand-table th {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	color: var(--wp--preset--color--denim);
	border-bottom-width: 2px;
}
.tophand-table td:first-child {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	color: var(--wp--preset--color--denim);
}
.tophand-table td strong {
	font-family: var(--wp--preset--font-family--heading);
	color: var(--wp--preset--color--denim);
}

@media (max-width: 781px) {
	.tophand-table table,
	.tophand-table tbody,
	.tophand-table tr,
	.tophand-table td {
		display: block;
		width: 100%;
	}
	.tophand-table thead {
		display: none;
	}
	.tophand-table tr {
		padding-block: var(--wp--preset--spacing--30);
		border-bottom: 1px solid var(--wp--preset--color--brass);
	}
	.tophand-table td {
		padding: 0.15rem 0;
		border-bottom: 0;
	}
	.tophand-table td:empty {
		display: none;
	}
	.tophand-table td:not(:first-child)::before {
		font-family: var(--wp--preset--font-family--heading);
		font-weight: 600;
		color: var(--wp--preset--color--iron);
	}
	/* Labels repeat the table header cells, which are approved copy. */
	.tophand-table--scope td:nth-child(2)::before {
		content: "TOPHAND self-performs: ";
	}
	.tophand-table--scope td:nth-child(3)::before {
		content: "Delivered by partner firms: ";
	}
	.tophand-table--shapes td:nth-child(2)::before {
		content: "What it is: ";
	}
	.tophand-table--shapes td:nth-child(3)::before {
		content: "Best when: ";
	}
	.tophand-table--providers td:nth-child(2)::before {
		content: "What it does for us: ";
	}
	.tophand-table--providers td:nth-child(3)::before {
		content: "What it handles: ";
	}
}

/* ------------------------------------------------------------------
   Contact form. Static mock until HubSpot is wired. Same rules apply to
   the HubSpot form once embedded.
   ------------------------------------------------------------------ */

.tophand-form {
	display: grid;
	gap: var(--wp--preset--spacing--40);
	margin-top: var(--wp--preset--spacing--40);
}
.tophand-form label,
.tophand-contact-section .hs-form label {
	display: block;
	margin-bottom: 0.4rem;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	color: var(--wp--preset--color--denim);
}
.tophand-form input,
.tophand-form select,
.tophand-form textarea,
.tophand-contact-section .hs-form input:not([type="submit"]),
.tophand-contact-section .hs-form select,
.tophand-contact-section .hs-form textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 0.75rem 0.9rem;
	font: inherit;
	color: var(--wp--preset--color--iron);
	background-color: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--iron);
	border-radius: 4px;
}
.tophand-field__help {
	margin: 0.4rem 0 0;
	font-size: var(--wp--preset--font-size--small);
}
.tophand-form button,
.tophand-contact-section .hs-form input[type="submit"] {
	justify-self: start;
	padding: 0.85rem 1.75rem;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	color: var(--wp--preset--color--white);
	background-color: var(--wp--preset--color--rust);
	border: 0;
	border-radius: 4px;
	cursor: pointer;
}
.tophand-form button[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}
.tophand-contact-aside p {
	padding-top: var(--wp--preset--spacing--30);
	border-top: 1px solid var(--wp--preset--color--brass);
}
.tophand-contact-aside strong {
	display: block;
	font-family: var(--wp--preset--font-family--heading);
	color: var(--wp--preset--color--denim);
}

/* ------------------------------------------------------------------
   Insights list and single post.
   ------------------------------------------------------------------ */

.tophand-post-card {
	padding-block: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--wp--preset--color--brass);
}
.tophand-post-list > :last-child .tophand-post-card,
.tophand-post-list > .tophand-post-card:last-child {
	border-bottom: 1px solid var(--wp--preset--color--brass);
}
.tophand-post-date {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--denim);
}

/* Footer navigation. */
.tophand-footer-nav {
	margin-top: var(--wp--preset--spacing--40);
}

/* Capabilities opens its submenu on click, so WordPress renders it as a
   button. Drop the browser's default button padding so it lines up with the
   links beside it. */
.wp-block-navigation .wp-block-navigation-submenu__toggle {
	padding-block: 0;
}

/* ------------------------------------------------------------------
   Insights post body and the HubSpot form frame.
   ------------------------------------------------------------------ */

.single-post .wp-block-post-content > h2 {
	font-size: var(--wp--preset--font-size--x-large);
	margin-top: var(--wp--preset--spacing--60);
}
.tophand-post-cta {
	margin-top: var(--wp--preset--spacing--60);
	padding-top: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--wp--preset--color--brass);
}

/* Assessment popup (assets/js/typeform-on-click.js). Typeform sets z-index
   10001, under the WordPress admin bar, which then covers its close button
   for logged-in users. body raises specificity over Typeform's stylesheet,
   which loads after this one. */
body .tf-v1-popup {
	z-index: 100000;
}

/* Reserve space while the HubSpot frame loads so the sidebar does not jump. */
.tophand-hubspot-form {
	min-height: 32rem;
}

/* Resources offers: microcopy sits tight under the button. */
.tophand-offer .wp-block-buttons + .tophand-microcopy,
.tophand-offer .tophand-placeholder + .tophand-microcopy {
	margin-top: var(--wp--preset--spacing--20);
}

/* ------------------------------------------------------------------
   Coming soon page. Standalone, rendered by inc/coming-soon.php.
   Every color is a theme.json preset. Contrast held to the palette
   rules: no rust text on denim, brass carries no text.
   ------------------------------------------------------------------ */

.tophand-cs-body {
	background-color: var(--wp--preset--color--stone);
}
.tophand-cs {
	display: block;
}
.tophand-cs__inner {
	max-width: 68rem;
	margin: 0 auto;
	padding-inline: var(--tophand-gutter);
}
.tophand-cs__inner--narrow {
	max-width: 44rem;
	margin-inline: 0;
	padding-inline: 0;
}

/* Top rule: the full palette as a single graphic mark. Carries no text. */
.tophand-cs__bars {
	display: flex;
	height: 8px;
}
.tophand-cs__bars span {
	flex: 1;
}
.tophand-cs__bars span:nth-child(1) { background-color: var(--wp--preset--color--denim); }
.tophand-cs__bars span:nth-child(2) { background-color: var(--wp--preset--color--rust); }
.tophand-cs__bars span:nth-child(3) { background-color: var(--wp--preset--color--brass); }
.tophand-cs__bars span:nth-child(4) { background-color: var(--wp--preset--color--iron); }
.tophand-cs__bars span:nth-child(5) { background-color: var(--wp--preset--color--stone); }

.tophand-cs__hero {
	background-color: var(--wp--preset--color--denim);
	color: var(--wp--preset--color--white);
	padding-block: clamp(3rem, 8vw, 6rem);
}
.tophand-cs__logo {
	display: block;
	width: min(19rem, 68vw);
	height: auto;
	margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.tophand-cs__status {
	display: inline-block;
	margin: 0 0 1.5rem;
	padding: 0.4rem 0.9rem;
	background-color: var(--wp--preset--color--stone);
	color: var(--wp--preset--color--denim);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.2;
}
.tophand-cs__headline {
	margin: 0;
	max-width: 16ch;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--3-x-large);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--white);
	text-wrap: balance;
}
.tophand-cs__lede {
	max-width: 42rem;
	margin: 1.5rem 0 0;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.45;
	color: var(--wp--preset--color--white);
}

.tophand-cs__caps {
	background-color: var(--wp--preset--color--stone);
	padding-block: clamp(3rem, 7vw, 5rem);
}
.tophand-cs__methods {
	background-color: var(--wp--preset--color--white);
	padding-block: clamp(3rem, 7vw, 5rem);
}
.tophand-cs__contact {
	background-color: var(--wp--preset--color--stone);
	padding-block: clamp(3rem, 7vw, 5rem);
}
.tophand-cs__h2 {
	margin: 0 0 2rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--2-x-large);
	font-weight: 600;
	line-height: 1.15;
	color: var(--wp--preset--color--denim);
	text-wrap: balance;
}

.tophand-cs__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}
@media (min-width: 600px) {
	.tophand-cs__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
	.tophand-cs__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.tophand-cs__card {
	background-color: var(--wp--preset--color--white);
	border-top: 4px solid var(--wp--preset--color--brass);
	padding: 1.75rem;
}
.tophand-cs__card h3 {
	margin: 0 0 0.75rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	line-height: 1.2;
	color: var(--wp--preset--color--denim);
}
.tophand-cs__card p {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
	color: var(--wp--preset--color--iron);
}
.tophand-cs__credential {
	max-width: 42rem;
	margin: 2.5rem 0 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	line-height: 1.3;
	color: var(--wp--preset--color--denim);
}

.tophand-cs__method-name {
	margin: 0 0 0.9rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	color: var(--wp--preset--color--denim);
}
.tophand-cs__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.tophand-cs__chips li {
	padding: 0.4rem 0.85rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1.2;
	color: var(--wp--preset--color--white);
}
.tophand-cs__chips--denim li { background-color: var(--wp--preset--color--denim); }
.tophand-cs__chips--rust li { background-color: var(--wp--preset--color--rust); }

.tophand-cs__hr {
	width: 4rem;
	height: 0;
	border: 0;
	border-top: 4px solid var(--wp--preset--color--brass);
	margin: 2.25rem 0;
}
.tophand-cs__hr--full {
	width: 100%;
	border-top-width: 1px;
	margin: 2rem 0 1.25rem;
}

.tophand-cs__contact-lede {
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--iron);
}
.tophand-cs__contact .tophand-hubspot-form {
	margin-top: 1.5rem;
}

.tophand-cs__footer {
	background-color: var(--wp--preset--color--iron);
	color: var(--wp--preset--color--white);
	padding-block: clamp(2.5rem, 5vw, 3.5rem);
	font-size: var(--wp--preset--font-size--small);
}
.tophand-cs__footer p {
	margin: 0 0 0.6rem;
	line-height: 1.5;
}
.tophand-cs__footer strong {
	font-family: var(--wp--preset--font-family--heading);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.tophand-cs__footer a {
	color: var(--wp--preset--color--white);
	text-decoration: underline;
}
.tophand-cs__footer a:hover {
	text-decoration: none;
}

/* Typeform. The popup button keeps the card rhythm of a block button. */
.tophand-offer .tophand-typeform-buttons {
	margin-top: var(--wp--preset--spacing--40);
}
.tophand-typeform-inline {
	margin-top: var(--wp--preset--spacing--40);
}

/* ------------------------------------------------------------------
   Home banner. Full bleed, under the header, above the hero.
   ------------------------------------------------------------------ */

.tophand-banner {
	margin: 0;
	line-height: 0;
	background-color: var(--wp--preset--color--denim);
}
.tophand-banner__img {
	display: block;
	width: 100%;
	height: auto;
}

/* ------------------------------------------------------------------
   Overlay hero. Photograph with live headline and subhead on top.

   Large screens: text sits over the left of the image on a denim scrim
   that fades out to the right, so the sunrise stays visible and the
   type keeps its contrast.
   Below 1200px: the text drops beneath the image onto solid denim. A
   150px tall photo cannot carry a headline on a phone, and between 900 and
   1199px the text is taller than the 2.5:1 band (it overflowed the photo
   when the breakpoint was 900).
   ------------------------------------------------------------------ */

.tophand-overlay-hero {
	position: relative;
	background-color: var(--wp--preset--color--denim);
	color: var(--wp--preset--color--white);
}
.tophand-overlay-hero__media {
	line-height: 0;
}
.tophand-overlay-hero .tophand-banner__img {
	display: block;
	width: 100%;
	height: auto;
}
.tophand-overlay-hero__panel {
	padding: var(--wp--preset--spacing--50) var(--tophand-gutter) var(--wp--preset--spacing--60);
}
.tophand-overlay-hero__text {
	max-width: 36rem;
}
.tophand-overlay-hero h1 {
	margin: 0;
	color: var(--wp--preset--color--white);
	letter-spacing: -0.01em;
	text-wrap: balance;
}
.tophand-overlay-hero .tophand-lede {
	margin: 0;
	color: var(--wp--preset--color--white);
}

@media (min-width: 1200px) {
	/* Image and panel share one grid cell. The photo box holds the home
	   banner's 2.5:1 band as its minimum; the row grows when the text needs
	   more room (eyebrow, long subhead, buttons). The photo fills the row with
	   object-fit: cover around the focal point set per banner in inc/media.php. */
	.tophand-overlay-hero {
		display: grid;
		/* Fixed to the container. An auto column would size itself from the
		   photo box's aspect ratio times a text-driven row height. */
		grid-template-columns: minmax(0, 1fr);
	}
	.tophand-overlay-hero > .tophand-overlay-hero__media,
	.tophand-overlay-hero > .tophand-overlay-hero__panel {
		grid-area: 1 / 1;
		/* The group's block gap put a 24px top margin on the panel, which left
		   an unscrimmed strip of photo above it. */
		margin-block: 0;
	}
	.tophand-overlay-hero > .tophand-overlay-hero__media {
		position: relative;
		/* Width pinned to the column so a text-driven row height crops the
		   photo instead of widening the box to keep 5:2. */
		width: 100%;
		aspect-ratio: 5 / 2;
		align-self: stretch;
	}
	.tophand-overlay-hero .tophand-banner__img {
		position: absolute;
		inset: 0;
		height: 100%;
		object-fit: cover;
		object-position: 70% 50%;
	}
	.tophand-overlay-hero__panel {
		position: relative;
		display: flex;
		align-items: center;
		padding: var(--wp--preset--spacing--60) 0;
		/* Scrim. Held strong across the full width of the type, then faded out.
		   Stops were set by sampling the photograph under the headline and
		   subhead and measuring the composite against white. Built from the
		   denim preset with color-mix so no color is defined outside theme.json. */
		background: linear-gradient(
			to right,
			color-mix(in srgb, var(--wp--preset--color--denim) 92%, transparent) 0%,
			color-mix(in srgb, var(--wp--preset--color--denim) 88%, transparent) 40%,
			color-mix(in srgb, var(--wp--preset--color--denim) 80%, transparent) 52%,
			color-mix(in srgb, var(--wp--preset--color--denim) 38%, transparent) 64%,
			color-mix(in srgb, var(--wp--preset--color--denim) 0%, transparent) 78%
		);
	}
	.tophand-overlay-hero__text {
		width: min(42%, 34rem);
		max-width: none;
		margin-left: max(var(--tophand-gutter), calc((100% - 72rem) / 2));
		padding-right: var(--wp--preset--spacing--40);
	}
}

@media (min-width: 1600px) {
	.tophand-overlay-hero__text {
		width: min(38%, 36rem);
	}
}

/* Cards and buttons keep their own colors inside a denim section. */
.is-style-dark-section .tophand-card :is(h2, h3, h4) {
	color: var(--wp--preset--color--denim);
}
.is-style-dark-section .tophand-card p {
	color: var(--wp--preset--color--iron);
}
.is-style-dark-section .tophand-card a {
	color: var(--wp--preset--color--rust);
}
.tophand-split-cta {
	display: flex;
}
