.hero {
  min-height: 100svh;
  position: relative;
  display: grid;
  align-items: end;
  padding: 120px 46px 52px;
  overflow: hidden;
  background: var(--navy);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(
      90deg,
      rgba(8, 43, 73, 0.18) 0%,
      rgba(8, 43, 73, 0.06) 40%,
      rgba(247, 242, 234, 0.58) 72%,
      rgba(247, 242, 234, 0.88) 100%
    ),
    var(--hero-bg-image);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  transform: scale(1.02);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px, 0.86fr) minmax(300px, 0.72fr);
  align-items: end;
  gap: 70px;
}

.hero-copy {
  color: #fffdf8;
  padding-bottom: 18px;
  text-shadow: 0 8px 34px rgba(0, 0, 0, 0.34);
}

.hero h1 {
  max-width: 720px;
  color: #fffdf8;
  font-size: clamp(42px, 6vw, 92px);
  line-height: 0.98;
}

.hero p {
  max-width: 560px;
  margin: 26px 0 34px;
  color: rgba(255, 253, 248, 0.88);
  font-size: 18px;
}

.hero-panel {
  justify-self: end;
  width: min(472px, 100%);
  padding: 32px;
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-panel p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  text-shadow: none;
}

.signal-list {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 22px;
}

/* ==========================================================================
   REFERENCE HERO
   ========================================================================== */

.hero.reference-hero {
  min-height: 426px;
  align-items: center;
  padding: 80px 46px 0;
  background: #efe7dc;
}

.hero.reference-hero::before {
  background-image:
    linear-gradient(
      90deg,
      rgba(8, 43, 73, 0.05) 0%,
      rgba(247, 242, 234, 0.08) 41%,
      rgba(247, 242, 234, 0.72) 63%,
      rgba(247, 242, 234, 0.96) 100%
    ),
    var(--hero-bg-image);
  background-position: center;
  transform: none;
}

.reference-hero .hero-inner {
  grid-template-columns: minmax(430px, 1.04fr) minmax(470px, 0.96fr);
  align-items: center;
  min-height: 426px;
}

.reference-hero .hero-copy {
  grid-column: 2;
  max-width: 610px;
  color: #061f36;
  padding: 0;
  background: transparent;
  border-left: 0;
  backdrop-filter: none;
  text-shadow: none;
}

.reference-hero .hero h1,
.reference-hero h1 {
  color: #061f36;
  font-size: clamp(34px, 3.25vw, 45px);
  line-height: 1.25;
  max-width: 600px;
}

.reference-hero .hero-copy p:not(.eyebrow),
.reference-hero p {
  color: #1c2d40;
  text-shadow: none;
  max-width: 560px;
  margin: 22px 0 28px;
}

.reference-hero .hero-panel {
  display: none;
}

.reference-hero .btn.dark {
  border-color: rgba(6, 35, 61, 0.46);
  background: rgba(255, 253, 248, 0.26);
  color: var(--navy);
}

.reference-hero .btn.dark:hover,
.reference-hero .btn.dark:focus-visible {
  background: #fffdf8;
  border-color: var(--gold);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1080px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    justify-self: start;
  }

  .reference-hero .hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .reference-hero .hero-copy {
    grid-column: auto;
    padding: 26px;
    background: rgba(247, 242, 234, 0.82);
  }
}

@media (max-width: 720px) {
  .hero {
    min-height: 92svh;
    padding: 96px 20px 34px;
  }

  .hero::before {
    background-image:
      linear-gradient(
        180deg,
        rgba(8, 43, 73, 0.18) 0%,
        rgba(8, 43, 73, 0.34) 46%,
        rgba(8, 43, 73, 0.72) 100%
      ),
      var(--hero-bg-image);
    background-position: 37% center;
  }

  .hero-inner {
    gap: 30px;
  }

  .hero-panel {
    padding: 24px;
  }

  .signal-list {
    font-size: 19px;
  }
}

/* Candidate: append after existing rules; mobile only. */
@media (max-width: 700px) {
  :is(.page-id-144, .page-id-146) .reference-hero .hero-copy {
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 22px 18px;
  }
  :is(.page-id-144, .page-id-146) .reference-hero h1 {
    font-size: clamp(30px, 8.5vw, 34px);
    line-height: 1.16;
    max-width: 100%;
    text-wrap: balance;
  }
}
