/* Capabilities: typographic hero, sticky index, seven compact practice sections, brief builder */

.cap-hero {
  min-height: min(84svh, 820px);
}

/* The intro sits under the title at full width so each sentence holds one line */
.cap-hero .page-hero__main,
.cap-hero .page-hero__aside {
  grid-column: 1 / -1;
}

.cap-hero .page-hero__aside {
  margin-top: clamp(28px, 3vw, 44px);
}

.cap-hero .page-hero__lede {
  font-size: clamp(17px, 0.85rem + 0.5vw, 22px);
}

/* Sticky index: numbered pills that follow the reader down the page */
.cap-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 14px var(--edge);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(36, 37, 40, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.cap-nav__list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cap-nav__list::-webkit-scrollbar {
  display: none;
}

.cap-nav__list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  color: var(--on-dark-muted);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;
}

.cap-nav__list a span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 600;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.cap-nav__list a:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--white);
}

.cap-nav__list a[aria-current="true"] {
  border-color: var(--turquoise);
  background: rgba(56, 206, 187, 0.12);
  color: var(--white);
}

.cap-nav__list a[aria-current="true"] span {
  background: var(--turquoise);
  color: var(--surface-deep);
}

/* Practice section: number, title and tagline hold on the left while the detail scrolls on the right */
.cap-sec {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  padding: clamp(72px, 8vw, 128px) var(--edge);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  scroll-margin-top: 72px;
}

.cap-sec:first-child {
  border-top: 0;
}

.cap-sec__head {
  grid-column: 1 / span 4;
  align-self: start;
  position: sticky;
  top: 112px;
}

.cap-sec__num {
  font-size: clamp(64px, 1rem + 6vw, 128px);
  font-weight: 600;
  line-height: 0.85;
  letter-spacing: -0.06em;
  background: linear-gradient(90deg, var(--turquoise) 20%, var(--yellow));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cap-sec__title {
  margin-top: 20px;
  font-size: clamp(32px, 1rem + 2.2vw, 56px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.cap-sec__tag {
  margin-top: 16px;
  font-size: clamp(18px, 0.9rem + 0.45vw, 23px);
  font-weight: 500;
  line-height: 1.35;
  color: var(--turquoise);
}

.cap-sec__body {
  grid-column: 5 / span 8;
  display: grid;
  gap: 22px;
}

.cap-sec__text {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.84);
}

.cap-sec__quote {
  margin: 8px 0;
  padding-left: 22px;
  border-left: 3px solid var(--yellow);
  font-size: clamp(22px, 1rem + 0.9vw, 30px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.cap-sec__accent {
  color: var(--yellow);
}

.cap-sec__text .row + .row {
  margin-top: 0.15em;
}

.cap-sec__note {
  padding: 14px 18px;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--on-dark-muted);
}

/* Services accordion */
.svc-list {
  margin-top: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.svc {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  interpolate-size: allow-keywords;
}

.svc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
}

.svc summary::-webkit-details-marker {
  display: none;
}

.svc__title {
  font-size: clamp(17px, 0.9rem + 0.35vw, 21px);
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}

.svc summary:hover .svc__title,
.svc[open] .svc__title {
  color: var(--turquoise);
}

/* Plus that turns into a minus */
.svc__icon {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.svc__icon::before,
.svc__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1.6px;
  background: currentColor;
  translate: -50% -50%;
  transition: rotate 0.35s var(--ease-out);
}

.svc__icon::after {
  rotate: 90deg;
}

.svc[open] .svc__icon {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--surface-deep);
}

.svc[open] .svc__icon::after {
  rotate: 0deg;
}

.svc p {
  max-width: 56ch;
  padding: 0 48px 20px 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--on-dark-muted);
}

.svc::details-content {
  height: 0;
  overflow: clip;
  transition:
    height 0.45s var(--ease-out),
    content-visibility 0.45s allow-discrete;
}

.svc[open]::details-content {
  height: auto;
}

/* Digital communications hub panel */
.hub {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.25rem;
  background: var(--surface-deep);
}

.hub__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(23, 69, 143, 0.35);
}

.hub__name {
  font-size: 15px;
  font-weight: 600;
}

.hub__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--turquoise);
}

.hub__status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--turquoise);
  animation: hub-blink 1.6s ease-in-out infinite;
}

@keyframes hub-blink {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(56, 206, 187, 0.7);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(56, 206, 187, 0);
  }
}

.hub__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hub__grid li {
  padding: 18px 20px 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.hub__grid li:first-child {
  border-left: 0;
}

.hub__grid h4 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--yellow);
}

.hub__grid p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--on-dark-muted);
}

/* Brief builder CTA: full width, flowing into the footer */
.brief {
  padding: clamp(80px, 9vw, 140px) var(--edge) clamp(64px, 7vw, 104px);
  background:
    radial-gradient(circle at 50% 0%, rgba(56, 206, 187, 0.16), transparent 60%),
    var(--surface-deep);
}

.brief__inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.brief__head .label {
  justify-content: center;
}

.brief__title {
  font-size: clamp(36px, 1rem + 3.2vw, 76px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.brief__title .grad {
  display: inline-block;
}

.brief__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(36px, 4vw, 56px);
}

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    transform 0.3s var(--ease-out);
}

.chip:hover {
  border-color: var(--white);
  transform: translateY(-2px);
}

.chip__num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  transition: background-color 0.3s ease;
}

.chip__tick {
  width: 0;
  height: 10px;
  overflow: hidden;
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  opacity: 0;
  rotate: 45deg;
  transition:
    width 0.3s var(--ease-out),
    opacity 0.3s ease;
}

.chip[aria-pressed="true"] {
  border-color: var(--turquoise);
  background: var(--turquoise);
  color: var(--surface-deep);
}

.chip[aria-pressed="true"] .chip__num {
  background: var(--surface-deep);
  color: var(--turquoise);
}

.chip[aria-pressed="true"] .chip__tick {
  width: 6px;
  opacity: 1;
  margin: -4px 2px 0 2px;
}

.brief:not(.has-picks) .brief__sentence {
  display: none;
}

.brief__sentence {
  min-height: 2.6em;
  margin: clamp(32px, 3.6vw, 48px) auto 0;
  max-width: 40ch;
  font-size: clamp(20px, 1rem + 0.9vw, 30px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.brief__lead {
  color: var(--grey);
}

.brief__picks {
  color: var(--on-dark-muted);
}

.brief.has-picks .brief__picks {
  background: linear-gradient(90deg, var(--turquoise) 30%, var(--yellow));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brief__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 28px;
  margin-top: 32px;
}

.brief__btn .btn__dot {
  background: var(--yellow);
}

.brief.has-picks .brief__btn .btn__label {
  animation: brief-nudge 2.4s ease-in-out infinite;
}

@keyframes brief-nudge {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(56, 206, 187, 0.6);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(56, 206, 187, 0);
  }
}

@media (max-width: 960px) {
  .cap-sec__head,
  .cap-sec__body {
    grid-column: 1 / -1;
  }

  .cap-sec__head {
    position: static;
    margin-bottom: 32px;
  }

  .cap-sec__body {
    max-width: 64ch;
  }

  /* A mid-sentence break and the line that leads into it rejoin into one flowing sentence */
  .row--soft,
  .row:has(+ .row--soft) {
    display: inline;
  }
}

@media (max-width: 640px) {
  .hub__grid {
    grid-template-columns: 1fr;
  }

  .hub__grid li {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .hub__grid li:first-child {
    border-top: 0;
  }

  .chip {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub__status span,
  .brief.has-picks .brief__btn .btn__label {
    animation: none;
  }
}
