/* ============================================================================
   Homepage design system
   8px-based spacing, measured typography, restrained surfaces and one visual
   language. Loaded after brand.css.
   ========================================================================== */

/* Thin credibility strip between hero and problem section */
.trust-strip {
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
}

.trust-strip__row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding-block: var(--space-5);
}

.trust-strip__label {
  flex: 0 0 auto;
  color: #7a8899;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trust-strip__items {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  min-width: 0;
  gap: var(--space-2) var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.trust-strip__items li {
  position: relative;
  padding-left: var(--space-4);
  color: #4a5768;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Below this, items no longer all fit on one line; switch to an even
   2-column grid instead of letting flex-wrap break rows unevenly. */
@media (max-width: 75rem) {
  .trust-strip__row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .trust-strip__items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3) var(--space-6);
    width: 100%;
  }

  .trust-strip__items li { white-space: normal; }
}

@media (max-width: 36rem) {
  .trust-strip__items { grid-template-columns: 1fr; }
}

.trust-strip__items li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--c-primary);
}

/* Homepage performance proof panel */
.proof-card--hero {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  min-height: 27rem;
  padding: var(--space-10);
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(151,197,244,0.18);
  border-radius: var(--radius-lg);
  background: rgba(7, 26, 48, 0.84);
  box-shadow: 0 2rem 5rem rgba(0,0,0,0.28);
  backdrop-filter: blur(1rem);
  -webkit-backdrop-filter: blur(1rem);
}

.proof-card--hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 88% 15%, rgba(40,145,248,0.2), transparent 32%);
}

.proof-hero__topline {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  color: #9eb2ca;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.status-dot {
  width: var(--space-2);
  height: var(--space-2);
  border-radius: 50%;
  background: #31d49a;
  box-shadow: 0 0 0 0.25rem rgba(49,212,154,0.1);
}

.proof-hero__num {
  font-family: var(--font-display);
  color: #b8dcff;
  font-size: clamp(5rem, 10vw, 8rem);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.06em;
}

.proof-hero__label {
  margin-top: var(--space-4);
  color: #fff;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.proof-hero__sub {
  margin-top: var(--space-1);
  color: #90a6bf;
  font-size: 0.8125rem;
  font-weight: 600;
}

.proof-hero__signal {
  display: flex;
  align-items: end;
  gap: var(--space-2);
  height: var(--space-12);
  margin-top: var(--space-8);
}

.proof-hero__signal span {
  flex: 1;
  min-height: 20%;
  background: linear-gradient(to top, #0758bd, #61b9ff);
  border-radius: 2px 2px 0 0;
  opacity: 0.8;
}

.proof-hero__signal span:nth-child(2) { height: 42%; }
.proof-hero__signal span:nth-child(3) { height: 58%; }
.proof-hero__signal span:nth-child(4) { height: 76%; }
.proof-hero__signal span:nth-child(5) { height: 100%; }

.proof-hero__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-4);
  padding-top: var(--space-5);
  color: #cae4ff;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

/* ---- Homepage product modules ------------------------------------------ */
.module-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: var(--space-4);
}

/* Columns hold 3, 4, and 3 modules. Flex + equal auto-rows spreads the extra
   height across the cards in the shorter columns instead of dumping it as
   empty space below the last one. */
.module-group {
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
  border: 1px solid #dfe7f0;
  border-radius: var(--radius-lg);
  background: #fff;
}

.module-group__title {
  margin: 0 0 var(--space-5);
  padding-bottom: var(--space-4);
  color: #0967ce;
  border-bottom: 1px solid #dfe7f0;
  font-size: 0.75rem;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.modules {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Flex, not grid-auto-rows: 1fr, because the row track only resolves against a
   definite container height and this one comes from the sibling column. */
.modules > li {
  display: flex;
  flex: 1;
}

.module {
  display: block;
  flex: 1;
  padding: var(--space-5);
  color: inherit;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: #f7f9fc;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease;
}

.module:hover,
.module:focus-visible {
  border-color: #b8d5f3;
  background: #fff;
}

.module h4 {
  margin: 0 0 var(--space-2);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.module p {
  margin: 0;
  color: #5b697a;
  font-size: 0.9rem;
  line-height: 1.6;
}

.people {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(var(--space-6), 3vw, var(--space-10));
}

.person {
  padding-top: var(--space-6);
  border-top: 2px solid #b7d7f8;
}

/* Source headshots are a mix of colour and greyscale at slightly different
   crops, so normalise both here rather than re-shooting the set. */
.person__photo {
  display: block;
  width: 5rem;
  height: 5rem;
  margin-bottom: var(--space-5);
  object-fit: cover;
  border-radius: 50%;
  background: var(--c-subtle);
  filter: grayscale(1) contrast(1.05);
}

.person h3 { margin-bottom: var(--space-2); font-size: 1.125rem; }
.person .role { color: #0967ce; font-size: 0.8125rem; font-weight: 700; }
.person p { margin: var(--space-4) 0 0; color: #596778; font-size: 0.9rem; }

/* ---- Section-specific composition -------------------------------------- */
.problem-section .stat-grid {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
}

.problem-section .stat {
  border: 0;
  border-radius: 0;
  background: var(--c-surface);
}

.problem-section .stat + .stat { border-top: 1px solid var(--c-border); }

/* ---- Trusted Call Completion ------------------------------------------- */
.tcc-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(var(--space-10), 6vw, var(--space-20));
  margin-bottom: clamp(var(--space-12), 6vw, var(--space-20));
}

.tcc-figure {
  margin: 0;
  text-align: center;
}

.tcc-figure img {
  width: 100%;
  max-width: 34rem;
  height: auto;
}

/* TrustedCaller™ gates access to TCC™, so it closes this section rather than
   standing alone. */
.tcc-gate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  margin-top: clamp(var(--space-12), 6vw, var(--space-16));
  padding-top: clamp(var(--space-10), 5vw, var(--space-16));
  border-top: 1px solid var(--c-border);
}

.tcc-gate h3 {
  margin: 0;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  letter-spacing: -0.032em;
}

.tcc-gate p { color: var(--c-muted); }

/* ---- Case study + the beliefs that explain it -------------------------- */
.case-study-section {
  background: linear-gradient(145deg, #071522, #0b213b) !important;
}

.case-study-section .section__head { max-width: 56rem; }
.case-study-section .stat-grid { grid-template-columns: repeat(2, 1fr); }
.case-study-section .quote { margin-top: var(--space-12) !important; }

.beliefs {
  margin-top: clamp(var(--space-16), 7vw, var(--space-24));
  padding-top: clamp(var(--space-12), 5vw, var(--space-16));
  border-top: 1px solid rgba(255,255,255,0.12);
}

.beliefs__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  margin-bottom: clamp(var(--space-10), 5vw, var(--space-16));
}

.beliefs__head h3 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: -0.032em;
}

.beliefs__head .lede { margin: 0; }

/* Two columns, not four: at four the measure drops under 30 characters and
   every heading wraps. */
.belief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(var(--space-8), 4vw, var(--space-12));
}

.belief h4 {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
  padding-top: var(--space-5);
  color: #fff;
  border-top: 1px solid rgba(255,255,255,0.16);
  font-size: 1.125rem;
}

.belief__num {
  color: #6fb2f5;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.belief p { margin: 0; color: #a9bacd; font-size: 0.9375rem; line-height: 1.7; }

/* ---- Branded Calling ID ------------------------------------------------ */
/* The artwork is a transparent WebP whose callout labels are white pills with
   black text, so the card has to be dark: it borrows the navy gradient the v2
   .cmp-media panel uses rather than the pale wash it had before. */
.bcid-figure {
  display: grid;
  justify-items: center;
  gap: var(--space-6);
  margin: 0;
  padding: clamp(var(--space-6), 3vw, var(--space-8));
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 40%, #0d4d81, #0a223d 75%);
}

/* The handset sits in the middle ~38% of the art with the callout pills running
   edge to edge on both sides, so the image needs the full card width for the
   phone to read; the old 22rem cap left it too small. */
.bcid-figure img {
  width: 100%;
  max-width: 32rem;
  height: auto;
}

.bcid-figure figcaption {
  color: #a9bacd;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
}

/* ---- Portfolio + ecosystem --------------------------------------------- */
/* Fixed three columns: six cards divide evenly, with no orphan on the second
   row and no full-bleed card breaking the rhythm. */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.ecosystem {
  display: grid;
  justify-items: center;
  gap: var(--space-6);
  margin-top: clamp(var(--space-12), 6vw, var(--space-16));
  padding-top: clamp(var(--space-10), 5vw, var(--space-12));
  border-top: 1px solid var(--c-border);
}

.ecosystem__label {
  max-width: 44rem;
  margin: 0;
  color: var(--c-ink);
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  text-align: center;
}

.ecosystem .pill-row { justify-content: center; }

.testimonials-section {
  background: linear-gradient(145deg, #081523, #0c2037) !important;
}

.testimonials-section .container {
  display: grid;
  grid-template-columns: minmax(15rem, 0.72fr) minmax(0, 1.28fr);
  align-items: start;
  gap: clamp(var(--space-10), 6vw, var(--space-20));
}

.testimonials-section .section__head {
  position: sticky;
  top: var(--space-24);
  margin: 0;
}

.testimonials-section .quote { grid-column: 2; }
.testimonials-section .quote + .quote { margin-top: var(--space-4) !important; }

/* Thin family-ownership banner closing the testimonials section. Spans both
   grid columns so it reads as a rule under the section, not a third quote. */
.owner-banner {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-6);
  margin-top: var(--space-8);
  padding: var(--space-4) var(--space-6);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.04);
  color: #c9d8e8;
  font-size: 0.9375rem;
  line-height: 1.55;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.owner-banner:hover,
.owner-banner:focus-visible {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.07);
}

.owner-banner__text strong {
  color: #fff;
  font-weight: 700;
}

.owner-banner__cta {
  flex: 0 0 auto;
  color: #7dbdff;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ---- Contact CTA split --------------------------------------------------- */
.contact-cta-section {
  background: linear-gradient(145deg, #071421, #0b2340) !important;
}

.contact-cta {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(var(--space-10), 6vw, var(--space-20));
}

.contact-cta__stat {
  padding-right: clamp(0px, 4vw, var(--space-12));
  border-right: 1px solid rgba(255,255,255,0.14);
}

.contact-cta__stat-eyebrow {
  display: block;
  margin-bottom: var(--space-4);
  color: #a9b8cb;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
}

.contact-cta__stat-num {
  display: block;
  color: #fff;
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.contact-cta__body h2 {
  margin-bottom: var(--space-3);
  color: #fff;
}

.contact-cta__body .lede { margin-bottom: var(--space-6); }

.contact-cta__phone {
  margin: 0;
  color: #a9b8cb;
  font-size: 0.9375rem;
}

.contact-cta__phone a {
  color: #78baff;
  font-weight: 700;
  text-decoration: none;
}

.contact-cta__phone a:hover { text-decoration: underline; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 64rem) {
  .people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 56rem) {
  .contact-cta { grid-template-columns: 1fr; gap: var(--space-8); }
  .contact-cta__stat {
    padding-right: 0;
    padding-bottom: var(--space-8);
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.14);
  }

  .proof-card--hero { min-height: 23rem; }
  .module-groups { grid-template-columns: 1fr; }
  .case-study-section .stat-grid { grid-template-columns: 1fr; }

  /* Stacked heads and splits: single column, and drop the stretch that only
     makes sense when two columns sit side by side. */
  .tcc-intro,
  .tcc-gate,
  .beliefs__head,
  .belief-grid { grid-template-columns: 1fr; }

  .tcc-intro { gap: var(--space-10); }
  .beliefs__head { gap: var(--space-4); }
  .tcc-gate { gap: var(--space-6); }
  /* Single column: nothing to equalise against, so drop back to plain blocks.
     Leaving the row-flex li in place would size .module to max-content and
     push the card past the viewport. */
  .modules > li { display: block; flex: none; }
  .module { flex: none; }

  .testimonials-section .container { display: block; }
  .testimonials-section .section__head { position: static; margin-bottom: var(--space-8); }
}

@media (max-width: 36rem) {
  .proof-card--hero { min-height: 22rem; padding: var(--space-6); }
  .people { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .module-group { padding: var(--space-6); }
  .bcid-figure { padding: var(--space-6); }
}

@media (prefers-reduced-motion: reduce) {
  .module { transition: none; }
}
