/*
 * home-shared.css — ActiveWords homepage shared primitives
 * Loaded when the published homepage markup or native homepage blocks are present.
 *
 * Source of truth: deployed child-theme style.css, homepage block (was lines
 * 80-164, scoped `body.page-id-37049 .aw-*`). This is a faithful 1:1 refactor:
 * class names follow homepage-css-rename-map.md, declarations are unchanged.
 *
 * Brand tokens match Michael's :root values in the main style.css and are
 * repeated here so inserted patterns stay styled on any page/theme context.
 * Homepage-only tokens live on the .aw-home wrapper below.
 */

/* --- Homepage-only design tokens ---
 * On :root (not the .aw-home wrapper) so the sections render correctly when a
 * block is used on ANY page, with or without the full-page wrapper. Brand tokens
 * (--aw-blue / --aw-orange / --aw-text) still come from the theme's :root. */
:root {
  --aw-blue: #0073b9;
  --aw-orange: #f97316;
  --aw-text: #3a3a3a;
  --aw-orange-hover: #ea580c;
  --aw-light-blue: #f2f8fc;
  --aw-gray-50: #f9fafb;
  --aw-gray-100: #f3f4f6;
  --aw-gray-200: #e5e7eb;
  --aw-gray-600: #4b5563;
  --aw-gray-800: #1f2937;
  --aw-gray-900: #111827;
}

/* --- Full-page wrapper (was .aw-homepage-gutenberg) ---
 * Full-bleed break-out + base type. Only applies when the wrapper is present
 * (e.g. the full homepage pattern); individual sections on a normal page stay
 * within the page's content width, which is the desired behaviour. */
.aw-home {
  color: var(--aw-gray-900);
  font-family: Arial, Helvetica, sans-serif;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: -32px;
  max-width: 100vw;
  overflow-x: clip;
  width: 100vw;
}

.aw-home *,
.aw-home ::before,
.aw-home ::after { box-sizing: border-box; }

.aw-home-section,
.aw-home-section *,
.aw-home-section ::before,
.aw-home-section ::after { box-sizing: border-box; }

/* --- Gutenberg layout-wrapper neutraliser ---
 * WordPress renders core/group blocks with an inner `.wp-block-group__inner-container`
 * wrapper, which becomes the ONLY child of our group and collapses our grid/flex
 * layouts (everything lands in a single column). `display: contents` removes that
 * wrapper's box so the real children become direct children of our .aw-home-* group
 * for layout. The second rule cancels WP's block-gap flow margins (our CSS handles
 * spacing via explicit margins + grid gap). */
.aw-home .wp-block-group__inner-container,
.aw-home-section .wp-block-group__inner-container { display: contents !important; }
.aw-home .is-layout-flow > *,
.aw-home-section .is-layout-flow > * { margin-block-start: 0 !important; }

.aw-home h1,
.aw-home h2,
.aw-home h3,
.aw-home p { margin-top: 0; }

/* --- Theme-chrome fixes for the front page ---
 * These target the Qode parent-theme title/header OUTSIDE .aw-home. The live
 * front page uses body.home; native rebuild/landing drafts receive
 * .awhb-homepage-canvas automatically when they contain native homepage blocks.
 */
body.home .qodef-title,
body.awhb-homepage-canvas .qodef-title,
body.home .qodef-title-holder,
body.awhb-homepage-canvas .qodef-title-holder,
body.home .qodef-page-title,
body.awhb-homepage-canvas .qodef-page-title,
body.home .qodef-page-header-title,
body.awhb-homepage-canvas .qodef-page-header-title,
body.home .qodef-breadcrumbs,
body.awhb-homepage-canvas .qodef-breadcrumbs,
body.home .entry-title,
body.awhb-homepage-canvas .entry-title,
body.home .page-title,
body.awhb-homepage-canvas .page-title { display: none !important; }

body.home .qodef-content,
body.awhb-homepage-canvas .qodef-content,
body.home .qodef-content .qodef-content-inner,
body.awhb-homepage-canvas .qodef-content .qodef-content-inner,
body.home .qodef-content .qodef-container,
body.awhb-homepage-canvas .qodef-content .qodef-container,
body.home .qodef-content .qodef-container-inner,
body.awhb-homepage-canvas .qodef-content .qodef-container-inner { padding-top: 0 !important; }

body.home .qodef-content .qodef-container-inner,
body.awhb-homepage-canvas .qodef-content .qodef-container-inner { margin-top: 0 !important; padding-top: 0 !important; width: 100% !important; }

/* --- Section shell (was .aw-section + variants) --- */
.aw-home section,
.aw-home-section { width: 100%; }
.aw-home-section { max-width: 100vw; overflow-x: clip; padding: 56px 20px; }
.aw-home-section--compact { padding-top: 44px; padding-bottom: 44px; }
.aw-home-section--blue { background: var(--aw-blue); color: #fff; }
.aw-home-section--light { background: var(--aw-gray-50); }
.aw-home-section--soft-blue {
  background: var(--aw-light-blue);
  border-top: 1px solid rgba(0, 115, 185, 0.1);
  border-bottom: 1px solid rgba(0, 115, 185, 0.1);
}

/* --- Containers (was .aw-container / .aw-container-narrow) --- */
.aw-home-container { max-width: 1180px; margin-left: auto; margin-right: auto; }
.aw-home-container--narrow { max-width: 880px; margin-left: auto; margin-right: auto; }
.aw-home-container,
.aw-home-container--narrow { width: 100%; }

/* --- Section headings (was .aw-section-heading / .aw-lede) --- */
.aw-home-heading { margin-bottom: 32px; text-align: center; }
.aw-home-heading h2 { color: var(--aw-gray-900); font-size: 36px; font-weight: 500; line-height: 1.16; margin-bottom: 12px; }
.aw-home-section--blue .aw-home-heading h2,
.aw-home-section--blue .aw-home-heading p { color: #fff; }
.aw-home-heading p,
.aw-home-lede { color: var(--aw-gray-600); font-size: 18px; line-height: 1.55; }
.aw-home-section--blue .aw-home-lede,
.aw-home-section--blue p { color: rgba(255, 255, 255, 0.9); }

/* --- Buttons (was .aw-button + variants / .aw-button-row) --- */
.aw-home-btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.aw-home-btn {
  align-items: center;
  border-radius: 8px;
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  min-height: 48px;
  padding: 14px 22px;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms, border-color 160ms, color 160ms;
}
.aw-home-btn--primary { background: var(--aw-orange); border: 2px solid var(--aw-orange); color: #fff !important; }
.aw-home-btn--primary:hover { background: var(--aw-orange-hover); border-color: var(--aw-orange-hover); color: #fff !important; }
.aw-home-btn--blue { background: var(--aw-blue); border: 2px solid var(--aw-blue); color: #fff !important; }
.aw-home-btn--blue:hover { background: #005f99; border-color: #005f99; color: #fff !important; }
.aw-home-btn--outline-white { align-items: center; background: transparent; border: 2px solid rgba(255, 255, 255, 0.35); color: #fff !important; display: inline-flex; justify-content: center; }
.aw-home-btn--outline-white:hover { background: rgba(255, 255, 255, 0.1); color: #fff !important; }
.aw-home-btn--outline-blue { align-items: center; background: #fff; border: 2px solid var(--aw-blue); color: var(--aw-blue) !important; display: inline-flex; justify-content: center; }
.aw-home-btn--outline-blue:hover { background: var(--aw-gray-50); }

/* --- Card / icon primitives (shared by Capabilities, Audiences, Differentiators) ---
 * Kept shared rather than triplicated per section. Section files add only their
 * own modifiers (e.g. blue icon, feature-card padding) and grid alias.
 * (was .aw-card-grid-3 / .aw-card-grid-2 / .aw-card / .aw-icon / .aw-icon-blue /
 *  .aw-lucide-icon / .aw-why-card)
 */
.aw-home-card-grid { display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.aw-home-card-grid--cols-2 { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.aw-home-card { background: #fff; border: 1px solid var(--aw-gray-200); border-radius: 8px; box-shadow: rgba(0, 0, 0, 0.05) 0 4px 10px; padding: 24px; }
.aw-home-card h3 { color: var(--aw-gray-900); font-size: 20px; margin-bottom: 10px; }
.aw-home-card p { color: var(--aw-gray-600); font-size: 15px; line-height: 1.55; margin-bottom: 0; }
.aw-home-card--feature { padding: 32px; }
.aw-home-icon { align-items: center; background: var(--aw-orange); border-radius: 8px; color: #fff; display: inline-flex; font-size: 22px; font-weight: 700; height: 48px; justify-content: center; margin-bottom: 16px; width: 48px; }
.aw-home-icon--blue { background: var(--aw-blue); }
.aw-home-icon-svg { display: block; height: 24px; width: 24px; }

/* --- Shared responsive --- */
@media (max-width: 900px) {
  .aw-home-card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .aw-home-section { padding-left: 16px; padding-right: 16px; }
  .aw-home-card-grid--cols-2 { grid-template-columns: 1fr; }
  .aw-home-btn-row { flex-direction: column; }
  .aw-home-btn { width: 100%; }
}
