@import "/branding/tokens/tokens.css";
@import "/branding/typography/fonts.css";
@import "/website/components/filter-select/filter-select.css";
@import "/website/components/title-reveal/title-reveal.css";

/* Website base styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-primary);
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: var(--leading-base);
  letter-spacing: var(--tracking-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

strong,
b {
  font-weight: var(--weight-medium);
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--weight-medium);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
}

p {
  line-height: var(--leading-base);
  letter-spacing: var(--tracking-body);
  text-wrap: pretty;
}

a {
  color: inherit;
}

::selection {
  background: var(--bg-signal);
  color: var(--white);
}

/* Button component - shared CTA appearance and motion. Active source of truth — the standalone components/button/{button,pill}.css are legacy and not linked by any page. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  font: inherit;
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-body);
  text-decoration: none;
  text-transform: none;
  background: transparent;
  cursor: pointer;
  transition:
    opacity var(--transition-base),
    transform var(--transition-base),
    border-color var(--transition-base),
    background-color var(--transition-base);
}

.btn--pill,
.closing-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);

  width: fit-content;
  min-height: var(--pill-min-height);

  padding: var(--space-1-5) var(--space-1-5) var(--space-1-5) var(--space-5-0);

  border: var(--border-interactive);
  border-radius: var(--radius-pill);

  color: inherit;
  text-decoration: none;

  font-size: var(--text-base);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-body);

  opacity: 1;
}

.btn--pill.btn--sm,
.engagement-action {
  min-height: var(--pill-min-height-sm);

  font-size: var(--text-sm);

  opacity: var(--opacity-interactive-subtle);
}

.btn--pill .btn-icon,
.closing-cta .btn-icon {
  position: relative;

  display: block;
  flex-shrink: 0;

  width: var(--pill-icon-size);
  height: var(--pill-icon-size);
  overflow: hidden;

  border-radius: var(--radius-pill);
  line-height: var(--leading-heading);

  font-size: 1.2rem;

  background: var(--control-surface-dark);
}

.btn--pill.btn--sm .btn-icon,
.engagement-action .btn-icon {
  width: var(--pill-icon-size-sm);
  height: var(--pill-icon-size-sm);

  font-size: 1.05rem;
}

.btn-icon-motion {
  display: flex;

  width: 200%;
  height: 100%;

  transform: translateX(-50%);

  transition: transform var(--transition-base) 180ms;

  will-change: transform;
}

.btn-icon-motion--down {
  flex-direction: column;

  width: 100%;
  height: 200%;

  transform: translateY(-50%);

  transition: transform var(--transition-base) 180ms;
}

.btn-icon-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 50%;

  height: 100%;

  font-size: inherit;
  line-height: var(--leading-heading);
}

.btn-icon-motion--down .btn-icon-arrow {
  width: 100%;
  height: auto;
}

@keyframes pill-icon-shift {
  from {
    transform: translateX(-50%);
  }

  to {
    transform: translateX(0);
  }
}

@keyframes pill-icon-shift-down {
  from {
    transform: translateY(-50%);
  }

  to {
    transform: translateY(0);
  }
}

@media (hover: hover) and (pointer: fine) {
  .btn--pill:hover .btn-icon-motion:not(.btn-icon-motion--down),
  .closing-cta:hover .btn-icon-motion:not(.btn-icon-motion--down),
  .engagement-item:hover .btn--pill.btn--sm .btn-icon-motion,
  .engagement-item:hover .engagement-action .btn-icon-motion {
    animation: pill-icon-shift 640ms linear infinite;

    transition: none;
  }

  .btn--pill:hover .btn-icon-motion--down,
  .closing-cta:hover .btn-icon-motion--down {
    animation: pill-icon-shift-down 640ms linear infinite;

    transition: none;
  }

  .btn--pill:hover .btn-icon,
  .closing-cta:hover .btn-icon,
  .engagement-item:hover .btn--pill.btn--sm .btn-icon,
  .engagement-item:hover .engagement-action .btn-icon {
    background: transparent;
  }
}

.section-shell[data-theme="light"] .btn--pill,
.section-shell[data-theme="surface"] .btn--pill,
.section-shell[data-theme="surface-darker"] .btn--pill,
.section-shell[data-theme="mineral-soft"] .btn--pill,
.section-shell[data-theme="surface-elevated"] .btn--pill,
.section-shell[data-theme="light"] .closing-cta,
.section-shell[data-theme="surface"] .closing-cta,
.section-shell[data-theme="surface-darker"] .closing-cta,
.section-shell[data-theme="mineral-soft"] .closing-cta,
.section-shell[data-theme="surface-elevated"] .closing-cta,
.section-shell[data-theme="light"] .btn--pill.btn--sm,
.section-shell[data-theme="surface"] .btn--pill.btn--sm,
.section-shell[data-theme="surface-darker"] .btn--pill.btn--sm,
.section-shell[data-theme="mineral-soft"] .btn--pill.btn--sm,
.section-shell[data-theme="surface-elevated"] .btn--pill.btn--sm,
.section-shell[data-theme="light"] .engagement-action,
.section-shell[data-theme="surface"] .engagement-action,
.section-shell[data-theme="surface-darker"] .engagement-action,
.section-shell[data-theme="mineral-soft"] .engagement-action,
.section-shell[data-theme="surface-elevated"] .engagement-action {
  border: var(--border-interactive-light);
}

.section-shell[data-theme="light"] .btn--pill .btn-icon,
.section-shell[data-theme="surface"] .btn--pill .btn-icon,
.section-shell[data-theme="surface-darker"] .btn--pill .btn-icon,
.section-shell[data-theme="mineral-soft"] .btn--pill .btn-icon,
.section-shell[data-theme="surface-elevated"] .btn--pill .btn-icon,
.section-shell[data-theme="light"] .closing-cta .btn-icon,
.section-shell[data-theme="surface"] .closing-cta .btn-icon,
.section-shell[data-theme="surface-darker"] .closing-cta .btn-icon,
.section-shell[data-theme="mineral-soft"] .closing-cta .btn-icon,
.section-shell[data-theme="surface-elevated"] .closing-cta .btn-icon,
.section-shell[data-theme="light"] .btn--pill.btn--sm .btn-icon,
.section-shell[data-theme="surface"] .btn--pill.btn--sm .btn-icon,
.section-shell[data-theme="surface-darker"] .btn--pill.btn--sm .btn-icon,
.section-shell[data-theme="mineral-soft"] .btn--pill.btn--sm .btn-icon,
.section-shell[data-theme="surface-elevated"] .btn--pill.btn--sm .btn-icon,
.section-shell[data-theme="light"] .engagement-action .btn-icon,
.section-shell[data-theme="surface"] .engagement-action .btn-icon,
.section-shell[data-theme="surface-darker"] .engagement-action .btn-icon,
.section-shell[data-theme="mineral-soft"] .engagement-action .btn-icon,
.section-shell[data-theme="surface-elevated"] .engagement-action .btn-icon {
  background: rgba(23, 22, 27, 0.06);
}

.btn--pill:focus-visible,
.closing-cta:focus-visible {
  outline: 1.5px solid currentColor;
  outline-offset: var(--motion-shift-subtle);
}

@media (hover: hover) and (pointer: fine) {
  .engagement-item:hover .btn--pill.btn--sm,
  .engagement-item:hover .engagement-action {
    opacity: 1;
  }
}

/* Text link CTA — section explore / view all */

.btn--text,
.work-feature-cta,
.insight-cta {
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2);

  font-size: var(--text-base);
  line-height: var(--leading-heading);

  opacity: var(--opacity-interactive-muted);
}

.btn--text .btn-icon,
.work-feature-cta .btn-icon,
.insight-cta .btn-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;

  overflow: visible;

  line-height: var(--leading-heading);
  font-size: 1em;

  background: transparent;
}

.btn--text .btn-icon-arrow,
.work-feature-cta .btn-icon-arrow,
.insight-cta .btn-icon-arrow {
  display: inline-flex;
  align-items: center;
  flex: none;

  line-height: var(--leading-heading);

  transition: transform var(--transition-base);
}

.btn--text:focus-visible,
.insight-cta:focus-visible {
  outline: 1.5px solid currentColor;
  outline-offset: var(--motion-shift-subtle);
}

@media (hover: hover) and (pointer: fine) {
  .btn--text:hover,
  .insight-cta:hover,
  .work-feature-link:hover .btn--text,
  .work-feature-link:hover .work-feature-cta {
    opacity: 1;
  }

  .btn--text:hover .btn-icon-arrow,
  .insight-cta:hover .btn-icon-arrow,
  .work-feature-link:hover .btn--text .btn-icon-arrow,
  .work-feature-link:hover .work-feature-cta .btn-icon-arrow {
    transform: translateX(calc(var(--motion-shift-link) + var(--space-1)));
  }
}

@media (max-width: 760px) {

  .btn--pill,
  .closing-cta {
    min-height: var(--pill-min-height-mobile);
  }

  .btn--pill .btn-icon,
  .closing-cta .btn-icon {
    width: var(--pill-icon-size-mobile);
    height: var(--pill-icon-size-mobile);
  }

  .btn--pill.btn--sm,
  .engagement-action {
    min-height: var(--pill-min-height-sm-mobile);
  }

  .btn--pill.btn--sm .btn-icon,
  .engagement-action .btn-icon {
    width: var(--pill-icon-size-sm-mobile);
    height: var(--pill-icon-size-sm-mobile);
  }

}

@media (prefers-reduced-motion: reduce) {

  .btn--pill,
  .btn--pill .btn-icon,
  .closing-cta,
  .closing-cta .btn-icon,
  .btn--pill.btn--sm,
  .btn--pill.btn--sm .btn-icon,
  .engagement-action,
  .engagement-action .btn-icon,
  .btn--text,
  .btn--text .btn-icon,
  .btn--text .btn-icon-arrow,
  .work-feature-cta,
  .insight-cta {
    transition-duration: 0.01ms !important;
  }

  .btn-icon-motion,
  .btn-icon-motion--down {
    transition: none !important;
  }

}

@media (prefers-reduced-motion: reduce) and (hover: hover) and (pointer: fine) {
  .btn--pill:hover .btn-icon-motion:not(.btn-icon-motion--down),
  .btn--pill:hover .btn-icon-motion--down,
  .closing-cta:hover .btn-icon-motion:not(.btn-icon-motion--down),
  .closing-cta:hover .btn-icon-motion--down,
  .engagement-item:hover .btn--pill.btn--sm .btn-icon-motion,
  .engagement-item:hover .engagement-action .btn-icon-motion {
    animation: none !important;
  }
}
