/*
 * home.css — CHN home view styling.
 * Uses brand tokens defined in tokens.css. No hex literals.
 *
 * F1 defensive: `wp-user-frontend-old/assets/css/frontend-forms.css` ships
 *     `body { font-family: "Open Sans", sans-serif; }` and loads AFTER the
 *     theme's base.css, beating its `body { font-family: var(--chn-font-sans) }`
 *     in cascade order. Until that's resolved chrome-wide, the .chn-home
 *     wrapper raises specificity (0,1,1) so brand-font wins on every home
 *     descendant that doesn't override.
 */
main.chn-home,
main.chn-home p,
main.chn-home a,
main.chn-home div,
main.chn-home span,
main.chn-home li,
main.chn-home dt,
main.chn-home button,
main.chn-home input,
main.chn-home select {
	font-family: var(--chn-font-sans);
}
main.chn-home h1,
main.chn-home h2,
main.chn-home h3,
main.chn-home h4,
main.chn-home h5,
main.chn-home h6 {
	font-family: var(--chn-font-serif);
}
/* Mono families stay mono — explicit override stops the cascade walk. */
main.chn-home .chn-mono,
main.chn-home .chn-num,
main.chn-home .chn-home-trust__stats dd,
main.chn-home .chn-home-pillar__index,
main.chn-home .chn-home-trust__step-num,
main.chn-home .chn-home-featured .chn-plan-card__price {
	font-family: var(--chn-font-mono);
}

/* ------------------------------------------------------------------
   GLOBAL SECTION RHYTHM
   ------------------------------------------------------------------
   Section padding is provided by `.chn-section { padding-block: var(--chn-space-7) }`
   from components.css. No blanket `.chn-home > section` override here —
   that rule was previously winning the cascade against per-section padding
   (e.g. the hero's editorial 96-160px clamp), collapsing the hero to a
   cramped 48px. Per-section padding overrides now live with each section.
   Adjacent different-bg sections also "kiss" cleanly with no hairline
   seam (no border-top between sections — checklist D2). */

.chn-home-section__header { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--chn-space-5); margin-bottom: var(--chn-space-6); flex-wrap: wrap; }
.chn-home-section__title { font-family: var(--chn-font-serif); font-size: clamp(28px, 3.2vw, 40px); line-height: 1.06; letter-spacing: -.02em; font-variation-settings: "opsz" 96, "wght" 600; margin: 0 0 var(--chn-space-2); color: var(--chn-color-text); }
.chn-home-section__sub { color: var(--chn-color-muted); margin: 0; max-width: 56ch; line-height: 1.55; }
.chn-home-section__cta { color: var(--chn-color-primary); font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.chn-home-section__cta:hover { color: var(--chn-color-primary-700); }

/* ------------------------------------------------------------------
   HERO
   ------------------------------------------------------------------ */
/* Phase B3: background variant is now driven by .chn-section--surface-alt
   (no-image fallback) or .chn-section--image (background-image carrier).
   We only override padding + colour here so the hero retains its taller
   editorial padding compared to the generic .chn-section default. */
/* F6 padding ladder restored (F7 trimmed home.css inadvertently reset
   it to the legacy 80/72 clamp — restored here to 96/96 so the hero
   has the editorial breathing room Kemar asked for). */
.chn-home-hero { position: relative; padding-top: clamp(96px, 12vw, 160px); padding-bottom: clamp(96px, 10vw, 140px); color: var(--chn-color-text); overflow: hidden; }
.chn-home-hero--image { color: #fff; }
.chn-home-hero__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,59,148,.55) 0%, rgba(29,39,51,.65) 100%); pointer-events: none; }
/* B4 Phase: the hero's `.chn-section__inner` companion class supplies the
   boxed container (max-width 1280px, padding-inline clamp, margin-inline
   auto). The hero text-column then sits flush-left INSIDE that container
   (so the first character of "Design" aligns with the left edge of every
   other section's content at x = (viewport - 1280)/2 + clamp(20,4vw,48)).
   The 760px constraint is applied to the inner-children (eyebrow / title /
   sub / actions) rather than the wrapper — that keeps the boxed alignment
   intact and still caps the reading width for editorial rhythm. */
.chn-home-hero__inner { position: relative; z-index: 1; text-align: left; }
.chn-home-hero__inner > * { max-width: 760px; }
.chn-home-hero__eyebrow { font-size: 11px; letter-spacing: .26em; font-weight: 700; text-transform: uppercase; color: var(--chn-color-accent); margin: 0 0 var(--chn-space-3); }
.chn-home-hero--image .chn-home-hero__eyebrow { color: var(--chn-color-accent-tint, #ffd8b8); }
.chn-home-hero__title { font-family: var(--chn-font-serif); font-size: clamp(40px, 5.5vw, 64px); line-height: 1.02; letter-spacing: -.025em; font-variation-settings: "opsz" 144, "wght" 600; margin: 0 0 var(--chn-space-4); color: inherit; }
.chn-home-hero__sub { font-size: clamp(16px, 1.5vw, 19px); line-height: 1.55; margin: 0 0 var(--chn-space-5); color: inherit; opacity: .92; max-width: 60ch; }
.chn-home-hero__actions { display: flex; gap: var(--chn-space-3); flex-wrap: wrap; }

/* Ghost button on image hero: white outline */
.chn-home-hero--image .chn-button--on-image { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .8); }
.chn-home-hero--image .chn-button--on-image:hover { background: rgba(255, 255, 255, .12); border-color: #fff; color: #fff; }

/* ------------------------------------------------------------------
   PLAN SEARCH
   ------------------------------------------------------------------ */
/* F6 restored: drop the negative-margin overlap so the hero CTAs aren't
   visually "attached" to the filter system below. Filter sits with its
   own breathing room (top + bottom var(--chn-space-7)). */
.chn-home-search { padding: var(--chn-space-6) 0 var(--chn-space-7) !important; margin-top: 0; position: relative; z-index: 2; }
.chn-home-search__form { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: var(--chn-space-3); background: var(--chn-color-surface); border: 1px solid var(--chn-color-border); border-radius: var(--chn-radius-md); padding: var(--chn-space-4); box-shadow: 0 12px 32px -16px rgba(11, 59, 148, .25); }
.chn-home-search__field label { display: block; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: var(--chn-color-muted); margin-bottom: 6px; }
.chn-home-search__field .chn-home-search__field-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chn-home-search__field-label small { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 7px; border: 1px solid rgba(11, 59, 148, .2); border-radius: 999px; background: rgba(11, 59, 148, .07); color: var(--chn-color-primary); font-size: 10px; font-weight: 800; letter-spacing: .08em; line-height: 1; }
.chn-home-search__field select { width: 100%; padding: 10px 12px; font-family: var(--chn-font-sans); font-size: 14px; border: 1px solid var(--chn-color-border); border-radius: var(--chn-radius-sm); background: var(--chn-color-surface); color: var(--chn-color-text); }
.chn-home-search__field select:focus { border-color: var(--chn-color-primary); outline: 3px solid rgba(11, 59, 148, .12); }
.chn-home-search__submit { align-self: end; height: 42px; }

/* ------------------------------------------------------------------
   FOUR PILLARS
   ------------------------------------------------------------------ */
/* Phase B3: background now comes from `.chn-section--surface-alt` so the
   home section markup matches the rest of the site's full-bleed pattern. */
.chn-home-pillars__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--chn-space-4); }
.chn-home-pillar {
	--card-accent: var(--chn-color-primary);
	display: flex; flex-direction: column; gap: var(--chn-space-2);
	padding: var(--chn-space-6) var(--chn-space-5);
	min-height: 220px;
	background: var(--chn-color-surface);
	border: 1px solid var(--chn-color-border);
	border-top: 6px solid var(--card-accent);
	border-radius: var(--chn-radius-md);
	text-decoration: none; color: var(--chn-color-text);
	transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
	position: relative;
}
.chn-home-pillar:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 28px -10px rgba(0, 0, 0, .18);
	color: var(--chn-color-text);
}
.chn-home-pillar__index {
	font-family: var(--chn-font-mono); font-size: 12px; letter-spacing: .1em;
	color: var(--card-accent); font-weight: 700;
}
.chn-home-pillar__label {
	font-family: var(--chn-font-serif); font-size: 30px; line-height: 1.05; margin: 0;
	color: var(--chn-color-text);
	font-variation-settings: "opsz" 36, "wght" 800;
	letter-spacing: -.02em;
	text-transform: uppercase;
}
.chn-home-pillar__sub { font-size: 15px; color: var(--chn-color-muted); margin: 0; line-height: 1.5; flex: 1; }
.chn-home-pillar__arrow { color: var(--card-accent); font-size: 18px; align-self: flex-start; transition: transform .15s ease; }
.chn-home-pillar:hover .chn-home-pillar__arrow { transform: translateX(4px); }

/* Per 2026-05-27 meeting — Design / Bid / Build / Manage stage colours.
   Saturation kept moderate so the cards still feel premium next to the
   navy + orange brand. Each card top border + accent text uses the
   per-stage hue; backgrounds stay neutral so brand identity holds. */
.chn-home-pillar--design { --card-accent: #c0392b; }
.chn-home-pillar--bid    { --card-accent: #d4a017; }
.chn-home-pillar--build  { --card-accent: #2e7d32; }
.chn-home-pillar--manage { --card-accent: #1565c0; }

/* ------------------------------------------------------------------
   FEATURED PLANS
   ------------------------------------------------------------------ */
/* The card itself is owned by components.css and is identical to the card on
   /house-plans/. The homepage only controls the rail width. Capping the rail
   at the catalogue results width prevents a featured card from becoming a
   different, oversized design at desktop widths. */
.chn-home-featured__grid {
	max-width: 872px;
	margin-inline: auto;
}

/* ------------------------------------------------------------------
   CUSTOM DESIGN CTA
   ------------------------------------------------------------------ */
/* Phase B3: background comes from `.chn-section--navy` for visual cohesion
   with the other closing-CTA bands across the site (was: --chn-color-text). */
.chn-home-customdesign { color: #fff; }
.chn-home-customdesign__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--chn-space-6); flex-wrap: wrap; }
.chn-home-customdesign__copy { flex: 1 1 60%; min-width: 280px; }
.chn-home-customdesign__eyebrow { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; font-weight: 700; color: var(--chn-color-accent); margin-bottom: var(--chn-space-2); }
.chn-home-customdesign__title { font-family: var(--chn-font-serif); font-size: clamp(24px, 2.8vw, 34px); line-height: 1.1; margin: 0 0 var(--chn-space-3); color: #fff; font-variation-settings: "opsz" 48, "wght" 600; letter-spacing: -.015em; }
.chn-home-customdesign__sub { color: rgba(255, 255, 255, .85); margin: 0; max-width: 60ch; }
.chn-home-customdesign .chn-button--primary { background: var(--chn-color-accent); border-color: var(--chn-color-accent); }
.chn-home-customdesign .chn-button--primary:hover { background: var(--chn-color-accent-700); border-color: var(--chn-color-accent-700); }

/* ------------------------------------------------------------------
   PROVIDER STRIP
   ------------------------------------------------------------------ */
.chn-home-providers__grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--chn-space-3); }
/* F1: explicit brand font so hello-elementor's 'Open Sans' base
   doesn't leak into the tile (it does without this — provider tiles
   would render in Open Sans instead of Manrope). */
.chn-home-provider-tile { display: flex; align-items: center; justify-content: space-between; gap: var(--chn-space-2); padding: var(--chn-space-4); background: var(--chn-color-surface); border: 1px solid var(--chn-color-border); border-radius: var(--chn-radius-md); color: var(--chn-color-text); text-decoration: none; transition: border-color .15s, transform .15s; font-family: var(--chn-font-sans); }
.chn-home-provider-tile:hover { border-color: var(--chn-color-primary); transform: translateY(-2px); color: var(--chn-color-text); }
.chn-home-provider-tile__label { font-family: var(--chn-font-sans); font-weight: 600; font-size: 15px; }
.chn-home-provider-tile__arrow { color: var(--chn-color-primary); font-size: 16px; }

/* ------------------------------------------------------------------
   TRUST + PROCESS
   ------------------------------------------------------------------ */
/* Phase B3: background comes from `.chn-section--paper-shade` so the trust
   strip has a warm contrast to the lighter pillar/feature rails above. */
.chn-home-trust__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--chn-space-4); margin-bottom: var(--chn-space-6); }
.chn-home-trust__step { padding: var(--chn-space-4); border-top: 2px solid var(--chn-color-primary); background: var(--chn-color-surface); border-radius: 0 0 var(--chn-radius-md) var(--chn-radius-md); }
.chn-home-trust__step-num { font-family: var(--chn-font-mono); font-size: 13px; letter-spacing: .08em; color: var(--chn-color-accent); font-weight: 600; display: block; margin-bottom: var(--chn-space-2); }
.chn-home-trust__step-title { font-family: var(--chn-font-serif); font-size: 19px; line-height: 1.2; margin: 0 0 var(--chn-space-2); color: var(--chn-color-text); font-variation-settings: "opsz" 24, "wght" 600; }
.chn-home-trust__step-sub { color: var(--chn-color-muted); margin: 0; line-height: 1.5; font-size: 14px; }
.chn-home-trust__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--chn-space-3); margin: var(--chn-space-5) 0 0; padding: var(--chn-space-4) 0 0; border-top: 1px solid var(--chn-color-border); }
.chn-home-trust__stats > div { padding: 0; }
.chn-home-trust__stats dt { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; font-weight: 700; color: var(--chn-color-muted); margin-bottom: 4px; }
/* Stats numerals use the brand mono so figures align tabularly across
   the four stat tiles (E5 in the checklist — applies the `.chn-mono`
   spirit by typeface even when the rendered text isn't strictly numeric). */
.chn-home-trust__stats dd { font-family: var(--chn-font-mono); font-size: clamp(22px, 2.4vw, 30px); margin: 0; color: var(--chn-color-text); font-weight: 600; font-feature-settings: "tnum" 1; letter-spacing: -.01em; line-height: 1.1; }

/* ------------------------------------------------------------------
   MEMBERSHIP / ACCOUNT CTA
   ------------------------------------------------------------------ */
/* Phase B3: navy background comes from `.chn-section--navy`. Padding kept
   for the visually substantial closing band. */
.chn-home-membership { color: #fff; padding: clamp(72px, 8vw, 100px) 0 !important; }
.chn-home-membership__inner { text-align: center; max-width: 720px; margin: 0 auto; }
.chn-home-membership__title { font-family: var(--chn-font-serif); font-size: clamp(32px, 3.8vw, 46px); line-height: 1.05; margin: 0 0 var(--chn-space-3); color: #fff; font-variation-settings: "opsz" 96, "wght" 600; letter-spacing: -.02em; }
.chn-home-membership__sub { color: rgba(255, 255, 255, .9); margin: 0 0 var(--chn-space-5); font-size: 16px; line-height: 1.55; }
.chn-home-membership .chn-button--on-navy { background: var(--chn-color-accent); border-color: var(--chn-color-accent); }
.chn-home-membership .chn-button--on-navy:hover { background: var(--chn-color-accent-700); border-color: var(--chn-color-accent-700); }

/* ------------------------------------------------------------------
   RESPONSIVE — mobile first cleanup
   ------------------------------------------------------------------ */
@media (max-width: 900px) {
	.chn-home-search__form { grid-template-columns: repeat(2, 1fr); }
	.chn-home-search__submit { grid-column: 1 / -1; }
	.chn-home-pillars__grid { grid-template-columns: repeat(2, 1fr); }
	.chn-home-providers__grid { grid-template-columns: repeat(2, 1fr); }
	.chn-home-trust__grid { grid-template-columns: repeat(2, 1fr); }
	.chn-home-trust__stats { grid-template-columns: repeat(2, 1fr); }
	.chn-home-customdesign__inner { flex-direction: column; align-items: flex-start; text-align: left; }
}

@media (max-width: 560px) {
	.chn-home-search__form { grid-template-columns: 1fr; }
	.chn-home-pillars__grid { grid-template-columns: 1fr; }
	.chn-home-providers__grid { grid-template-columns: 1fr; }
	.chn-home-trust__grid { grid-template-columns: 1fr; }
	.chn-home-trust__stats { grid-template-columns: repeat(2, 1fr); }
	.chn-home-section__header { flex-direction: column; align-items: flex-start; }
	/* Per 2026-05-27 meeting: on mobile the four pillar cards should be
	   rectangular vertical (taller than wide), not square. */
	.chn-home-pillar { min-height: 240px; padding: var(--chn-space-5) var(--chn-space-4); }
	.chn-home-pillar__label { font-size: 26px; }
}
