/* ========================================
   HOME PAGE L7 (Phase 7 gate-pass aligned)
   Scoped to .entry-content so it applies wherever L7 home content is rendered.
   Tokens: background #f6f8fb, surface #ffffff, primary #2d6cdf,
   secondary #2a3d57, muted #607089; radius 14px cards, 10px controls;
   shadow 0 8px 24px rgba(17, 24, 39, 0.08).
   ======================================== */

/* Constrain overall width so L7 home doesn't stretch full viewport */
body.gm-l7-home .entry-content,
body.home .entry-content {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Section containment (match About) */
.entry-content .gm-home-hero,
.entry-content .gm-home-proof,
.entry-content .gm-home-projects-teaser,
.entry-content .gm-home-topics,
.entry-content .gm-home-connect-cta {
  max-width: 1080px;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 0 !important;
  margin-bottom: 2rem !important;
}

/* Hero: align with About hero typography */
.entry-content .gm-home-hero {
  padding: 1rem 0 0.35rem !important;
  text-align: center;
}

.entry-content .gm-home-hero h1 {
  max-width: none;
  width: auto;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.8rem;
  color: var(--theme-palette-color-3, #3a4f66);
  font-size: clamp(2.2rem, 1.95rem + 1.6vw, 3.2rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
  font-weight: 760;
  text-wrap: balance;
}

.entry-content .gm-home-hero h1 .gm-hero-line {
  display: block;
  white-space: nowrap;
}

.entry-content .gm-home-hero .gm-home-subhead {
  max-width: 54ch;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.55rem;
  color: #334e68;
  font-size: clamp(1rem, 0.97rem + 0.16vw, 1.06rem);
  line-height: 1.56;
  text-wrap: balance;
}

.entry-content .gm-home-hero .wp-block-buttons {
  justify-content: center;
  margin-top: 1.5rem;
  gap: 1rem;
}

.entry-content .gm-home-hero .wp-block-button:first-child .wp-block-button__link {
  background-color: #2d6cdf !important;
  color: #fff !important;
  border-radius: 10px !important;
  padding: 0.75rem 1.5rem !important;
  font-weight: 700;
}

.entry-content .gm-home-hero .wp-block-button__link {
  border-radius: 10px !important;
  padding: 0.64rem 1.2rem !important;
  font-weight: 700;
}

.entry-content .gm-home-hero .wp-block-button__link:focus-visible,
.entry-content .gm-home-connect-cta .wp-block-button__link:focus-visible {
  outline: 2px solid #2d6cdf;
  outline-offset: 2px;
}

/* Proof: kicker like Selected Projects eyebrow */
.entry-content .gm-home-proof {
  text-align: center;
}

.entry-content .gm-home-proof .gm-home-proof-kicker {
  margin: 0 0 0.75rem 0 !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #2d6cdf !important;
}

.entry-content .gm-home-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry-content .gm-home-proof-grid .gm-proof-item {
  padding: 16px;
  border: 1px solid #dde6f2;
  border-radius: 14px;
  background: #fbfdff;
  text-align: center;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

.entry-content .gm-home-proof-grid .gm-proof-metric {
  display: block;
  margin-bottom: 0.35rem;
  color: #2a3d57;
  font-size: clamp(1.5rem, 1.2rem + 0.8vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

.entry-content .gm-home-proof-grid .gm-proof-label {
  display: block;
  color: #607089;
  font-size: 0.9rem;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .entry-content .gm-home-proof-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Projects tease */
.entry-content .gm-home-projects-teaser {
  text-align: center;
}

.entry-content .gm-home-projects-teaser .gm-home-projects-kicker {
  margin: 0 0 0.75rem 0 !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #2d6cdf !important;
}

.entry-content .gm-home-projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry-content .gm-home-project-card {
  padding: 20px;
  border: 1px solid #dde6f2;
  border-radius: 14px;
  background: #fbfdff;
  text-align: left;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

.entry-content .gm-home-project-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
}

.entry-content .gm-home-project-card h3 a {
  color: #2a3d57;
  text-decoration: none;
}

.entry-content .gm-home-project-card h3 a:hover {
  color: #2d6cdf;
}

.entry-content .gm-home-project-card h3 a:focus-visible,
.entry-content .gm-home-topics .card-header h3 a:focus-visible {
  outline: 2px solid #2d6cdf;
  outline-offset: 2px;
  border-radius: 4px;
}

.entry-content .gm-home-project-card .gm-home-project-outcome {
  margin: 0;
  color: #607089;
  font-size: 0.95rem;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .entry-content .gm-home-projects-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Focus Areas section */
.entry-content .gm-home-topics h2 {
  margin-bottom: 1.15rem;
  color: var(--theme-palette-color-3, #3a4f66);
  font-size: clamp(1.4rem, 1.2rem + 0.7vw, 2rem);
  line-height: 1.2;
}

.entry-content .gm-home-topics .gm-home-topics-subhead {
  max-width: 58ch;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
  color: #334e68;
  font-size: clamp(1rem, 0.97rem + 0.16vw, 1.06rem);
  line-height: 1.56;
}

/* Focus areas: one row of three; wider container for 2–3 line scan of copy */
.entry-content .gm-home-topics .expertise-grid-container {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.entry-content .gm-home-topics .expertise-cards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 1.25rem;
}

/* Cards fill their grid cells; taller so copy fits (header/content stay 40/60) */
.entry-content .gm-home-topics .expertise-card {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  height: 240px !important;
}

@media (max-width: 768px) {
  .entry-content .gm-home-topics .expertise-card {
    height: 220px !important;
  }
}

@media (max-width: 640px) {
  .entry-content .gm-home-topics .expertise-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 400px) {
  .entry-content .gm-home-topics .expertise-cards-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Connect CTA */
.entry-content .gm-home-connect-cta {
  margin-top: 0.4rem !important;
  padding: 0.85rem 1.2rem !important;
  border: 1px solid #dde6f2;
  border-radius: 14px;
  background: #fbfdff;
  text-align: center;
}

.entry-content .gm-home-connect-cta h2 {
  margin-bottom: 0.35rem;
  color: var(--theme-palette-color-3, #3a4f66);
  font-size: clamp(1.4rem, 1.2rem + 0.7vw, 2rem);
  line-height: 1.2;
}

.entry-content .gm-home-connect-cta p {
  margin-bottom: 0.75rem;
  color: #334e68;
}

.entry-content .gm-home-connect-cta .wp-block-buttons {
  justify-content: center;
}

.entry-content .gm-home-connect-cta .wp-block-button__link {
  background-color: #2d6cdf !important;
  color: #fff !important;
  border-radius: 10px !important;
  padding: 0.64rem 1.2rem !important;
  font-weight: 700;
}

.entry-content .gm-home-connect-cta .gm-home-meta-links {
  margin-top: 0.4rem;
  margin-bottom: 0 !important;
  color: #607089;
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 500;
}

.entry-content .gm-home-connect-cta .gm-home-secondary-link {
  color: #6a7e95;
  font-size: inherit;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid #ccdae9;
  padding-bottom: 1px;
  transition: color 0.18s ease;
}

.entry-content .gm-home-connect-cta .gm-home-secondary-link:hover {
  color: #2d6cdf;
  border-color: #2d6cdf;
}

.entry-content .gm-home-connect-cta .gm-home-secondary-link:focus-visible {
  color: #2d6cdf;
  border-color: #2d6cdf;
  outline: 2px solid #2d6cdf;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Touch targets ≥44px on mobile for primary CTAs (Gate E4) */
@media (max-width: 768px) {
  .entry-content .gm-home-hero h1 {
    max-width: 100%;
    font-size: clamp(1.8rem, 1.45rem + 4.2vw, 2.4rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
  }

  .entry-content .gm-home-hero h1 .gm-hero-line {
    white-space: normal;
  }

  .entry-content .gm-home-hero .wp-block-buttons {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: min(100%, 28rem);
    margin-left: auto;
    margin-right: auto;
    margin-top: 1.25rem !important;
    gap: 0.75rem !important;
  }

  .entry-content .gm-home-hero .wp-block-button {
    display: block;
    width: 100%;
    margin: 0 !important;
  }

  .entry-content .gm-home-hero .wp-block-button + .wp-block-button {
    margin-top: 0 !important;
  }

  .entry-content .gm-home-hero .wp-block-button__link,
  .entry-content .gm-home-connect-cta .wp-block-button__link {
    width: 100%;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
