/*
 * AAFCPAs Landing Page shell
 *
 * Loaded only on pages using the Landing Page template (inc/landing-page.php),
 * after global.css. Covers the shared chrome only: landing header, footer,
 * main area and anchor offsets. Campaign sections are styled by their blocks.
 *
 * Source of truth: Figma "SOC Landing Pages" → Campaign / Header and
 * Campaign / Minimal Footer (Desktop 1440 / Mobile 390). Sizes scale fluidly
 * between those two frames (clamp() from a 390px to a 1440px viewport).
 *
 * Everything is scoped to `.aaf-landing` (body class) or `.aaf-lp-*` so it
 * can't reach normal pages even if this file were loaded by mistake.
 */

.aaf-landing {
	/* Figma: header 76px (mobile) → 92px (desktop). */
	--aaf-lp-header-height: clamp(76px, 70.057px + 1.5238vw, 92px);
	/* Figma: side padding 20px (mobile) → 64px (desktop). */
	--aaf-lp-gutter: clamp(20px, 3.657px + 4.1905vw, 64px);
	--aaf-lp-admin-bar: 0px;
}

/* WP admin bar is fixed above 600px: keep the sticky header below it. */
.aaf-landing.admin-bar {
	--aaf-lp-admin-bar: 32px;
}

@media (max-width: 782px) {
	.aaf-landing.admin-bar {
		--aaf-lp-admin-bar: 46px;
	}
}

@media (max-width: 600px) {
	.aaf-landing.admin-bar {
		--aaf-lp-admin-bar: 0px;
	}
}

/* ==========================================================================
   Main
   The header is sticky (in flow), so main needs no top offset. The landing
   template also strips `has-solid-header`; this is a belt-and-braces reset.
   ========================================================================== */

.aaf-landing .aaf-main--landing {
	padding-top: 0;
}

/* Anchor targets (e.g. the header CTA → #soc-form) land below the sticky
   header. Beats the global [class*="wp-block-aafcpas-"][id] rule, which
   assumes the taller site header + announcement bar. The admin bar is not
   added here: core's admin-bar CSS already sets html { scroll-padding-top }. */
body.aaf-landing [id] {
	scroll-margin-top: calc(var(--aaf-lp-header-height) + var(--wp--preset--spacing--md));
}

/* ==========================================================================
   Landing Header
   ========================================================================== */

.aaf-lp-header {
	position: sticky;
	top: var(--aaf-lp-admin-bar);
	z-index: var(--wp--custom--z-index--navbar);
	background-color: var(--wp--preset--color--white-50);
	/* Shadow only (no border or size change) so scrolling never shifts layout. */
	transition: box-shadow 0.2s ease;
}

.aaf-lp-header.is-scrolled {
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 6px 16px rgba(0, 18, 20, 0.08);
}

.aaf-lp-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	height: var(--aaf-lp-header-height);
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 var(--aaf-lp-gutter);
}

.aaf-lp-header__logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	border-radius: var(--wp--custom--border-radius--small);
}

.aaf-lp-header__logo:focus-visible {
	outline: 2px solid var(--wp--preset--color--orange-700);
	outline-offset: 4px;
}

.aaf-lp-header__logo-img {
	display: block;
	/* Figma: 88px (mobile) → 205px (desktop). */
	width: clamp(88px, 44.543px + 11.1429vw, 205px);
	height: auto;
	aspect-ratio: 204.941 / 53.982;
}

/* CTA: the site's .aaf-btn--fill (60px pill, 24/8 padding, 16px gap, 44px
   icon circle) at Figma's Body MD/Semibold 16px. .aaf-btn defaults to 18px. */
.aaf-lp-header .aaf-lp-header__cta {
	align-self: center;
	font-size: var(--wp--preset--font-size--body-md);
}

.aaf-lp-header .aaf-lp-header__cta:focus-visible {
	outline: 2px solid var(--wp--preset--color--orange-700);
	outline-offset: 2px;
}

/* Figma mobile: CTA fills the space beside the logo, 48px tall, 12/6
   padding, 14px/20px label, icon pushed to the right edge. */
@media (max-width: 767px) {
	.aaf-lp-header .aaf-lp-header__cta {
		flex: 1 1 0;
		min-width: 0;
		height: 48px;
		padding: 2px 6px 2px 12px;
		gap: 0;
		font-size: var(--wp--preset--font-size--body-sm);
		line-height: 20px;
	}

	.aaf-lp-header .aaf-lp-header__cta .aaf-btn__label {
		flex: 1 1 auto;
		text-align: center;
	}
}

/* Figma's 390px frame fits "Get SOC 1 Pricing & Timeline" on one line with
   ~0px to spare. On narrower phones the label wraps to a second line inside
   the 48px pill instead of overflowing the viewport. */
@media (max-width: 389px) {
	.aaf-lp-header .aaf-lp-header__cta .aaf-btn__label {
		white-space: normal;
		min-width: 0;
	}
}

/* ==========================================================================
   Landing Footer
   Figma: white, Body SM/Regular (14px/1.5) in black-300. Desktop: copyright
   left, Privacy Policy right, 32/64 padding. Mobile: stacked, 12px gap,
   24/20 padding.
   ========================================================================== */

.aaf-lp-footer {
	background-color: var(--wp--preset--color--white-50);
	color: var(--wp--preset--color--black-300);
	font-family: var(--wp--preset--font-family--plus-jakarta-sans);
	font-size: var(--wp--preset--font-size--body-sm);
	font-weight: 400;
	line-height: 1.5;
}

.aaf-lp-footer__inner {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px var(--wp--preset--spacing--md);
	max-width: 1440px;
	margin: 0 auto;
	padding: clamp(24px, 21.029px + 0.7619vw, 32px) var(--aaf-lp-gutter);
}

.aaf-lp-footer__copyright {
	margin: 0;
}

.aaf-lp-footer a.aaf-lp-footer__link {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.aaf-lp-footer a.aaf-lp-footer__link:hover {
	color: var(--wp--preset--color--black-500);
	text-decoration: underline;
}

.aaf-lp-footer a.aaf-lp-footer__link:focus-visible {
	color: var(--wp--preset--color--black-500);
	outline: 2px solid var(--wp--preset--color--orange-700);
	outline-offset: 2px;
	border-radius: 2px;
}

.aaf-lp-footer a.aaf-lp-footer__link:active {
	opacity: 0.8;
}

@media (max-width: 767px) {
	.aaf-lp-footer__inner {
		flex-direction: column;
	}
}
