/*
Theme Name: AZAgencyFinder
Theme URI: https://azagencyfinder.com
Author: Blue Aspen Marketing
Description: Custom block theme for AZAgencyFinder, the guide to Arizona SEO and marketing agencies. Desert Editorial design system: ink, terracotta and sand; Source Serif 4 headings, Inter body.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: azagencyfinder
*/

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { text-underline-offset: 3px; }
:where(.wp-site-blocks) :focus-visible { outline: 2px solid var(--wp--preset--color--brand); outline-offset: 2px; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; background: #fff; padding: 8px 12px; }
/* Editorial column: left-aligned 760px text column, wide blocks run to 1200px */
.wp-block-post-content > :not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright) { max-width: 760px; margin-left: 0 !important; margin-right: auto !important; }
.wp-block-post-excerpt__excerpt { max-width: 760px; }
.is-style-answer-box.is-layout-constrained > * { margin-left: 0 !important; }
.wp-block-post-content > .alignwide { margin-left: 0 !important; }

/* ---------- Kicker / overline ---------- */
.is-style-kicker {
	font-size: 12px !important; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
	color: var(--wp--preset--color--accent-hover);
}

/* ---------- Cards ---------- */
.is-style-card {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--md);
}
.is-style-card:where(a, :has(> a.azf-stretch)) { transition: box-shadow .15s ease; }
.is-style-card:hover:has(a) { box-shadow: var(--wp--preset--shadow--sm); }

/* ---------- Answer box (TL;DR) ---------- */
.is-style-answer-box {
	background: var(--wp--preset--color--sunken);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--lg);
}

/* ---------- Disclosure ---------- */
.is-style-disclosure {
	background: var(--wp--preset--color--info-soft);
	border-radius: var(--wp--custom--radius--md);
	font-size: 14px; line-height: 22px;
}
.is-style-disclosure strong:first-child { color: var(--wp--preset--color--info); }

/* ---------- Badges ---------- */
.azf-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.azf-badge {
	display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 20px; font-weight: 600;
	padding: 0 8px; border-radius: var(--wp--custom--radius--sm);
	background: var(--wp--preset--color--sunken); color: var(--wp--preset--color--muted);
}
.azf-badge--pick { background: var(--wp--preset--color--accent-soft); color: var(--wp--preset--color--accent-hover); }
.azf-badge--verified { background: var(--wp--preset--color--success-soft); color: var(--wp--preset--color--success); }
.azf-badge--owned { background: var(--wp--preset--color--info-soft); color: var(--wp--preset--color--info); }
.azf-badge--warn { background: var(--wp--preset--color--warning-soft); color: var(--wp--preset--color--warning); }
.azf-badge--flag { background: var(--wp--preset--color--danger-soft); color: var(--wp--preset--color--danger); }

/* ---------- Score ---------- */
.azf-score { font-family: var(--wp--preset--font-family--serif); font-weight: 700; font-size: 28px; line-height: 1; color: var(--wp--preset--color--contrast); }
.azf-score small { font-family: var(--wp--preset--font-family--sans); font-size: 13px; font-weight: 400; color: var(--wp--preset--color--subtle); }
.azf-meter { height: 6px; border-radius: 999px; background: var(--wp--preset--color--border); overflow: hidden; margin-top: 8px; }
.azf-meter > span { display: block; height: 100%; background: var(--wp--preset--color--rating); border-radius: 999px; }

/* ---------- Facts row ---------- */
.azf-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 16px 0; border-top: 1px solid var(--wp--preset--color--border); border-bottom: 1px solid var(--wp--preset--color--border); }
.azf-facts dt { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wp--preset--color--subtle); }
.azf-facts dd { margin: 6px 0 0; font-family: var(--wp--preset--font-family--mono); font-size: 14px; color: var(--wp--preset--color--contrast); }

.azf-facts dd.azf-score { font-family: var(--wp--preset--font-family--serif); font-size: 28px; font-weight: 700; line-height: 1; margin-top: 6px; }

/* ---------- Finder form ---------- */
.azf-finder { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; width: 100%; margin: 0; }
.azf-finder .azf-field { flex: 1 1 180px; display: flex; flex-direction: column; gap: 6px; }
.azf-finder label { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wp--preset--color--subtle); }
.azf-finder select { height: 48px; width: 100%; border: 1px solid var(--wp--preset--color--border-strong); border-radius: 8px; padding: 0 12px; font: inherit; font-size: 16px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--wp--preset--color--contrast); background: #fff; }
.azf-finder button { flex: 0 0 auto; height: 48px; border: 0; cursor: pointer; }

/* ---------- Comparison table ---------- */
.is-style-comparison { border: 1px solid var(--wp--preset--color--border); border-radius: var(--wp--custom--radius--md); background: var(--wp--preset--color--surface); overflow-x: auto; }
.is-style-comparison table { border-collapse: collapse; width: 100%; }
.is-style-comparison th, .is-style-comparison td { border: 0; border-bottom: 1px solid var(--wp--preset--color--border); padding: 12px 16px; text-align: left; vertical-align: top; }
.is-style-comparison thead th, .is-style-comparison thead { border-bottom: 1px solid var(--wp--preset--color--border); background: var(--wp--preset--color--sunken); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wp--preset--color--subtle); }
.is-style-comparison tbody tr:last-child td { border-bottom: 0; }
.is-style-comparison figcaption { padding: 12px 16px; text-align: left; margin: 0; }

/* ---------- Pills (service chips) ---------- */
.is-style-pill .wp-block-button__link {
	background: var(--wp--preset--color--surface) !important; color: var(--wp--preset--color--contrast) !important;
	border: 1px solid var(--wp--preset--color--border-strong); border-radius: 999px; font-weight: 500; font-size: 14px; padding: 7px 16px;
}
.is-style-pill .wp-block-button__link:hover { background: var(--wp--preset--color--sunken) !important; }
.wp-block-button.is-style-outline > .wp-block-button__link { border: 1px solid var(--wp--preset--color--border-strong); color: var(--wp--preset--color--contrast); background: transparent; padding: 12px 21px; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--sunken); color: var(--wp--preset--color--contrast); }
.wp-block-button.is-style-ink > .wp-block-button__link { background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base); }
.wp-block-button.is-style-ink > .wp-block-button__link:hover { background: var(--wp--preset--color--ink-700); color: var(--wp--preset--color--base); }

/* ---------- Check list ---------- */
.is-style-checks { list-style: none; padding-left: 0; }
.is-style-checks li { position: relative; padding-left: 26px; }
.is-style-checks li::before {
	content: ""; position: absolute; left: 0; top: 0.35em; width: 16px; height: 16px;
	background: no-repeat center / 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23256443' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

/* ---------- Arrow link cards ---------- */
.azf-arrow { color: var(--wp--preset--color--accent); font-weight: 600; text-decoration: none; }
.is-style-link-card { position: relative; }
.is-style-link-card a::after { content: ""; position: absolute; inset: 0; }
.is-style-link-card a { text-decoration: none; color: inherit; }

/* ---------- FAQ (details) ---------- */
.wp-block-details { border-bottom: 1px solid var(--wp--preset--color--border); padding: 20px 0; }
.wp-block-details summary { cursor: pointer; font-weight: 600; font-size: 18px; line-height: 28px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; color: var(--wp--preset--color--accent); font-size: 24px; line-height: 28px; font-weight: 400; }
.wp-block-details[open] summary::after { content: "–"; }
.wp-block-details > :not(summary) { color: var(--wp--preset--color--muted); }

/* ---------- Header ---------- */
.azf-ownership-bar a { color: #f6dcd3; }
.azf-header .wp-block-navigation__submenu-container { border: 1px solid var(--wp--preset--color--border) !important; border-radius: 8px; box-shadow: var(--wp--preset--shadow--md); padding: 8px 0; min-width: 240px !important; }
.azf-header .wp-block-navigation-item__content { padding: 8px 12px; text-decoration: none; }
.azf-header .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--accent-hover); }

/* ---------- Footer ---------- */
.azf-footer a { color: var(--wp--preset--color--sand-300); text-decoration: none; }
.azf-footer a:hover { color: #ffffff; text-decoration: underline; }
.azf-footer .wp-block-list { list-style: none; padding-left: 0; }
.azf-footer .wp-block-list li { margin-bottom: 8px; }

/* ---------- Decorative sunset ---------- */
.azf-sunset { position: absolute; right: 0; bottom: 0; pointer-events: none; }
.azf-has-sunset { position: relative; overflow: hidden; }
.azf-has-sunset > :not(.azf-sunset) { position: relative; z-index: 1; }

@media (max-width: 600px) {
	.azf-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
	.azf-hide-mobile { display: none !important; }
}
