/* ==========================================================================
   FJ Designs — "Studio Stage" layer on top of Kadence
   Colours come from the Kadence global palette (Customizer → Colors),
   so changing a palette swatch updates the whole site.
   ========================================================================== */

:root {
	--fj-navy: var(--global-palette3, #111827);
	--fj-ink: var(--global-palette4, #1f2937);
	--fj-body: var(--global-palette5, #4b5563);
	--fj-muted: var(--global-palette6, #6b7280);
	--fj-line: var(--global-palette7, #e7e2d8);
	--fj-paper: var(--global-palette8, #faf8f4);
	--fj-white: var(--global-palette9, #ffffff);
	--fj-gold: #f4b942;          /* brand gold: fills, markers, lines only */
	--fj-gold-text: var(--global-palette2, #8a6116); /* gold that is readable as text on light */
	--fj-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
	--fj-wrap: 1240px;
	--fj-gutter: clamp(20px, 4vw, 48px);
	--fj-space-1: 8px;
	--fj-space-2: 16px;
	--fj-space-3: 24px;
	--fj-space-4: 40px;
	--fj-space-5: clamp(56px, 7vw, 96px);
	--fj-space-6: clamp(72px, 10vw, 140px);
	--fj-radius: 2px;
	--fj-ease: cubic-bezier(.2, .7, .2, 1);
}

body { background-color: var(--fj-paper); }

/* ---------- Type ---------- */
h1, h2, h3, h4 { letter-spacing: -0.02em; text-wrap: balance; }
h1 em, h2 em, h3 em, .fj-serif, .wp-block-heading em {
	font-family: var(--fj-serif);
	font-style: italic;
	font-weight: 400;
	letter-spacing: -0.01em;
}
.fj-case__title, .fj-work__title, .is-style-fj-display, .fj-hero h1 {
	font-size: clamp(2.5rem, 5.4vw, 4.6rem);
	line-height: 1.02;
	font-weight: 500;
	letter-spacing: -0.035em;
	margin: 0 0 var(--fj-space-3);
	color: var(--fj-navy);
}
.fj-section h2, .fj-band__title {
	font-size: clamp(1.9rem, 3.4vw, 3rem);
	line-height: 1.06;
	letter-spacing: -0.03em;
	font-weight: 500;
}
.fj-lead, .is-style-fj-lead {
	font-size: clamp(1.1rem, 1.6vw, 1.3rem);
	line-height: 1.55;
	color: var(--fj-body);
	max-width: 46ch;
}
p { text-wrap: pretty; }

/* Eyebrow with the gold square marker (the logo's corner, reduced to a dot) */
.fj-eyebrow, .is-style-fj-eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 var(--fj-space-3);
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--fj-ink);
}
.fj-eyebrow::before, .is-style-fj-eyebrow::before {
	content: "";
	width: 8px;
	height: 8px;
	background: var(--fj-gold);
	flex: none;
}
.fj-eyebrow a { color: inherit; text-decoration: none; }
.fj-eyebrow a:hover { color: var(--fj-gold-text); }
.fj-eyebrow--light, .is-style-fj-dark .is-style-fj-eyebrow { color: rgba(255, 255, 255, .78); }
.has-text-align-center.is-style-fj-eyebrow { display: flex; justify-content: center; }

.fj-num {
	font-family: var(--fj-serif);
	font-style: italic;
	font-weight: 400;
	color: var(--fj-gold-text);
	margin-right: 6px;
}

/* ---------- Layout ---------- */
.fj-wrap {
	width: 100%;
	max-width: calc(var(--fj-wrap) + 2 * var(--fj-gutter));
	margin-inline: auto;
	padding-inline: var(--fj-gutter);
	box-sizing: border-box;
}
.fj-section { padding-block: var(--fj-space-5); }
.fj-section, .fj-hero { padding-inline: var(--fj-gutter); }
.entry-content > .fj-section, .entry-content > .fj-hero { margin-block: 0; }
.fj-section + .fj-section { border-top: 1px solid var(--fj-line); }
.is-style-fj-paper { background: var(--fj-paper); }
.is-style-fj-dark, .fj-band--dark {
	background: var(--fj-navy);
	color: rgba(255, 255, 255, .82);
}
.is-style-fj-dark :where(h1, h2, h3, h4), .fj-band--dark :where(h1, h2, h3, h4) { color: #fff; }
.is-style-fj-dark a:not(.wp-block-button__link) { color: var(--fj-gold); }

/* Section header: eyebrow + heading left, intro right */
.fj-section-head { align-items: end !important; margin-bottom: var(--fj-space-4) !important; }
.fj-section-head p:last-child { margin-bottom: 0; }

/* ---------- Buttons ---------- */
.wp-block-button__link, .fj-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 15px 24px;
	border-radius: var(--fj-radius);
	font-weight: 500;
	font-size: 0.98rem;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color .2s var(--fj-ease), color .2s var(--fj-ease), border-color .2s var(--fj-ease), transform .2s var(--fj-ease);
}
.fj-btn--gold, .is-style-fj-dark .wp-block-button:not(.is-style-outline) .wp-block-button__link {
	background: var(--fj-gold);
	color: var(--fj-navy);
	border: 1px solid var(--fj-gold);
}
.fj-btn--gold:hover, .is-style-fj-dark .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
	background: #fff;
	border-color: #fff;
	color: var(--fj-navy);
}
.fj-btn--ghost-light, .is-style-fj-dark .is-style-outline .wp-block-button__link {
	background: transparent;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, .35);
}
.fj-btn--ghost-light:hover, .is-style-fj-dark .is-style-outline .wp-block-button__link:hover { border-color: var(--fj-gold); color: var(--fj-gold); }
.wp-block-button.is-style-outline .wp-block-button__link { border: 1px solid currentColor; background: transparent; }
.wp-block-button:not(.is-style-outline) .wp-block-button__link::after,
.fj-btn--gold::after { content: "→"; transition: transform .2s var(--fj-ease); }
.wp-block-button__link:hover::after, .fj-btn--gold:hover::after { transform: translateX(3px); }
:where(a, button, .wp-block-button__link):focus-visible { outline: 2px solid var(--fj-gold); outline-offset: 3px; }

/* ---------- Lists ---------- */
.fj-ticks, .is-style-fj-ticks { list-style: none; padding-left: 0; margin-left: 0; }
.fj-ticks li, .is-style-fj-ticks li {
	position: relative;
	padding: 12px 0 12px 22px;
	border-bottom: 1px solid var(--fj-line);
}
.fj-ticks li::before, .is-style-fj-ticks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 1.15em;
	width: 7px;
	height: 7px;
	background: var(--fj-gold);
}

/* ---------- Service: "what's included" (ruled, numbered columns, not cards) ---------- */
.fj-included { counter-reset: fj-inc; gap: 0 !important; border-top: 1px solid var(--fj-navy); }
.fj-included > .wp-block-column {
	counter-increment: fj-inc;
	padding: var(--fj-space-3) var(--fj-space-3) var(--fj-space-3) 0;
	border-bottom: 1px solid var(--fj-line);
}
.fj-included > .wp-block-column + .wp-block-column { padding-left: var(--fj-space-3); border-left: 1px solid var(--fj-line); }
.fj-included h3 { font-size: 1.2rem; margin: 0 0 10px; }
.fj-included h3::before {
	content: counter(fj-inc, decimal-leading-zero);
	display: block;
	margin-bottom: 18px;
	font-family: var(--fj-serif);
	font-style: italic;
	font-weight: 400;
	font-size: 1.05rem;
	color: var(--fj-gold-text);
}
.fj-included p { margin: 0; color: var(--fj-body); }

/* ---------- Process steps ---------- */
.fj-steps { counter-reset: fj-step; }
.fj-steps > .wp-block-column { counter-increment: fj-step; position: relative; padding-top: 28px; border-top: 2px solid var(--fj-line); }
.fj-steps > .wp-block-column::before {
	content: "";
	position: absolute;
	top: -2px;
	left: 0;
	width: 36px;
	height: 2px;
	background: var(--fj-gold);
}
.fj-steps h3 { font-size: 1.1rem; margin: 0 0 8px; }
.fj-steps h3::before { content: counter(fj-step, decimal-leading-zero) "  "; font-family: var(--fj-serif); font-style: italic; font-weight: 400; color: var(--fj-gold-text); white-space: pre; }
.fj-steps p { margin: 0; color: var(--fj-body); font-size: .97rem; }

/* ---------- Service hero ---------- */
.fj-hero { padding-block: clamp(48px, 8vw, 112px) var(--fj-space-5); }
.fj-hero .wp-block-buttons { margin-top: var(--fj-space-4); }
.fj-hero__note { margin-top: var(--fj-space-2); font-size: .9rem; color: var(--fj-muted); }
.fj-hero__media { position: relative; }
.fj-hero__media img { width: 100%; height: auto; display: block; }
/* signature corner: gold L-bracket on the image */
.fj-corner { position: relative; }
.fj-corner::after {
	content: "";
	position: absolute;
	right: -10px;
	bottom: -10px;
	width: 64px;
	height: 64px;
	border-right: 3px solid var(--fj-gold);
	border-bottom: 3px solid var(--fj-gold);
	pointer-events: none;
}
.fj-media-empty .wp-block-image:not(:has(img[src])), .fj-placeholder-box {
	aspect-ratio: 4 / 3;
	background:
		linear-gradient(135deg, transparent 49.6%, var(--fj-line) 50%, transparent 50.4%),
		var(--fj-white);
	border: 1px solid var(--fj-line);
}

/* ---------- FAQ (core/details) ---------- */
.fj-faq .wp-block-details {
	border-bottom: 1px solid var(--fj-line);
	padding: 0;
	margin: 0;
}
.fj-faq .wp-block-details:first-of-type { border-top: 1px solid var(--fj-navy); }
.fj-faq summary {
	list-style: none;
	cursor: pointer;
	padding: 22px 40px 22px 0;
	font-weight: 500;
	font-size: 1.08rem;
	color: var(--fj-navy);
	position: relative;
}
.fj-faq summary::-webkit-details-marker { display: none; }
.fj-faq summary::after {
	content: "+";
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.4rem;
	font-weight: 300;
	color: var(--fj-gold-text);
	transition: transform .25s var(--fj-ease);
}
.fj-faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.fj-faq details > :not(summary) { margin: 0 0 22px; max-width: 70ch; color: var(--fj-body); }

/* ---------- Bands ---------- */
.fj-band { padding-block: var(--fj-space-5); }
.fj-band__inner { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--fj-space-4); }
.fj-band__title { margin: 0 0 var(--fj-space-2); max-width: 18ch; }
.fj-band__title em { color: var(--fj-gold); }
.fj-band__text { margin: 0; color: rgba(255, 255, 255, .72); }
.fj-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.is-style-fj-dark h2 em { color: var(--fj-gold); }

/* ---------- Project cards ---------- */
.fj-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(24px, 3vw, 40px); }
.fj-card__link { display: block; color: inherit; text-decoration: none; }
.fj-card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--fj-white); border: 1px solid var(--fj-line); }
.fj-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--fj-ease); }
.fj-card__link:hover .fj-card__media img { transform: scale(1.03); }
.fj-card__placeholder { position: absolute; inset: 0; background: linear-gradient(135deg, transparent 49.7%, var(--fj-line) 50%, transparent 50.3%); }
.fj-card__body { padding-top: 18px; }
.fj-card__meta { margin: 0 0 6px; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fj-muted); }
.fj-card__title { margin: 0 0 6px; font-size: 1.3rem; line-height: 1.2; }
.fj-card__text { margin: 0 0 12px; color: var(--fj-body); font-size: .97rem; }
.fj-card__more { font-weight: 500; font-size: .92rem; color: var(--fj-navy); border-bottom: 1px solid var(--fj-gold); padding-bottom: 2px; }
.fj-badge {
	position: absolute;
	left: 12px;
	top: 12px;
	padding: 5px 9px;
	background: var(--fj-navy);
	color: #fff;
	font-size: .72rem;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.fj-editor-hint { padding: 14px 16px; border: 1px dashed var(--fj-gold-text); color: var(--fj-gold-text); font-size: .9rem; }

/* ---------- Case study ---------- */
.fj-case__head { padding-top: clamp(40px, 7vw, 96px); padding-bottom: var(--fj-space-4); }
.fj-case__head .fj-lead { max-width: 52ch; }
.fj-sample-note {
	display: inline-block;
	margin: 0 0 var(--fj-space-3);
	padding: 8px 12px;
	background: #fff4d8;
	border-left: 3px solid var(--fj-gold);
	color: var(--fj-ink);
	font-size: .9rem;
}
.fj-facts { display: flex; flex-wrap: wrap; gap: var(--fj-space-4); margin: var(--fj-space-4) 0 0; padding-top: var(--fj-space-3); border-top: 1px solid var(--fj-line); }
.fj-facts dt { margin: 0 0 4px; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fj-muted); }
.fj-facts dd { margin: 0; font-weight: 500; color: var(--fj-navy); }
.fj-case__cover { margin-block: 0 var(--fj-space-5); }
.fj-case__cover img { width: 100%; height: auto; display: block; }
.fj-cover-placeholder {
	display: grid;
	place-items: center;
	aspect-ratio: 16 / 8;
	background: linear-gradient(135deg, transparent 49.85%, var(--fj-line) 50%, transparent 50.15%), var(--fj-white);
	border: 1px solid var(--fj-line);
	color: var(--fj-muted);
	font-size: .9rem;
}
.fj-cover-placeholder span { background: var(--fj-white); padding: 6px 12px; }
.fj-case__story { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 64px); padding-bottom: var(--fj-space-5); }
.fj-case__label { font-size: 1.15rem; margin: 0 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--fj-navy); }
.fj-case__text { color: var(--fj-body); }
.fj-case__text p:last-child { margin-bottom: 0; }
.fj-case__content { padding-bottom: var(--fj-space-5); }
.fj-case__content > * { margin-block: 0 var(--fj-space-4); }
.fj-case__content .wp-block-image img { display: block; }
.fj-case__proof { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(24px, 5vw, 80px); padding-bottom: var(--fj-space-5); }
.fj-quote { margin: 0; padding-left: var(--fj-space-3); border-left: 3px solid var(--fj-gold); }
.fj-quote blockquote { margin: 0 0 16px; padding: 0; border: 0; }
.fj-quote blockquote p { font-family: var(--fj-serif); font-style: italic; font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.25; color: var(--fj-navy); margin: 0; }
.fj-quote figcaption strong { display: block; color: var(--fj-navy); }
.fj-quote figcaption span { color: var(--fj-muted); font-size: .92rem; }
.fj-next a { display: block; padding-block: var(--fj-space-5); text-decoration: none; color: var(--fj-navy); }
.fj-next__title { display: block; font-size: clamp(1.8rem, 4vw, 3.2rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; transition: color .2s var(--fj-ease); }
.fj-next a:hover .fj-next__title { color: var(--fj-gold-text); }

/* ---------- Work archive ---------- */
.fj-work__head { padding-top: clamp(40px, 7vw, 96px); padding-bottom: var(--fj-space-4); }
.fj-work__title { max-width: 16ch; }
.fj-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--fj-space-4); }
.fj-filter a { padding: 9px 14px; border: 1px solid var(--fj-line); background: var(--fj-white); color: var(--fj-ink); text-decoration: none; font-size: .9rem; }
.fj-filter a:hover { border-color: var(--fj-navy); }
.fj-filter a[aria-current="page"] { background: var(--fj-navy); border-color: var(--fj-navy); color: #fff; }
.fj-cards--archive { padding-bottom: var(--fj-space-5); }

/* ---------- Reveal on scroll (only when JS runs and motion is allowed) ---------- */
@media (prefers-reduced-motion: no-preference) {
	.fj-js .fj-reveal { opacity: 0; translate: 0 18px; transition: opacity .7s var(--fj-ease), translate .7s var(--fj-ease); }
	.fj-js .fj-reveal.is-in { opacity: 1; translate: 0 0; }
}

/* ---------- Mobile ---------- */
@media (max-width: 781px) {
	.fj-included > .wp-block-column,
	.fj-included > .wp-block-column + .wp-block-column { padding: var(--fj-space-3) 0; border-left: 0; }
	.fj-steps { gap: var(--fj-space-3) !important; }
	.fj-case__story, .fj-case__proof { grid-template-columns: 1fr; }
	.fj-facts { gap: var(--fj-space-3); }
	.fj-band__inner { align-items: start; }
	.fj-band__actions, .fj-band__actions .fj-btn { width: 100%; justify-content: center; }
	.fj-corner::after { right: -6px; bottom: -6px; width: 40px; height: 40px; }
}

/* ---------- Block editor helpers ---------- */
.editor-styles-wrapper .fj-reveal { opacity: 1 !important; translate: none !important; }

/* Small print under sections */
.fj-small-note { margin-top: var(--fj-space-3); font-size: .88rem; color: var(--fj-muted); max-width: 70ch; }
.is-style-fj-dark .fj-hero__note { color: rgba(255,255,255,.6); }
.fj-cta .wp-block-buttons { justify-content: flex-end; }
@media (max-width: 781px) { .fj-cta .wp-block-buttons { justify-content: flex-start; } }

/* ==========================================================================
   Logo
   ========================================================================== */
.fj-logo { display: inline-flex; align-items: center; gap: 12px; color: var(--fj-navy); text-decoration: none; line-height: 1; }
.fj-mark { width: 38px; height: 38px; flex: none; display: block; }
.fj-mark__ink { fill: var(--fj-logo-ink, #111827); transition: fill .2s var(--fj-ease); }
.fj-mark__accent { fill: var(--fj-logo-accent, #f4b942); }
.fj-logo__word { font-size: 1.18rem; font-weight: 600; letter-spacing: -0.025em; color: inherit; }
.fj-logo:hover .fj-mark__ink { fill: var(--fj-gold-text); }
.fj-logo--mobile .fj-mark { width: 34px; height: 34px; }
.fj-logo--mobile .fj-logo__word { font-size: 1.08rem; }

/* ==========================================================================
   Header (layout, menu and button are set in Customize → Header)
   ========================================================================== */
#masthead .site-main-header-wrap .site-header-row-container-inner,
#masthead .site-header-row-container-inner { background: rgba(250, 248, 244, .92); }
#masthead .site-main-header-wrap { border-bottom: 1px solid var(--fj-line); }
@supports (backdrop-filter: blur(8px)) {
	#masthead .site-header-row-container-inner { background: rgba(250, 248, 244, .8); backdrop-filter: saturate(1.4) blur(10px); }
}
.header-navigation .menu > li > a {
	position: relative;
	font-size: .95rem;
	font-weight: 500;
	color: var(--fj-ink);
}
.header-navigation .menu > li > a::after {
	content: "";
	position: absolute;
	left: var(--fj-nav-pad, 1.2em);
	right: var(--fj-nav-pad, 1.2em);
	bottom: 0.9em;
	height: 2px;
	background: var(--fj-gold);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .25s var(--fj-ease);
}
.header-navigation .menu > li > a:hover::after,
.header-navigation .menu > li.current-menu-item > a::after,
.header-navigation .menu > li.current-menu-ancestor > a::after { transform: scaleX(1); }
.header-navigation .sub-menu { border: 1px solid var(--fj-line); box-shadow: 0 18px 40px -24px rgba(17, 24, 39, .35); }
.header-navigation .sub-menu a { font-size: .92rem; }
.header-button-wrap .header-button,
#masthead .header-button {
	border-radius: var(--fj-radius);
	background: var(--fj-navy);
	color: #fff;
	border: 1px solid var(--fj-navy);
	padding: 12px 20px;
	font-weight: 500;
	font-size: .93rem;
	box-shadow: none;
}
#masthead .header-button:hover { background: var(--fj-gold); border-color: var(--fj-gold); color: var(--fj-navy); }
#masthead .item-is-stuck .site-header-row-container-inner { box-shadow: 0 10px 30px -22px rgba(17, 24, 39, .45); }

/* ==========================================================================
   Footer
   ========================================================================== */
.fj-footer {
	--fj-logo-ink: #f7f4ee;
	background: var(--fj-navy);
	color: rgba(255, 255, 255, .7);
	font-size: .95rem;
	padding-top: var(--fj-space-6);
}
.fj-footer a { color: #fff; text-decoration: none; }
.fj-footer a:hover { color: var(--fj-gold); }
.fj-footer__cta { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--fj-space-4); padding-bottom: var(--fj-space-5); border-bottom: 1px solid rgba(255, 255, 255, .12); }
.fj-footer__big { margin: 0; max-width: 16ch; color: #fff; font-size: clamp(2rem, 4.6vw, 3.8rem); line-height: 1.02; font-weight: 500; letter-spacing: -0.035em; }
.fj-footer__big em { font-family: var(--fj-serif); font-style: italic; font-weight: 400; color: var(--fj-gold); }
.fj-footer__cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.fj-footer__mail { border-bottom: 1px solid var(--fj-gold); padding-bottom: 2px; }
.fj-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: var(--fj-space-4); padding-block: var(--fj-space-5); }
.fj-footer__brand p { margin: 18px 0 0; max-width: 30ch; }
.fj-footer .fj-logo { color: #fff; }
.fj-footer .fj-logo:hover .fj-mark__ink { fill: var(--fj-gold); }
.fj-footer__heading { margin: 0 0 14px; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.fj-footer__links { list-style: none; margin: 0; padding: 0; }
.fj-footer__links li { margin: 0 0 10px; }
.fj-footer__note { margin: 16px 0 0; font-size: .86rem; color: rgba(255, 255, 255, .55); }
.fj-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 24px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem; color: rgba(255, 255, 255, .5); }
.fj-footer__bottom p { margin: 0; }
.fj-footer__bottom a { color: rgba(255, 255, 255, .7); }
@media (max-width: 1024px) { .fj-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
	.fj-footer__grid { grid-template-columns: 1fr; }
	.fj-footer__cta-actions, .fj-footer__cta-actions .fj-btn { width: 100%; justify-content: center; }
}

/* ---------- Fixes after first live review ---------- */
.fj-section-head :where(h2, h3) { margin-top: 0; margin-bottom: 0; }
.fj-section-head .is-style-fj-eyebrow { margin-bottom: 18px; }
.fj-section .wp-block-columns + .wp-block-columns { margin-top: 0; }
:where(.fj-section, .fj-hero, .fj-cta) :where(h1, h2) { margin-top: 0; }

/* Empty hero image slot: WordPress prints nothing for an image block without a picture */
.fj-media-empty:not(:has(img))::before {
	content: "Add a product image";
	display: grid;
	place-items: center;
	aspect-ratio: 4 / 3;
	background: linear-gradient(135deg, transparent 49.8%, var(--fj-line) 50%, transparent 50.2%), var(--fj-white);
	border: 1px solid var(--fj-line);
	color: var(--fj-muted);
	font-size: .85rem;
}
body:not(.logged-in) .fj-media-empty:not(:has(img))::before { content: ""; }

/* Outline buttons: same size as solid buttons */
.wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link {
	padding: 14px 23px;
	border: 1px solid var(--fj-navy);
	color: var(--fj-navy);
	background: transparent;
	font-size: .98rem;
}
.wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--fj-navy); color: #fff; }
.is-style-fj-dark .wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link { border-color: rgba(255,255,255,.35); color: #fff; }
.is-style-fj-dark .wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link:hover { border-color: var(--fj-gold); color: var(--fj-gold); background: transparent; }
.wp-block-buttons { gap: 12px; }

/* Page already ends with its own call to action → footer skips its CTA row */
body:has(.fj-cta, .fj-band--dark, .fj-form, .fj-aside) .fj-footer { padding-top: 0; }
body:has(.fj-cta, .fj-band--dark, .fj-form, .fj-aside) .fj-footer__cta { display: none; }
body:has(.fj-cta, .fj-band--dark, .fj-form, .fj-aside) .fj-footer__grid { border-top: 1px solid rgba(255,255,255,.12); }
/* Beat Kadence's entry-content heading margins inside FJ sections */
.entry-content :is(.fj-section, .fj-hero) :is(h1, h2).wp-block-heading { margin-top: 0; margin-bottom: 20px; }
.entry-content :is(.fj-section, .fj-hero) .is-style-fj-eyebrow { margin-bottom: 18px; }
.entry-content .fj-section-head :is(h2).wp-block-heading { margin-bottom: 0; }
.entry-content :is(.fj-section, .fj-hero) .wp-block-column > :first-child { margin-top: 0; }
.entry-content :is(.fj-section, .fj-hero) .wp-block-column > :last-child { margin-bottom: 0; }

/* ==========================================================================
   Inquiry form (markup from FJ Core [fj_inquiry_form])
   ========================================================================== */
.fj-form { background: var(--fj-white); border: 1px solid var(--fj-line); padding: clamp(22px, 4vw, 48px); position: relative; }
.fj-form::before { content: ""; position: absolute; left: -1px; top: -1px; width: 56px; height: 3px; background: var(--fj-gold); }
.fj-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.fj-form__step + .fj-form__step { margin-top: var(--fj-space-5); padding-top: var(--fj-space-4); border-top: 1px solid var(--fj-line); }
.fj-form--js .fj-form__step + .fj-form__step { margin-top: 0; padding-top: 0; border-top: 0; }
.fj-form__legend { display: block; margin: 0 0 var(--fj-space-3); padding: 0; font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 500; letter-spacing: -0.02em; color: var(--fj-navy); line-height: 1.15; }
.fj-form__legend span { display: block; margin-top: 6px; font-size: .95rem; font-weight: 400; letter-spacing: 0; color: var(--fj-muted); }
.fj-form__progress { display: none; gap: 6px; margin-bottom: 14px; }
.fj-form--js .fj-form__progress { display: flex; }
.fj-form__progress span { flex: 1; height: 3px; background: var(--fj-line); transition: background .3s var(--fj-ease); }
.fj-form__progress span.is-on { background: var(--fj-gold); }
.fj-form__count { display: none; margin: 0 0 var(--fj-space-3); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fj-muted); }
.fj-form--js .fj-form__count { display: block; }

.fj-field { margin-bottom: 22px; }
.fj-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.fj-field label, .fj-field__label { display: block; margin-bottom: 8px; font-weight: 500; font-size: .95rem; color: var(--fj-navy); }
.fj-opt { font-weight: 400; color: var(--fj-muted); font-size: .85rem; }
.fj-field__hint { margin: 8px 0 0; font-size: .85rem; color: var(--fj-muted); }
.fj-form input[type="text"], .fj-form input:not([type]), .fj-form input[type="email"], .fj-form input[type="url"], .fj-form input[type="tel"], .fj-form select, .fj-form textarea {
	width: 100%; box-sizing: border-box; padding: 13px 14px; border: 1px solid #d6d0c4; border-radius: var(--fj-radius);
	background: #fff; color: var(--fj-ink); font: inherit; font-size: 1rem; box-shadow: none;
}
.fj-form :is(input, select, textarea):focus { outline: none; border-color: var(--fj-navy); box-shadow: 0 0 0 3px rgba(244, 185, 66, .45); }
.fj-form input[type="file"] { font-size: .92rem; }
.fj-form [aria-invalid="true"]:is(input, select, textarea) { border-color: #b42318; }

.fj-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fj-chip { position: relative; margin: 0 !important; cursor: pointer; }
.fj-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fj-chip span { display: inline-block; padding: 10px 14px; border: 1px solid #d6d0c4; background: #fff; color: var(--fj-ink); font-size: .93rem; font-weight: 400; line-height: 1.2; transition: border-color .15s, background .15s, color .15s; }
.fj-chip:hover span { border-color: var(--fj-navy); }
.fj-chip input:checked + span { background: var(--fj-navy); border-color: var(--fj-navy); color: #fff; }
.fj-chips:not(.fj-chips--radio) .fj-chip input:checked + span::before { content: "✓ "; color: var(--fj-gold); }
.fj-chip input:focus-visible + span { outline: 2px solid var(--fj-gold); outline-offset: 2px; }
.fj-chips[aria-invalid="true"] .fj-chip span { border-color: #e4a29b; }

.fj-check { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 18px; font-size: .95rem; cursor: pointer; }
.fj-check input { margin-top: 4px; accent-color: var(--fj-navy); }
.fj-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { margin: 8px 0 16px; }

.fj-form__err { margin: 8px 0 0; color: #b42318; font-size: .88rem; }
.fj-form__summary { margin-bottom: var(--fj-space-3); padding: 14px 16px; border-left: 3px solid #b42318; background: #fef3f2; color: #7a271a; }
.fj-form__summary p { margin: 0 0 6px; }
.fj-form__summary ul { margin: 0; padding-left: 18px; }
.fj-form__summary a { color: inherit; }
.fj-form__summary:focus { outline: none; }

.fj-form__nav { display: flex; gap: 12px; justify-content: flex-end; margin-top: var(--fj-space-4); padding-top: var(--fj-space-3); border-top: 1px solid var(--fj-line); }
.fj-btn--solid { background: var(--fj-navy); color: #fff; border: 1px solid var(--fj-navy); cursor: pointer; }
.fj-btn--solid:hover { background: var(--fj-gold); border-color: var(--fj-gold); color: var(--fj-navy); }
.fj-btn--solid[data-next]::after, .fj-btn--solid[data-submit]::after { content: "→"; }
.fj-btn--solid:disabled { opacity: .6; cursor: progress; }
.fj-btn--line { background: transparent; color: var(--fj-navy); border: 1px solid #d6d0c4; cursor: pointer; margin-right: auto; }
.fj-btn--line:hover { border-color: var(--fj-navy); }
.fj-form [hidden] { display: none !important; }

/* Start a Project page layout */
.fj-inquiry-layout { align-items: flex-start !important; }
.fj-aside { position: sticky; top: 110px; }
.fj-aside h2 { font-size: 1.1rem !important; letter-spacing: -0.01em; }
.fj-aside ol { list-style: none; counter-reset: fj-next; padding: 0; margin: 0 0 var(--fj-space-4); }
.fj-aside ol li { counter-increment: fj-next; position: relative; padding: 0 0 18px 40px; color: var(--fj-body); }
.fj-aside ol li::before { content: counter(fj-next, decimal-leading-zero); position: absolute; left: 0; top: -1px; font-family: var(--fj-serif); font-style: italic; color: var(--fj-gold-text); font-size: 1.1rem; }
.fj-aside ol li strong { display: block; color: var(--fj-navy); font-weight: 500; }

@media (max-width: 781px) {
	.fj-field-row { grid-template-columns: 1fr; }
	.fj-form__nav { flex-wrap: wrap; }
	.fj-form__nav .fj-btn--solid { flex: 1; justify-content: center; }
	.fj-aside { position: static; }
}

/* Form pages: give the section room before the footer */
.fj-hero:has(.fj-inquiry-layout, .fj-aside) { padding-bottom: var(--fj-space-6); }
