/* Shared call-to-action.
   One component for the hero buttons and every section CTA, so they render
   identically. No opacity is animated on hover: only colour, so a button can
   never fade out from under the pointer. */

.hbtn,
.opening__action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-height: 43px;
  margin: 0;
  padding: 0.46rem 0.72rem;
  overflow: hidden;
  text-decoration: none;
  color: var(--ix-ink);
  border: 1px solid var(--ix-ink);
  background-color: transparent;
  font-family: var(--font-text);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.2;
  text-align: left;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.22s var(--ix-ease), border-color 0.22s var(--ix-ease);
}

.hbtn::before,
.opening__action::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--ix-terracotta);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform 0.3s var(--ix-ease);
}

.hbtn:hover::before,
.hbtn:focus-visible::before,
.opening__action:hover::before,
.opening__action:focus-visible::before {
  transform: scaleY(1);
}

.hbtn > *,
.opening__action > * {
  position: relative;
  z-index: 1;
}

.hbtn:hover,
.hbtn:focus-visible,
.opening__action:hover,
.opening__action:focus-visible {
  color: #fff;
  border-color: var(--ix-terracotta);
}

.hbtn--solid,
.opening__action--solid {
  background-color: var(--ix-ink);
  color: #fff;
}

.closing .hbtn--solid,
.folio .hbtn--solid {
  background-color: var(--ix-cloth);
  color: var(--ix-ink);
  border-color: var(--ix-cloth);
}

.closing .hbtn--solid:hover,
.closing .hbtn--solid:focus-visible,
.folio .hbtn--solid:hover,
.folio .hbtn--solid:focus-visible {
  color: #fff;
  border-color: var(--ix-terracotta);
}

.hbtn:focus-visible,
.opening__action:focus-visible {
  outline: 2px solid var(--ix-terracotta);
  outline-offset: 2px;
}

.hbtn__arrow,
.opening__action-arrow {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  transition: transform 0.26s var(--ix-ease);
}

.hbtn__arrow svg,
.opening__action-arrow svg {
  width: 14px;
  height: 14px;
}

.hbtn:hover .hbtn__arrow,
.hbtn:focus-visible .hbtn__arrow,
.opening__action:hover .opening__action-arrow,
.opening__action:focus-visible .opening__action-arrow {
  transform: translateX(3px);
}

.hbtn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

.hbtn-row--pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  align-items: stretch;
}

.hbtn--pair {
  justify-content: space-between;
  min-height: 0;
  padding: 0.6rem 0.7rem;
  white-space: normal;
  text-align: left;
}

.hbtn__text {
  display: block;
  min-width: 0;
  font-size: 0.78rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.hbtn:not(.hbtn--pair) .hbtn__text {
  font-size: inherit;
  line-height: inherit;
  overflow-wrap: normal;
}

.hbtn-row--center {
  justify-content: center;
}

.hbtn--sm {
  min-height: 34px;
  padding: 0.3rem 0.6rem;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
}

.hbtn--sm .hbtn__arrow {
  width: 16px;
  height: 16px;
}

.hbtn--sm .hbtn__arrow svg {
  width: 12px;
  height: 12px;
}

.closing__inner > .hbtn,
.closing__inner > .opening__action {
  grid-column: 1 / -1;
  justify-self: center;
  align-self: center;
  margin-top: 0.4rem;
}

@media (max-width: 680px) {
  .hbtn,
  .opening__action {
    min-height: 44px;
    padding: 0.5rem 0.65rem;
    gap: 0.45rem;
    font-size: 0.74rem;
  }

  .hbtn-row {
    gap: 0.45rem;
    margin-top: 1rem;
  }

  .hbtn-row--pair {
    gap: 0.4rem;
  }

  .hbtn--pair {
    padding: 0.5rem 0.55rem;
  }

  .hbtn__text {
    font-size: 0.72rem;
  }

  .hbtn--sm {
    min-height: 32px;
    padding: 0.28rem 0.5rem;
    font-size: 0.66rem;
  }
}

@media (max-width: 420px) {
  .hbtn,
  .opening__action {
    padding: 0.46rem 0.5rem;
    font-size: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hbtn,
  .hbtn::before,
  .hbtn__arrow,
  .opening__action,
  .opening__action::before,
  .opening__action-arrow {
    transition: none;
  }
}
