/*
Theme Name: My Financial Controller
Theme URI: https://myfinancialcontroller.co.uk
Author: Abner Ymanuehl Tuyac
Description: Custom block theme for My Financial Controller. Navy and muted gold, Manrope, white space, no page builder. Edit text and prices in the block editor.
Version: 0.1.8
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: myfc
*/

/* Small extras theme.json cannot express. Colours come from the palette variables. */

/* Eyebrow label with the short gold line in front ("— OUR SERVICES"). */
.myfc-eyebrow-line {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.myfc-eyebrow-line::before {
	content: "";
	width: 2rem;
	height: 2px;
	background: var(--wp--preset--color--gold);
	flex: none;
}

/* Thin vertical dividers between columns (services row), stacked on phones. */
@media (min-width: 782px) {
	.myfc-divided > .wp-block-column + .wp-block-column {
		border-left: 1px solid var(--wp--preset--color--line);
		padding-left: var(--wp--preset--spacing--40);
	}
}
@media (max-width: 781px) {
	.myfc-divided > .wp-block-column + .wp-block-column {
		border-top: 1px solid var(--wp--preset--color--line);
		padding-top: var(--wp--preset--spacing--40);
	}
}

/* Arrow links ("View Packages →"). */
.myfc-arrow-link a {
	text-decoration: none;
	font-weight: 600;
}
.myfc-arrow-link a:hover,
.myfc-arrow-link a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

/* Visible keyboard focus everywhere (WCAG 2.2 AA). */
:where(a, button, input, select, textarea, .wp-element-button):focus-visible {
	outline: 2px solid var(--wp--preset--color--navy);
	outline-offset: 3px;
}

/* Header: keep the Contact button on one line next to the menu. */
.myfc-header .wp-block-buttons {
	flex-wrap: nowrap;
}

/* Footer link lists without bullets. */
.myfc-plain-list {
	list-style: none;
}
.myfc-plain-list a {
	text-decoration: none;
}
.myfc-plain-list a:hover,
.myfc-plain-list a:focus-visible {
	text-decoration: underline;
}

/* Gold words inside headings: no highlight background, even when the editor strips the inline style. */
mark.has-inline-color {
	background-color: transparent;
}

/* Header on small screens: Contact stays on one line, tagline hides to make room. */
.myfc-header .wp-block-button__link {
	white-space: nowrap;
}
@media (max-width: 600px) {
	.myfc-header .myfc-tagline {
		display: none;
	}
}

/* Outline button on the navy strip: white border and text. */
.myfc-on-dark .wp-block-button__link {
	color: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--white);
}
.myfc-on-dark .wp-block-button__link:hover,
.myfc-on-dark .wp-block-button__link:focus-visible {
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--navy);
}
.has-navy-background-color :where(a, button, .wp-element-button):focus-visible {
	outline-color: var(--wp--preset--color--gold);
}
@media (max-width: 781px) {
	.myfc-cta-buttons {
		justify-content: flex-start !important;
	}
}

/* Tablets: show the menu button up to laptop width, so the menu never wraps onto two lines. */
@media (min-width: 600px) and (max-width: 1079px) {
	.myfc-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}
	.myfc-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

/* Menu button (phones and tablets). */
.myfc-header .wp-block-navigation__responsive-container-open svg,
.myfc-header .wp-block-navigation__responsive-container-close svg {
	width: 28px;
	height: 28px;
}

/* Open menu panel (phones and tablets): full-screen white panel, one clear list. */
.myfc-header .is-menu-open {
	padding: 1.25rem clamp(1.25rem, 6vw, 2.5rem) 2.5rem !important;
	animation: myfc-menu-in 0.18s ease-out;
}
@keyframes myfc-menu-in {
	from { opacity: 0; transform: translateY(-6px); }
	to { opacity: 1; transform: none; }
}
.myfc-header .is-menu-open .wp-block-navigation__responsive-container-close {
	top: 1.25rem;
	right: clamp(1.25rem, 6vw, 2.5rem);
	color: var(--wp--preset--color--navy);
}
.myfc-header .is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 3rem !important;
	align-items: stretch !important;
	width: auto;
	max-width: 100%;
	box-sizing: border-box;
}
.myfc-header .is-menu-open .wp-block-navigation__container {
	flex-direction: column;
	align-items: stretch !important;
	gap: 0 !important;
	width: 100%;
}

/* Top-level links: large, semibold, thin divider under each. */
.myfc-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item {
	display: flex;
	flex-direction: column;
	align-items: flex-start !important;
	width: 100%;
	box-sizing: border-box;
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	font-size: 1.1875rem;
	font-weight: 600;
}
.myfc-header .is-menu-open .wp-block-navigation-item__content {
	padding: 0 !important;
	text-decoration: none;
}

/* Sub-items: smaller, slate, indented under a short gold line. */
.myfc-header .is-menu-open .wp-block-navigation__submenu-container {
	gap: 0 !important;
	margin: 0.6rem 0 0.15rem !important;
	padding: 0 0 0 1rem !important;
	border-left: 2px solid var(--wp--preset--color--gold) !important;
	font-size: 1rem;
	font-weight: 500;
}
.myfc-header .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item {
	align-items: flex-start !important;
	padding: 0.3rem 0;
	color: var(--wp--preset--color--slate);
}
.myfc-header .is-menu-open .wp-block-navigation__submenu-icon {
	display: none;
}
.myfc-header .is-menu-open .wp-block-navigation-item__content:hover,
.myfc-header .is-menu-open .wp-block-navigation-item__content:focus-visible {
	color: var(--wp--preset--color--navy);
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

/* "Contact" only shows in the open menu, as a full-width gold button; desktop has the header button. */
.myfc-header .myfc-menu-contact {
	display: none !important;
}
.myfc-header .is-menu-open .myfc-menu-contact {
	display: flex !important;
	align-items: stretch !important;
	margin-top: 1.25rem;
	padding: 0 !important;
	border-bottom: 0 !important;
}
.myfc-header .is-menu-open .myfc-menu-contact .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 0.9rem 1.5rem !important;
	border-radius: 4px;
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--navy);
	text-align: center;
	font-size: 1rem;
}
.myfc-header .is-menu-open .myfc-menu-contact .wp-block-navigation-item__content:hover,
.myfc-header .is-menu-open .myfc-menu-contact .wp-block-navigation-item__content:focus-visible {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
	text-decoration: none;
}

/* No white gap between the navy call-to-action strip and the footer. */
.wp-site-blocks > section,
.wp-site-blocks > footer {
	margin-block-start: 0;
}

/* Buttons: one size for filled and outline, smooth hover. */
.wp-element-button,
.wp-block-button__link {
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	line-height: 1.5;
}
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-custom-font-size) {
	padding: 0.85rem 1.5rem;
}
@media (prefers-reduced-motion: reduce) {
	.wp-element-button,
	.wp-block-button__link {
		transition: none;
	}
}
