/* hdpf-layout.css — site chrome, container, sections, hero, CTA band.
 *
 * "Refined Blueprint" execution: paper surfaces, a restrained blueprint-grid
 * atmosphere used deliberately (hero / bands / planes — never as page-wide
 * garnish), brand-first Newsreader display type, one blue accent for action.
 *
 * Tokens only (no raw hex). color-mix(tokens) is used for atmosphere tints.
 * rem for layout/spacing, px for hairlines/shadows, @container for breakpoints.
 */

/* ------------------------------------------------------------------ *
 * Atmosphere primitives
 * ------------------------------------------------------------------ */

:root {
  /* Blueprint grid — faint accent ruling on paper. */
  --hdpf-bp-line: color-mix(in srgb, var(--hdpf-accent) 9%, transparent);
  --hdpf-bp-line-soft: color-mix(in srgb, var(--hdpf-accent) 5%, transparent);
  --hdpf-bp-size: 1.5rem;
  /* Site content measure — a touch wider than the design-system content-max. */
  --hdpf-measure: 75rem;
  --hdpf-gutter: var(--hdpf-space-6);
}

/* Blueprint grid surface. Apply to a positioned element; it paints a subtle
 * drafting grid. Pair with a base background on the element itself. */
.hdpf-blueprint {
  background-image:
    linear-gradient(var(--hdpf-bp-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--hdpf-bp-line) 1px, transparent 1px);
  background-size: var(--hdpf-bp-size) var(--hdpf-bp-size);
}

.hdpf-body {
  margin: 0;
  min-height: 100vh;
  color: var(--hdpf-ink);
  font-family: var(--hdpf-font-ui);
  background-color: var(--hdpf-page);
  /* A whisper of paper warmth at the very top; the rest stays clean. */
  background-image:
    radial-gradient(120% 40rem at 50% -8rem, var(--hdpf-accent-soft), transparent 60%);
  background-repeat: no-repeat;
}

.hdpf-skip-link {
  position: absolute;
  left: var(--hdpf-space-4);
  top: -100%;
  z-index: var(--hdpf-z-max);
  padding: var(--hdpf-space-2) var(--hdpf-space-4);
  background: var(--hdpf-accent);
  color: var(--hdpf-ink-onAccent);
  border-radius: var(--hdpf-radius-md);
  text-decoration: none;
  font-weight: var(--hdpf-fw-semibold);
  box-shadow: var(--hdpf-shadow-md);
}

.hdpf-skip-link:focus {
  top: var(--hdpf-space-3);
}

/* ------------------------------------------------------------------ *
 * Container + main
 * ------------------------------------------------------------------ */

.hdpf-container {
  width: min(100% - (var(--hdpf-gutter) * 2), var(--hdpf-measure));
  margin-inline: auto;
}

/* Full-bleed helper: a section spans the viewport while its inner content
 * stays on the container measure. */
.hdpf-bleed {
  width: 100%;
}

.hdpf-main {
  display: block;
}

/* ------------------------------------------------------------------ *
 * Header
 * ------------------------------------------------------------------ */

.hdpf-header {
  position: sticky;
  top: 0;
  z-index: var(--hdpf-z-topbar);
  padding: var(--hdpf-space-3) 0;
  background: color-mix(in srgb, var(--hdpf-page) 82%, transparent);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
}

/* The site-header card (base styling in hdpf-nav.css) — refined here. */
.hdpf-header .hdpf-site-header {
  min-height: 3.25rem;
  padding-block: var(--hdpf-space-2);
  border-color: var(--hdpf-border);
  box-shadow: var(--hdpf-shadow-sm);
}

.hdpf-site-header__brand {
  gap: var(--hdpf-space-3);
}

.hdpf-brand-logo {
  display: block;
  height: 2.25rem;
  width: auto;
}

[data-theme="dark"] .hdpf-brand-logo {
  /* Dark-text lockup → crisp white silhouette on dark chrome. */
  filter: brightness(0) invert(1);
}

/* Hide the legacy text mark/name when a logo image is present. */
.hdpf-site-header__brand .hdpf-site-header__name {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hdpf-header__actions {
  display: inline-flex;
  align-items: center;
  gap: var(--hdpf-space-3);
}

.hdpf-header__phone {
  display: inline-flex;
  align-items: center;
  gap: var(--hdpf-space-2);
  color: var(--hdpf-ink);
  text-decoration: none;
  font-size: var(--hdpf-fs-caption);
  font-weight: var(--hdpf-fw-semibold);
  white-space: nowrap;
}

.hdpf-header__phone .hdpf-icon {
  color: var(--hdpf-accent);
}

.hdpf-header__phone:hover {
  color: var(--hdpf-accent);
}

.hdpf-header__theme .hdpf-header__theme-moon {
  display: none;
}

[data-theme="dark"] .hdpf-header__theme .hdpf-header__theme-sun {
  display: none;
}

[data-theme="dark"] .hdpf-header__theme .hdpf-header__theme-moon {
  display: inline-flex;
}

.hdpf-header__menu-btn {
  display: none;
}

/* Collapse the desktop nav / phone label as the container narrows. */
@container layout-root (max-width: 52rem) {
  .hdpf-site-header__nav,
  .hdpf-header__cta {
    display: none;
  }

  .hdpf-header__menu-btn {
    display: inline-flex;
  }
}

@container layout-root (max-width: 34rem) {
  .hdpf-header__phone span {
    display: none;
  }
}

/* Mobile nav — slide-in side drawer (scrim + drawer), like the design gallery */
html.hdpf-nav-open {
  overflow: hidden;
}

.hdpf-mobile-nav {
  position: fixed;
  inset: 0;
  z-index: var(--hdpf-z-modal);
}

.hdpf-mobile-nav[hidden] {
  display: none !important;
}

/* While sliding out (not yet hidden) let clicks fall through to the page. */
.hdpf-mobile-nav:not(.is-open) {
  pointer-events: none;
}

.hdpf-mobile-nav__scrim {
  position: absolute;
  inset: 0;
  background: var(--hdpf-scrim);
  opacity: 0;
  transition: opacity var(--hdpf-duration-normal) var(--hdpf-ease-standard);
}

.hdpf-mobile-nav.is-open .hdpf-mobile-nav__scrim {
  opacity: 1;
}

.hdpf-mobile-nav__drawer {
  position: absolute;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--hdpf-space-4);
  width: min(86vw, 20rem);
  height: 100%;
  padding: var(--hdpf-space-4);
  background: var(--hdpf-surface);
  border-right: 1px solid var(--hdpf-border);
  box-shadow: var(--hdpf-shadow-lg);
  transform: translateX(-105%);
  transition: transform var(--hdpf-duration-slow) var(--hdpf-ease-emphasized);
  overflow-y: auto;
}

.hdpf-mobile-nav.is-open .hdpf-mobile-nav__drawer {
  transform: translateX(0);
}

.hdpf-mobile-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hdpf-space-3);
  padding-bottom: var(--hdpf-space-3);
  border-bottom: 1px solid var(--hdpf-divider);
}

.hdpf-mobile-nav__logo {
  display: block;
  height: 1.75rem;
  width: auto;
}

.hdpf-mobile-nav__close {
  color: var(--hdpf-ink-faint);
}

.hdpf-mobile-nav__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--hdpf-space-1);
}

.hdpf-mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hdpf-space-3);
  min-height: var(--hdpf-touch-target);
  padding: var(--hdpf-space-2) var(--hdpf-space-3);
  border-radius: var(--hdpf-radius-md);
  color: var(--hdpf-ink);
  text-decoration: none;
  font-weight: var(--hdpf-fw-semibold);
  transition:
    background-color var(--hdpf-duration-fast) var(--hdpf-ease-standard),
    color var(--hdpf-duration-fast) var(--hdpf-ease-standard);
}

.hdpf-mobile-nav__link-label {
  display: inline-flex;
  align-items: center;
  gap: var(--hdpf-space-3);
}

/* Leading icon dim; trailing chevron dimmer */
.hdpf-mobile-nav__link .hdpf-icon {
  color: var(--hdpf-ink-faint);
}

.hdpf-mobile-nav__link:hover {
  background: var(--hdpf-page-soft);
  color: var(--hdpf-accent);
}

.hdpf-mobile-nav__link.is-active {
  background: var(--hdpf-accent-soft);
  color: var(--hdpf-accent-strong);
}

.hdpf-mobile-nav__link.is-active .hdpf-mobile-nav__link-label .hdpf-icon {
  color: var(--hdpf-accent);
}

/* Bottom actions — mirrors the header action cluster (phone + Free Consult) */
.hdpf-mobile-nav__actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: var(--hdpf-space-3);
  padding-top: var(--hdpf-space-4);
  border-top: 1px solid var(--hdpf-divider);
}

.hdpf-mobile-nav__actions .hdpf-btn--primary {
  flex: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hdpf-mobile-nav__drawer,
  .hdpf-mobile-nav__scrim {
    transition: none;
  }
}

/* ------------------------------------------------------------------ *
 * Footer
 * ------------------------------------------------------------------ */

.hdpf-footer {
  padding: var(--hdpf-space-9) 0 var(--hdpf-space-9);
}

.hdpf-footer .hdpf-site-footer {
  position: relative;
  overflow: hidden;
  border-color: var(--hdpf-border);
  box-shadow: var(--hdpf-shadow-sm);
}

/* Thin blueprint accent rule along the footer top edge. */
.hdpf-footer .hdpf-site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--hdpf-accent), color-mix(in srgb, var(--hdpf-accent) 20%, transparent));
}

.hdpf-footer__brand-logo {
  display: block;
  width: auto;
  margin-bottom: var(--hdpf-space-4);
}

[data-theme="dark"] .hdpf-footer__brand-logo {
  filter: brightness(0) invert(1);
}

.hdpf-nap-plain {
  margin-top: var(--hdpf-space-4);
  font-size: var(--hdpf-fs-micro);
  color: var(--hdpf-ink-faint);
  font-family: var(--hdpf-font-mono);
  letter-spacing: var(--hdpf-tracking-wide);
}

.hdpf-ink-faint {
  color: var(--hdpf-ink-faint);
  font-weight: var(--hdpf-fw-regular);
}

/* Merged Company + Family footer column (two stacked groups). */
.hdpf-site-footer__col-merge {
  display: flex;
  flex-direction: column;
}

.hdpf-site-footer__group + .hdpf-site-footer__group {
  margin-top: var(--hdpf-space-6);
}

.hdpf-site-footer__insured {
  display: inline-flex;
  align-items: center;
  gap: var(--hdpf-space-2);
  margin: var(--hdpf-space-5) 0 0;
  font-size: var(--hdpf-fs-caption);
  font-weight: var(--hdpf-fw-semibold);
  color: var(--hdpf-ink-muted);
}

.hdpf-site-footer__insured .hdpf-icon {
  color: var(--hdpf-success);
}

/* ------------------------------------------------------------------ *
 * Section rhythm
 * ------------------------------------------------------------------ */

.hdpf-section {
  padding-block: var(--hdpf-space-11);
}

.hdpf-section--tight {
  padding-block: var(--hdpf-space-9);
}

/* Soft alternating band for rhythm. Full-bleed tint. */
.hdpf-section--soft {
  background: var(--hdpf-page-soft);
  border-block: 1px solid var(--hdpf-border);
}

.hdpf-section__head {
  max-width: 46rem;
  margin-bottom: var(--hdpf-space-8);
}

.hdpf-section__head--center {
  margin-inline: auto;
  text-align: center;
}

.hdpf-section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--hdpf-space-2);
  margin: 0 0 var(--hdpf-space-3);
  font-family: var(--hdpf-font-mono);
  font-size: var(--hdpf-fs-micro);
  letter-spacing: var(--hdpf-tracking-wider);
  text-transform: uppercase;
  color: var(--hdpf-accent);
  font-weight: var(--hdpf-fw-semibold);
}

/* Small drafting tick before eyebrow text. */
.hdpf-section__eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 2px;
  background: var(--hdpf-accent);
  border-radius: var(--hdpf-radius-pill);
}

.hdpf-section__head--center .hdpf-section__eyebrow {
  justify-content: center;
}

.hdpf-section__title {
  margin: 0 0 var(--hdpf-space-4);
  font-family: var(--hdpf-font-display);
  font-size: clamp(1.875rem, 1.1rem + 2.9vw, 2.5rem);
  font-weight: var(--hdpf-fw-black);
  line-height: var(--hdpf-lh-tight);
  letter-spacing: var(--hdpf-tracking-tight);
  color: var(--hdpf-ink-strong);
  text-wrap: balance;
  text-transform: capitalize;
}

.hdpf-section__lead {
  margin: 0;
  max-width: 42rem;
  font-size: var(--hdpf-fs-title);
  line-height: var(--hdpf-lh-relaxed);
  color: var(--hdpf-ink-muted);
  text-wrap: pretty;
}

.hdpf-section__head--center .hdpf-section__lead {
  margin-inline: auto;
}

/* ------------------------------------------------------------------ *
 * Grid helpers
 * ------------------------------------------------------------------ */

.hdpf-grid {
  display: grid;
  gap: var(--hdpf-space-5);
}

.hdpf-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hdpf-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hdpf-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@container layout-root (max-width: 60rem) {
  .hdpf-grid--3,
  .hdpf-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container layout-root (max-width: 40rem) {
  .hdpf-grid--2,
  .hdpf-grid--3,
  .hdpf-grid--4 { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ *
 * Hero — split composition: content + blueprint photo plane
 * ------------------------------------------------------------------ */

.hdpf-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--hdpf-border);
  background:
    radial-gradient(90% 80% at 85% 0%, var(--hdpf-accent-soft), transparent 60%),
    var(--hdpf-page);
}

/* Faint blueprint ruling washed across the hero. */
.hdpf-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hdpf-bp-line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--hdpf-bp-line-soft) 1px, transparent 1px);
  background-size: var(--hdpf-bp-size) var(--hdpf-bp-size);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.7), transparent 85%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.7), transparent 85%);
  pointer-events: none;
}

.hdpf-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: var(--hdpf-space-10);
  padding-block: clamp(var(--hdpf-space-9), 6vw, var(--hdpf-space-11));
}

.hdpf-hero__content {
  max-width: 34rem;
}

.hdpf-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--hdpf-space-2);
  margin: 0 0 var(--hdpf-space-5);
  font-family: var(--hdpf-font-mono);
  font-size: var(--hdpf-fs-micro);
  letter-spacing: var(--hdpf-tracking-wider);
  text-transform: uppercase;
  color: var(--hdpf-accent);
  font-weight: var(--hdpf-fw-semibold);
}

.hdpf-hero__eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: var(--hdpf-accent);
  border-radius: var(--hdpf-radius-pill);
}

.hdpf-hero__title {
  margin: 0 0 var(--hdpf-space-5);
  font-family: var(--hdpf-font-display);
  font-size: clamp(2.5rem, 1.4rem + 4.4vw, 4rem);
  font-weight: var(--hdpf-fw-black);
  line-height: 1.02;
  letter-spacing: var(--hdpf-tracking-tight);
  color: var(--hdpf-ink-strong);
  text-wrap: balance;
  text-transform: capitalize;
}

.hdpf-hero__lead {
  margin: 0 0 var(--hdpf-space-7);
  max-width: 32rem;
  font-size: var(--hdpf-fs-title);
  line-height: var(--hdpf-lh-relaxed);
  color: var(--hdpf-ink-muted);
  text-wrap: pretty;
}

.hdpf-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hdpf-space-3);
}

.hdpf-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hdpf-space-2) var(--hdpf-space-5);
  margin-top: var(--hdpf-space-7);
  padding-top: var(--hdpf-space-5);
  border-top: 1px dashed var(--hdpf-border-strong);
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.hdpf-hero__trust li {
  display: inline-flex;
  align-items: center;
  gap: var(--hdpf-space-2);
  font-size: var(--hdpf-fs-caption);
  font-weight: var(--hdpf-fw-semibold);
  color: var(--hdpf-ink-muted);
}

.hdpf-hero__trust .hdpf-icon {
  color: var(--hdpf-success);
}

.hdpf-hero__media {
  position: relative;
}

/* Staggered entrance for the hero (reduced-motion zeroes durations via tokens
 * — but also guard with the media query for the transform). */
.hdpf-hero__content > * {
  animation: hdpf-rise var(--hdpf-duration-slow) var(--hdpf-ease-emphasized) backwards;
}
.hdpf-hero__content > :nth-child(1) { animation-delay: 40ms; }
.hdpf-hero__content > :nth-child(2) { animation-delay: 100ms; }
.hdpf-hero__content > :nth-child(3) { animation-delay: 160ms; }
.hdpf-hero__content > :nth-child(4) { animation-delay: 220ms; }
.hdpf-hero__content > :nth-child(5) { animation-delay: 280ms; }
.hdpf-hero__media { animation: hdpf-rise var(--hdpf-duration-slow) var(--hdpf-ease-emphasized) 160ms backwards; }

@keyframes hdpf-rise {
  from { opacity: 0; transform: translateY(0.75rem); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hdpf-hero__content > *,
  .hdpf-hero__media { animation: none; }
}

@container layout-root (max-width: 56rem) {
  .hdpf-hero__inner {
    grid-template-columns: 1fr;
    gap: var(--hdpf-space-8);
  }
  .hdpf-hero__content { max-width: 40rem; }
  .hdpf-hero__media { order: -1; }
}

/* ------------------------------------------------------------------ *
 * Photo / blueprint placeholder plane (reusable)
 * ------------------------------------------------------------------ */

.hdpf-plane {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--hdpf-border-strong);
  border-radius: var(--hdpf-radius-xl);
  background: var(--hdpf-surface-inset);
  box-shadow: var(--hdpf-shadow-md);
  aspect-ratio: 4 / 3;
}

/* Placeholder variant: blueprint grid + drafting crop marks + caption. */
.hdpf-plane--placeholder {
  background-color: var(--hdpf-surface-inset);
  background-image:
    linear-gradient(var(--hdpf-bp-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--hdpf-bp-line) 1px, transparent 1px);
  background-size: var(--hdpf-bp-size) var(--hdpf-bp-size);
  display: grid;
  place-items: center;
}

.hdpf-plane__mark {
  color: color-mix(in srgb, var(--hdpf-accent) 42%, transparent);
}

.hdpf-plane__mark .hdpf-icon {
  width: 3.5rem;
  height: 3.5rem;
}

/* Drafting crop-mark corners. */
.hdpf-plane--placeholder::before,
.hdpf-plane--placeholder::after {
  content: "";
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid color-mix(in srgb, var(--hdpf-accent) 45%, transparent);
}
.hdpf-plane--placeholder::before {
  top: var(--hdpf-space-4);
  left: var(--hdpf-space-4);
  border-right: 0;
  border-bottom: 0;
}
.hdpf-plane--placeholder::after {
  bottom: var(--hdpf-space-4);
  right: var(--hdpf-space-4);
  border-left: 0;
  border-top: 0;
}

.hdpf-plane__caption {
  position: absolute;
  left: var(--hdpf-space-4);
  bottom: var(--hdpf-space-4);
  display: inline-flex;
  align-items: center;
  gap: var(--hdpf-space-2);
  padding: var(--hdpf-space-1) var(--hdpf-space-3);
  border-radius: var(--hdpf-radius-pill);
  background: color-mix(in srgb, var(--hdpf-surface) 80%, transparent);
  border: 1px solid var(--hdpf-border);
  font-family: var(--hdpf-font-mono);
  font-size: var(--hdpf-fs-micro);
  letter-spacing: var(--hdpf-tracking-wide);
  text-transform: uppercase;
  color: var(--hdpf-ink-muted);
}

.hdpf-plane__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ------------------------------------------------------------------ *
 * Hero carousel (folder-driven background slides; crossfade + Ken Burns)
 * ------------------------------------------------------------------ */

.hdpf-hero-carousel {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--hdpf-border-strong);
  border-radius: var(--hdpf-radius-xl);
  box-shadow: var(--hdpf-shadow-md);
  background: var(--hdpf-surface-inset);
  isolation: isolate;
}

.hdpf-hero-carousel__slide {
  position: absolute;
  inset: 0;
  background-image: var(--hdpf-slide-img);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity var(--hdpf-duration-slow) var(--hdpf-ease-standard);
  will-change: opacity;
}

.hdpf-hero-carousel__slide.is-active {
  opacity: 1;
  z-index: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .hdpf-hero-carousel__slide.is-active {
    animation: hdpf-kenburns 8s var(--hdpf-ease-standard) both;
  }
}

@keyframes hdpf-kenburns {
  from { transform: scale(1.12); }
  to   { transform: scale(1); }
}

/* Generic carousel dots — reused by hero + reviews. */
.hdpf-carousel__dots {
  display: flex;
  justify-content: center;
  gap: var(--hdpf-space-2);
}

.hdpf-hero-carousel .hdpf-carousel__dots {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: var(--hdpf-space-4);
}

.hdpf-carousel__dot {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: 0;
  border-radius: var(--hdpf-radius-pill);
  background: var(--hdpf-border-strong);
  cursor: pointer;
  transition:
    background var(--hdpf-duration-fast) var(--hdpf-ease-standard),
    width var(--hdpf-duration-fast) var(--hdpf-ease-standard),
    transform var(--hdpf-duration-fast) var(--hdpf-ease-standard);
}

.hdpf-carousel__dot:hover { transform: scale(1.2); }

.hdpf-carousel__dot.is-active {
  background: var(--hdpf-accent);
  width: 1.25rem;
}

/* On-photo (hero) dots read white with a soft shadow. */
.hdpf-hero-carousel .hdpf-carousel__dot {
  background: color-mix(in srgb, var(--hdpf-ink-onAccent) 55%, transparent);
  box-shadow: 0 1px 2px rgba(17, 20, 24, 0.4);
}

.hdpf-hero-carousel .hdpf-carousel__dot.is-active {
  background: var(--hdpf-ink-onAccent);
}

/* ------------------------------------------------------------------ *
 * Full-bleed photo hero — the carousel fills the section as a
 * background; content sits on top over a readability scrim.
 * ------------------------------------------------------------------ */

.hdpf-hero--full {
  display: flex;
  align-items: flex-end;
  min-height: min(90vh, 46rem);
  border-bottom: 0;
  isolation: isolate;
  background: var(--hdpf-hero-bg);
}

.hdpf-hero--full::before { display: none; } /* drop the blueprint wash over a photo */

/* Carousel → full-bleed background layer (overrides the bounded card look) */
.hdpf-hero__bg.hdpf-hero-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--hdpf-hero-bg);
}

/* Dark blueprint fallback when no photos are present */
.hdpf-hero__bg--placeholder .hdpf-hero-carousel__slide {
  background-color: var(--hdpf-hero-bg);
  background-image:
    linear-gradient(color-mix(in srgb, var(--hdpf-hero-ink) 7%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--hdpf-hero-ink) 7%, transparent) 1px, transparent 1px);
  background-size: var(--hdpf-bp-size) var(--hdpf-bp-size);
}

/* Readability scrim — dark toward the content (lower-left), clearing up-right */
.hdpf-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(94deg, var(--hdpf-hero-shade) 0%, var(--hdpf-hero-shade-mid) 44%, transparent 78%),
    linear-gradient(0deg, var(--hdpf-hero-shade) 0%, transparent 58%);
}

/* Content overlays the background + scrim. Keep .hdpf-container's own
 * width/centering (min(100% - gutters, measure) + margin-inline:auto) so the
 * hero content lines up with every other section; auto margins still center it
 * inside the flex hero. Only the base 2-column grid is dropped. */
.hdpf-hero--full .hdpf-hero__inner {
  position: relative;
  z-index: 2;
  display: block;
  padding-block: clamp(var(--hdpf-space-9), 8vw, var(--hdpf-space-11));
}

.hdpf-hero--full .hdpf-hero__content {
  max-width: 39rem;
}

/* On-photo type — light, with a soft shadow for busy photos */
.hdpf-hero--full .hdpf-hero__eyebrow {
  color: color-mix(in srgb, var(--hdpf-accent) 45%, var(--hdpf-hero-ink));
}

.hdpf-hero--full .hdpf-hero__title {
  color: var(--hdpf-hero-ink);
  text-shadow: 0 2px 18px color-mix(in srgb, var(--hdpf-hero-bg) 55%, transparent);
}

.hdpf-hero--full .hdpf-hero__lead {
  color: var(--hdpf-hero-ink-muted);
  text-shadow: 0 1px 12px color-mix(in srgb, var(--hdpf-hero-bg) 45%, transparent);
}

.hdpf-hero--full .hdpf-hero__trust {
  border-top-color: color-mix(in srgb, var(--hdpf-hero-ink) 28%, transparent);
}

.hdpf-hero--full .hdpf-hero__trust li {
  color: var(--hdpf-hero-ink-muted);
}

.hdpf-hero--full .hdpf-hero__trust .hdpf-icon {
  color: color-mix(in srgb, var(--hdpf-success) 45%, var(--hdpf-hero-ink));
}

/* Secondary (phone) button → glassy on the photo; primary stays brand blue */
.hdpf-hero--full .hdpf-btn--secondary {
  background: color-mix(in srgb, var(--hdpf-hero-ink) 14%, transparent);
  border-color: color-mix(in srgb, var(--hdpf-hero-ink) 46%, transparent);
  color: var(--hdpf-hero-ink);
  backdrop-filter: blur(6px);
}

.hdpf-hero--full .hdpf-btn--secondary:hover {
  background: color-mix(in srgb, var(--hdpf-hero-ink) 24%, transparent);
  border-color: var(--hdpf-hero-ink);
  color: var(--hdpf-hero-ink);
}

/* Dots sit at the bottom center of the photo */
.hdpf-hero--full .hdpf-carousel__dots {
  bottom: var(--hdpf-space-6);
}

@container layout-root (max-width: 56rem) {
  .hdpf-hero--full {
    min-height: min(86vh, 40rem);
  }
  .hdpf-hero__scrim {
    background: linear-gradient(0deg, var(--hdpf-hero-shade) 6%, var(--hdpf-hero-shade-mid) 52%, transparent 92%);
  }
  .hdpf-hero--full .hdpf-hero__content { max-width: none; }
}

/* ---- Advanced transitions: long cross-dissolve + varied Ken Burns ---- */
.hdpf-hero__bg .hdpf-hero-carousel__slide {
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1100ms var(--hdpf-ease-standard);
  will-change: opacity, transform;
}

.hdpf-hero__bg .hdpf-hero-carousel__slide.is-active {
  opacity: 1;
  z-index: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .hdpf-hero__bg .hdpf-hero-carousel__slide.is-active {
    animation: hdpf-kb-a 7000ms var(--hdpf-ease-standard) both;
  }
  .hdpf-hero__bg .hdpf-hero-carousel__slide:nth-child(4n+2).is-active { animation-name: hdpf-kb-b; }
  .hdpf-hero__bg .hdpf-hero-carousel__slide:nth-child(4n+3).is-active { animation-name: hdpf-kb-c; }
  .hdpf-hero__bg .hdpf-hero-carousel__slide:nth-child(4n+4).is-active { animation-name: hdpf-kb-d; }
}

@media (prefers-reduced-motion: reduce) {
  .hdpf-hero__bg .hdpf-hero-carousel__slide {
    transform: none;
    transition-duration: 300ms;
  }
}

/* Each variant zooms out to the same resting transform (scale 1.04) so the
 * outgoing slide never snaps as it cross-dissolves — only the entry pan varies. */
@keyframes hdpf-kb-a { from { transform: scale(1.2) translate(2.5%, -1.5%); } to { transform: scale(1.04); } }
@keyframes hdpf-kb-b { from { transform: scale(1.2) translate(-2.5%, 1.5%); } to { transform: scale(1.04); } }
@keyframes hdpf-kb-c { from { transform: scale(1.22) translate(1.5%, 2%); }  to { transform: scale(1.04); } }
@keyframes hdpf-kb-d { from { transform: scale(1.2) translate(-1.5%, -2%); } to { transform: scale(1.04); } }

/* ------------------------------------------------------------------ *
 * CTA band — bold accent close
 * ------------------------------------------------------------------ */

.hdpf-cta-band {
  position: relative;
  overflow: hidden;
  margin-top: 0;
  padding-block: var(--hdpf-space-11);
  background:
    radial-gradient(80% 120% at 100% 0%, var(--hdpf-accent-hover), transparent 55%),
    var(--hdpf-accent);
  color: var(--hdpf-ink-onAccent);
  border: 0;
}

.hdpf-cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--hdpf-ink-onAccent) 10%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--hdpf-ink-onAccent) 10%, transparent) 1px, transparent 1px);
  background-size: var(--hdpf-bp-size) var(--hdpf-bp-size);
  -webkit-mask-image: radial-gradient(70% 100% at 0% 100%, rgba(0,0,0,0.9), transparent 70%);
  mask-image: radial-gradient(70% 100% at 0% 100%, rgba(0,0,0,0.9), transparent 70%);
  pointer-events: none;
}

.hdpf-cta-band__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--hdpf-space-7);
}

.hdpf-cta-band__copy {
  max-width: 40rem;
}

.hdpf-cta-band__title {
  margin: 0 0 var(--hdpf-space-3);
  font-family: var(--hdpf-font-display);
  font-size: clamp(1.75rem, 1.1rem + 2.6vw, 2.5rem);
  font-weight: var(--hdpf-fw-black);
  line-height: var(--hdpf-lh-tight);
  letter-spacing: var(--hdpf-tracking-tight);
  color: var(--hdpf-ink-onAccent);
  text-wrap: balance;
}

.hdpf-cta-band__body {
  margin: 0;
  font-size: var(--hdpf-fs-title);
  line-height: var(--hdpf-lh-relaxed);
  color: color-mix(in srgb, var(--hdpf-ink-onAccent) 88%, transparent);
  text-wrap: pretty;
}

.hdpf-cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hdpf-space-3);
}

/* On the accent band, the primary button inverts to paper for max contrast. */
.hdpf-cta-band .hdpf-btn--primary {
  background: var(--hdpf-ink-onAccent);
  color: var(--hdpf-accent);
  border-color: var(--hdpf-ink-onAccent);
}

.hdpf-cta-band .hdpf-btn--primary:hover {
  background: color-mix(in srgb, var(--hdpf-ink-onAccent) 90%, var(--hdpf-accent));
  color: var(--hdpf-accent-press);
}

.hdpf-cta-band .hdpf-btn--secondary {
  background: color-mix(in srgb, var(--hdpf-ink-onAccent) 12%, transparent);
  color: var(--hdpf-ink-onAccent);
  border-color: color-mix(in srgb, var(--hdpf-ink-onAccent) 45%, transparent);
}

.hdpf-cta-band .hdpf-btn--secondary:hover {
  background: color-mix(in srgb, var(--hdpf-ink-onAccent) 22%, transparent);
  border-color: var(--hdpf-ink-onAccent);
  color: var(--hdpf-ink-onAccent);
}

/* ------------------------------------------------------------------ *
 * Page intro (non-home pages)
 * ------------------------------------------------------------------ */

.hdpf-page-intro {
  position: relative;
  overflow: hidden;
  padding-block: clamp(var(--hdpf-space-9), 5vw, var(--hdpf-space-11)) var(--hdpf-space-9);
  border-bottom: 1px solid var(--hdpf-border);
  background:
    radial-gradient(80% 90% at 90% 0%, var(--hdpf-accent-soft), transparent 55%),
    var(--hdpf-page);
}

.hdpf-page-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hdpf-bp-line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--hdpf-bp-line-soft) 1px, transparent 1px);
  background-size: var(--hdpf-bp-size) var(--hdpf-bp-size);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.6), transparent 80%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.6), transparent 80%);
  pointer-events: none;
}

.hdpf-page-intro__inner {
  position: relative;
  z-index: 1;
}

.hdpf-page-intro__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--hdpf-space-2);
  margin: 0 0 var(--hdpf-space-4);
  font-family: var(--hdpf-font-mono);
  font-size: var(--hdpf-fs-micro);
  letter-spacing: var(--hdpf-tracking-wider);
  text-transform: uppercase;
  color: var(--hdpf-accent);
  font-weight: var(--hdpf-fw-semibold);
}

.hdpf-page-intro__eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: var(--hdpf-accent);
  border-radius: var(--hdpf-radius-pill);
}

.hdpf-page-intro__title {
  margin: 0 0 var(--hdpf-space-4);
  max-width: 20ch;
  font-family: var(--hdpf-font-display);
  font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.25rem);
  font-weight: var(--hdpf-fw-black);
  letter-spacing: var(--hdpf-tracking-tight);
  line-height: 1.05;
  color: var(--hdpf-ink-strong);
  text-wrap: balance;
  text-transform: capitalize;
}

.hdpf-page-intro__lead {
  margin: 0;
  max-width: 42rem;
  color: var(--hdpf-ink-muted);
  font-size: var(--hdpf-fs-title);
  line-height: var(--hdpf-lh-relaxed);
  text-wrap: pretty;
}

.hdpf-page-intro--center {
  text-align: center;
}

.hdpf-page-intro--center .hdpf-page-intro__eyebrow {
  justify-content: center;
}

.hdpf-page-intro--center .hdpf-page-intro__title,
.hdpf-page-intro--center .hdpf-page-intro__lead {
  margin-inline: auto;
}

.hdpf-page-intro__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hdpf-space-3);
  margin-top: var(--hdpf-space-6);
}

.hdpf-page-intro--center .hdpf-page-intro__actions {
  justify-content: center;
}

/* Breadcrumbs riding inside the intro band, so the top of the page reads as
 * one unit instead of a stray line above a tinted box. The trail keeps its own
 * .hdpf-container (it is a sibling of __inner, not a child), so it stays on the
 * same left edge as the H1 — do not zero that container's width or padding. */
.hdpf-page-intro .hdpf-breadcrumbs {
  position: relative;
  z-index: 1;
  padding-block: 0;
  margin-bottom: var(--hdpf-space-6);
}

/* Split intro — copy beside a media plane. Turns a text-only page header into
 * an actual hero on pages that have a photo or an illustration to show. */
.hdpf-page-intro--split .hdpf-page-intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--hdpf-space-10);
  align-items: center;
}

.hdpf-page-intro--split .hdpf-page-intro__title {
  max-width: 16ch;
}

.hdpf-page-intro__media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--hdpf-border-strong);
  border-radius: var(--hdpf-radius-xl);
  background: var(--hdpf-surface-inset);
  box-shadow: var(--hdpf-shadow-md);
  aspect-ratio: 4 / 3;
}

.hdpf-page-intro__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Illustration fallback when a page has no photo of its own. */
.hdpf-page-intro__media--ill {
  display: grid;
  place-items: center;
  padding: var(--hdpf-space-7);
  background-color: var(--hdpf-surface-inset);
  background-image:
    linear-gradient(var(--hdpf-bp-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--hdpf-bp-line) 1px, transparent 1px);
  background-size: var(--hdpf-bp-size) var(--hdpf-bp-size);
}

.hdpf-page-intro__media--ill .hdpf-ill {
  width: 100%;
  height: auto;
}

/* Staggered entrance, matching the home hero. */
.hdpf-page-intro__copy > * {
  animation: hdpf-rise var(--hdpf-duration-slow) var(--hdpf-ease-emphasized) backwards;
}
.hdpf-page-intro__copy > :nth-child(1) { animation-delay: 40ms; }
.hdpf-page-intro__copy > :nth-child(2) { animation-delay: 100ms; }
.hdpf-page-intro__copy > :nth-child(3) { animation-delay: 160ms; }
.hdpf-page-intro__copy > :nth-child(4) { animation-delay: 220ms; }
.hdpf-page-intro__media { animation: hdpf-rise var(--hdpf-duration-slow) var(--hdpf-ease-emphasized) 160ms backwards; }

@media (prefers-reduced-motion: reduce) {
  .hdpf-page-intro__copy > *,
  .hdpf-page-intro__media { animation: none; }
}

@container layout-root (max-width: 56rem) {
  .hdpf-page-intro--split .hdpf-page-intro__grid {
    grid-template-columns: 1fr;
    gap: var(--hdpf-space-7);
  }

  .hdpf-page-intro--split .hdpf-page-intro__title {
    max-width: 20ch;
  }

  .hdpf-page-intro__media {
    order: -1;
    aspect-ratio: 16 / 9;
  }
}
