/*
Theme Name: Financial Flight Plan
Theme URI: https://financialflightpath.com
Author: Shaan Rais
Description: Custom block (Gutenberg) theme for Financial Flight Path, financial education for commercial airline pilots. Includes ready-made section blocks (hero, about, pillars, testimonials, social follow, newsletter signup, contact form with General and Speaking inquiries, 404 page), subtle entrance animations, and an inbox for newsletter subscribers and inquiries. Header, menus, footer disclaimer, social links, colors, typography and layout are all editable under Appearance > Theme Options.
Version: 0.4.57
Requires at least: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: ffp
*/

/* ==========================================================================
   Header / footer (all values come from theme.json tokens)
   ========================================================================== */
.site-header { position: relative; z-index: 10; background: var(--wp--preset--color--navy-900); }
/* Per-page checkbox (page editor > Header) adds .has-overlay-header to <body>. */
.has-overlay-header .site-header { position: absolute; inset: 0 0 auto; background: transparent; }
.site-header .wp-block-navigation__responsive-container-open,
.site-footer .wp-block-navigation__responsive-container-open { color: var(--wp--preset--color--cream); }
.ffp-logo { margin: 0; }
.ffp-logo img { display: block; width: 240px; height: auto; }
.site-header .wp-block-button__link { white-space: nowrap; }
/* The header button would wrap under the logo below ~1100px; the hero has the same call to action. */
@media (max-width: 1099px) { .site-header .wp-block-buttons:has(.site-header__cta) { display: none !important; } }
.site-header .wp-block-navigation__responsive-container-open,
.site-footer .wp-block-navigation__responsive-container-open { min-width: 44px; min-height: 44px; justify-content: center; } /* comfortable tap target */
/* Open mobile menu: large, easy-to-tap links. */
.site-header .wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem var(--wp--preset--spacing--40) 2rem; }
.site-header .is-menu-open .wp-block-navigation__responsive-container-content { gap: 0.5rem; }
.site-header .is-menu-open .wp-block-navigation__container { gap: 0.25rem; align-items: flex-start; }
.site-header .is-menu-open .wp-block-navigation-item__content { font-size: clamp(1.75rem, 1rem + 3vw, 2.25rem); font-weight: 600; line-height: 1.2; padding: 0.7rem 0; }
/* Menu icons: bold gold bars instead of core's thin 24px glyphs. 44px tap target, the bars sit flush with the page
   gutter (the same edge as the logo), and the close "X" lands exactly where the hamburger was. */
.site-header .wp-block-navigation__responsive-container-open,
.site-header .wp-block-navigation__responsive-container-close {
	width: 44px;
	height: 44px;
	min-width: 44px;
	min-height: 44px;
	padding: 0;
	justify-content: flex-end;
	align-items: center;
	color: var(--wp--preset--color--gold-light);
	background: none;
	border: 0;
	cursor: pointer;
}
.site-header .wp-block-navigation__responsive-container-close { position: absolute; top: 11px; right: 0; z-index: 2; } /* 11px = header centre line (57px) minus the overlay's 24px top padding minus half the button */
.site-header .wp-block-navigation__responsive-container-open svg,
.site-header .wp-block-navigation__responsive-container-close svg { display: none; }
.site-header .wp-block-navigation__responsive-container-open::before {
	content: "";
	width: 30px;
	height: 20px;
	background:
		var(--wp--preset--gradient--gold) 0 0 / 100% 3px no-repeat,
		var(--wp--preset--gradient--gold) 0 50% / 100% 3px no-repeat,
		var(--wp--preset--gradient--gold) 0 100% / 100% 3px no-repeat;
	transition: transform 0.2s ease;
}
.site-header .wp-block-navigation__responsive-container-open:hover::before { transform: scaleX(0.85); transform-origin: right center; }
.site-header .wp-block-navigation__responsive-container-close::before,
.site-header .wp-block-navigation__responsive-container-close::after {
	content: "";
	position: absolute;
	top: calc(50% - 1.5px);
	right: -3px;
	width: 34px;
	height: 3px;
	background: var(--wp--preset--gradient--gold);
	transform: rotate(45deg);
}
.site-header .wp-block-navigation__responsive-container-close::after { transform: rotate(-45deg); }
.site-header .wp-block-navigation__responsive-container-open:focus-visible,
.site-header .wp-block-navigation__responsive-container-close:focus-visible { outline: 2px solid var(--wp--preset--color--gold-light); outline-offset: 2px; }
/* Footer on tablet and phone: logo above the menu, both centred, with air between them. */
@media (max-width: 899px) {
	.site-footer__inner { flex-direction: column; align-items: center; justify-content: center; gap: 1.75rem; text-align: center; }
	.site-footer .wp-block-navigation,
	.site-footer .wp-block-navigation__container { justify-content: center; }
	.site-footer .wp-block-navigation__container { gap: 0.75rem 1.75rem; }
	.site-footer__disclaimer,
	.site-footer__copyright { text-align: center; }
}
/* Header menu collapses to the hamburger below 900px (core only does it below 600px, which wraps the links under the logo on tablets). */
@media (max-width: 899px) {
	.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none; }
	.site-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
}

/* ==========================================================================
   Hover + focus states
   ========================================================================== */
.wp-element-button,
.wp-block-button__link {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.wp-element-button::after,
.wp-block-button__link::after { /* light sweep across the gold */
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.38) 50%, transparent 68%);
	transform: translateX(-125%);
	transition: transform 0.7s ease;
	pointer-events: none;
}
.wp-element-button:hover,
.wp-block-button__link:hover { transform: translateY(-2px); filter: brightness(1.04); box-shadow: 0 12px 26px -10px color-mix(in srgb, var(--wp--preset--color--gold) 80%, transparent); }
.wp-element-button:hover::after,
.wp-block-button__link:hover::after { transform: translateX(125%); }
.wp-element-button:active,
.wp-block-button__link:active { transform: translateY(0); box-shadow: none; }
.wp-element-button:focus-visible,
.wp-block-button__link:focus-visible { outline: 2px solid var(--wp--preset--color--gold-light); outline-offset: 3px; }

/* Navigation links: gold underline grows in. */
.wp-block-navigation .wp-block-navigation-item__content {
	padding-bottom: 3px;
	background: linear-gradient(var(--wp--preset--color--gold-light), var(--wp--preset--color--gold-light)) no-repeat 0 100% / 0 1px;
	transition: background-size 0.3s ease, color 0.2s ease;
}
.wp-block-navigation .wp-block-navigation-item__content:hover,
.wp-block-navigation .wp-block-navigation-item__content:focus-visible { background-size: 100% 1px; }
.wp-block-navigation .wp-block-navigation-item__content:focus-visible { outline: 2px solid var(--wp--preset--color--gold-light); outline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
	.wp-element-button,
	.wp-block-button__link,
	.wp-block-navigation .wp-block-navigation-item__content { transition: none; }
	.wp-element-button:hover,
	.wp-block-button__link:hover { transform: none; }
	.wp-element-button::after,
	.wp-block-button__link::after { display: none; }
}

/* ==========================================================================
   Responsive type tokens. Values live in theme.json (settings.custom.responsive)
   and are editable under Appearance > Theme Options.
   Breakpoints: tablet <= 1024px, mobile <= 781px.
   ========================================================================== */
:root {
	--ffp-fs-body: var(--wp--custom--responsive--body--desktop);
	--ffp-fs-lead: var(--wp--custom--responsive--lead--desktop);
	--ffp-fs-medium: var(--wp--custom--responsive--medium--desktop);
	--ffp-fs-display: var(--wp--custom--responsive--display--desktop);
	--ffp-fs-giant: var(--wp--custom--responsive--giant--desktop);
	--ffp-fs-heading-1: var(--wp--custom--responsive--heading-1--desktop);
	--ffp-fs-heading-2: var(--wp--custom--responsive--heading-2--desktop);
	--ffp-fs-heading-3: var(--wp--custom--responsive--heading-3--desktop);
	--ffp-fs-button: var(--wp--custom--responsive--button--desktop);
	--ffp-fs-eyebrow: var(--wp--custom--responsive--eyebrow--desktop);
}
@media (max-width: 1024px) {
	:root {
		--ffp-fs-body: var(--wp--custom--responsive--body--tablet);
		--ffp-fs-lead: var(--wp--custom--responsive--lead--tablet);
		--ffp-fs-medium: var(--wp--custom--responsive--medium--tablet);
		--ffp-fs-display: var(--wp--custom--responsive--display--tablet);
		--ffp-fs-giant: var(--wp--custom--responsive--giant--tablet);
		--ffp-fs-heading-1: var(--wp--custom--responsive--heading-1--tablet);
		--ffp-fs-heading-2: var(--wp--custom--responsive--heading-2--tablet);
		--ffp-fs-heading-3: var(--wp--custom--responsive--heading-3--tablet);
		--ffp-fs-button: var(--wp--custom--responsive--button--tablet);
		--ffp-fs-eyebrow: var(--wp--custom--responsive--eyebrow--tablet);
	}
}
@media (max-width: 781px) {
	:root {
		--ffp-fs-body: var(--wp--custom--responsive--body--mobile);
		--ffp-fs-lead: var(--wp--custom--responsive--lead--mobile);
		--ffp-fs-medium: var(--wp--custom--responsive--medium--mobile);
		--ffp-fs-display: var(--wp--custom--responsive--display--mobile);
		--ffp-fs-giant: var(--wp--custom--responsive--giant--mobile);
		--ffp-fs-heading-1: var(--wp--custom--responsive--heading-1--mobile);
		--ffp-fs-heading-2: var(--wp--custom--responsive--heading-2--mobile);
		--ffp-fs-heading-3: var(--wp--custom--responsive--heading-3--mobile);
		--ffp-fs-button: var(--wp--custom--responsive--button--mobile);
		--ffp-fs-eyebrow: var(--wp--custom--responsive--eyebrow--mobile);
	}
}

/* Speaking page (tall hero): the header button is the design's 282 x 50. */
body:has(.ffp-hero.is-style-tall) .site-header .wp-block-button__link { padding: 0.9rem 2.5625rem; }
body:has(.ffp-hero.is-style-tall) .site-header .wp-block-navigation-item__content { font-weight: 600; }

/* Images that have a wide (2560px+) canvas are wrapped in a <picture> (inc/wide-images.php); it must not take part in the layout. */
picture.ffp-wide { display: contents; }

/* Visually hidden, still read by screen readers (e.g. the "(opens in a new tab)" notice). */
.ffp-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
