/*
 * A.T.E. HUBER theme styles that theme.json cannot express.
 * Tokens come from theme.json as --wp--preset--* and --wp--custom--* variables.
 */

:root {
	--ahet-section-gap: var(--wp--preset--spacing--section);
	--ahet-rule: rgb(14 46 84 / 35%);
}

/* Line breaks ----------------------------------------------------------- */

/* Headings split into even lines; paragraphs avoid a single word on the last line. */
:where(h1, h2, h3, h4, [class*="__title"], [class*="__heading"]) {
	text-wrap: balance;
}

:where(p, li, td, figcaption, summary) {
	text-wrap: pretty;
}

.ahet-nowrap {
	white-space: nowrap;
}

/* Reusable text styles ------------------------------------------------ */

.ahet-eyebrow {
	margin: 0;
	color: var(--wp--preset--color--blue);
	font-size: var(--wp--preset--font-size--body);
	text-transform: uppercase;
	letter-spacing: 0;
}

/* Header -------------------------------------------------------------- */

.ahet-header {
	position: relative;
	z-index: 10;
	padding-top: 22px;
	padding-bottom: 18px;
}

.ahet-navbar {
	min-height: 55px;
	padding: 0 25px 0 36px;
	border-radius: var(--wp--custom--radius--panel);
	background: rgb(255 255 255 / 92%);
	backdrop-filter: blur(9px);
	gap: 20px;
}

.ahet-navbar .ahet-logo {
	margin: 0;
	flex-shrink: 0;
}

.ahet-header-cta .wp-block-button__link {
	padding: 11px 27px;
	line-height: 1.27;
}

/* Tablets: the full menu stays in the bar (Figma 1024 and 768), with tighter spacing. */
@media (max-width: 1080px) {
	.ahet-navbar {
		padding: 0 14px 0 20px;
		gap: 12px;
	}

	.ahet-navbar .ahet-logo img {
		width: 130px !important;
	}

	.ahet-header-cta .wp-block-button__link {
		padding: 10px 18px;
		font-size: 13px;
	}
}

/*
 * Phones: menu button and full-screen menu (Main menu block). The drawer carries
 * Reach Out, so the header button hides. A backdrop filter would trap the
 * fixed drawer inside the bar, so it is turned off here.
 */
@media (max-width: 767px) {
	.ahet-navbar {
		padding: 6px 8px 6px 16px;
		background: var(--wp--preset--color--white);
		backdrop-filter: none;
	}

	.ahet-navbar .ahet-logo img {
		width: 120px !important;
	}

	.ahet-navbar .ahet-header-cta {
		display: none;
	}
}

/* Section title row --------------------------------------------------- */

.ahet-title-row {
	gap: 20px;
}

.ahet-title-row > .wp-block-heading {
	margin: 0;
	flex-shrink: 0;
}

.ahet-title-row__rule.wp-block-separator {
	flex: 1 1 auto;
	min-width: 24px;
	margin: 0;
}

.ahet-title-row__aside {
	margin: 0;
	flex-shrink: 0;
}

@media (max-width: 781px) {
	.ahet-title-row {
		flex-wrap: wrap !important;
	}

	.ahet-title-row__rule.wp-block-separator {
		display: none;
	}

	.ahet-title-row__aside {
		flex-basis: 100%;
	}
}

/* Sections ------------------------------------------------------------ */

/* Every top-level section on a page is 110 px from the one above it.
   Specificity is kept low (0,1,1) so blocks can set their own, such as right under the anchor bar. */
.ahet-main :where(.wp-block-post-content > *) + section {
	margin-block-start: var(--ahet-section-gap);
}

/* The page starts right under the header; the hero brings its own top padding. */
.ahet-main,
.ahet-main > .wp-block-post-content,
.ahet-main > .wp-block-post-content > :first-child {
	margin-block-start: 0;
}

/* FAQ ----------------------------------------------------------------- */

.ahet-faq__list {
	border-top: 1px solid rgb(14 46 84 / 15%);
}

.ahet-faq .wp-block-details summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 16px;
	color: var(--wp--preset--color--navy);
	font-weight: 600;
}

.ahet-faq .wp-block-details summary::-webkit-details-marker {
	display: none;
}

.ahet-faq .wp-block-details summary::after {
	content: "";
	flex-shrink: 0;
	width: 8px;
	height: 8px;
	margin-top: 4px;
	border-right: 1.5px solid currentcolor;
	border-bottom: 1.5px solid currentcolor;
	transform: rotate(-45deg);
	transition: transform 0.2s ease;
}

.ahet-faq .wp-block-details[open] summary::after {
	transform: rotate(45deg);
}

.ahet-faq .wp-block-details > p {
	margin: 8px 0 0;
}

/* Footer band --------------------------------------------------------- */

/* 110 px from the last section to the banner: 55 px of white, then 55 px of the light blue band. */
.ahet-footer-band {
	margin-block-start: calc(var(--ahet-section-gap) / 2);
	padding-top: min(calc(var(--ahet-section-gap) / 2), 4vh);
}

/*
 * The closing banner, footer and legal bar fit in one screen height.
 * Gaps follow the design (129 px, 35 px, 33 px rows) on tall screens and
 * shrink with the window height on shorter ones.
 */
.ahet-footer {
	/* At least 56 px between the banner and the footer (Medhavini, 2 Dec 2026). */
	margin-top: clamp(56px, 8vh, 129px);
	padding-bottom: clamp(14px, 3vh, 35px);
	color: var(--wp--preset--color--navy);
}

/* Logo column plus four link columns on one row, sharing the width (269 : 175 in the design). */
.ahet-footer__top {
	display: grid !important;
	grid-template-columns: minmax(0, 269fr) repeat(4, minmax(0, 175fr));
	gap: 0 16px !important;
}

.ahet-footer__brand {
	gap: 15px;
}

.ahet-footer__brand > p {
	margin: 0;
	max-width: 200px;
}

.ahet-footer__logo,
.ahet-footer__logo img {
	margin: 0;
	mix-blend-mode: multiply;
}

.ahet-social {
	margin-top: 14px !important;
	gap: 5px;
}

.ahet-social .wp-social-link {
	font-size: 16px;
}

.ahet-footer__col {
	gap: clamp(8px, 2vh, 18px);
}

.ahet-footer__heading {
	margin: 0;
	font-size: var(--wp--preset--font-size--body);
	font-weight: 700;
}

.ahet-footer__nav {
	gap: 0;
	font-size: var(--wp--preset--font-size--body);
}

.ahet-footer__nav .wp-block-navigation-item__content {
	line-height: clamp(26px, 3.7vh, 33px);
	color: var(--wp--preset--color--navy);
}

.ahet-footer__bottom {
	margin-top: clamp(14px, 3vh, 32px);
	align-items: center;
}

.ahet-footer__legal-name {
	max-width: 513px;
	margin: 0;
}

.ahet-legal-bar {
	border-top: 1px solid var(--wp--preset--color--blue);
	padding-top: clamp(4px, 1vh, 9px);
	padding-bottom: clamp(8px, 2vh, 19px);
}

.ahet-legal-bar p {
	display: flex;
	gap: 50px;
	margin: 0;
	line-height: 33px;
}

.ahet-legal-bar a {
	color: var(--wp--preset--color--navy);
}

/* Short laptop windows: tighter footer so banner, footer and legal bar still fit in one screen. */
@media (min-width: 782px) and (max-height: 700px) {
	.ahet-footer-band {
		padding-top: 12px;
	}

	.ahet-footer {
		margin-top: 56px;
	}

	.ahet-footer__brand {
		gap: 6px;
	}

	.ahet-footer__brand > p {
		max-width: none;
		line-height: 1.4;
	}

	.ahet-social {
		margin-top: 4px !important;
	}
}

@media (max-width: 781px) {
	.ahet-footer__bottom {
		flex-direction: column;
		align-items: stretch !important;
		gap: 20px;
	}

	/* Sign-up first, then the legal name, as in the mobile design. */
	.ahet-footer__legal-name {
		order: 2;
	}
}

/* Footer column headings are buttons on phones (assets/js/theme.js); on wide screens they look like plain headings. */
.ahet-footer__toggle {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
}

.ahet-footer__toggle:disabled {
	cursor: default;
}

/* Phones (Figma "Mobile (390 px)"): 20 px margins, 48 px between sections, body 15 px. */
@media (max-width: 781px) {
	:root {
		--ahet-section-gap: 48px;
		--wp--preset--font-size--body: 15px;
	}

	body {
		font-size: 15px;
	}
}

/*
 * Tablets (600 to 781 px): logo, address and social links on one row, then the four
 * link columns side by side and open. The phone accordion would leave most of the width empty.
 */
@media (min-width: 600px) and (max-width: 781px) {
	.ahet-footer__top {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		row-gap: 32px !important;
	}

	.ahet-footer__brand {
		grid-column: 1 / -1;
		flex-direction: row !important;
		flex-wrap: wrap;
		align-items: center !important;
		gap: 16px 40px;
	}

	.ahet-footer__brand > p {
		max-width: none;
	}

	.ahet-social {
		margin-top: 0 !important;
		margin-left: auto !important;
	}
}

/* Phones (up to 599 px): link columns open and close (assets/js/theme.js). */
@media (max-width: 599px) {
	.ahet-footer__top {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 0 !important;
	}

	.ahet-footer__brand {
		padding-bottom: 20px;
	}

	.ahet-footer__col {
		gap: 0;
		border-top: 1px solid var(--ahet-rule);
	}

	.ahet-footer__col:last-child {
		border-bottom: 1px solid var(--ahet-rule);
	}

	.ahet-footer__heading {
		align-self: stretch;
	}

	.ahet-footer__toggle {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 14px 0;
		cursor: pointer;
	}

	.ahet-footer__toggle::after {
		content: "+";
		font-weight: 400;
	}

	.ahet-footer__toggle[aria-expanded="true"]::after {
		content: "\2212";
	}

	.ahet-footer__nav {
		padding-bottom: 12px;
	}

	.ahet-footer__nav[hidden] {
		display: none !important;
	}
}

/* Motion -------------------------------------------------------------- */

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

/* Header stays on screen. As the page scrolls, the bar eases into a floating
   card (as on yellowforhormones.com). theme.js sets --ahet-float from 0 (top
   of page) to 1 (after 80px of scroll), so the change follows the scroll
   instead of jumping at one point. */
/* Room the floating header takes at the top of the window: sticky side
   menus and in-page links (#anchors) stop below it. */
:root {
	--ahet-float: 0;
	--ahet-header-space: calc(var(--wp-admin--admin-bar--height, 0px) + 80px);
	scroll-padding-top: calc(var(--ahet-header-space) + 16px);
}

@media (max-width: 767px) {
	:root {
		--ahet-header-space: calc(var(--wp-admin--admin-bar--height, 0px) + 72px);
	}
}

/* Slides up 12px as it floats. Moving the sticky offset (not a transform)
   keeps the phone menu, which is fixed inside the header, full screen. */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	z-index: 100;
	top: calc(var(--wp-admin--admin-bar--height, 0px) - 12px * var(--ahet-float));
}

/* Only position, tint, blur and shadow change, so nothing below the header moves.
   Tint: white at 92% opacity at the top, pale blue-white at 82% once floating. */
.ahet-navbar {
	background: rgb(calc(255 - 9 * var(--ahet-float)) calc(255 - 4 * var(--ahet-float)) calc(255 - 3 * var(--ahet-float)) / calc(92% - 10% * var(--ahet-float)));
	box-shadow: 0 6px 24px rgb(14 46 84 / calc(8% * var(--ahet-float)));
}

/* Blur only above phone width: on phones a blur would trap the full-screen menu inside the bar. */
@media (min-width: 768px) {
	.ahet-navbar {
		-webkit-backdrop-filter: blur(calc(9px + 5px * var(--ahet-float))) saturate(calc(100% + 40% * var(--ahet-float)));
		backdrop-filter: blur(calc(9px + 5px * var(--ahet-float))) saturate(calc(100% + 40% * var(--ahet-float)));
	}
}

@media (max-width: 767px) {
	.ahet-navbar {
		background: rgb(calc(255 - 9 * var(--ahet-float)) calc(255 - 4 * var(--ahet-float)) calc(255 - 3 * var(--ahet-float)) / calc(92% + 5% * var(--ahet-float)));
	}
}
