/*
  Component: hero
  The homepage hero is one general message. The pill styles below remain for
  the profession selector component, which no page currently loads.
*/

.hero {
  position: relative;
  overflow: hidden;
}

.hero .container:first-of-type {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 48px;
  padding-block: 64px 56px;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-2);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.hero-kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--accent-2-line);
  flex: none;
}

/* Profession pills */
.pro-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.pro-pill {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--edge);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-family: var(--font-text);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}

.pro-pill:hover {
  color: var(--text-1);
  border-color: var(--text-2);
}

.pro-pill[aria-selected="true"] {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--text-1);
}

.hero h1 {
  /* The headline is a full question now, so it runs a size smaller and
     wider than the old six-word line to keep the buttons above the fold */
  font-size: clamp(2.1rem, 4.2vw, 3.3rem);
  line-height: 1.08;
  max-width: 20ch;
  text-wrap: balance;
}

.hero-sub {
  color: var(--text-2);
  font-size: 1.125rem;
  line-height: 1.65;
  max-width: 34rem;
  margin-top: 22px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-example {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--text-2);
  font-size: 0.9rem;
  margin-top: 26px;
  padding-left: 12px;
  border-left: 2px solid var(--accent-2-line);
}

.hero-served {
  color: var(--text-2);
  font-size: 0.9rem;
  max-width: 34rem;
  margin-top: 18px;
}

.hero-served a {
  color: var(--text-1);
  text-underline-offset: 3px;
  text-decoration-color: var(--accent-2-line);
  white-space: nowrap;
}

/* Swap transition: fade the copy block when the profession changes */
.pro-swap {
  transition: opacity var(--t-fast) var(--ease);
}

.pro-swap.is-swapping {
  opacity: 0;
}

/* Signal motif */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.signal {
  width: min(100%, 460px);
  height: auto;
}

.signal .ring {
  stroke: var(--accent);
  fill: none;
}

.signal .ring-static {
  stroke: var(--edge);
}

.signal .core {
  fill: var(--accent-2-line);
}

.signal .sweep {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: signal-sweep 36s linear infinite;
}

.signal .pulse {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: signal-pulse 4.5s var(--ease) infinite;
  opacity: 0;
}

.signal .pulse.p2 {
  animation-delay: 1.5s;
}

.signal .pulse.p3 {
  animation-delay: 3s;
}

@keyframes signal-sweep {
  to {
    transform: rotate(360deg);
  }
}

@keyframes signal-pulse {
  0% {
    transform: scale(0.42);
    opacity: 0.55;
  }
  80% {
    transform: scale(1);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .signal .sweep,
  .signal .pulse {
    animation: none;
  }

  .signal .pulse {
    opacity: 0.25;
    transform: scale(0.7);
  }
}

/* Pain points row */
.pain-row {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  padding-block: 40px 72px;
}

.pain-row li {
  border-top: 1px solid var(--edge);
  padding-top: 18px;
}

.pain-row h3 {
  font-family: var(--font-text);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
}

.pain-row p {
  color: var(--text-2);
  font-size: 0.95rem;
  margin-top: 8px;
}

@media (max-width: 900px) {
  .hero .container:first-of-type {
    display: block;
    position: relative;
    padding-block: 56px 40px;
  }

  .hero-copy {
    position: relative;
    z-index: 1;
  }

  .hero-visual {
    position: absolute;
    top: 4px;
    right: -60px;
    z-index: 0;
    pointer-events: none;
  }

  .signal {
    width: 240px;
    opacity: 0.55;
  }

  .pain-row {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-block: 8px 56px;
  }
}
