/*
Theme Name: Apuzzo Internet Marketing
Theme URI: https://www.apuzzo.com
Author: Sonic 777
Description: Custom authority theme for Apuzzo Internet Marketing — Local SEO + AI visibility for home-service companies, Marco Island FL. Mobile-first responsive foundation, Sonic Boom page architecture.
Version: 1.0.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: apuzzo
*/

/* =============================================================
   0. TOKENS (STYLE-GUIDE.md §1–2)
   ============================================================= */
:root {
  --c-navy: #001828;        /* Apuzzo Navy — logo */
  --c-navy-700: #0B2A45;
  --c-navy-600: #112337;
  --c-orange: #F07020;      /* Apuzzo Orange — the only action color */
  --c-orange-700: #D9601A;
  --c-orange-50: #FDEBDD;
  --c-sky: #6EC1E4;         /* on navy only */
  --c-sky-700: #1B7FA8;     /* links on white */
  --c-sky-50: #EAF6FB;
  --c-white: #FFFFFF;
  --c-cloud: #F6F8FA;
  --c-line: #E6EBF0;
  --c-muted: #94A3B3;
  --c-body-muted: #4A5563;
  --c-body: #1C2733;
  --c-ink: #0F1A26;
  --c-success: #1F8A4C; --c-warning: #C98A00; --c-danger: #C0392B; --c-info: #1B7FA8;

  --f-display: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --f-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --bp-sm: 640px; --bp-md: 768px; --bp-lg: 1024px; --bp-xl: 1280px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --radius: 10px; --radius-sm: 6px;
  --shadow: 0 8px 24px rgba(0, 24, 40, 0.08);
  --shadow-lg: 0 20px 48px rgba(0, 24, 40, 0.16);
  --container: 1200px;
  --header-h: 76px;
  --measure: 760px;
}

/* =============================================================
   1. RESET + RESPONSIVE FOUNDATION (mobile-first, built ONCE — STYLE-GUIDE §7)
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--f-body); color: var(--c-body); background: var(--c-white);
  font-size: clamp(1.0625rem, 0.4vw + 0.95rem, 1.125rem); line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.nav-locked { overflow: hidden; }
img, video, iframe, svg { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--c-sky-700); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--c-orange-700); }
h1, h2, h3, h4 { font-family: var(--f-display); color: var(--c-ink); margin: 0 0 0.5em; letter-spacing: -0.01em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.65rem, 3.2vw, 2.5rem); line-height: 1.15; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.25; }
h4 { font-size: 1.05rem; line-height: 1.3; font-weight: 600; }
p { margin: 0 0 1em; }
.lead, p.lead { font-size: clamp(1.2rem, 1.2vw + 1rem, 1.375rem); line-height: 1.5; color: var(--c-body-muted); }
small, .small { font-size: 0.9rem; }
ul, ol { padding-left: 1.25rem; margin: 0 0 1em; }
table { border-collapse: collapse; width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(16px, 5vw, 48px); }
.container--narrow { max-width: 800px; }

.grid-2, .grid-3, .grid-4 { display: grid; gap: clamp(16px, 3vw, 32px); grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--c-orange); color: #fff; padding: 10px 14px; z-index: 1000; border-radius: var(--radius-sm); }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--c-sky); outline-offset: 2px; }

/* Buttons — ≥44px tap targets */
.btn, .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: var(--radius-sm); border: 2px solid transparent;
  font-family: var(--f-display); font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.btn-primary, .wp-block-button__link { background: var(--c-orange); color: #fff; }
.btn-primary:hover, .wp-block-button__link:hover { background: var(--c-orange-700); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(240, 112, 32, 0.28); }
.btn-outline, .is-style-outline .wp-block-button__link { background: transparent; color: var(--c-navy-600); border-color: var(--c-navy-600); }
.btn-outline:hover, .is-style-outline .wp-block-button__link:hover { background: var(--c-navy-600); color: #fff; }
.btn-ghost-white { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.55); }
.btn-ghost-white:hover { background: #fff; color: var(--c-navy); }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.5rem 0; }
.wp-block-button { margin: 0; }

/* Icons — hard-capped (STYLE-GUIDE §4) */
.icon { width: 24px; height: 24px; flex: 0 0 24px; }
.icon-ui { width: 18px; height: 18px; flex: 0 0 18px; }
svg.icon { max-width: 48px; max-height: 48px; }

.ap-eyebrow { display: inline-block; font-family: var(--f-display); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-orange-700); margin-bottom: 0.75rem; }
.ap-eyebrow--sky { color: var(--c-sky); }

/* =============================================================
   2. HEADER + NAV
   ============================================================= */
.site-header { background: var(--c-white); color: var(--c-ink); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--c-line); transition: box-shadow 200ms ease, background-color 200ms ease, border-color 200ms ease; }
.site-header.is-scrolled { border-bottom-color: transparent; box-shadow: 0 6px 24px rgba(0,24,40,0.10); background: rgba(255,255,255,0.90); -webkit-backdrop-filter: saturate(1.3) blur(10px); backdrop-filter: saturate(1.3) blur(10px); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); }
.brand img { height: 44px; width: auto; }
.header-right { display: flex; align-items: center; gap: 10px; }
.header-phone { display: none; color: var(--c-navy); text-decoration: none; font-family: var(--f-display); font-weight: 600; align-items: center; gap: 8px; min-height: 44px; }
.header-phone:hover { color: var(--c-orange-700); }
.header-cta .cta-full { display: none; } .header-cta .cta-short { display: inline; }
.header-cta { min-height: 44px; padding: 10px 14px; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: transparent; border: 1px solid rgba(0,24,40,0.22); border-radius: var(--radius-sm); color: var(--c-navy); cursor: pointer; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-open { display: none; } .nav-open .nav-toggle .icon-close { display: block; }
.site-nav { position: fixed; inset: var(--header-h) 0 0 0; background: var(--c-white); padding: 16px clamp(16px, 5vw, 48px) 32px; overflow-y: auto; transform: translateX(100%); transition: transform 220ms ease; z-index: 99; }
.nav-open .site-nav { transform: none; }
.site-nav > ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul > li > a, .site-nav .sub-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: 8px 4px; color: var(--c-ink); text-decoration: none; font-family: var(--f-display); font-weight: 600; font-size: 1.1rem; background: none; border: 0; border-bottom: 1px solid var(--c-line); text-align: left; cursor: pointer; }
.site-nav a[aria-current="page"], .site-nav .is-current > .sub-toggle { color: var(--c-orange-700); }
.site-nav .sub { list-style: none; margin: 0; padding: 4px 0 8px 12px; display: none; }
.site-nav .has-sub.sub-open .sub { display: block; }
.site-nav .sub a { display: block; padding: 10px 8px; color: var(--c-body); text-decoration: none; min-height: 44px; border-radius: var(--radius-sm); }
.site-nav .sub a strong { display: block; font-family: var(--f-display); font-weight: 600; color: var(--c-ink); }
.site-nav .sub a span { display: block; font-size: 0.9rem; color: var(--c-body-muted); }
.site-nav .sub a:hover { background: var(--c-cloud); }
.nav-mobile-cta { display: grid; gap: 10px; margin-top: 20px; }
@media (min-width: 640px) { .header-cta .cta-full { display: inline; } .header-cta .cta-short { display: none; } .header-cta { padding: 10px 18px; } }
@media (min-width: 1024px) {
  .brand img { height: 60px; }
  .nav-toggle, .nav-mobile-cta { display: none; }
  .header-phone { display: inline-flex; }
  .site-nav { position: static; transform: none; padding: 0; background: transparent; overflow: visible; inset: auto; }
  .site-nav > ul { display: flex; align-items: center; gap: 4px; }
  .site-nav > ul > li { position: relative; }
  .site-nav > ul > li > a, .site-nav .sub-toggle { width: auto; min-height: 44px; padding: 8px 12px; border: 0; font-size: 0.98rem; border-radius: var(--radius-sm); gap: 4px; color: var(--c-ink); }
  .site-nav > ul > li > a:hover, .site-nav .sub-toggle:hover { background: var(--c-cloud); color: var(--c-navy); }
  .site-nav .sub { position: absolute; top: 100%; left: 0; width: 340px; background: #fff; color: var(--c-body); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px; margin-top: 6px; }
  .site-nav .has-sub:hover .sub, .site-nav .has-sub:focus-within .sub { display: block; }
  .site-nav .sub a { color: var(--c-ink); }
  .site-nav .sub a span { color: var(--c-body-muted); }
  .site-nav .sub a:hover { background: var(--c-cloud); }
  .site-nav .sub a[aria-current="page"] strong { color: var(--c-orange-700); }
}
@media (min-width: 1280px) { .site-nav > ul > li > a, .site-nav .sub-toggle { padding: 8px 14px; } }

/* =============================================================
   3. SECTIONS + HERO
   ============================================================= */
.ap-section { padding-block: clamp(3rem, 8vw, 6rem); }
.ap-section--cloud { background: var(--c-cloud); }
.ap-section--navy { background: var(--c-navy); color: #fff; }
.ap-section--navy h2, .ap-section--navy h3 { color: #fff; }
.on-navy { color: #C9D6E2; }
.ap-section-head { max-width: 760px; margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.ap-section-head p { color: var(--c-body-muted); font-size: 1.1rem; }

.ap-hero, .ap-page-hero { position: relative; background: var(--c-navy); color: #fff; overflow: hidden; isolation: isolate; }
.ap-hero-media { position: absolute; inset: 0; z-index: -1; }
.ap-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; opacity: 0.55; }
.ap-hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,24,40,0.55) 0%, rgba(0,24,40,0.78) 60%, rgba(0,24,40,0.95) 100%); }
.ap-hero .container { padding-block: clamp(3.5rem, 9vw, 7rem) clamp(2.5rem, 6vw, 4rem); min-height: min(82vh, 760px); display: flex; align-items: center; }
.ap-hero-inner { max-width: 740px; }
.ap-hero h1, .ap-page-hero h1 { color: #fff; }
.ap-hero h1 em { font-style: normal; color: var(--c-orange); }
.ap-hero-sub { font-size: clamp(1.1rem, 1.1vw + 0.95rem, 1.3rem); color: #DCE6EF; max-width: 62ch; }
.ap-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.5rem 0; }
.ap-ctas .btn { flex: 1 1 100%; }
@media (min-width: 640px) { .ap-ctas .btn { flex: 0 0 auto; } }
@media (min-width: 1024px) { .ap-hero-media img { opacity: 0.75; } .ap-hero-media::after { background: linear-gradient(90deg, rgba(0,24,40,0.96) 0%, rgba(0,24,40,0.85) 45%, rgba(0,24,40,0.25) 100%); } }

.ap-badges { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.ap-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 0.92rem; font-weight: 600; font-family: var(--f-display); color: var(--c-navy-600); }
.ap-badge .icon { width: 20px; height: 20px; flex-basis: 20px; color: var(--c-orange-700); }
.ap-badges--on-dark .ap-badge { color: #fff; } .ap-badges--on-dark .ap-badge .icon { color: var(--c-sky); }

/* Page hero (inner pages) */
.ap-page-hero .container { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 5vw, 3rem); max-width: var(--container); }
.ap-page-hero h1 { max-width: 20ch; }
.ap-page-hero .ap-hero-sub { max-width: 60ch; }
.ap-breadcrumb { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.9rem; color: #B7C6D3; }
.ap-breadcrumb li + li::before { content: "/"; margin-right: 6px; color: #6A8296; }
.ap-breadcrumb a { color: #fff; text-decoration: none; } .ap-breadcrumb a:hover { color: var(--c-sky); }

/* =============================================================
   4. HOMEPAGE COMPONENTS
   ============================================================= */
.ap-split { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .ap-split { grid-template-columns: 1.15fr 1fr; } .ap-split--reverse { grid-template-columns: 1fr 1.15fr; } .ap-split--reverse > :first-child { order: 2; } }

.ap-pains { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ap-pains li { display: flex; gap: 14px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 18px; }
.ap-pains strong { display: block; font-family: var(--f-display); color: var(--c-ink); margin-bottom: 4px; }
.ap-pains p { margin: 0; color: var(--c-body-muted); font-size: 0.98rem; }
.ap-pain-icon { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 10px; background: var(--c-orange-50); color: var(--c-orange-700); display: inline-flex; align-items: center; justify-content: center; }
.ap-pain-icon .icon { width: 22px; height: 22px; }

.ap-proof { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--c-line); border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; }
.ap-proof > div { background: #fff; padding: clamp(18px, 3vw, 28px); }
.ap-proof strong { display: block; font-family: var(--f-display); font-size: clamp(1.6rem, 2.6vw, 2.2rem); color: var(--c-orange-700); line-height: 1.05; margin-bottom: 6px; letter-spacing: -0.02em; }
.ap-proof span { color: var(--c-body-muted); font-size: 0.95rem; }
@media (min-width: 768px) { .ap-proof { grid-template-columns: repeat(4, 1fr); } }

.ap-figure { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 3 / 2; }
.ap-figure img { width: 100%; height: 100%; object-fit: cover; }
.ap-icon-circle { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 14px; background: var(--c-sky-50); color: var(--c-sky-700); margin-bottom: 14px; }
.ap-icon-circle--orange { background: var(--c-orange-50); color: var(--c-orange-700); }
.ap-icon-circle .icon { width: 28px; height: 28px; }

.ap-checks { list-style: none; margin: 1rem 0 1.5rem; padding: 0; display: grid; gap: 10px; }
.ap-checks li { display: flex; gap: 10px; align-items: flex-start; }
.ap-checks .icon { color: var(--c-sky-700); margin-top: 2px; width: 22px; height: 22px; flex-basis: 22px; }
.ap-checks--engines li { padding: 10px 12px; background: var(--c-sky-50); border-radius: var(--radius-sm); }

.ap-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: clamp(20px, 3vw, 28px); text-decoration: none; color: var(--c-body); transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease; }
a.ap-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; color: var(--c-body); }
.ap-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.ap-card p { color: var(--c-body-muted); font-size: 0.98rem; flex: 1; }
.ap-card-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; background: var(--c-sky-50); color: var(--c-sky-700); margin-bottom: 14px; }
.ap-card-icon .icon { width: 24px; height: 24px; }
@media (min-width: 1024px) { .ap-card-icon { width: 56px; height: 56px; } .ap-card-icon .icon { width: 28px; height: 28px; } }
.ap-card-link { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-display); font-weight: 600; color: var(--c-orange-700); font-size: 0.95rem; margin-top: auto; }
.ap-card-link .icon { width: 18px; height: 18px; flex-basis: 18px; }
.ap-card--navy { background: var(--c-navy); border-color: var(--c-navy); color: #fff; }
.ap-card--navy h3 { color: #fff; } .ap-card--navy p { color: #C9D6E2; }
.ap-card--navy .ap-card-icon { background: rgba(110,193,228,0.15); color: var(--c-sky); }
.ap-card--navy .btn { align-self: flex-start; margin-top: auto; }

.ap-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
.ap-step { position: relative; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 24px 20px 20px 72px; counter-increment: step; }
.ap-step::before { content: counter(step, decimal-leading-zero); position: absolute; left: 20px; top: 22px; font-family: var(--f-display); font-weight: 700; font-size: 1.3rem; color: var(--c-orange-700); }
.ap-step h3 { font-size: 1.15rem; margin-bottom: 6px; }
.ap-step p { margin: 0; color: var(--c-body-muted); font-size: 0.98rem; }
@media (min-width: 768px) { .ap-steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ap-steps { grid-template-columns: repeat(4, 1fr); } .ap-step { padding: 64px 22px 22px; } .ap-step::before { left: 22px; top: 18px; font-size: 1.6rem; } }

.ap-measure { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.ap-measure li { background: var(--c-navy); color: #fff; border-radius: var(--radius); padding: clamp(18px, 3vw, 26px); display: flex; flex-direction: column; gap: 6px; }
.ap-measure .icon { color: var(--c-sky); width: 26px; height: 26px; flex-basis: 26px; margin-bottom: 6px; }
.ap-measure strong { font-family: var(--f-display); font-size: clamp(1.15rem, 2vw, 1.4rem); }
.ap-measure span { color: #B7C6D3; font-size: 0.92rem; }
@media (min-width: 1024px) { .ap-measure { grid-template-columns: repeat(4, 1fr); } }

.ap-areas { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ap-areas a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.28); color: #fff; text-decoration: none; font-family: var(--f-display); font-weight: 600; font-size: 0.95rem; transition: background-color 160ms ease, border-color 160ms ease; }
.ap-areas a:hover { background: var(--c-orange); border-color: var(--c-orange); color: #fff; }
.ap-areas .icon { width: 18px; height: 18px; flex-basis: 18px; color: var(--c-sky); }
.ap-areas a:hover .icon { color: #fff; }

/* =============================================================
   5. INNER PAGE LAYOUT + PROSE + CONTENT BLOCKS
   ============================================================= */
.ap-page-layout { display: grid; gap: clamp(2rem, 5vw, 4rem); padding-block: clamp(2.5rem, 6vw, 4.5rem); grid-template-columns: minmax(0, 1fr); }
.ap-page-main { min-width: 0; max-width: var(--measure); }
.ap-page-aside { min-width: 0; }
@media (min-width: 1024px) { .ap-page-layout { grid-template-columns: minmax(0, var(--measure)) 320px; justify-content: space-between; } .ap-aside-sticky { position: sticky; top: calc(var(--header-h) + 16px); } }
.ap-aside-card { background: var(--c-navy); color: #fff; border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.ap-aside-card h3 { color: #fff; font-size: 1.25rem; }
.ap-aside-card p { color: #C9D6E2; font-size: 0.98rem; }
.ap-aside-card .btn { width: 100%; margin-bottom: 12px; }
.ap-aside-phone { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-family: var(--f-display); font-weight: 600; min-height: 44px; }
.ap-aside-phone .icon { color: var(--c-sky); }
.ap-aside-trust { list-style: none; margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid rgba(255,255,255,0.14); display: grid; gap: 8px; font-size: 0.92rem; color: #DCE6EF; }
.ap-aside-trust li { display: flex; gap: 8px; align-items: center; }
.ap-aside-trust .icon { color: var(--c-sky); width: 18px; height: 18px; flex-basis: 18px; }
.ap-aside-links { background: var(--c-cloud); border-radius: var(--radius); padding: 20px 24px; }
.ap-aside-links h4 { margin-bottom: 10px; }
.ap-aside-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ap-aside-links a { display: block; padding: 8px 0; color: var(--c-navy-600); text-decoration: none; min-height: 44px; display: flex; align-items: center; border-bottom: 1px solid var(--c-line); }
.ap-aside-links li:last-child a { border-bottom: 0; }
.ap-aside-links a:hover { color: var(--c-orange-700); }

.ap-prose > * + * { margin-top: 1.1em; }
.ap-prose h2 { margin-top: 2.2em; }
.ap-prose h3 { margin-top: 1.8em; }
.ap-prose h2:first-child, .ap-prose .lead:first-child { margin-top: 0; }
.ap-prose p.lead { color: var(--c-ink); font-weight: 400; }
.ap-prose ul, .ap-prose ol { padding-left: 1.4rem; }
.ap-prose li + li { margin-top: 0.4em; }
.ap-prose img { border-radius: var(--radius); }
.ap-prose figure { margin: 1.5rem 0; }
.ap-prose figcaption { font-size: 0.9rem; color: var(--c-body-muted); margin-top: 8px; }
.ap-prose a { text-decoration: underline; }

/* Tables — wrapped so wide tables scroll, never the page */
.wp-block-table { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.5rem 0; border: 1px solid var(--c-line); border-radius: var(--radius); }
.wp-block-table table { min-width: 520px; font-size: 0.98rem; }
.wp-block-table th, .wp-block-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--c-line); vertical-align: top; }
.wp-block-table th { background: var(--c-navy); color: #fff; font-family: var(--f-display); font-weight: 600; }
.wp-block-table tbody tr:nth-child(even) td { background: var(--c-cloud); }
.wp-block-table tbody tr.is-highlight td { background: var(--c-orange-50); }
.wp-block-table figcaption { padding: 10px 14px; font-size: 0.9rem; color: var(--c-body-muted); }

/* Key facts strip */
.ap-keyfacts { list-style: none; margin: 1.5rem 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--c-line); border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; }
.ap-keyfacts li { background: var(--c-cloud); padding: 16px 18px; font-size: 0.98rem; }
.ap-keyfacts strong { display: block; font-family: var(--f-display); color: var(--c-orange-700); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
@media (min-width: 640px) { .ap-keyfacts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ap-keyfacts { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }

/* Callouts */
.ap-callout { border-left: 4px solid var(--c-sky-700); background: var(--c-sky-50); border-radius: 0 var(--radius) var(--radius) 0; padding: 20px 22px; margin: 1.75rem 0; }
.ap-callout h3 { font-size: 1.15rem; margin-bottom: 6px; }
.ap-callout p:last-child { margin-bottom: 0; }
.ap-callout--orange { border-color: var(--c-orange); background: var(--c-orange-50); }
.ap-callout--sky { border-color: var(--c-sky-700); background: var(--c-sky-50); }
.ap-callout--navy { border-color: var(--c-navy); background: var(--c-navy); color: #fff; }
.ap-callout--navy h3 { color: #fff; } .ap-callout--navy p { color: #DCE6EF; } .ap-callout--navy a { color: var(--c-sky); }

/* Cards in content */
.ap-cards { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 1.75rem 0; }
.ap-cards > div { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 20px; transition: transform 180ms ease, box-shadow 180ms ease; }
.ap-cards > div:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ap-cards h3 { font-size: 1.1rem; margin: 0 0 6px; }
.ap-cards h3 a { color: var(--c-navy-600); text-decoration: none; }
.ap-cards h3 a:hover { color: var(--c-orange-700); }
.ap-cards p { margin: 0; color: var(--c-body-muted); font-size: 0.96rem; }
@media (min-width: 768px) { .ap-cards--2, .ap-cards--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ap-cards--3 { grid-template-columns: repeat(3, 1fr); } }

/* Inline CTA band */
.ap-cta-inline { background: var(--c-navy); color: #fff; border-radius: var(--radius); padding: clamp(22px, 4vw, 32px); margin: 2.25rem 0; display: grid; gap: 16px; align-items: center; }
.ap-cta-inline h3 { color: #fff; margin-bottom: 4px; font-size: 1.25rem; }
.ap-cta-inline p { color: #C9D6E2; margin: 0; }
.ap-cta-inline .wp-block-buttons { margin: 0; }
@media (min-width: 768px) { .ap-cta-inline { grid-template-columns: 1fr auto; } }

/* Numbered process in content */
.ap-prose .ap-steps { margin: 1.75rem 0; }
/* What-we-measure strip in content */
.ap-prose .ap-measure { margin: 1.75rem 0; }

/* FAQ (details) — theme emits FAQPage schema */
.wp-block-details, .ap-prose details { border: 1px solid var(--c-line); border-radius: var(--radius-sm); background: #fff; margin: 0 0 10px; padding: 0 18px; }
.wp-block-details summary, .ap-prose details summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; padding: 12px 0; font-family: var(--f-display); font-weight: 600; color: var(--c-ink); }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; font-size: 1.4rem; color: var(--c-orange-700); flex: 0 0 auto; line-height: 1; }
.wp-block-details[open] summary::after { content: "–"; }
.wp-block-details > *:not(summary) { margin: 0 0 14px; color: var(--c-body); }
.wp-block-separator { border: 0; border-top: 1px solid var(--c-line); margin: 2.5rem 0; }

/* =============================================================
   6. FORM
   ============================================================= */
.ap-form-wrap { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: clamp(20px, 4vw, 32px); box-shadow: var(--shadow); }
.ap-form { display: grid; gap: 14px; grid-template-columns: 1fr; }
.ap-field { display: grid; gap: 6px; }
.ap-field label { font-family: var(--f-display); font-weight: 600; font-size: 0.92rem; color: var(--c-ink); }
.ap-field input, .ap-field select, .ap-field textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #C5D0DA; border-radius: var(--radius-sm); background: #fff; }
.ap-field textarea { min-height: 110px; resize: vertical; }
.ap-field input:focus, .ap-field select:focus, .ap-field textarea:focus { border-color: var(--c-sky-700); outline: 3px solid rgba(110,193,228,0.35); outline-offset: 0; }
.ap-hp { position: absolute; left: -9999px; }
.ap-form .btn { justify-self: start; }
.ap-form-note { font-size: 0.88rem; color: var(--c-body-muted); margin: 0; }
.ap-form-success { background: #E4F5EA; border-left: 4px solid var(--c-success); padding: 12px 14px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
@media (min-width: 640px) { .ap-form { grid-template-columns: 1fr 1fr; } .ap-field--full, .ap-form .btn, .ap-form-note { grid-column: 1 / -1; } }

/* =============================================================
   7. FOOTER CTA + FOOTER + MOBILE BAR
   ============================================================= */
.ap-footer-cta { background: var(--c-navy-700); color: #fff; padding-block: clamp(2.5rem, 6vw, 4.5rem); border-top: 4px solid var(--c-orange); }
.ap-footer-cta .container { display: grid; gap: 24px; align-items: center; }
.ap-footer-cta h2 { color: #fff; }
.ap-footer-cta p { color: #C9D6E2; max-width: 60ch; margin: 0; }
.ap-footer-cta .ap-ctas { margin: 0; }
@media (min-width: 1024px) { .ap-footer-cta .container { grid-template-columns: 1.4fr 1fr; } .ap-footer-cta .ap-ctas { justify-content: flex-end; } }

.site-footer { background: var(--c-navy); color: #C9D6E2; padding-block: clamp(2.5rem, 6vw, 4rem) calc(clamp(2.5rem, 6vw, 4rem) + 64px); font-size: 0.95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--c-sky); }
.site-footer h4 { color: #fff; margin-bottom: 12px; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.site-footer ul a { display: inline-flex; align-items: center; padding: 2px 0; min-height: 44px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
.footer-logo img { height: 56px; width: auto; margin-bottom: 14px; }
.footer-tagline { font-family: var(--f-display); font-weight: 600; color: #fff; font-size: 1.1rem; }
.footer-chamber a { color: var(--c-sky); text-decoration: underline; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.88rem; color: #94A3B3; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }

.ap-mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--c-line); border-top: 1px solid var(--c-line); padding-bottom: env(safe-area-inset-bottom); }
.ap-mobile-bar a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 56px; padding: 0 6px; text-decoration: none; font-family: var(--f-display); font-weight: 600; font-size: clamp(0.82rem, 3.6vw, 0.95rem); white-space: nowrap; }
.ap-mobile-bar .bar-call { background: #fff; color: var(--c-navy); }
.ap-mobile-bar .bar-book { background: var(--c-orange); color: #fff; }
@media (min-width: 1024px) { .ap-mobile-bar { display: none; } .site-footer { padding-bottom: clamp(2.5rem, 6vw, 4rem); } }

/* =============================================================
   8. MOTION
   ============================================================= */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal-d0 { transition-delay: 0ms; } .reveal-d1 { transition-delay: 90ms; } .reveal-d2 { transition-delay: 180ms; } .reveal-d3 { transition-delay: 270ms; }
@keyframes ap-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.ap-hero .ap-eyebrow, .ap-hero h1, .ap-hero .ap-hero-sub, .ap-hero .ap-ctas, .ap-hero .ap-badges { animation: ap-rise 600ms ease both; }
.ap-hero h1 { animation-delay: 80ms; } .ap-hero .ap-hero-sub { animation-delay: 160ms; } .ap-hero .ap-ctas { animation-delay: 240ms; } .ap-hero .ap-badges { animation-delay: 320ms; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* Utilities */
.u-center { text-align: center; }
.u-muted { color: var(--c-body-muted); }
.u-max-60 { max-width: 60ch; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* =============================================================
   HOMEPAGE V2 — "SEARCH EVERYWHERE" REVAMP (reference-driven)
   ============================================================= */

/* --- Hero --- */
.apx-hero { position: relative; overflow: hidden; background: linear-gradient(180deg,#fff 0%,#F4F8FC 100%); padding-block: clamp(2.5rem,7vw,5.5rem); }
.apx-hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.apx-hero-bg .apx-orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; }
.apx-orb--1 { width: 420px; height: 420px; background: radial-gradient(circle,#6EC1E4 0%,transparent 70%); top: -120px; right: -80px; animation: apx-float 14s ease-in-out infinite; }
.apx-orb--2 { width: 340px; height: 340px; background: radial-gradient(circle,#F07020 0%,transparent 70%); bottom: -140px; left: -60px; opacity: .25; animation: apx-float 18s ease-in-out infinite reverse; }
.apx-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(0,24,40,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(0,24,40,.04) 1px,transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 70% 20%,#000 0%,transparent 75%); }
.apx-hero .container { position: relative; z-index: 1; }
.apx-hero-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2rem,5vw,3.5rem); align-items: center; }
@media (min-width: 1024px) { .apx-hero-grid { grid-template-columns: 1.05fr 1fr; } }
.apx-hero-copy h1 { font-size: clamp(2.2rem,4.8vw,3.7rem); margin-bottom: .5em; }
.apx-grad { background: linear-gradient(100deg,var(--c-orange) 0%,#F4A05A 60%,var(--c-orange-700) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.apx-hero-sub { font-size: clamp(1.1rem,1.1vw+.9rem,1.28rem); color: var(--c-body-muted); max-width: 40ch; margin-bottom: 1.6rem; }
.apx-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 26px; padding: 0; margin: 1.6rem 0 0; }
.apx-trust li { display: flex; align-items: center; gap: 10px; }
.apx-trust-ic { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 11px; background: var(--c-sky-50); color: var(--c-sky-700); flex: 0 0 40px; }
.apx-trust-ic .icon { width: 20px; height: 20px; }
.apx-trust li span:not(.apx-trust-ic) { display: flex; flex-direction: column; line-height: 1.1; font-size: .92rem; color: var(--c-body-muted); }
.apx-trust strong { font-family: var(--f-display); color: var(--c-ink); font-size: 1rem; }

/* --- Search Everywhere dashboard card --- */
.apx-dash { background: #fff; border: 1px solid var(--c-line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: clamp(16px,2.2vw,22px); }
.apx-dash-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.apx-dash-title { font-family: var(--f-display); font-weight: 700; color: var(--c-ink); font-size: 1.02rem; }
.apx-dash-pill { font-size: .78rem; color: var(--c-body-muted); border: 1px solid var(--c-line); border-radius: 999px; padding: 4px 10px; }
.apx-dash-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
@media (max-width: 520px) { .apx-dash-grid { grid-template-columns: repeat(2,1fr); } }
.apx-tile { border: 1px solid var(--c-line); border-radius: 12px; padding: 10px; background: linear-gradient(180deg,#fff,#FAFCFE); opacity: 0; transform: translateY(10px); animation: apx-rise .55s ease forwards; animation-delay: var(--d,0s); }
.apx-tile-top { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.apx-tile-glyph svg { width: 20px; height: 20px; display: block; }
.apx-tile-name { font-size: .78rem; font-weight: 600; color: var(--c-body); font-family: var(--f-display); }
.apx-spark { width: 100%; height: 30px; color: var(--c-sky-700); display: block; }
.apx-spark-line { stroke-dasharray: 140; stroke-dashoffset: 140; animation: apx-draw 1.3s ease forwards; animation-delay: calc(var(--d,0s) + .25s); }
.apx-tile:nth-child(2) .apx-spark { color: #EA4335; } .apx-tile:nth-child(3) .apx-spark { color: #10A37F; }
.apx-tile:nth-child(4) .apx-spark { color: #4285F4; } .apx-tile:nth-child(5) .apx-spark { color: #9168F0; } .apx-tile:nth-child(6) .apx-spark { color: #20B8CD; }
.apx-tile-trend { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; color: var(--c-success); }
.apx-tile-trend .icon { width: 13px; height: 13px; }
.apx-dash-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--c-line); font-size: .82rem; color: var(--c-success); }
.apx-dash-foot .icon { width: 16px; height: 16px; flex: 0 0 16px; }

/* --- Three engines cards --- */
.apx-engine { position: relative; overflow: hidden; }
.apx-engine-ic { transition: transform .25s ease; }
a.apx-engine:hover .apx-engine-ic { transform: scale(1.08) rotate(-3deg); }
.apx-engine--sky .apx-engine-ic { background: #EAF2FE; color: #2563EB; }
.apx-engine--green .apx-engine-ic { background: #E7F6ED; color: #1E9E52; }
.apx-engine--purple .apx-engine-ic { background: #F0EAFE; color: #7C4DE0; }
.apx-engine::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg,var(--c-orange),#F4A05A); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
a.apx-engine:hover::after { transform: scaleX(1); }

/* --- Journey --- */
.apx-journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 18px; counter-reset: jstep; }
@media (min-width: 720px) { .apx-journey { grid-auto-flow: column; grid-template-columns: repeat(5,1fr); gap: 8px; } }
.apx-jstep { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; opacity: 0; transform: translateY(12px); }
.reveal.in .apx-jstep { animation: apx-rise .5s ease forwards; animation-delay: var(--d,0s); }
@media (min-width: 720px) { .apx-jstep:not(:last-child)::after { content: ""; position: absolute; top: 28px; right: -50%; width: 100%; height: 2px; background-image: linear-gradient(90deg,var(--c-sky) 40%,transparent 40%); background-size: 12px 2px; z-index: 0; } }
.apx-jic { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 50%; background: #fff; border: 2px solid var(--c-sky-50); color: var(--c-sky-700); box-shadow: var(--shadow); }
.apx-jic .icon { width: 26px; height: 26px; }
.apx-jstep strong { font-family: var(--f-display); font-size: 1rem; color: var(--c-ink); }
.apx-jsub { font-size: .85rem; color: var(--c-body-muted); max-width: 18ch; }

/* --- Industries --- */
.apx-industries { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
@media (min-width: 640px) { .apx-industries { grid-template-columns: repeat(4,1fr); } }
@media (min-width: 1024px) { .apx-industries { grid-template-columns: repeat(7,1fr); } }
.apx-industries li { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px 10px; background: #fff; border: 1px solid var(--c-line); border-radius: 14px; font-family: var(--f-display); font-weight: 600; font-size: .9rem; color: var(--c-body); text-align: center; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; opacity: 0; transform: translateY(10px); }
.reveal.in .apx-industries li { animation: apx-rise .45s ease forwards; animation-delay: var(--d,0s); }
.apx-industries li:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.apx-ind-ic { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px; background: var(--c-orange-50); color: var(--c-orange-700); }
.apx-ind-ic .icon { width: 24px; height: 24px; }
.apx-industries li:nth-child(3n+1) .apx-ind-ic { background: var(--c-sky-50); color: var(--c-sky-700); }

/* --- Stat band (navy) --- */
.apx-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; text-align: center; }
@media (min-width: 900px) { .apx-stats { grid-template-columns: repeat(4,1fr); } }
.apx-stats li { padding: 8px; border-left: 2px solid rgba(110,193,228,.25); }
.apx-stats li:first-child { border-left: none; }
@media (max-width: 899px) { .apx-stats li:nth-child(odd) { border-left: none; } }
.apx-stat-num { display: block; font-family: var(--f-display); font-weight: 800; font-size: clamp(2.2rem,5vw,3rem); line-height: 1; color: #fff; letter-spacing: -.02em; }
.apx-stat-label { display: block; margin-top: 8px; font-size: .9rem; color: #C9D6E2; }

/* --- Frank photo frame --- */
.apx-frank-photo img { border-radius: 16px; box-shadow: var(--shadow-lg); }

/* --- Areas strip tighter --- */
.apx-areas { display: flex; flex-wrap: wrap; gap: 10px; }
.apx-areas li { list-style: none; }
/* v2 area pills sit on a WHITE section — light-theme colors (base .ap-areas is white-on-navy) */
.apx-areas a { color: var(--c-ink); background: var(--c-white); border-color: var(--c-line); box-shadow: 0 1px 2px rgba(0,24,40,0.04); }
.apx-areas a:hover { background: var(--c-orange); border-color: var(--c-orange); color: #fff; }
.apx-areas .icon { color: var(--c-sky-700); }
.apx-areas a:hover .icon { color: #fff; }

/* --- CTA band --- */
.apx-cta-band { background: linear-gradient(120deg,var(--c-navy) 0%,#00304F 100%); position: relative; overflow: hidden; padding-block: clamp(2.5rem,6vw,4rem); }
.apx-cta-band::before { content: ""; position: absolute; top: -80px; right: -40px; width: 320px; height: 320px; background: radial-gradient(circle,rgba(240,112,32,.35),transparent 70%); filter: blur(40px); }
.apx-cta-inner { position: relative; display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; }
@media (min-width: 900px) { .apx-cta-inner { grid-template-columns: 1.4fr 1fr; } }
.apx-cta-inner h2 { color: #fff; margin-bottom: .35em; }
.apx-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) { .apx-cta-actions { justify-content: flex-end; } }

@keyframes apx-float { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-24px,20px); } }
@keyframes apx-rise { to { opacity: 1; transform: none; } }
@keyframes apx-draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .apx-orb, .apx-tile, .apx-jstep, .apx-industries li { animation: none !important; opacity: 1 !important; transform: none !important; }
  .apx-spark-line { animation: none !important; stroke-dashoffset: 0 !important; }
}
