/*
Theme Name: Fence Funnel
Theme URI: https://example.com/
Author: Andre
Description: Lightweight block theme for Angelo's fence-estimate landing pages. Built from DESIGN.md. Pairs with the Fence Leads plugin.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: fence-funnel
*/

/* Only what theme.json can't express. Tokens come from DESIGN.md via theme.json. */

:root {
	--ff-shadow: var(--wp--preset--shadow--panel);
	--ff-radius-card: var(--wp--custom--radius--card);
	--ff-radius-control: var(--wp--custom--radius--control);
}

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

:where(a, button, input, select, textarea, summary, .wp-element-button):focus-visible {
	outline: 3px solid var(--wp--preset--color--brand-navy);
	outline-offset: 2px;
	box-shadow: 0 0 0 2px var(--wp--preset--color--white);
}
.has-brand-navy-background-color :where(a, button, .wp-element-button):focus-visible {
	outline-color: var(--wp--preset--color--white);
	box-shadow: 0 0 0 2px var(--wp--preset--color--brand-navy);
}

.wp-element-button, .wp-block-button__link { box-sizing: border-box; min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

/* Outline buttons placed on navy turn white. */
.has-brand-navy-background-color .is-style-outline > .wp-block-button__link {
	color: var(--wp--preset--color--white);
}

/* Eyebrow label above section titles. */
.is-style-eyebrow {
	font-size: 13px !important;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brand-red);
	margin-bottom: 8px !important;
}
.has-brand-navy-background-color .is-style-eyebrow,
.wp-block-cover .is-style-eyebrow { color: var(--wp--preset--color--white) !important; opacity: .85; }

/* Card */
.is-style-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--ff-radius-card);
	padding: var(--wp--preset--spacing--40);
}
.has-white-background-color .is-style-card { background: var(--wp--preset--color--mist); }

/* Step number badge in "How it works" */
.ff-step-num {
	width: 40px; height: 40px; border-radius: 50%;
	display: inline-flex !important; align-items: center; justify-content: center;
	background: var(--wp--preset--color--brand-navy); color: var(--wp--preset--color--white);
	font-weight: 800;
}

/* Stars */
.ff-stars { color: var(--wp--preset--color--star); letter-spacing: 2px; font-size: 20px; line-height: 1; }

/* Trust bar figures */
.ff-trust strong { display: block; font-size: 28px; font-weight: 800; line-height: 1.1; }
.ff-trust p { margin: 0; }

/* Hero layout: form panel beside on desktop, under on phone */
.ff-hero .ff-hero-media img { border-radius: var(--ff-radius-card); }
@media (max-width: 781px) {
	.ff-hero .wp-block-columns { gap: 24px; }
	/* Phones: get the form above the fold; the sticky bar carries the call button. */
	.ff-hero .ff-checks, .ff-hero .fl-call-wrap { display: none; }
	.ff-hero .has-lead-font-size { font-size: 17px !important; }
}

/* Portrait */
.wp-block-media-text__media img { border-radius: var(--ff-radius-card); }

/* Header */
.ff-wordmark { font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; }
.ff-wordmark span { display: block; font-size: 13px; font-weight: 600; opacity: .85; letter-spacing: .02em; }

/* FAQ */
.wp-block-details summary { font-weight: 700; font-size: 18px; cursor: pointer; color: var(--wp--preset--color--brand-navy); }
.wp-block-details > *:not(summary) { margin-top: 10px; color: var(--wp--preset--color--ink); }

/* Sticky mobile call bar (DESIGN.md 4.7) */
body .wp-block-group.ff-sticky-bar { display: none; }
@media (max-width: 781px) {
	body .wp-block-group.ff-sticky-bar {
		display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
		display: grid; grid-template-columns: 1fr 1fr;
		gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
		background: var(--wp--preset--color--white); box-shadow: 0 -6px 24px rgba(11,37,69,.16);
		transition: transform .2s ease;
	}
	.ff-sticky-bar > * { min-width: 0; margin: 0 !important; }
	.ff-sticky-bar .fl-call-button { color: var(--wp--preset--color--brand-navy) !important; }
	.ff-sticky-bar .wp-block-button__link, .ff-sticky-bar .fl-call-button { width: 100%; }
	.ff-sticky-bar.is-hidden { transform: translateY(110%); }
	body.has-ff-sticky-bar { padding-bottom: 84px; }
}

@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

/* Check-mark list in the hero */
.ff-checks { list-style: none; }
.ff-checks li { position: relative; padding-left: 30px; margin: 6px 0; }
.ff-checks li::before {
	content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px; border-radius: 50%;
	background: var(--wp--preset--color--brand-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/14px no-repeat;
}

/* Trust bar: 2 x 2 on phones */
@media (max-width: 781px) {
	.ff-trust-grid { flex-wrap: wrap !important; }
	.ff-trust-grid > .wp-block-column { flex-basis: calc(50% - 12px) !important; }
}
