.home-opportunities {
  --opportunity-trigger-height: clamp(4.15rem, 9.8vw, 5.5rem);
  --opportunity-edge: #56748b75;
  width: min(93%, 114rem);
  margin: 0 auto;
  /* The fixed menu scrolls to the section's border box. Keep its title below the menu. */
  margin-block-start: -5rem;
  padding-block-start: 5rem;
  color: #f5f8ff;
  font-family: Plusjakartasans, Arial, sans-serif;
}

@media (min-width: 992px) and (max-width: 1240px) {
  .home-refresh .nav-menu > .w-nav-link {
    padding-inline: .65rem;
    white-space: nowrap;
  }
}

.home-opportunities h2 {
  margin: 0 auto clamp(1rem, 2.8vw, 2.1rem);
  scroll-margin-top: 5.5rem;
  color: inherit;
  font-size: clamp(1.4rem, 3.1vw, 3.25rem);
  font-weight: 700;
  line-height: 1.14;
  text-align: center;
  text-wrap: balance;
}

.home-opportunities h2 span { color: #6697ff; }

.opportunity-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .72rem;
  margin-bottom: .65rem;
  font-size: clamp(.75rem, 1.6vw, 1.45rem);
  font-weight: 700;
  letter-spacing: .027em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}

.opportunity-columns > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(.4rem, 1.6vw, 2rem);
  min-height: clamp(3.35rem, 5.3vw, 5.25rem);
  padding: .55rem .65rem;
  border: 1px solid var(--opportunity-column-edge);
  border-block-end: .22rem solid var(--opportunity-column-accent);
  border-radius: .8rem;
  color: var(--opportunity-column-text);
}

.opportunity-columns > :first-child {
  --opportunity-column-edge: #a05156;
  --opportunity-column-accent: #f1535d;
  --opportunity-column-text: #ffb3b5;
  --opportunity-column-mark: #ff888c;
  background: linear-gradient(170deg, #2e2831, #442b32);
}

.opportunity-columns > :last-child {
  --opportunity-column-edge: #5179ae;
  --opportunity-column-accent: #6094f3;
  --opportunity-column-text: #9bbfff;
  --opportunity-column-mark: #82adff;
  background: linear-gradient(170deg, #1a3040, #1d3853);
}

.opportunity-columns > span::before {
  flex: none;
  width: clamp(1.16rem, 2.05vw, 2.25rem);
  aspect-ratio: 1;
  border: clamp(1.5px, .14vw, 2.5px) solid currentColor;
  border-radius: 50%;
  color: var(--opportunity-column-mark);
  content: "";
}

.opportunity-columns > :first-child::before {
  background: linear-gradient(currentColor, currentColor) center / 51% 2px no-repeat;
}

.opportunity-columns > :last-child::before {
  --opportunity-check-stroke: transparent calc(50% - .055rem), currentColor calc(50% - .055rem) calc(50% + .055rem), transparent calc(50% + .055rem);
  background:
    linear-gradient(45deg, var(--opportunity-check-stroke)) 31% 58% / 24% 24% no-repeat,
    linear-gradient(135deg, var(--opportunity-check-stroke)) 76% 48% / 38% 38% no-repeat;
}

.opportunity-rows { display: grid; gap: .33rem; }
.opportunity-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .72rem;
}

.opportunity-cell {
  --opportunity-accent: #ff7679;
  --opportunity-glow: #db4c553b;
  --opportunity-light: 15%;
  display: grid;
  min-width: 0;
  align-content: start;
  border: 1px solid var(--opportunity-edge);
  border-radius: .85rem;
  background: linear-gradient(133deg, #1e3442, #13232e 84%);
}

.opportunity-cell--solution {
  --opportunity-accent: #80b3ff;
  --opportunity-glow: #3d83fa59;
  --opportunity-light: 85%;
}

.opportunity-row[data-open] .opportunity-cell {
  border-color: color-mix(in srgb, var(--opportunity-accent), #263b50 55%);
  background: radial-gradient(80% 120% at var(--opportunity-light) 45%, var(--opportunity-glow), transparent 78%), #142633;
}

.opportunity-trigger {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(.45rem, 1.25vw, 1rem);
  min-height: var(--opportunity-trigger-height);
  width: 100%;
  padding: .7rem clamp(.68rem, 1.65vw, 1.45rem);
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.home-opportunities .opportunity-trigger:focus-visible {
  outline: 2px solid #b6d5ff;
  outline-offset: -3px;
}

.opportunity-label { min-width: 0; }
.opportunity-kind { display: none; }
.opportunity-title {
  display: block;
  font-size: clamp(.78rem, 1.24vw, 1.2rem);
  font-weight: 700;
  line-height: 1.24;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.opportunity-icon {
  display: grid;
  place-items: center;
  width: clamp(2.08rem, 4.7vw, 3.25rem);
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--opportunity-accent), transparent 60%);
  border-radius: 50%;
  background: color-mix(in srgb, var(--opportunity-accent), #152733 88%);
}

.opportunity-icon img {
  display: block;
  width: 68%;
  height: 68%;
  object-fit: contain;
  filter: grayscale(1) contrast(.48) brightness(1.88);
}

.opportunity-row[data-open] .opportunity-icon { box-shadow: 0 0 1.1rem var(--opportunity-glow); }

.opportunity-chevron {
  width: .42rem;
  aspect-ratio: 1;
  border-right: 1.5px solid var(--opportunity-accent);
  border-bottom: 1.5px solid var(--opportunity-accent);
  opacity: .82;
  transform: rotate(45deg);
}

.opportunity-row[data-open] .opportunity-chevron { transform: rotate(225deg); }

.opportunity-detail {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
}

.opportunity-detail > div { min-height: 0; overflow: hidden; }
.opportunity-detail p {
  margin: 0;
  padding: 0 clamp(.75rem, 1.65vw, 1.45rem) .95rem;
  color: #e0e9f3;
  font-size: clamp(.82rem, 1.15vw, 1rem);
  line-height: 1.55;
}

.opportunity-row[data-open] .opportunity-detail { grid-template-rows: 1fr; opacity: 1; }

.opportunity-connector {
  position: absolute;
  z-index: 1;
  inset: calc(var(--opportunity-trigger-height) / 2 - .65rem) auto auto calc(50% - .65rem);
  display: grid;
  place-items: center;
  width: 1.3rem;
  aspect-ratio: 1;
  border: 1px solid #6b83a0;
  border-radius: 50%;
  background: #1c2f3f;
  color: #b9d4ff;
  font: 700 1rem/1 Arial, sans-serif;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .opportunity-detail { transition: grid-template-rows .3s ease, opacity .23s ease; }
  .opportunity-chevron { transition: transform .24s ease; }

  .opportunity-row[data-open] .opportunity-icon {
    animation: opportunity-icon-lift .84s cubic-bezier(.17, .72, .33, 1) both;
  }

  .opportunity-row[data-open] .opportunity-cell--solution .opportunity-icon { animation-delay: .13s; }
}

@keyframes opportunity-icon-lift {
  0%, 100% { transform: none; }
  48% { transform: translateY(-3px) scale(1.25); box-shadow: 0 .24rem 1.15rem var(--opportunity-accent); }
}

@media (width > 30rem) {
  .opportunity-cell--problem .opportunity-label { text-align: end; }
  .opportunity-cell--solution .opportunity-icon { grid-area: 1 / 3; }
  .opportunity-cell--solution .opportunity-label { grid-area: 1 / 2; }
  .opportunity-cell--solution .opportunity-chevron { grid-area: 1 / 1; }
}

@media (max-width: 30rem) {
  .opportunity-rows { gap: .65rem; }
  .opportunity-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .opportunity-cell--problem { border-radius: .65rem .65rem 0 0; }
  .opportunity-cell--solution { --opportunity-light: 15%; border-block-start-width: 0; border-radius: 0 0 .65rem .65rem; }
  .opportunity-connector { display: none; }
  .opportunity-kind {
    display: block;
    margin-bottom: .22rem;
    color: var(--opportunity-accent);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .065em;
    text-transform: uppercase;
  }
  .opportunity-title { font-size: .83rem; }
}
