/* Reusable widgets: tabs, buttons, carousel, team, reveal, back-to-top. */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 600ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left { transform: translateX(-32px); }
.reveal-left.in-view { transform: translateX(0); }
.reveal-right { transform: translateX(32px); }
.reveal-right.in-view { transform: translateX(0); }
.reveal-scale { transform: scale(0.96); }
.reveal-scale.in-view { transform: scale(1); }
/* Stagger sibling reveals. */
.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
.reveal[data-delay="4"] { transition-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

.tab-bar {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 4px rgba(0,0,0,0.15);
  padding: 8px;
  display: flex;
  gap: 8px;
  max-width: 548px;
  margin: 0 auto 48px;
}
.tab {
  flex: 1;
  padding: 16px 16px;
  border-radius: 8px;
  font-size: 14px;
  letter-spacing: -0.5px;
  color: var(--gray-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.tab svg { width: 14px; height: 14px; flex-shrink: 0; }
.tab.active {
  background: rgba(83,66,140,0.01);
  color: var(--purple);
  box-shadow: inset 0 0 0 1px rgba(83,66,140,0.5), 0 1px 2px rgba(0,0,0,0.05);
}
.tab:hover:not(.active) {
  color: var(--purple);
  background: rgba(83,66,140,0.04);
}

.tab-panels {
  display: grid;
}
.tab-content {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: 414px 1fr;
  gap: 58px;
  align-items: start;
}
.tab-content[hidden] {
  display: grid;
  visibility: hidden;
  pointer-events: none;
}

.role-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-radius: 8px;
  font-size: 16px;
  letter-spacing: -0.5px;
  color: #383838;
  text-align: left;
  width: 100%;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.role-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.role-btn:hover {
  background: rgba(83,66,140,0.08);
  color: var(--purple);
  transform: translateX(2px);
}
.role-btn.active {
  background: var(--purple);
  color: #fff;
  transform: translateX(0);
  box-shadow: 0 4px 12px rgba(83,66,140,0.3);
}
.role-btn.active svg { color: #fff; }
.role-btn.active:hover { transform: translateX(0); background: var(--purple); color: #fff; }

.dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 32px;
}
.dot {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 6px solid transparent;
  background-clip: padding-box;
  border-radius: 9999px;
  background-color: #d1d5db;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.dot:hover { background-color: #9ca3af; transform: scale(1.2); }
.dot:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 1px;
}
.dot.active { background-color: var(--purple); transform: scale(1.1); }

.assumptions {
  background: var(--teal-lighter);
  border-left: 4px solid var(--purple);
  border-radius: 8px;
  padding: 20px 24px;
  margin-top: 20px;
}
.assumptions ol { padding-left: 22px; margin: 0; }
.assumptions li {
  font-family: 'Andada Pro', serif;
  font-size: 16px;
  line-height: 26px;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.assumptions li:last-child { margin-bottom: 0; }

.team-card-head {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 32px;
}
.team-headshot {
  width: 160px;
  height: 160px;
  border-radius: 12px;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgb(234,140,99) 0%, rgb(117,122,216) 70%);
  overflow: hidden;
  position: relative;
}
.team-headshot.no-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(144deg, rgba(234,140,99,0.65) 0%, rgba(117,122,216,0.65) 100%);
}
.team-headshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.team-info { padding-top: 8px; flex: 1; }
.team-info h3 {
  font-size: 30px;
  line-height: 36px;
  letter-spacing: -0.5px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}
.team-info .role {
  font-size: 18px;
  color: var(--purple);
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}
.team-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.team-category {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 13px;
  letter-spacing: -0.2px;
  color: #fff;
  white-space: nowrap;
}
.cat-orange { background: var(--orange); }
.cat-purple { background: var(--purple); }
.cat-teal { background: var(--teal); }
.team-bio p {
  font-family: 'Andada Pro', serif;
  font-size: 16px;
  line-height: 26px;
  color: var(--dark);
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}
.team-bio p:last-child { margin-bottom: 0; }
.team-bio a {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.team-bio .bio-pending { color: var(--text-muted); font-style: italic; }

.story-view .story-title {
  font-size: 30px;
  line-height: 36px;
  letter-spacing: -0.5px;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 20px;
}
.story-view h4 {
  font-size: 22px;
  line-height: 28px;
  letter-spacing: -0.5px;
  font-weight: 600;
  color: var(--dark);
  margin: 28px 0 12px;
}
.story-view p {
  font-family: 'Andada Pro', serif;
  font-size: 16px;
  line-height: 26px;
  color: var(--dark);
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}
.story-view p:last-child { margin-bottom: 0; }

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: var(--purple);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(83,66,140,0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity .25s ease, transform .25s ease, background .2s ease;
  z-index: 60;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover { background: #3e2f70; transform: translateY(-2px); }
.back-to-top:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--purple);
}
.back-to-top svg { width: 18px; height: 18px; }

@media (max-width: 1024px) {
  .dot {
    width: 44px;
    height: 44px;
    border-width: 16px;
  }
  .resources-dots .dot {
    width: 44px;
    height: 44px;
    border-width: 17px;
  }
}
