/* ════════════════════════════════════
   Case Study — Accenture Federal Services
   Values aligned to shared CSS variables.
   ════════════════════════════════════ */

/* ── BREADCRUMB ── */
.cs-breadcrumb {
  background: var(--themeBaseDark);
  height: calc(var(--inputField) + var(--paddingXS));
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 var(--paddingXL);
  overflow: hidden;
}

.cs-breadcrumb__back {
  font-size: var(--textCaption);
  font-weight: 400;
  letter-spacing: calc(var(--borderThickness) * 0.3);
  color: var(--themeBaseMuted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color var(--trans-fast);
  white-space: nowrap;
}

.cs-breadcrumb__back:hover {
  color: var(--brandPrimary);
}

.cs-breadcrumb__sep {
  font-size: var(--textCaption);
  color: var(--themeBaseMuted);
  margin: 0 var(--textCaption);
  letter-spacing: calc(var(--borderThickness) * 0.3);
}

.cs-breadcrumb__current {
  font-size: var(--textCaption);
  font-weight: 400;
  letter-spacing: calc(var(--borderThickness) * 0.3);
  color: var(--basicText);
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── HERO HEADER ── */
.cs-header {
  background: var(--themeBaseText);
  color: var(--basicText);
  min-height: 640px;
  padding: var(--paddingXL) var(--paddingXL) 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--paddingXL);
}

.cs-header__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--paddingXL);
  position: relative;
  z-index: 2;
  width: 100%;
  flex: 1;
}

.cs-header__left {
  display: flex;
  flex-direction: column;
  gap: var(--paddingXS);
  max-width: 622px;
}

.cs-header__eyebrow {
  font-size: var(--textBody);
  font-weight: 700;
  color: var(--brandPrimary) !important;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
  margin: 0;
}

.cs-header__title {
  font-family: var(--font-heading);
  font-size: var(--textH1);
  font-weight: 700;
  color: var(--basicText);
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
}

.cs-header__logo {
  flex-shrink: 0;
  width: min(338px, 28vw);
  --logo-fill: var(--basicText);
}

.cs-header__logo img {
  width: 100%;
  height: auto;
  max-height: 210px;
  object-fit: contain;
  display: block;
  filter: brightness(0) saturate(100%) invert(1);
  color: var(--logo-fill);
}

/* Job info meta row */
.cs-header__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--paddingLG);
  position: relative;
  z-index: 3;
  margin: 0 calc(var(--paddingXL) * -1);
  padding: var(--paddingLG) var(--paddingXL);
  list-style: none;
  background: var(--themeBaseText);
}

.cs-meta-item {
  display: flex;
  flex-direction: column;
  gap: var(--paddingXS);
  width: 190px;
  min-width: 0;
}

.cs-meta-item__label {
  font-size: var(--textBody);
  font-weight: 700;
  color: var(--brandPrimary);
  line-height: 1.2;
  text-transform: capitalize;
}

.cs-meta-item__value {
  font-size: var(--textBody);
  font-weight: 500;
  color: var(--basicText);
  line-height: normal;
  margin: 0;
}

/* ── HERO IMAGE ── */
.cs-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--themeBaseDark);
  z-index: 0;
}

.cs-hero-img__slides {
  position: absolute;
  inset: 0;
}

.cs-hero-img__slides::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(var(--hero-rgb), 0.75);
  backdrop-filter: blur(3px);
}

.cs-hero-img__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 900ms ease-in-out;
}

.cs-hero-img__slide.is-active {
  opacity: 1;
}

.cs-hero-img__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  z-index: 4;
  background: rgba(var(--hero-rgb), 0.32);
}

.cs-hero-img__progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--brandPrimaryDark);
  transform: scaleX(0);
  transform-origin: left center;
}

/* Video panel — sits below the hero banner, above Primary Responsibilities */
.cs-video-panel-outer {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--paddingXL);
  padding: var(--paddingLG) var(--paddingXL);
  width: 100%;
  box-sizing: border-box;
  justify-content: space-between;
  background: var(--brandSecondaryDark);
}

.cs-video-panel__text {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--basicText);
}

#cs-video-title {
  color: var(--basicText);
}

.cs-video-panel__desc {
  font-size: var(--textBody);
  font-weight: 400;
  color: rgba(var(--basicText-rgb), 0.7);
  line-height: 1.68;
  margin: 0 0 0 10%;
  max-width: 480px;
}

.cs-hero-img__video-panel {
  position: relative;
  flex: 1 1 420px;
  width: auto;
  max-width: 420px;
  min-width: 0;
  aspect-ratio: 574 / 393;
  border: none;
  padding: 0;
  background: var(--themeBaseDark);
  background-position: center;
  background-size: cover;
  border-radius: var(--radiusMD);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cs-hero-img__video-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(var(--hero-rgb), 0.52);
  transition: background var(--trans-fast);
}

.cs-hero-img__video-panel:hover::before {
  background: rgba(var(--hero-rgb), 0.34);
}

.cs-hero-img__play {
  width: var(--paddingXL);
  height: var(--paddingXL);
  color: rgba(var(--basicText-rgb), 0.7);
  position: relative;
  z-index: 1;
}

/* ── 01 PRIMARY RESPONSIBILITIES ── */
.cs-responsibilities {
  background: var(--bg);
  color: var(--text);
  padding: var(--paddingXL) var(--paddingXL);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--paddingXL);
}

.cs-responsibilities__main {
  display: flex;
  flex-direction: column;
  flex: 1 1 480px;
  min-width: 0;
}

.cs-responsibilities__body {
  font-size: var(--textBody);
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.68;
  margin: 0;
  max-width: 860px;
}

/* Outcome card */
.cs-outcomes {
  background: var(--themeBaseSurface);
  border: var(--borderThickness) solid var(--divider);
  border-radius: var(--paddingXS);
  padding: var(--paddingLG);
  width: 263px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--paddingSM);
}

.cs-outcomes__label {
  font-size: var(--textBody);
  font-weight: 700;
  color: var(--brandPrimary);
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
  margin: 0;
}

.cs-outcome-item {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cs-outcome-item__value {
  font-family: var(--font);
  font-size: var(--textH3);
  font-weight: 700;
  color: var(--text);
  letter-spacing: calc(calc(var(--borderThickness) / 4) * -1);
  line-height: normal;
  margin: 0;
}

.cs-outcome-item__desc {
  font-size: var(--textCaption);
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: calc(var(--borderThickness) / 4);
  line-height: normal;
  margin: 0;
}

/* ── 02 HOW TOM WORKS ── */
.cs-process {
  background: var(--themeBaseText);
  color: var(--basicText);
  padding: var(--paddingXL);
}

.cs-process__steps {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--paddingLG) 0;
}

.cs-process-step {
  position: relative;
  flex: 1 1 300px;
  min-width: 300px;
  height: 146px;
  box-sizing: border-box;
  padding-left: var(--paddingLG);
}

.cs-process-step__num {
  font-family: var(--font);
  font-size: var(--textH1);
  font-weight: 700;
  color: rgba(var(--basicText-rgb), 0.35);
  letter-spacing: calc(1.5px * -1);
  line-height: normal;
  margin: 0 0 0 0;
  position: absolute;
  top: 0;
  left: var(--paddingLG);
}

.cs-process-step__name {
  font-size: var(--textSubhead);
  font-weight: 900;
  color: var(--basicText);
  letter-spacing: calc(calc(var(--borderThickness) / 4) * -1);
  line-height: normal;
  margin: 0;
  position: absolute;
  top: 46%;
  left: var(--paddingLG);
}

.cs-process-step__desc {
  font-size: var(--textCallout);
  font-weight: 400;
  color: rgba(var(--basicText-rgb), 0.68);
  line-height: 1.58;
  margin: 0;
  position: absolute;
  top: 70%;
  left: var(--paddingLG);
  right: 0;
}

/* ── 03 PORTFOLIO ── */
.cs-portfolio {
  background: var(--bg);
  color: var(--text);
  padding: var(--paddingXL);
}

.cs-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--paddingMD);
}

.cs-portfolio-item {
  height: 260px;
  border-radius: var(--paddingXS);
  overflow: hidden;
  transform-style: preserve-3d;
  transform: perspective(700px) rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg))
    scale3d(var(--tilt-scale, 1), var(--tilt-scale, 1), 1);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition:
    transform 350ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow var(--trans);
  will-change: transform;
}

.cs-portfolio-item.is-tilting {
  transition:
    transform 100ms ease-out,
    box-shadow var(--trans);
}

.cs-portfolio-item:hover {
  box-shadow: 0 var(--paddingLG) var(--paddingLG) rgba(0, 0, 0, 0.25);
  z-index: 1;
}

.cs-portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.job-detail-page #site-footer-component .home-footer__tab {
  display: none;
}

/* ── NEXT PROJECT ── */
.cs-project-nav {
  background: var(--bg);
  color: var(--text);
  min-height: var(--min-textarea-h);
  padding: 0 var(--paddingXL) var(--paddingXL);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
}

.cs-project-nav__tab {
  display: none;
  align-items: flex-start;
  height: 62px;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  width: 100%;
}

.cs-project-nav__tab .home-footer__tab-panel {
  color: var(--text);
}

.cs-project-nav__inner {
  display: flex;
  flex-direction: row;
  gap: var(--paddingXL);
  flex: 1;
  align-items: center;
  justify-content: space-between;
}

.cs-project-nav__link {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: var(--paddingSM);
  justify-content: center;
  min-width: 0;
  width: 100%;
  color: var(--hero);
  text-decoration: none;
  transition: color var(--trans-fast);
  padding: var(--paddingMD) var(--paddingLG);
}

.cs-project-nav__link[hidden] {
  display: none;
}

.cs-project-nav__link--next {
  justify-content: flex-end;
}

.cs-project-nav__link-label {
  font-size: var(--textH2);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.cs-project-nav__icon {
  width: var(--paddingLG);
  height: var(--paddingLG);
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cs-project-nav__link:hover {
  color: var(--brandPrimary);
}

@media (max-width: 1199px) {
  .cs-header {
    min-height: 620px;
    gap: var(--paddingLG);
  }

  .cs-header__content {
    align-items: flex-start;
    flex-direction: column;
  }

  .cs-header__logo {
    width: min(280px, 70vw);
  }

  .cs-header__meta {
    align-items: flex-start;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 calc(var(--paddingLG) * -1);
  }

  .cs-meta-item {
    width: auto;
  }

  .cs-video-panel-outer {
    grid-template-columns: 1fr;
  }

  .cs-video-panel__desc {
    max-width: none;
  }
}

@media (max-width: 767px) {
  .cs-outcomes {
    width: 100%;
  }

  .cs-breadcrumb {
    display: none;
  }

  .cs-header {
    min-height: 340px;
  }

  .cs-header__title {
    line-height: 1.05;
  }

  .cs-header__meta {
    grid-template-columns: 1fr;
    gap: var(--paddingMD);
    margin: 0 calc(var(--paddingMD) * -1);
  }

  .cs-project-nav {
    min-height: auto;
    padding: 0;
  }

  .cs-project-nav__inner {
    gap: var(--paddingLG);
  }

  .cs-video-panel-outer {
    flex-direction: column;
    gap: var(--paddingLG);
  }
  .cs-video-panel__desc {
    margin: 0;
    max-width: none;
  }
  .cs-portfolio-grid {
    grid-template-columns: 1fr;
  }
  .cs-hero-img__video-panel {
    width: 100%;
    max-height: 320px;
  }
  .cs-process__steps {
    flex-direction: column;
    gap: var(--paddingLG);
  }
  .cs-process-step {
    position: static;
    flex: 0 1 auto;
    width: 100%;
    min-width: 0;
    height: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: var(--paddingXS);
    padding-left: 0;
  }
  .cs-process-step__num,
  .cs-process-step__name,
  .cs-process-step__desc {
    position: static;
    top: auto;
    left: auto;
    right: auto;
  }
  .cs-process-step__desc {
    overflow-wrap: break-word;
  }
}

/* ── PRESENTATION MODAL ── */
.cs-pres-modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(var(--hero-rgb), 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--paddingXL);
}

.cs-pres-modal[hidden] {
  display: none;
}

.cs-pres-modal__frame {
  position: relative;
  width: min(92vw, 1280px);
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - var(--paddingXL) * 2);
}

.cs-pres-modal__close {
  position: absolute;
  top: calc((var(--size-icon-lg) + var(--paddingSM)) * -1);
  right: 0;
  z-index: 2;
  width: var(--size-icon-lg);
  height: var(--size-icon-lg);
  background: rgba(var(--hero-rgb), 0.8);
  border: calc(var(--borderThickness) / 2) solid rgba(var(--basicText-rgb), 0.2);
  border-radius: 50%;
  color: var(--basicText);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition:
    background var(--trans-fast),
    border-color var(--trans-fast);
}

.cs-pres-modal__close:hover {
  background: var(--brandPrimary);
  border-color: var(--brandPrimary);
}

.cs-pres-modal__iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: var(--hero);
}

/* make the play button feel clickable */
.cs-hero-img__video-panel {
  cursor: pointer;
  border: none;
  transition: transform var(--trans-fast);
}

/* ── PORTFOLIO MODAL ── */
.cs-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-modal[hidden] {
  display: none;
}

.cs-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(var(--hero-rgb), 0.92);
  cursor: pointer;
}

.cs-modal__inner {
  position: relative;
  z-index: 1;
  width: 90vw;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  border-radius: var(--paddingXS);
  overflow: hidden;
}

.cs-modal__img {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  display: block;
  background: var(--themeBaseDark);
}

.cs-modal__info {
  background: var(--paper);
  padding: var(--paddingMD) var(--paddingLG);
  border-top: var(--borderThickness) solid var(--brandPrimary);
  display: flex;
  flex-direction: column;
  gap: var(--size-xxs);
}

.cs-modal__info-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cs-modal__category {
  font-size: var(--textCaption);
  font-weight: 700;
  color: var(--brandPrimary);
  letter-spacing: calc(var(--borderThickness) * 0.3);
  text-transform: uppercase;
  margin: 0;
}

.cs-modal__counter {
  font-size: var(--textCaption);
  font-weight: 400;
  color: var(--themeBaseMuted);
  letter-spacing: calc(var(--borderThickness) * 0.2);
  margin: 0;
}

.cs-modal__desc {
  font-size: var(--textCallout);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.6;
  margin: 0;
}

.cs-modal__close {
  position: absolute;
  top: var(--paddingMD);
  right: var(--paddingMD);
  z-index: 2;
  width: var(--size-icon-lg);
  height: var(--size-icon-lg);
  background: rgba(var(--hero-rgb), 0.8);
  border: calc(var(--borderThickness) / 2) solid
    rgba(var(--basicText-rgb), 0.12);
  border-radius: 50%;
  color: var(--basicText);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition:
    background var(--trans-fast),
    border-color var(--trans-fast);
}

.cs-modal__close:hover {
  background: var(--brandPrimary);
  border-color: var(--brandPrimary);
}

.cs-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: var(--paddingXL);
  height: var(--paddingXL);
  background: rgba(var(--hero-rgb), 0.7);
  border: calc(var(--borderThickness) / 2) solid
    rgba(var(--basicText-rgb), 0.12);
  border-radius: 50%;
  color: rgba(var(--basicText-rgb), 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition:
    background var(--trans-fast),
    color var(--trans-fast),
    border-color var(--trans-fast);
}

.cs-modal__nav:hover {
  background: var(--brandPrimary);
  border-color: var(--brandPrimary);
  color: var(--basicText);
}

.cs-modal__nav[hidden] {
  display: none;
}

.cs-modal__nav--prev {
  left: var(--paddingMD);
}
.cs-modal__nav--next {
  right: var(--paddingMD);
}

/* portfolio items get pointer cursor */
.cs-portfolio-item {
  cursor: pointer;
}
