/* Jesse Johnson — pill buttons (archived badge + stroke CTAs) */
:root {
  --jj-blue: #3035a2;
}

/* GSAP magnetic nudge — transform only; hover styles stay on the element */
.jj-btn-magnet {
  position: relative;
  will-change: transform;
}

/* —— Archived cases badge (next to section titles) —— */
.inner-title-wrapper.jj-title-with-pill {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
}

.inner-title-wrapper.jj-title-with-pill .h2-test,
.inner-title-wrapper.jj-title-with-pill .passion,
.inner-title-wrapper.jj-title-with-pill h1,
.inner-title-wrapper.jj-title-with-pill h2 {
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
}

.jj-archived-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  align-self: center;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--jj-blue);
  text-decoration: none;
  border: 1px solid var(--jj-blue);
  border-radius: 99px;
  padding: 0.6em 0.7em;
  overflow: hidden;
  background: transparent;
  line-height: 1;
  transition: color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.jj-archived-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--jj-blue);
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.jj-archived-pill:hover::before,
.jj-archived-pill:focus-visible::before {
  transform: scaleX(1);
}

.jj-archived-pill:hover,
.jj-archived-pill:focus-visible {
  color: #fff;
  border-color: var(--jj-blue);
  box-shadow: 0 6px 20px rgba(48, 53, 162, 0.28);
}

.jj-archived-pill:focus-visible {
  outline: 2px solid var(--jj-blue);
  outline-offset: 3px;
}

.jj-archived-pill-label,
.jj-archived-pill-num {
  position: relative;
  z-index: 1;
}

.jj-archived-pill-num {
  font-size: 0.58em;
  font-weight: 700;
  line-height: 0;
  top: -0.35em;
  margin-left: 0.12em;
  color: var(--jj-blue);
  transition: color 0.35s ease;
}

.jj-archived-pill:hover .jj-archived-pill-num,
.jj-archived-pill:focus-visible .jj-archived-pill-num {
  color: #fff;
}

/* Archive pill — below featured grid, desktop cols 3–4 */
.main-grid:has(.jj-grid-3col) > .jj-cases-archive-row {
  grid-column: 3 / 5;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-top: 0.15em;
}

.jj-cases-archive-row .jj-archived-pill {
  font-size: calc(0.7rem + 2px);
  padding: 1em;
}

/* —— Stroke pill buttons (site-wide fill hover) —— */
a.button.stroke:not(.usp):not(.top.call) {
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

a.button.stroke:not(.usp):not(.top.call)::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--jj-blue);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

a.button.stroke:not(.usp):not(.top.call):hover::before,
a.button.stroke:not(.usp):not(.top.call):focus-visible::before {
  transform: scaleX(1);
}

a.button.stroke:not(.usp):not(.top.call) .link-text-wrapper {
  position: relative;
  z-index: 1;
}

a.button.stroke:not(.usp):not(.top.call):hover,
a.button.stroke:not(.usp):not(.top.call):focus-visible {
  border-color: var(--jj-blue);
  box-shadow: 0 6px 20px rgba(48, 53, 162, 0.28);
}

a.button.stroke:not(.usp):not(.top.call):hover .link-floating-text,
a.button.stroke:not(.usp):not(.top.call):focus-visible .link-floating-text {
  color: #fff !important;
  text-shadow: 0 15px 0 #fff !important;
}

/* White-outline pills (footer, dark sections) — not case CTA (blue fill there) */
a.button.stroke.white:not(.usp):not(.top.call):not(.cta-case-btn):not(.jj-stroke-cta-pill)::before {
  background: #fff;
}

a.button.stroke.white:not(.usp):not(.top.call):not(.cta-case-btn):not(.jj-stroke-cta-pill):hover,
a.button.stroke.white:not(.usp):not(.top.call):not(.cta-case-btn):not(.jj-stroke-cta-pill):focus-visible {
  border-color: #fff;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.12);
}

a.button.stroke.white:not(.usp):not(.top.call):not(.cta-case-btn):not(.jj-stroke-cta-pill):hover .link-floating-text,
a.button.stroke.white:not(.usp):not(.top.call):not(.cta-case-btn):not(.jj-stroke-cta-pill):focus-visible .link-floating-text {
  color: var(--jj-blue) !important;
  text-shadow: 0 15px 0 var(--jj-blue) !important;
}

/* White stroke pills — blue fill + white label (Get started, Passion, footer social) */
a.button.stroke.white.jj-stroke-cta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

a.button.stroke.white.jj-stroke-cta-pill::before {
  background: var(--jj-blue) !important;
}

a.button.stroke.white.jj-stroke-cta-pill:hover,
a.button.stroke.white.jj-stroke-cta-pill:focus-visible {
  border-color: var(--jj-blue) !important;
  box-shadow: 0 6px 20px rgba(48, 53, 162, 0.28) !important;
  background-color: transparent !important;
}

a.button.stroke.white.jj-stroke-cta-pill:hover .link-text-wrapper .link-floating-text,
a.button.stroke.white.jj-stroke-cta-pill:focus-visible .link-text-wrapper .link-floating-text,
a.button.stroke.white.jj-stroke-cta-pill:hover .link-floating-text.shadow-medium,
a.button.stroke.white.jj-stroke-cta-pill:focus-visible .link-floating-text.shadow-medium,
a.button.stroke.white.jj-stroke-cta-pill:hover .link-floating-text.shadow-medium-light,
a.button.stroke.white.jj-stroke-cta-pill:focus-visible .link-floating-text.shadow-medium-light {
  color: #fff !important;
  text-shadow: 0 15px 0 #fff !important;
}

a.button.stroke.white.jj-stroke-cta-pill .link-arrow {
  position: relative;
  z-index: 1;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  margin-left: 0 !important;
  margin-top: 0;
  width: 12px;
  height: 12px;
  color: #fff;
  flex-shrink: 0;
  transition:
    max-width 0.3s ease 0.15s,
    opacity 0.3s ease 0.15s,
    margin-left 0.3s ease 0.15s,
    color 0.35s ease;
}

a.button.stroke.white.jj-stroke-cta-pill:hover .link-arrow,
a.button.stroke.white.jj-stroke-cta-pill:focus-visible .link-arrow {
  max-width: 20px;
  opacity: 1;
  margin-left: 0.55em !important;
  color: #fff !important;
}

a.button.stroke.white.jj-stroke-cta-pill .link-arrow svg,
a.button.stroke.white.jj-stroke-cta-pill .link-arrow svg path {
  fill: currentColor;
}

a.button.stroke.white.jj-stroke-cta-pill:hover .link-arrow svg,
a.button.stroke.white.jj-stroke-cta-pill:hover .link-arrow svg path,
a.button.stroke.white.jj-stroke-cta-pill:focus-visible .link-arrow svg,
a.button.stroke.white.jj-stroke-cta-pill:focus-visible .link-arrow svg path {
  fill: #fff !important;
}

/* —— Hover arrow reveal (hero + light-section stroke; keeps existing fill hover) —— */
a.jj-pill-with-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

a.jj-pill-with-arrow .link-arrow {
  position: relative;
  z-index: 1;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  margin-left: 0 !important;
  margin-top: 0;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition:
    max-width 0.3s ease 0.15s,
    opacity 0.3s ease 0.15s,
    margin-left 0.3s ease 0.15s,
    color 0.35s ease;
}

a.jj-pill-with-arrow:hover .link-arrow,
a.jj-pill-with-arrow:focus-visible .link-arrow {
  max-width: 20px;
  opacity: 1;
  margin-left: 0.55em !important;
}

a.jj-pill-with-arrow .link-arrow svg,
a.jj-pill-with-arrow .link-arrow svg path {
  fill: currentColor;
}

/* Hero billboard — white arrow with label on hover */
a.button.stroke.top.jj-pill-with-arrow:hover .link-arrow,
a.button.stroke.top.jj-pill-with-arrow:focus-visible .link-arrow {
  color: #fff;
}

a.button.stroke.top.jj-pill-with-arrow:hover .link-arrow svg,
a.button.stroke.top.jj-pill-with-arrow:hover .link-arrow svg path,
a.button.stroke.top.jj-pill-with-arrow:focus-visible .link-arrow svg,
a.button.stroke.top.jj-pill-with-arrow:focus-visible .link-arrow svg path {
  fill: #fff !important;
}

/* Light sections — blue-fill stroke pills (e.g. More about me) */
a.button.stroke.jj-pill-with-arrow:not(.white):hover .link-arrow,
a.button.stroke.jj-pill-with-arrow:not(.white):focus-visible .link-arrow {
  color: #fff;
}

a.button.stroke.jj-pill-with-arrow:not(.white):hover .link-arrow svg,
a.button.stroke.jj-pill-with-arrow:not(.white):hover .link-arrow svg path,
a.button.stroke.jj-pill-with-arrow:not(.white):focus-visible .link-arrow svg,
a.button.stroke.jj-pill-with-arrow:not(.white):focus-visible .link-arrow svg path {
  fill: #fff !important;
}

@media screen and (max-width: 991px) {
  .main-grid:has(.jj-grid-3col) > .jj-cases-archive-row {
    grid-column: 1 / -1;
    margin-top: 0.5em;
  }
}

@media screen and (max-width: 767px) {
  .inner-title-wrapper.jj-title-with-pill {
    flex-wrap: wrap;
    row-gap: 0.65rem;
  }

  .jj-cases-archive-row .jj-archived-pill {
    font-size: 0.7rem;
    padding: 0.6em 0.7em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jj-archived-pill::before,
  a.button.stroke:not(.usp):not(.top.call)::before {
    transition: none;
  }

  .jj-archived-pill:hover::before,
  .jj-archived-pill:focus-visible::before,
  a.button.stroke:not(.usp):not(.top.call):hover::before,
  a.button.stroke:not(.usp):not(.top.call):focus-visible::before {
    transform: scaleX(1);
  }
}
