/* ==========================================================================
   Fifthmark — theme styles
   Colors, fonts, sizes and default buttons live in theme.json (editable in
   Appearance → Editor → Styles). This file adds the branded block styles,
   header/footer details, hover effects and the animation system.
   ========================================================================== */

:root {
	--fm-gold: #C7A56B;
	--fm-gold-hover: #D9BC86;
	--fm-gold-ink: #7D5F2E;
	--fm-navy: #142234;
	--fm-deep: #0B1420;
	--fm-ivory: #F5F0E7;
	--fm-charcoal: #202329;
	--fm-line: rgba(199, 165, 107, 0.18);
	--fm-line-strong: rgba(199, 165, 107, 0.45);
	--fm-radius: 2px;
	--fm-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	--fm-sweep: url(../images/gold_sweep.png);
}

@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

.wp-site-blocks { overflow-x: clip; }

/* Full-width sections sit flush against each other (no ivory gaps) */
.wp-site-blocks > * { margin-block-start: 0; }
.wp-block-post-content > .alignfull,
.is-root-container > .alignfull { margin-block-start: 0 !important; margin-block-end: 0 !important; }
.wp-block-post-content > .alignfull:first-child { margin-top: 0; }

img { height: auto; }

:focus-visible { outline: 2px solid var(--fm-gold); outline-offset: 3px; }

/* Dark contexts: sections, cards and panels on navy -------------------------------- */
:is(.has-deep-navy-background-color, .has-midnight-navy-background-color, .has-charcoal-background-color,
	.is-style-fm-hero, .is-style-fm-cta, .is-style-fm-card-dark, .is-style-fm-panel, .fm-header, .fm-footer) {
	--fm-eyebrow: var(--fm-gold);
	--fm-soft: #B9C0C9;
	--fm-outline-text: var(--fm-ivory);
	--fm-outline-border: rgba(199, 165, 107, 0.65);
	--fm-tag: var(--fm-gold);
}

:is(.has-deep-navy-background-color, .has-midnight-navy-background-color, .has-charcoal-background-color,
	.is-style-fm-hero, .is-style-fm-cta, .is-style-fm-card-dark, .is-style-fm-panel, .fm-header, .fm-footer)
	a:where(:not(.wp-element-button)) {
	color: var(--fm-gold);
}

/* Light contexts (default, and light cards/sections placed inside dark ones) */
:root,
:is(.is-style-fm-card, .has-warm-ivory-background-color, .has-card-ivory-background-color, .has-sand-background-color, .has-white-background-color) {
	--fm-eyebrow: var(--fm-gold-ink);
	--fm-soft: #4A515C;
	--fm-outline-text: var(--fm-charcoal);
	--fm-outline-border: var(--fm-gold-ink);
	--fm-tag: var(--fm-gold-ink);
}
:is(.is-style-fm-card, .has-warm-ivory-background-color, .has-card-ivory-background-color, .has-sand-background-color, .has-white-background-color)
	a:where(:not(.wp-element-button)) {
	color: var(--fm-gold-ink);
}

/* Gold word inside a heading (select text → Highlight → Champagne Gold) */
mark.has-inline-color { background: transparent; }

/* Paragraph styles ------------------------------------------------------------------ */
.is-style-fm-eyebrow {
	display: flex;
	align-items: center;
	gap: 14px;
	font-size: 12px !important;
	line-height: 1.4;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--fm-eyebrow);
}
.is-style-fm-eyebrow::before {
	content: "";
	width: 40px;
	height: 1px;
	background: currentColor;
	flex: none;
}
.is-style-fm-eyebrow.has-text-align-center { justify-content: center; }

.is-style-fm-lead {
	font-size: 18px;
	line-height: 1.65;
	color: var(--fm-soft);
	max-width: 600px;
}
.has-text-align-center.is-style-fm-lead { margin-left: auto; margin-right: auto; }

.is-style-fm-number {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 40px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.02em;
	color: var(--fm-eyebrow);
}

.is-style-fm-tag {
	display: inline-block;
	width: fit-content;
	font-size: 11px !important;
	line-height: 1.4;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 700;
	padding: 5px 10px;
	border: 1px solid currentColor;
	border-radius: var(--fm-radius);
	color: var(--fm-tag);
}

.is-style-fm-step {
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--fm-outline-border);
	border-radius: 50%;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 14px !important;
	color: var(--fm-eyebrow);
	flex: none;
}

/* Buttons --------------------------------------------------------------------------- */
.wp-element-button,
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 50px;
	transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.wp-block-button__link:hover { text-decoration: none; }

.wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background) {
	background: transparent;
	color: var(--fm-outline-text);
	border: 1px solid var(--fm-outline-border);
	padding: 14px 28px;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: rgba(199, 165, 107, 0.12);
	color: var(--fm-outline-text);
	border-color: var(--fm-gold);
}

/* Text link with underline ("Explore Service →") — Additional CSS class: fm-link */
.fm-link a, a.fm-link {
	display: inline-flex;
	gap: 8px;
	font-weight: 700;
	font-size: 14px;
	color: var(--fm-eyebrow) !important;
	border-bottom: 1px solid currentColor;
	padding-bottom: 4px;
	text-decoration: none !important;
}

/* Group styles ---------------------------------------------------------------------- */
.is-style-fm-hero {
	position: relative;
	overflow: hidden;
	background: radial-gradient(70% 90% at 85% 25%, #2a2418 0%, #0f1a28 48%, #0B1420 85%) !important;
	color: var(--fm-ivory);
}
.is-style-fm-hero::after {
	content: "";
	position: absolute;
	left: -10%;
	right: -10%;
	bottom: -40px;
	height: 360px;
	background: var(--fm-sweep) center / cover no-repeat;
	opacity: 0.4;
	pointer-events: none;
	z-index: 0;
}
.is-style-fm-hero > * { position: relative; z-index: 1; }

.is-style-fm-cta {
	background: var(--fm-sweep) center 20% / cover no-repeat, linear-gradient(120deg, #142234 0%, #0B1420 60%, #2a2418 100%) !important;
	border-top: 1px solid rgba(199, 165, 107, 0.2);
	border-bottom: 1px solid rgba(199, 165, 107, 0.2);
	color: var(--fm-ivory);
}

.is-style-fm-card,
.is-style-fm-card-dark {
	padding: 32px;
	border-radius: var(--fm-radius);
	overflow: hidden;
	height: 100%;
}
.is-style-fm-card {
	background: #FBF8F2;
	border: 1px solid rgba(32, 35, 41, 0.08);
	color: var(--fm-charcoal);
}
.is-style-fm-card-dark {
	background: var(--fm-navy);
	border: 1px solid var(--fm-line);
	color: var(--fm-ivory);
}
/* Image as the first block in a card fills the top edge */
:is(.is-style-fm-card, .is-style-fm-card-dark) > .wp-block-image:first-child,
:is(.is-style-fm-card, .is-style-fm-card-dark) > .wp-block-post-featured-image:first-child {
	margin: -32px -32px 8px !important;
	max-width: none;
	width: calc(100% + 64px);
	overflow: hidden;
}
:is(.is-style-fm-card, .is-style-fm-card-dark) > .wp-block-image:first-child img,
:is(.is-style-fm-card, .is-style-fm-card-dark) > .wp-block-post-featured-image:first-child img {
	border-radius: 0;
	width: 100%;
}
/* Last button/link in a card sits at the bottom */
:is(.is-style-fm-card, .is-style-fm-card-dark) > :is(.wp-block-buttons, .fm-link):last-child { margin-top: auto; }

.fm-platforms mark { margin: 0 0.9em; font-size: 0.6em; vertical-align: 0.25em; }

/* Timeline (Additional CSS class: fm-timeline on a grid group) */
.fm-timeline { position: relative; }
.fm-timeline > * { position: relative; padding-top: 44px; }
.fm-timeline > *::before {
	content: ""; position: absolute; top: 2px; left: 0; width: 14px; height: 14px;
	background: var(--fm-gold); transform: rotate(45deg);
}
.fm-timeline > *::after {
	content: ""; position: absolute; top: 9px; left: 28px; right: -12px; height: 1px;
	background: rgba(199, 165, 107, 0.35);
}
.fm-timeline > :last-child::after { display: none; }

/* Highlighted card (e.g. recommended package) — Additional CSS class: fm-featured */
.fm-featured { border-color: var(--fm-gold) !important; box-shadow: 0 30px 60px -36px rgba(199, 165, 107, 0.45); }
.is-style-fm-card-dark.fm-featured { background: #1A2B40; }

.is-style-fm-panel {
	background: var(--fm-navy);
	border: 1px solid var(--fm-line);
	border-radius: var(--fm-radius);
	padding: 36px;
	color: var(--fm-ivory);
}
.is-style-fm-panel > .wp-block-image:first-child { margin: -36px -36px 12px !important; max-width: none; width: calc(100% + 72px); }

.is-style-fm-rule {
	border-top: 1px solid var(--fm-outline-border);
	padding-top: 28px;
}

/* Gentle image zoom on hover inside cards (and any block with class fm-zoom) */
:is(.is-style-fm-card, .is-style-fm-card-dark, .fm-zoom) img {
	transition: transform 0.7s var(--fm-ease);
}
:is(.is-style-fm-card, .is-style-fm-card-dark, .fm-zoom):hover img { transform: scale(1.04); }
.fm-zoom { overflow: hidden; }

/* Image styles ---------------------------------------------------------------------- */
.wp-block-image img { border-radius: var(--fm-radius); }
.wp-block-image img[style*="aspect-ratio"] { width: 100%; }
.wp-block-image.fm-fill { height: 100%; margin: 0; }
.wp-block-image.fm-fill img { height: 100%; width: 100%; min-height: 520px; object-fit: cover; border-radius: 0; }
@media (max-width: 781px) { .wp-block-image.fm-fill img { min-height: 340px; } }
.is-style-fm-frame { padding: 14px; }
.is-style-fm-frame img { outline: 1px solid var(--fm-line-strong); outline-offset: 14px; }
.is-style-fm-icon img { width: 56px; height: 56px; border-radius: 0; }
.is-style-fm-icon { margin-bottom: 4px; }

/* List styles ----------------------------------------------------------------------- */
.is-style-fm-ticks {
	list-style: none;
	padding-left: 0;
	display: grid;
	gap: 12px;
}
.is-style-fm-ticks li {
	position: relative;
	padding-left: 22px;
}
.is-style-fm-ticks li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 0.62em;
	width: 6px;
	height: 6px;
	background: var(--fm-gold);
	transform: rotate(45deg);
}
.is-style-fm-ticks.fm-two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
@media (max-width: 600px) { .is-style-fm-ticks.fm-two-col { grid-template-columns: minmax(0, 1fr); } }

.is-style-fm-plain {
	list-style: none;
	padding-left: 0;
	display: grid;
	gap: 10px;
}
.is-style-fm-plain a { color: #B9C0C9 !important; font-size: 14px; }
.is-style-fm-plain a:hover { color: var(--fm-gold) !important; text-decoration: none; }

/* FAQ ------------------------------------------------------------------------------- */
.is-style-fm-faq {
	border-top: 1px solid rgba(32, 35, 41, 0.14);
	padding: 24px 0;
	margin: 0 !important;
}
.is-style-fm-faq:last-child { border-bottom: 1px solid rgba(32, 35, 41, 0.14); }
.is-style-fm-faq summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 24px;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	font-size: 19px;
	line-height: 1.35;
}
.is-style-fm-faq summary::-webkit-details-marker { display: none; }
.is-style-fm-faq summary::after { content: "+"; color: var(--fm-gold-ink); font-size: 26px; line-height: 1; transition: transform 0.3s ease; }
.is-style-fm-faq[open] summary::after { transform: rotate(45deg); }
.is-style-fm-faq > :not(summary) { color: #555D68; margin-top: 14px; }

/* Header ---------------------------------------------------------------------------- */
.fm-header { border-bottom: 1px solid rgba(199, 165, 107, 0.14); position: relative; z-index: 50; }
.fm-header .wp-block-navigation-item__content { color: #E6E1D8; }
.fm-header .wp-block-navigation-item__content:hover,
.fm-header .current-menu-item > .wp-block-navigation-item__content,
.fm-header .current-menu-ancestor > .wp-block-navigation-item__content { color: var(--fm-gold); text-decoration: none; }
.fm-header .wp-block-navigation .wp-block-navigation__submenu-container {
	background: var(--fm-navy) !important;
	color: var(--fm-ivory) !important;
	border: 1px solid var(--fm-line) !important;
	border-radius: var(--fm-radius);
	padding: 10px 0;
	min-width: 280px !important;
	box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.6);
}
.fm-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 10px 20px !important; }
.fm-header .wp-block-navigation__responsive-container.is-menu-open { padding: 32px 24px; }
.fm-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 20px; }
.fm-header .wp-block-site-logo img, .fm-header .fm-logo img { border-radius: 0; }
@media (max-width: 781px) { .fm-header .fm-nav-cta { display: none; } }

/* Footer ---------------------------------------------------------------------------- */
.fm-footer { border-top: 1px solid rgba(199, 165, 107, 0.14); }
.fm-footer .fm-logo img { border-radius: 0; }
.fm-footer-bottom { border-top: 1px solid rgba(199, 165, 107, 0.14); padding-top: 28px; margin-top: 64px !important; }
.fm-footer-bottom a { color: #A3ABB6 !important; }
.fm-footer-bottom a:hover { color: var(--fm-gold) !important; }
.fm-footer .wp-block-social-links { gap: 10px; }
.fm-footer .wp-block-social-links .wp-social-link {
	color: var(--fm-gold) !important;
	border: 1px solid rgba(199, 165, 107, 0.35);
	border-radius: 50%;
	padding: 4px;
}
.fm-footer .wp-block-social-links .wp-social-link a { padding: 8px !important; }
.fm-footer .wp-block-social-links .wp-social-link:hover { background: rgba(199, 165, 107, 0.12); transform: none; }

/* Forms (Contact Form 7, WPForms Lite, etc.) inside a group with class fm-form -------- */
.fm-form :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], select, textarea) {
	width: 100%;
	font-family: var(--wp--preset--font-family--body);
	font-size: 15px;
	min-height: 50px;
	padding: 12px 14px;
	border: 1px solid #C9C2B4;
	background: #FFFFFF;
	color: var(--fm-charcoal);
	border-radius: var(--fm-radius);
	box-sizing: border-box;
}
.fm-form textarea { min-height: 140px; }
.fm-gold-top { border-top: 3px solid var(--fm-gold) !important; }
.fm-form .wpcf7-form > p, .fm-form .fm-field { margin: 0 0 20px; }
.fm-form .fm-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.fm-form .fm-row > * { margin: 0; }
.fm-form .wpcf7-form-control-wrap { display: block; margin-top: 8px; }
.fm-form .wpcf7-acceptance label { font-weight: 500; display: flex; gap: 10px; align-items: flex-start; }
.fm-form .wpcf7-not-valid-tip { font-size: 13px; color: #9B2C2C; margin-top: 6px; }
.fm-form .wpcf7-response-output { border-radius: var(--fm-radius); margin: 16px 0 0 !important; padding: 12px 16px !important; }
@media (max-width: 600px) { .fm-form .fm-row { grid-template-columns: minmax(0, 1fr); } }
.fm-form :is(input, select, textarea):focus { outline: 2px solid var(--fm-gold); outline-offset: 1px; border-color: var(--fm-gold-ink); }
.fm-form label { font-size: 13px; font-weight: 700; color: var(--fm-charcoal); display: block; }
.fm-form :is(input[type="submit"], button[type="submit"]) {
	background: var(--fm-gold);
	color: var(--fm-deep);
	border: 1px solid var(--fm-gold);
	border-radius: var(--fm-radius);
	min-height: 52px;
	padding: 0 30px;
	font-family: var(--wp--preset--font-family--body);
	font-weight: 700;
	font-size: 15px;
	cursor: pointer;
}
.fm-form :is(input[type="submit"], button[type="submit"]):hover { background: var(--fm-gold-hover); }
.fm-form .wpcf7-list-item { margin: 0 8px 8px 0; }
.fm-form .wpcf7-checkbox .wpcf7-list-item label {
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
	border: 1px solid #C9C2B4; background: #FFFFFF; border-radius: var(--fm-radius); font-weight: 600; font-size: 14px;
}
.fm-form input[type="checkbox"] { accent-color: var(--fm-gold-ink); width: 16px; height: 16px; }

/* Blog / single post ---------------------------------------------------------------- */
.wp-block-post-featured-image img { border-radius: var(--fm-radius); }
.wp-block-post-terms a { color: var(--fm-tag) !important; }
.single .wp-block-post-content > p, .single .wp-block-post-content > ul, .single .wp-block-post-content > ol { font-size: 17px; line-height: 1.75; }

/* Utilities ------------------------------------------------------------------------- */
.fm-gold { color: var(--fm-gold); }
.fm-serif { font-family: var(--wp--preset--font-family--accent); font-weight: 400; font-style: italic; letter-spacing: -0.01em; }
.fm-nowrap { white-space: nowrap; }

/* ==========================================================================
   Animations — classes added from the "Animation" panel in the editor.
   Only active when the visitor's browser runs the script and does not
   request reduced motion (the html element then has class "fm-js").
   ========================================================================== */
.fm-js [class*="fm-anim-"]:not(.fm-anim-stagger),
.fm-js .fm-anim-stagger > * {
	transition: opacity 0.85s var(--fm-ease), transform 0.85s var(--fm-ease);
	will-change: opacity, transform;
}
.fm-js .fm-anim-fade:not(.is-visible) { opacity: 0; }
.fm-js .fm-anim-up:not(.is-visible) { opacity: 0; transform: translateY(28px); }
.fm-js .fm-anim-left:not(.is-visible) { opacity: 0; transform: translateX(-36px); }
.fm-js .fm-anim-right:not(.is-visible) { opacity: 0; transform: translateX(36px); }
.fm-js .fm-anim-zoom:not(.is-visible) { opacity: 0; transform: scale(0.96); }
.fm-js .fm-anim-stagger:not(.is-visible) > * { opacity: 0; transform: translateY(24px); }

.fm-js .fm-anim-stagger > :nth-child(2) { transition-delay: 0.08s; }
.fm-js .fm-anim-stagger > :nth-child(3) { transition-delay: 0.16s; }
.fm-js .fm-anim-stagger > :nth-child(4) { transition-delay: 0.24s; }
.fm-js .fm-anim-stagger > :nth-child(5) { transition-delay: 0.32s; }
.fm-js .fm-anim-stagger > :nth-child(6) { transition-delay: 0.40s; }
.fm-js .fm-anim-stagger > :nth-child(7) { transition-delay: 0.48s; }
.fm-js .fm-anim-stagger > :nth-child(n+8) { transition-delay: 0.56s; }

.fm-js .fm-delay-1 { transition-delay: 0.1s; }
.fm-js .fm-delay-2 { transition-delay: 0.2s; }
.fm-js .fm-delay-3 { transition-delay: 0.3s; }
.fm-js .fm-delay-4 { transition-delay: 0.5s; }

.fm-js .fm-speed-slow, .fm-js .fm-speed-slow.fm-anim-stagger > * { transition-duration: 1.3s; }
.fm-js .fm-speed-fast, .fm-js .fm-speed-fast.fm-anim-stagger > * { transition-duration: 0.45s; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
	:is(.is-style-fm-card, .is-style-fm-card-dark, .fm-zoom):hover img { transform: none; }
}
