/* ===========================================================================
   HOME — impact calculator + "Our Digital Portfolio" case studies
   Added 2026-10-01 from the home revision Figma YmLzL45Qaw4FJRduYrQQM1
   280:4052 (desktop: calculator 280:5604, case studies 280:5597/280:5791) and
   281:6144 (phone: calculator 281:6541, case studies 281:7068). Loaded only
   on page-home.php (functions.php, after content.css). Nothing else on the
   home page is styled here.

   1. IMPACT CALCULATOR. The section is the same aib-calc component as
      /ai/ai-consulting-services/ and /ai/ai-automation-agency/, driven by
      the same js/ai-in-business.js. The rules below up to "values the home
      frame specifies" are a scripted copy of that component's rules from
      css/ai-automation-agency.css (2026-09-29 copy, its 1440-1520 head-row
      fix, the slider touch strip, QA 89's fixed value width and QA item
      21's hidden tab scrollbar), re-scoped to this template. Keep the
      copies in step; they match the home frame value for value except where
      the overrides after them say otherwise.
   2. CASE STUDIES (.hcs). New markup and styles; see that block.
   =========================================================================== */

body.page-template-page-home .aib-calc {
  --aib-gutter: var(--container-padding-inline, 40px);
  font-optical-sizing: none;
}

body.page-template-page-home .aib-calc .aib-container {
  max-width: var(--container-max-width, 1520px);
  margin: 0 auto;
  padding: 0 var(--aib-gutter);
  box-sizing: border-box;
}

body.page-template-page-home .aib-calc .aib-eyebrow {
  margin: 0;
  font-family: var(--font-base);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.19;
  letter-spacing: 2.86px;
  text-transform: uppercase;
  color: #cab5ff;
}

body.page-template-page-home .aib-calc .aib-eyebrow--light {
  color: #9a60fb;
}

body.page-template-page-home .aib-calc {
  background: #fff;
  padding: 120px 0;
}

body.page-template-page-home .aib-calc__head {
  display: flex;
  align-items: center;
  gap: 77px;
}

body.page-template-page-home .aib-calc__intro {
  flex: none;
  width: 900px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

body.page-template-page-home .aib-calc__heading {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 74.88px;
  line-height: 77.875px;
  letter-spacing: -3.744px;
  color: #171717;
}

body.page-template-page-home .aib-calc__heading span {
  color: #9a60fa;
}

body.page-template-page-home .aib-calc__lede {
  margin: -6px 0 0;
  font-family: var(--font-base);
  font-weight: 400;
  font-size: 17.28px;
  line-height: 30.24px;
  color: rgba(23, 23, 23, .7);
}

body.page-template-page-home .aib-calc__rate {
  flex: none;
  padding: 24px;
  background: rgba(255, 255, 255, .5);
  border: 1px solid #d8d1d9;
  border-radius: 12px;
}

body.page-template-page-home .aib-calc__rate-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 414px;
  max-width: 100%;
  margin-bottom: 5px;
}

body.page-template-page-home .aib-calc__rate-kicker {
  display: block;
  font-family: var(--font-base);
  font-weight: 500;
  font-size: 10px;
  line-height: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(0, 0, 0, .5);
}

body.page-template-page-home .aib-calc__rate-title {
  display: block;
  font-family: var(--font-base);
  font-weight: 500;
  font-size: 14px;
  line-height: 24px;
  color: #171717;
  cursor: pointer;
}

body.page-template-page-home .aib-calc__rate-value {
  flex: none;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 24px;
  line-height: normal;
  letter-spacing: -1.3824px;
  text-align: right;
  color: #9a60fa;
}

body.page-template-page-home .aib-calc__slider {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 414px;
  max-width: 100%;
  height: 6px;
  margin: 0;
  border-radius: 30px;
  background: linear-gradient(#9a60fa, #9a60fa) 0 / var(--aib-slider-pct, 28.57%) 100% no-repeat, rgba(154, 96, 250, .18);
  cursor: pointer;
}

body.page-template-page-home .aib-calc__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13.85px;
  height: 13.85px;
  border: 0;
  border-radius: 50%;
  background: #9a60fa;
}

body.page-template-page-home .aib-calc__slider::-moz-range-thumb {
  width: 13.85px;
  height: 13.85px;
  border: 0;
  border-radius: 50%;
  background: #9a60fa;
}

/* 2026-09-29, "slider doesn't work that well on mobile": the input was 6px
   tall, so a finger landing a little off the line scrolled the page, and the
   13.85px dot was a small target. The input is now a 32px touch strip (the
   margins give the extra 26px back, so nothing moves) with the 6px track and
   fill drawn on the track pseudo-elements, and the thumb is a 28px hit area
   that paints the same 13.85px dot. js/ai-in-business.js lets the thumb
   glide while the rate still moves in $5 steps. Same block in
   css/ai-in-business.css. */
body.page-template-page-home .aib-calc__slider {
  height: 32px;
  margin: -13px 0;
  border-radius: 0;
  background: transparent;
  touch-action: pan-y;
}

body.page-template-page-home .aib-calc__slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 30px;
  /* The fill ends under the dot's centre: 14px is half the 28px thumb. */
  background: linear-gradient(#9a60fa, #9a60fa) 0 / calc(14px + (100% - 28px) * var(--aib-slider-frac, .2857)) 100% no-repeat, rgba(154, 96, 250, .18);
}

body.page-template-page-home .aib-calc__slider::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
  margin-top: -11px;
  background: radial-gradient(circle, #9a60fa 6.4px, rgba(154, 96, 250, 0) 7.4px);
}

body.page-template-page-home .aib-calc__slider::-moz-range-track {
  height: 6px;
  border-radius: 30px;
  background: rgba(154, 96, 250, .18);
}

body.page-template-page-home .aib-calc__slider::-moz-range-progress {
  height: 6px;
  border-radius: 30px;
  background: #9a60fa;
}

body.page-template-page-home .aib-calc__slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  background: radial-gradient(circle, #9a60fa 6.4px, rgba(154, 96, 250, 0) 7.4px);
}

body.page-template-page-home .aib-calc__tabs {
  display: inline-flex;
  gap: 18px;
  margin: 48px 0 0;
  padding: 6px 8px;
  background: #fff;
  border: .824px solid #f0e7fe;
  border-radius: 10px;
}

body.page-template-page-home .aib-calc__tab {
  width: 96px;
  height: 44px;
  padding: 0 16px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 16px;
  line-height: normal;
  letter-spacing: -1.1384px;
  color: #4f5666;
}

body.page-template-page-home .aib-calc__tab.is-active {
  background: #ece7f5;
  font-weight: 500;
  color: #6c4eaa;
}

body.page-template-page-home .aib-calc__table {
  margin-top: 24px;
}

body.page-template-page-home .aib-calc__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 40px;
  background: #fff;
  border: 1px solid rgba(154, 96, 250, .15);
}

body.page-template-page-home .aib-calc__row + .aib-calc__row {
  margin-top: -1px;
}

body.page-template-page-home .aib-calc__row:first-child {
  border-radius: 20px 20px 0 0;
}

body.page-template-page-home .aib-calc__row:last-child {
  border-radius: 0 0 20px 20px;
}

body.page-template-page-home .aib-calc__row-main {
  display: flex;
  align-items: center;
  gap: 79px;
}

body.page-template-page-home .aib-calc__row-id {
  flex: none;
  width: 240px;
  display: flex;
  align-items: center;
  gap: 16px;
}

body.page-template-page-home .aib-calc__row-icon {
  flex: none;
  width: 45.375px;
  height: 45.375px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ebdffe;
  border-radius: 7.992px;
}

body.page-template-page-home .aib-calc__row-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 24px;
  line-height: normal;
  letter-spacing: -1.3824px;
  color: #171717;
}

body.page-template-page-home .aib-calc__row-compare {
  flex: none;
  width: 428px;
  display: flex;
  align-items: center;
  gap: 20px;
}

body.page-template-page-home .aib-calc__col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

body.page-template-page-home .aib-calc__col-arrow {
  flex: none;
}

body.page-template-page-home .aib-calc__col-kicker {
  margin: 0;
  font-family: var(--font-base);
  font-weight: 700;
  font-size: 10px;
  line-height: 13px;
  letter-spacing: 1.86px;
  text-transform: uppercase;
  color: #9a60fb;
}

body.page-template-page-home .aib-calc__col-text {
  margin: 0;
  font-family: var(--font-base);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.4;
  color: rgba(23, 23, 23, .7);
}

body.page-template-page-home .aib-calc__row-bars {
  flex: none;
  width: 303px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

body.page-template-page-home .aib-calc__bar {
  display: flex;
  align-items: center;
  gap: 14px;
}

body.page-template-page-home .aib-calc__bar-label {
  flex: none;
  width: 71px;
  font-family: var(--font-base);
  font-weight: 400;
  font-size: 14px;
  color: rgba(23, 23, 23, .7);
}

body.page-template-page-home .aib-calc__track {
  position: relative;
  flex: none;
  width: 156px;
  height: 8px;
  border-radius: 30px;
  background: rgba(217, 217, 217, .6);
}

body.page-template-page-home .aib-calc__track--rec {
  background: rgba(154, 96, 250, .1);
}

body.page-template-page-home .aib-calc__fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 8px;
  border-radius: 30px;
  background: #9a60fa;
}

body.page-template-page-home .aib-calc__bar-hrs {
  flex: none;
  width: 48px;
  font-family: var(--font-base);
  font-weight: 400;
  font-size: 14px;
  color: rgba(23, 23, 23, .7);
}

body.page-template-page-home .aib-calc__bar-hrs--rec {
  color: #9a60fa;
}

body.page-template-page-home .aib-calc__row-value {
  flex: none;
  width: 108px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 11px;
  text-align: right;
}

body.page-template-page-home .aib-calc__money {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 24px;
  line-height: normal;
  letter-spacing: -1.3824px;
  color: #9a60fa;
}

body.page-template-page-home .aib-calc__money-label {
  font-family: var(--font-base);
  font-weight: 400;
  font-size: 14px;
  color: rgba(23, 23, 23, .7);
  white-space: nowrap;
}

@media (max-width: 1439px) {
  body.page-template-page-home .aib-calc__head {
    gap: 48px;
  }

  body.page-template-page-home .aib-calc__intro {
    flex: 1 1 auto;
    width: auto;
  }

  body.page-template-page-home .aib-calc__rate {
    flex: none;
  }

  body.page-template-page-home .aib-calc__row {
    padding: 30px 24px;
  }

  body.page-template-page-home .aib-calc__row-main {
    gap: 32px;
  }

  body.page-template-page-home .aib-calc__row-compare {
    width: auto;
    flex: 1 1 auto;
  }
}

@media (max-width: 1279px) {
  body.page-template-page-home .aib-calc__heading {
    font-size: 56px;
    line-height: 60px;
    letter-spacing: -2.4px;
  }

  body.page-template-page-home .aib-calc__row {
    flex-wrap: wrap;
    gap: 20px;
  }

  body.page-template-page-home .aib-calc__row-main {
    flex: 1 1 100%;
  }

  body.page-template-page-home .aib-calc__row-bars {
    flex: 1 1 auto;
  }
}

@media (max-width: 1023px) {
  body.page-template-page-home .aib-calc__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
  }

  body.page-template-page-home .aib-calc__rate,
  body.page-template-page-home .aib-calc__rate-top,
  body.page-template-page-home .aib-calc__slider {
    width: 100%;
  }

  body.page-template-page-home .aib-calc__rate {
    box-sizing: border-box;
  }

  body.page-template-page-home .aib-calc__tabs {
    display: flex;
    width: 100%;
    gap: 8px;
    overflow-x: auto;
  }

  body.page-template-page-home .aib-calc__tab {
    flex: 1 0 auto;
  }

  body.page-template-page-home .aib-calc__row-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  body.page-template-page-home .aib-calc__row-id,
  body.page-template-page-home .aib-calc__row-compare {
    width: 100%;
  }

  body.page-template-page-home .aib-calc__row-value {
    width: 100%;
    align-items: flex-start;
    text-align: left;
  }
}

@media (max-width: 767px) {
  body.page-template-page-home .aib-calc {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  body.page-template-page-home .aib-calc__heading {
    font-size: 40px;
    line-height: 46px;
    letter-spacing: -1.4px;
  }

  body.page-template-page-home .aib-calc__row {
    padding: 24px 18px;
  }

  body.page-template-page-home .aib-calc__row-compare {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  body.page-template-page-home .aib-calc__col-arrow {
    transform: rotate(90deg);
  }

  body.page-template-page-home .aib-calc__bar-label {
    width: 64px;
  }

  body.page-template-page-home .aib-calc__track {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }
}

@media (max-width: 599px) {
  body.page-template-page-home .aib-calc__heading {
    font-size: 32px;
    line-height: 38px;
  }

  body.page-template-page-home .aib-calc__bar {
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  body.page-template-page-home .aib-calc__track {
    order: 3;
    flex: 1 1 100%;
  }
}

body.page-template-page-home .aib-calc__summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 24px;
}

body.page-template-page-home .aib-calc__summary-card {
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #e2ddea;
  background-color: #faf9fc;
}

body.page-template-page-home .aib-calc__summary-card--highlight {
  background: linear-gradient(90deg, #180829 0%, #34105c 100%);
  border-color: rgba(216, 209, 217, 0.4);
}

body.page-template-page-home .aib-calc__summary-label {
  margin: 0 0 8px;
  font-family: var(--font-base);
  font-weight: 500;
  font-size: 10px;
  line-height: normal;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.5);
}

body.page-template-page-home .aib-calc__summary-card--highlight .aib-calc__summary-label {
  color: #cab5ff;
}

body.page-template-page-home .aib-calc__summary-value {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 29px;
  line-height: normal;
  color: #9a60fa;
}

body.page-template-page-home .aib-calc__summary-card--highlight .aib-calc__summary-value {
  color: #ffffff;
}

body.page-template-page-home .aib-calc__summary-desc {
  margin: 0;
  font-family: var(--font-base);
  font-weight: 400;
  font-size: 12px;
  line-height: normal;
  color: rgba(23, 23, 23, 0.7);
}

body.page-template-page-home .aib-calc__summary-card--highlight .aib-calc__summary-desc {
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 1023px) {
  body.page-template-page-home .aib-calc__summary-value {
    font-size: 24px;
  }
}

@media (max-width: 767px) {
  body.page-template-page-home .aib-calc__summary {
    grid-template-columns: 1fr;
  }
}

/* The one deliberate difference from the AI in Your Business copy. Its head
   row needs 900 (intro) + 77 (gap) + 464 (rate card) = 1441px, but the
   container's content box is only 1360-1440px wide from 1440 to 1520px, so
   the rate card runs up to 41px past the right edge. That page hides the
   overrun with `overflow-x: clip` on .aib-page, which cuts the card and its
   "~$50/hr" off; here it would scroll the page sideways. The <=1439px rules
   above (48px gap, a flexible intro) are extended to 1520px, where the
   desktop layout fits again. */
@media (min-width: 1440px) and (max-width: 1520px) {
  body.page-template-page-home .aib-calc__head {
    gap: 48px;
  }

  body.page-template-page-home .aib-calc__intro {
    flex: 1 1 auto;
    width: auto;
  }
}

body.page-template-page-home .aib-calc__rate-value {
  min-width: 4.3em;
}

@media (max-width: 1023px) {
  body.page-template-page-home .aib-calc__tabs {
    scrollbar-width: none;
  }

  body.page-template-page-home .aib-calc__tabs::-webkit-scrollbar {
    display: none;
  }
}

/* ---------------------------------------------------------------------------
   Impact calculator — values the home frame specifies that differ from the
   AI in Your Business copy above.
   Desktop, Figma 280:5778: the summary row sits 40px under the rows (the
   frame's column gap), and each card is a 10px-gap column with 30/24
   padding, a #d8d1d9 border on a half-white fill, the label at 16px line
   height (bold on the highlighted card) and the value at 28.8/31.68.
   --------------------------------------------------------------------------- */
body.page-template-page-home .aib-calc__summary {
  margin-top: 40px;
}

body.page-template-page-home .aib-calc__summary-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 30px 24px;
  border-color: #d8d1d9;
  background-color: rgba(255, 255, 255, .5);
}

body.page-template-page-home .aib-calc__summary-card--highlight {
  background: linear-gradient(90deg, #180829 0%, #34105c 100%);
  border-color: #d8d1d9;
}

body.page-template-page-home .aib-calc__summary-label {
  margin: 0;
  line-height: 16px;
}

body.page-template-page-home .aib-calc__summary-card--highlight .aib-calc__summary-label {
  font-weight: 700;
}

body.page-template-page-home .aib-calc__summary-value {
  margin: 0;
  font-size: 28.8px;
  line-height: 31.68px;
}

/* 768-1023 keeps the copy's 24px, so "~$5,800/month" fits a third of the row. */
@media (max-width: 1023px) {
  body.page-template-page-home .aib-calc__summary-value {
    font-size: 24px;
    line-height: 31.2px;
  }
}

/* Rate card (280:5614, 464x114): the label sits on a 31.68px line pulled
   3px under the kicker, and the slider row is 14px (280:5622), so the
   32px touch strip gives back 9px a side rather than 13. */
body.page-template-page-home .aib-calc__rate-kicker {
  margin-bottom: -3px;
}

body.page-template-page-home .aib-calc__rate-title {
  line-height: 31.68px;
}

body.page-template-page-home .aib-calc__slider {
  margin: -9px 0;
}

/* Each row keeps its own border (280:5641-280:5743 are separate frames),
   so two hairlines meet between rows instead of one shared line. */
body.page-template-page-home .aib-calc__row + .aib-calc__row {
  margin-top: 0;
}

/* Phone, Figma 281:6541 (402 wide): 64px band, 15px gutter, the four tabs
   share the bar's width instead of scrolling, every row is its own card
   (one hairline between rows), each bar is one line (label, track, hours),
   and the three summary cards stack 10px apart. */
@media (max-width: 767px) {
  body.page-template-page-home .aib-calc {
    --aib-gutter: 15px;
    padding-top: 64px;
    padding-bottom: 64px;
  }

  body.page-template-page-home .aib-calc .aib-eyebrow {
    letter-spacing: 2px;
  }

  body.page-template-page-home .aib-calc__head {
    gap: 24px;
  }

  body.page-template-page-home .aib-calc__intro {
    gap: 16px;
  }

  body.page-template-page-home .aib-calc__heading {
    font-size: 36px;
    line-height: 37.4px;
    letter-spacing: -3px;
  }

  body.page-template-page-home .aib-calc__lede {
    margin: 0;
    font-size: 15px;
    line-height: 21px;
  }

  body.page-template-page-home .aib-calc__rate {
    padding: 16px;
  }

  body.page-template-page-home .aib-calc__rate-top {
    gap: 28px;
    margin-bottom: 12px;
  }

  body.page-template-page-home .aib-calc__rate-kicker {
    margin-bottom: 0;
  }

  body.page-template-page-home .aib-calc__rate-title {
    margin-top: 6px;
    font-size: 12px;
    line-height: 18px;
  }

  /* 281:6557: a 12px slider row. */
  body.page-template-page-home .aib-calc__slider {
    margin: -10px 0;
  }

  body.page-template-page-home .aib-calc__rate-value {
    font-size: 20px;
    letter-spacing: -1px;
  }

  body.page-template-page-home .aib-calc__tabs {
    gap: 6px;
    margin-top: 32px;
    padding: 6.18px;
    box-sizing: border-box;
    overflow: hidden;
  }

  body.page-template-page-home .aib-calc__tab {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    padding: 0 4px;
    font-size: 14px;
  }

  body.page-template-page-home .aib-calc__row {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 24px;
    padding: 24px 23.5px;
    border: .52px solid rgba(216, 209, 217, .7);
  }

  body.page-template-page-home .aib-calc__row + .aib-calc__row {
    margin-top: 0;
    border-top: 0;
  }

  body.page-template-page-home .aib-calc__row:first-child {
    border-radius: 16px 16px 0 0;
  }

  body.page-template-page-home .aib-calc__row:last-child {
    border-radius: 0 0 16px 16px;
  }

  body.page-template-page-home .aib-calc__row-main {
    gap: 24px;
  }

  body.page-template-page-home .aib-calc__row-id {
    gap: 12px;
  }

  body.page-template-page-home .aib-calc__row-icon {
    width: 44px;
    height: 44px;
    border-radius: 6px;
  }

  body.page-template-page-home .aib-calc__row-icon img {
    width: 22px;
    height: 22px;
  }

  body.page-template-page-home .aib-calc__row-title {
    font-size: 16px;
    line-height: 24px;
    letter-spacing: -1px;
  }

  body.page-template-page-home .aib-calc__row-compare {
    gap: 10px;
  }

  body.page-template-page-home .aib-calc__col-kicker {
    font-weight: 600;
  }

  body.page-template-page-home .aib-calc__col-text {
    font-size: 12px;
    line-height: normal;
  }

  body.page-template-page-home .aib-calc__row-bars {
    width: 100%;
    gap: 12px;
  }

  body.page-template-page-home .aib-calc__bar {
    flex-wrap: nowrap;
    gap: 16px;
  }

  body.page-template-page-home .aib-calc__bar-label,
  body.page-template-page-home .aib-calc__bar-hrs {
    width: auto;
    font-size: 12px;
  }

  body.page-template-page-home .aib-calc__track {
    order: 0;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  body.page-template-page-home .aib-calc__row-value {
    gap: 8px;
  }

  body.page-template-page-home .aib-calc__money {
    font-weight: 500;
    font-size: 18px;
    letter-spacing: -1px;
  }

  body.page-template-page-home .aib-calc__money-label {
    font-size: 12px;
  }

  body.page-template-page-home .aib-calc__summary {
    gap: 10px;
    margin-top: 24px;
  }

  body.page-template-page-home .aib-calc__summary-card {
    padding: 24px;
  }

  body.page-template-page-home .aib-calc__summary-value {
    font-size: 24px;
    line-height: 31.2px;
  }
}

/* ===========================================================================
   CASE STUDIES — "Our Digital Portfolio" (.hcs)
   Desktop Figma 280:5597 (band) + 280:5791 (content), y 10206-11119 of
   280:4052; phone Figma 281:7068 (the lower part of 281:7067). Replaces the
   137:5583 .casestudy slider, whose markup is disabled in page-home.php; its
   rules in css/content.css now match nothing and are left as they were.
   One white card per tab. The four cards share one grid cell, so the cell is
   as tall as the tallest and switching tabs never moves the page; the
   inactive ones are [hidden], shown here as invisible rather than removed.
   The tabs are switched by the sitewide [role="tablist"] handler in
   js/main.js; js/home-casestudy.js adds the dots, the autoplay and the swipe.
   =========================================================================== */
body.page-template-page-home .hcs {
  position: relative;
  padding: 119px 0 91px;
  border-top: 1px solid rgba(255, 255, 255, .04);
  background: linear-gradient(239.94deg, rgba(16, 10, 33, .72) 4.7384%, rgba(16, 10, 33, .9) 40.836%), #03000e;
  color: #fff;
}

body.page-template-page-home .hcs__container {
  width: min(1280px, calc(100% - 80px));
  margin: 0 auto;
}

body.page-template-page-home .hcs__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin: 0 0 42px;
  text-align: center;
}

body.page-template-page-home .hcs__eyebrow {
  margin: 0;
  font-family: var(--font-base);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.19;
  letter-spacing: 2.86px;
  text-transform: uppercase;
  color: #cab5ff;
}

body.page-template-page-home .hcs__heading {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 52px;
  line-height: 64px;
  letter-spacing: -1.5px;
  color: #f7f7f8;
  text-box: trim-both cap alphabetic;
}

body.page-template-page-home .hcs__heading span {
  color: #fff;
}

/* Tabs (280:5796): four equal columns, 4px underline, purple when active. */
body.page-template-page-home .hcs__tabs {
  position: relative;
  display: flex;
  gap: 16px;
  margin: 0 0 24px;
}

body.page-template-page-home .hcs__tab {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 16px 12px 16px 10px;
  border: 0;
  border-bottom: 4px solid rgba(230, 230, 230, .24);
  border-radius: 0;
  background: none;
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .3s ease;
}

body.page-template-page-home .hcs__tab.is-active {
  border-bottom-color: #9a60fa;
}

body.page-template-page-home .hcs__tab:focus-visible {
  outline: 2px solid #c191ff;
  outline-offset: 2px;
}

body.page-template-page-home .hcs__tab-title,
body.page-template-page-home .hcs__tab-sub {
  display: block;
  font-family: var(--font-base);
  line-height: 31.6px;
  white-space: nowrap;
  text-box: trim-both cap alphabetic;
}

body.page-template-page-home .hcs__tab-title {
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}

body.page-template-page-home .hcs__tab-sub {
  font-weight: 400;
  font-size: 12px;
  color: rgba(255, 255, 255, .7);
}

/* Cards (280:5814): white, 24px radius, 40px padding; copy column 468 wide,
   top-aligned with the 680x365 photo (280:5817 sits at y 0 of its row). */
body.page-template-page-home .hcs__panels {
  display: grid;
  touch-action: pan-y;
}

body.page-template-page-home .hcs__panel {
  grid-area: 1 / 1;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 52px;
  padding: 40px;
  border-radius: 24px;
  background: #fff;
  color: #171717;
  opacity: 1;
  visibility: visible;
  transition: opacity .45s ease, visibility 0s linear 0s;
}

body.page-template-page-home .hcs__panel[hidden] {
  display: flex;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .45s ease, visibility 0s linear .45s;
}

body.page-template-page-home .hcs__body {
  flex: 0 1 468px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 32px;
}

body.page-template-page-home .hcs__logo {
  display: flex;
  align-items: center;
  height: 54px;
}

/* A mark fills the slot's height (111x54 desktop, 99x48 phone); a wide
   wordmark sets its own height with --hcs-logo-h. */
body.page-template-page-home .hcs__logo img {
  display: block;
  width: auto;
  max-width: 100%;
  height: var(--hcs-logo-h, 100%);
  object-fit: contain;
  object-position: left center;
}

/* logo-gatsby.svg is the white wordmark the testimonials use on dark. */
body.page-template-page-home .hcs__logo--invert img {
  filter: brightness(0);
}

body.page-template-page-home .hcs__copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

body.page-template-page-home .hcs__card-eyebrow {
  margin: 0;
  font-family: var(--font-base);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.19;
  letter-spacing: 2.86px;
  text-transform: uppercase;
  color: #7831ad;
}

body.page-template-page-home .hcs__text {
  margin: 0;
  font-family: var(--font-base);
  font-weight: 450;
  font-size: 16px;
  line-height: 26px;
  color: rgba(23, 23, 23, .96);
}

body.page-template-page-home .hcs__link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-base);
  font-weight: 600;
  font-size: 16px;
  line-height: normal;
  color: #171717;
  text-decoration: none;
}

body.page-template-page-home .hcs__link-chevron {
  font-size: 25px;
  line-height: 25px;
  color: #9b66ff;
  transition: transform .25s ease;
}

body.page-template-page-home .hcs__link:hover .hcs__link-chevron,
body.page-template-page-home .hcs__link:focus-visible .hcs__link-chevron {
  transform: translateX(3px);
}

body.page-template-page-home .hcs__link:focus-visible {
  outline: 2px solid #9a60fa;
  outline-offset: 4px;
}

body.page-template-page-home .hcs__media {
  position: relative;
  flex: 0 1 680px;
  min-width: 0;
  aspect-ratio: 680 / 365;
  align-self: center;
}

body.page-template-page-home .hcs__photo-box {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 17px;
}

body.page-template-page-home .hcs__photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: var(--hcs-pos, 50% 50%);
}

/* Slide 1 follows the frame exactly: the photo is mirrored (280:5827,
   rotate 180 + flip Y) and placed at 149.02% x 156.24% from the box's
   top-left, so the mover and his box fill the right of the frame. */
body.page-template-page-home .hcs__photo-box--flip {
  transform: scaleX(-1);
}

body.page-template-page-home .hcs__photo-box--flip .hcs__photo {
  inset: 0 auto auto -.02%;
  width: 149.02%;
  height: 156.24%;
  object-fit: fill;
}

body.page-template-page-home .hcs__chips {
  position: absolute;
  left: 24px;
  bottom: 24px;
  display: flex;
  gap: 8px;
}

body.page-template-page-home .hcs__chip {
  box-sizing: border-box;
  width: 147px;
  height: 88px;
  margin: 0;
  padding: 14px 6px 14px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  border-radius: 12px;
  background: #fff;
}

body.page-template-page-home .hcs__chip-label,
body.page-template-page-home .hcs__chip-value,
body.page-template-page-home .hcs__chip-caption {
  display: block;
  font-family: var(--font-base);
  white-space: nowrap;
  text-box: trim-both cap alphabetic;
}

body.page-template-page-home .hcs__chip-label {
  font-weight: 600;
  font-size: 12px;
  line-height: 17.681px;
  letter-spacing: -.2829px;
  color: #8c42c8;
}

body.page-template-page-home .hcs__chip-figures {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.page-template-page-home .hcs__chip-value {
  font-weight: 700;
  font-size: 26.8px;
  line-height: 47.644px;
  letter-spacing: -1px;
  color: #100c15;
}

body.page-template-page-home .hcs__chip-caption {
  font-weight: 500;
  font-size: 10px;
  line-height: 47.644px;
  letter-spacing: -.028px;
  color: #716b73;
}

/* Dots (280:5599): 32x6 pills 12 apart, centred 33px under the card. Each
   button is 24px tall for the tap target, so the margins give back 9px. */
body.page-template-page-home .hcs__dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

body.page-template-page-home .hcs__dot {
  width: 32px;
  height: 24px;
  margin: 0;
  padding: 9px 0;
  border: 0;
  background: none;
  cursor: pointer;
}

body.page-template-page-home .hcs__dot::before {
  content: '';
  display: block;
  height: 6px;
  border-radius: 43px;
  background: rgba(246, 245, 251, .15);
  transition: background-color .3s ease;
}

body.page-template-page-home .hcs__dot.is-active::before {
  background: #9a60fa;
}

body.page-template-page-home .hcs__dot:focus-visible {
  outline: 2px solid #c191ff;
  outline-offset: 2px;
}

/* INTERPRETED, 768-1279 (the design has frames at 1520 and 402 only): the
   card row keeps its layout and the two columns shrink together. */
@media (max-width: 1279px) {
  body.page-template-page-home .hcs__panel {
    gap: 40px;
  }

  body.page-template-page-home .hcs__body {
    flex: 1 1 380px;
  }

  body.page-template-page-home .hcs__media {
    flex: 1 1 520px;
  }
}

/* INTERPRETED, 768-1023: the photo goes under the copy at the frame's
   680:365 shape, as it does on the phone. */
@media (max-width: 1023px) {
  body.page-template-page-home .hcs__heading {
    font-size: 44px;
    line-height: 52px;
  }

  body.page-template-page-home .hcs__panel {
    flex-direction: column;
    gap: 32px;
  }

  body.page-template-page-home .hcs__body,
  body.page-template-page-home .hcs__media {
    flex: none;
    width: 100%;
  }
}

/* Phone, Figma 281:7068 (402 wide): Poppins eyebrow and a 36px regular
   heading, a sideways tab strip from the 15px gutter, a 16px-padded card
   with the photo (330:299) under the copy, and the dots 24px under it. */
@media (max-width: 767px) {
  body.page-template-page-home .hcs {
    padding: 46px 0 40px;
    background: linear-gradient(-68.16deg, rgba(16, 10, 33, .72) 49.077%, rgba(16, 10, 33, .9) 66.158%), #03000e;
  }

  body.page-template-page-home .hcs__container {
    width: calc(100% - 30px);
  }

  body.page-template-page-home .hcs__head {
    gap: 16px;
    margin-bottom: 40px;
  }

  body.page-template-page-home .hcs__eyebrow {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 13px;
  }

  body.page-template-page-home .hcs__heading {
    font-weight: 400;
    font-size: 36px;
    line-height: 37.4px;
    letter-spacing: -2px;
    color: #fff;
  }

  body.page-template-page-home .hcs__tabs {
    margin: 0 -15px 20px;
    padding: 0 15px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  body.page-template-page-home .hcs__tabs::-webkit-scrollbar {
    display: none;
  }

  body.page-template-page-home .hcs__tab {
    flex: 0 0 223px;
  }

  body.page-template-page-home .hcs__panel {
    gap: 32px;
    padding: 16px;
  }

  body.page-template-page-home .hcs__body {
    gap: 32px;
  }

  body.page-template-page-home .hcs__logo {
    height: 48px;
  }

  body.page-template-page-home .hcs__copy {
    gap: 16px;
  }

  body.page-template-page-home .hcs__text {
    font-size: 14px;
    line-height: 24px;
  }

  body.page-template-page-home .hcs__body .hcs__link {
    margin-top: -8px;
  }

  /* 281:7101 is 330 wide in the card's 340px content box, 10px short of
     its right edge; kept as drawn. */
  body.page-template-page-home .hcs__media {
    align-self: flex-start;
    width: calc(100% - 10px);
    aspect-ratio: 330 / 299;
  }

  body.page-template-page-home .hcs__photo {
    object-position: var(--hcs-pos-m, 50% 50%);
  }

  body.page-template-page-home .hcs__photo-box--flip .hcs__photo {
    left: -13.27%;
    top: -.08%;
    width: 188.98%;
    height: 117.39%;
  }

  body.page-template-page-home .hcs__chips {
    left: 14px;
    bottom: 10px;
  }

  body.page-template-page-home .hcs__chip {
    width: 134px;
    height: 89px;
    padding: 14px 6px 14px 14px;
    border-radius: 11px;
  }

  body.page-template-page-home .hcs__dots {
    margin-top: 15px;
  }
}

/* INTERPRETED, below 375px: the two 134px chips (290px with their offset)
   no longer fit on the photo, so they share its width and let the label and
   caption wrap. */
@media (max-width: 374px) {
  body.page-template-page-home .hcs__chips {
    right: 14px;
  }

  body.page-template-page-home .hcs__chip {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 89px;
    padding: 12px 8px 12px 12px;
  }

  body.page-template-page-home .hcs__chip-label,
  body.page-template-page-home .hcs__chip-caption {
    white-space: normal;
    line-height: 1.25;
  }
}

/* Phone auto-advance, the home Use Cases pattern (css/content.css,
   `tbi-uc-tab-progress`), added later on 2026-10-01 on the owner's "as the
   portfolios running in the mobile". The active tab keeps the grey track and
   a purple bar fills it over 5 s. js/home-casestudy.js advances when the bar
   finishes, so pausing the bar pauses the advance. It pauses while the
   section is off screen or the card was tapped (.is-autoplay-paused), while
   a finger is on the card (.is-dragging), and while a keyboard user is on a
   tab (:focus-visible only, because Android focuses a tapped button).
   .has-progress is set by the script, so without it the solid underline
   stays. */
@keyframes tbi-hcs-tab-progress {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@media (max-width: 767px) {
  body.page-template-page-home .hcs.has-progress .hcs__tab {
    position: relative;
  }

  body.page-template-page-home .hcs.has-progress .hcs__tab.is-active {
    border-bottom-color: rgba(230, 230, 230, .24);
  }

  body.page-template-page-home .hcs.has-progress .hcs__tab::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 4px;
    background-color: #9a60fa;
    transform: scaleX(0);
    transform-origin: left center;
  }

  body.page-template-page-home .hcs.has-progress .hcs__tab.is-active::after {
    animation: tbi-hcs-tab-progress var(--hcs-progress-duration, 5000ms) linear forwards;
  }

  body.page-template-page-home .hcs.has-progress.is-autoplay-paused .hcs__tab.is-active::after,
  body.page-template-page-home .hcs.has-progress.is-dragging .hcs__tab.is-active::after,
  body.page-template-page-home .hcs.has-progress .hcs__tabs:has(.hcs__tab:focus-visible) .hcs__tab.is-active::after {
    animation-play-state: paused;
  }
}

/* Reduced motion: no bar and so no auto-advance; the solid purple underline
   marks the active tab and swiping still works. */
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  body.page-template-page-home .hcs.has-progress .hcs__tab.is-active {
    border-bottom-color: #9a60fa;
  }

  body.page-template-page-home .hcs.has-progress .hcs__tab::after {
    content: none;
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.page-template-page-home .hcs__panel,
  body.page-template-page-home .hcs__panel[hidden],
  body.page-template-page-home .hcs__tab,
  body.page-template-page-home .hcs__dot::before,
  body.page-template-page-home .hcs__link-chevron {
    transition: none;
  }
}
