/* === BITERS PROJECTS / DENSE & GUIDED VERSION === */
.hero {
  min-height: 78vh;
}
.heroGrid {
  padding-top: 132px;
  padding-bottom: 64px;
}
.universeWrap {
  height: 520px;
}
.dataGrid {
  min-height: 112px;
}
.portfolioOverview {
  padding: 105px 0;
  background: #fff;
}
.overviewDomains {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.overviewDomain {
  position: relative;
  min-height: 230px;
  border: 1px solid #e5e9ee;
  border-radius: 22px;
  background: #fff;
  padding: 26px;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
  transition: 0.32s var(--ease);
}
.overviewDomain:after {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  right: -80px;
  bottom: -90px;
  background: radial-gradient(circle, rgba(166, 142, 93, 0.15), transparent 68%);
  transition: 0.35s;
}
.overviewDomain:hover {
  transform: translateY(-5px);
  border-color: rgba(166, 142, 93, 0.4);
  box-shadow: 0 22px 50px rgba(7, 29, 52, 0.08);
}
.overviewDomain:hover:after {
  transform: scale(1.45);
}
.overviewDomain > span {
  font:
    800 9px/1 ui-monospace,
    monospace;
  letter-spacing: 0.14em;
  color: var(--gold);
}
.overviewDomain > strong {
  position: absolute;
  right: 24px;
  top: 20px;
  font-size: 42px;
  letter-spacing: -0.06em;
  color: #edf1f4;
}
.overviewDomain > b {
  display: block;
  font-size: 22px;
  letter-spacing: -0.035em;
  margin: 42px 0 7px;
  color: var(--navy);
}
.overviewDomain p {
  font-size: 12px;
  line-height: 1.6;
  color: #748294;
  max-width: 290px;
  margin: 0 0 20px;
}
.overviewDomain i {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: var(--navy);
}

/* Six featured cases become a single interactive control room */
.featured {
  padding-top: 105px;
  padding-bottom: 105px;
  background: #f7f9fb;
}
.featured .sectionHead {
  margin-bottom: 34px;
}
.featureNav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding: 10px;
  border: 1px solid #e2e7ec;
  border-radius: 18px;
  background: #fff;
}
.featureNav button {
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  padding: 12px 15px;
  text-align: left;
  cursor: pointer;
  color: #69798b;
  transition: 0.2s;
  min-width: 150px;
}
.featureNav button span {
  display: block;
  font:
    800 8px/1 ui-monospace,
    monospace;
  letter-spacing: 0.12em;
  color: #9aa7b4;
  margin-bottom: 6px;
}
.featureNav button b {
  display: block;
  font-size: 12px;
  color: var(--navy);
}
/* seven case studies: one row of equal tabs on wide screens */
@media (min-width: 1001px) {
  .featureNav {
    flex-wrap: nowrap;
  }
  .featureNav button {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }
  .featureNav button span {
    line-height: 1.4;
    margin-bottom: 4px;
  }
}
.featureNav button.active,
.featureNav button:hover {
  background: var(--navy);
  color: #fff;
}
.featureNav button.active b,
.featureNav button:hover b {
  color: #fff;
}
.featureNav button.active span,
.featureNav button:hover span {
  color: var(--gold2);
}
.featureStack {
  display: block;
}
.featureCase {
  display: none !important;
  min-height: 520px !important;
}
.featureCase.feature-active {
  display: grid !important;
  animation: featureIn 0.45s var(--ease);
}
@keyframes featureIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.featureCase h3 {
  font-size: clamp(46px, 5.2vw, 70px);
}
.featureCopy {
  padding: 48px 52px;
}
.featureVisual {
  min-height: 460px;
}

/* Atlas becomes a dense editorial list instead of 27 visual cards */
.atlas {
  padding-top: 105px;
}
.filterBar {
  position: sticky;
  top: 96px;
  z-index: 20;
  background: rgba(247, 249, 251, 0.88);
  backdrop-filter: blur(18px);
  padding: 12px;
  border: 1px solid #e1e6eb;
  border-radius: 20px;
  box-shadow: 0 14px 38px rgba(7, 29, 52, 0.055);
}
.projectGrid {
  display: block !important;
  margin-top: 28px;
  border-top: 1px solid #dfe5ea;
}
.projectCard {
  min-height: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #dfe5ea !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}
.projectCard > a {
  display: grid !important;
  grid-template-columns: 74px 1.05fr 1.45fr 0.72fr;
  grid-template-rows: auto auto auto;
  gap: 4px 24px;
  align-items: center;
  padding: 24px 22px !important;
}
.projectCard:hover {
  background: #fff !important;
  box-shadow: 0 16px 45px rgba(7, 29, 52, 0.06) !important;
  transform: translateY(-1px) !important;
}
.projectCard .cardTop {
  grid-column: 1;
  grid-row: 1/4;
  display: block !important;
  align-self: center;
}
.projectCard .cardTop .projectNo {
  display: block;
  font:
    800 12px/1 ui-monospace,
    monospace;
  color: var(--gold);
}
.projectCard .cardTop .year {
  display: block;
  font:
    700 8px/1 ui-monospace,
    monospace;
  color: #9aa6b2;
  margin-top: 8px;
}
.projectCard .miniUI {
  display: none !important;
}
.projectCard .chips {
  grid-column: 2;
  grid-row: 1;
  display: flex !important;
  gap: 5px;
  flex-wrap: wrap;
  margin: 0 0 5px !important;
}
.projectCard .chips span {
  font:
    750 7px/1 ui-monospace,
    monospace !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6d7e8f !important;
  background: #eef2f5 !important;
  border: 0 !important;
  border-radius: 999px;
  padding: 5px 7px !important;
}
.projectCard h3 {
  grid-column: 2;
  grid-row: 2;
  font-size: 22px !important;
  letter-spacing: -0.035em !important;
  line-height: 1.05 !important;
  margin: 0 !important;
  color: var(--navy) !important;
}
.projectCard h4 {
  grid-column: 2;
  grid-row: 3;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #708092 !important;
  margin: 0 !important;
}
.projectCard p {
  grid-column: 3;
  grid-row: 1/4;
  font-size: 11px !important;
  line-height: 1.58 !important;
  color: #748294 !important;
  margin: 0 !important;
  align-self: center;
}
.projectCard .cardFoot {
  grid-column: 4;
  grid-row: 1/4;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  align-self: center;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
.projectCard .tech {
  font:
    720 9px/1.45 ui-monospace,
    monospace !important;
  color: #516579 !important;
}
.projectCard .go {
  width: 30px !important;
  height: 30px !important;
  border: 1px solid #dce3e8 !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
  color: var(--gold) !important;
  transition: 0.2s;
}
.projectCard:hover .go {
  background: var(--navy) !important;
  border-color: var(--navy) !important;
  color: #fff !important;
}
.projectCard.hidden {
  display: none !important;
}
.emptyState {
  margin-top: 20px;
}

/* End-of-page statement: makes the portfolio say something, not just list work */
.portfolioMeaning {
  padding: 95px 0 105px;
  background: #fff;
}
.portfolioMeaningGrid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 78px;
  align-items: start;
}
.portfolioMeaning h2 {
  font-size: clamp(42px, 4.8vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.052em;
  margin: 16px 0 0;
}
.portfolioMeaning h2 em {
  font-style: normal;
  color: var(--gold);
}
.meaningPoints {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #e2e7eb;
  border-left: 1px solid #e2e7eb;
}
.meaningPoints > div {
  padding: 27px;
  border-right: 1px solid #e2e7eb;
  border-bottom: 1px solid #e2e7eb;
  min-height: 165px;
}
.meaningPoints span {
  font:
    800 8px/1 ui-monospace,
    monospace;
  color: var(--gold);
  letter-spacing: 0.14em;
}
.meaningPoints b {
  display: block;
  font-size: 18px;
  margin: 28px 0 8px;
  color: var(--navy);
}
.meaningPoints p {
  font-size: 11px;
  line-height: 1.6;
  color: #748294;
  margin: 0;
}

@media (max-width: 1050px) {
  .overviewDomains {
    grid-template-columns: 1fr 1fr;
  }
  .projectCard > a {
    grid-template-columns: 62px 1fr 1.25fr;
  }
  .projectCard .cardFoot {
    grid-column: 2/4;
    grid-row: 4;
    margin-top: 8px !important;
  }
  .portfolioMeaningGrid {
    grid-template-columns: 1fr;
    gap: 42px;
  }
}
@media (max-width: 760px) {
  .hero {
    min-height: auto;
  }
  .universeWrap {
    height: 430px;
  }
  .overviewDomains {
    grid-template-columns: 1fr;
  }
  .overviewDomain {
    min-height: 205px;
  }
  .featureNav {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .featureNav button {
    min-width: 160px;
  }
  .featureCase.feature-active {
    display: block !important;
  }
  .featureVisual {
    min-height: 350px;
  }
  .featureCopy {
    padding: 34px 28px;
  }
  .filterBar {
    position: relative;
    top: auto;
  }
  .projectCard > a {
    grid-template-columns: 48px 1fr;
    gap: 6px 14px;
    padding: 21px 8px !important;
  }
  .projectCard .cardTop {
    grid-column: 1;
    grid-row: 1/5;
  }
  .projectCard .chips,
  .projectCard h3,
  .projectCard h4,
  .projectCard p,
  .projectCard .cardFoot {
    grid-column: 2;
  }
  .projectCard .chips {
    grid-row: 1;
  }
  .projectCard h3 {
    grid-row: 2;
  }
  .projectCard h4 {
    grid-row: 3;
  }
  .projectCard p {
    grid-row: 4;
    margin-top: 8px !important;
  }
  .projectCard .cardFoot {
    grid-row: 5;
    margin-top: 10px !important;
  }
  .meaningPoints {
    grid-template-columns: 1fr;
  }
}

/* === PROJECT ATLAS / COMPACT VISUAL THUMBNAILS === */
#atlas .projectCard > a {
  grid-template-columns: 132px 1.02fr 1.38fr 0.7fr !important;
  grid-template-rows: auto auto auto !important;
  column-gap: 22px !important;
  min-height: 112px;
  position: relative;
}
#atlas .projectCard .cardTop {
  grid-column: 1 !important;
  grid-row: 1/4 !important;
  align-self: stretch !important;
  position: relative;
  z-index: 4;
  pointer-events: none;
  margin: 0 !important;
}
#atlas .projectCard .cardTop .projectNo,
#atlas .projectCard .cardTop .year {
  position: absolute;
  top: 9px;
  z-index: 5;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(4, 24, 47, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff !important;
  border-radius: 999px;
  padding: 6px 7px;
  margin: 0 !important;
  font:
    800 7px/1 ui-monospace,
    monospace !important;
  letter-spacing: 0.08em !important;
}
#atlas .projectCard .cardTop .projectNo {
  left: 9px;
  color: var(--gold2) !important;
}
#atlas .projectCard .cardTop .year {
  right: 9px;
  color: #dce5ed !important;
}
#atlas .projectCard .miniUI {
  display: block !important;
  grid-column: 1 !important;
  grid-row: 1/4 !important;
  width: 132px !important;
  height: 84px !important;
  min-height: 84px !important;
  align-self: center;
  margin: 0 !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  border: 1px solid rgba(8, 41, 78, 0.1) !important;
  box-shadow: 0 8px 24px rgba(7, 29, 52, 0.1);
  transform: translateZ(0);
  transition:
    transform 0.32s var(--ease),
    box-shadow 0.32s var(--ease) !important;
  background: linear-gradient(145deg, #06172d 0%, #0a2c53 58%, #0e3c6d 100%) !important;
}
#atlas .projectCard:hover .miniUI {
  transform: scale(1.045) translateZ(0);
  box-shadow: 0 14px 30px rgba(7, 29, 52, 0.17);
}
#atlas .projectCard .miniUI:before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 13px 13px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 82%);
}
#atlas .projectCard .miniUI:after {
  width: 108px !important;
  height: 108px !important;
  right: -32px !important;
  top: -46px !important;
  opacity: 0.95;
}
#atlas .projectCard .uiBar {
  height: 19px !important;
  padding: 0 7px !important;
  gap: 3px !important;
  position: relative;
  z-index: 2;
}
#atlas .projectCard .uiBar i {
  width: 3px !important;
  height: 3px !important;
}
#atlas .projectCard .uiBody {
  height: 54px !important;
  padding: 6px !important;
  gap: 5px !important;
  grid-template-columns: 0.27fr 0.73fr !important;
  position: relative;
  z-index: 2;
}
#atlas .projectCard .uiSide,
#atlas .projectCard .uiMain b {
  border-radius: 4px !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.055) !important;
}
#atlas .projectCard .uiMain {
  gap: 4px !important;
}
#atlas .projectCard .pulse {
  width: 5px !important;
  height: 5px !important;
  right: 9px !important;
  top: 7px !important;
  z-index: 4;
}
#atlas .projectCard .thumbMeta {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 6px;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}
#atlas .projectCard .thumbMeta span {
  font:
    800 5.5px/1 ui-monospace,
    monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(221, 232, 241, 0.6);
  max-width: 46%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#atlas .projectCard .thumbMeta strong {
  font-size: 7px;
  line-height: 1;
  font-weight: 820;
  color: #fff;
  max-width: 52%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: right;
}
/* Give the tiny previews different visual signatures while staying inside the Biters palette. */
#atlas .miniUI.fintech .uiMain b:first-child {
  background: linear-gradient(
    135deg,
    rgba(210, 184, 122, 0.3),
    rgba(255, 255, 255, 0.04)
  ) !important;
}
#atlas .miniUI.ai .uiMain b:nth-child(2) {
  box-shadow:
    inset 0 0 0 1px rgba(126, 159, 197, 0.25),
    0 0 13px rgba(126, 159, 197, 0.12);
}
#atlas .miniUI.iot .uiSide {
  background: radial-gradient(circle at 50% 35%, rgba(107, 165, 139, 0.35) 0 8%, transparent 9%),
    rgba(255, 255, 255, 0.04) !important;
}
#atlas .miniUI.learning .uiMain b:nth-child(3) {
  background: linear-gradient(
    90deg,
    rgba(201, 157, 106, 0.28) 38%,
    rgba(255, 255, 255, 0.045) 38%
  ) !important;
}
#atlas .miniUI.mobile .uiSide {
  border-radius: 7px !important;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.035);
}

#atlas .projectCard .chips {
  grid-column: 2 !important;
  grid-row: 1 !important;
}
#atlas .projectCard h3 {
  grid-column: 2 !important;
  grid-row: 2 !important;
}
#atlas .projectCard h4 {
  grid-column: 2 !important;
  grid-row: 3 !important;
}
#atlas .projectCard p {
  grid-column: 3 !important;
  grid-row: 1/4 !important;
}
#atlas .projectCard .cardFoot {
  grid-column: 4 !important;
  grid-row: 1/4 !important;
}

@media (max-width: 1050px) {
  #atlas .projectCard > a {
    grid-template-columns: 112px 1fr 1.18fr !important;
    column-gap: 17px !important;
  }
  #atlas .projectCard .miniUI {
    width: 112px !important;
    height: 76px !important;
    min-height: 76px !important;
  }
  #atlas .projectCard .cardTop {
    grid-column: 1 !important;
    grid-row: 1/4 !important;
  }
  #atlas .projectCard .chips,
  #atlas .projectCard h3,
  #atlas .projectCard h4 {
    grid-column: 2 !important;
  }
  #atlas .projectCard p {
    grid-column: 3 !important;
    grid-row: 1/4 !important;
  }
  #atlas .projectCard .cardFoot {
    grid-column: 2/4 !important;
    grid-row: 4 !important;
    margin-top: 9px !important;
  }
}
@media (max-width: 760px) {
  #atlas .projectCard > a {
    grid-template-columns: 92px 1fr !important;
    grid-template-rows: auto auto auto auto auto !important;
    gap: 5px 14px !important;
    padding: 19px 8px !important;
  }
  #atlas .projectCard .miniUI {
    grid-column: 1 !important;
    grid-row: 1/5 !important;
    width: 92px !important;
    height: 72px !important;
    min-height: 72px !important;
    align-self: start !important;
  }
  #atlas .projectCard .cardTop {
    grid-column: 1 !important;
    grid-row: 1/5 !important;
  }
  #atlas .projectCard .cardTop .projectNo,
  #atlas .projectCard .cardTop .year {
    padding: 5px 6px !important;
    font-size: 6px !important;
    top: 7px !important;
  }
  #atlas .projectCard .cardTop .projectNo {
    left: 7px !important;
  }
  #atlas .projectCard .cardTop .year {
    right: 7px !important;
  }
  #atlas .projectCard .thumbMeta span {
    display: none;
  }
  #atlas .projectCard .thumbMeta strong {
    max-width: 100%;
    font-size: 6.5px;
  }
  #atlas .projectCard .chips,
  #atlas .projectCard h3,
  #atlas .projectCard h4,
  #atlas .projectCard p,
  #atlas .projectCard .cardFoot {
    grid-column: 2 !important;
  }
  #atlas .projectCard .chips {
    grid-row: 1 !important;
  }
  #atlas .projectCard h3 {
    grid-row: 2 !important;
  }
  #atlas .projectCard h4 {
    grid-row: 3 !important;
  }
  #atlas .projectCard p {
    grid-row: 4 !important;
    margin-top: 7px !important;
  }
  #atlas .projectCard .cardFoot {
    grid-row: 5 !important;
    margin-top: 9px !important;
  }
}
@media (max-width: 460px) {
  #atlas .projectCard > a {
    grid-template-columns: 80px 1fr !important;
    gap: 5px 11px !important;
  }
  #atlas .projectCard .miniUI {
    width: 80px !important;
    height: 66px !important;
    min-height: 66px !important;
  }
  #atlas .projectCard .uiBody {
    height: 45px !important;
  }
}

/* Project cover in the row thumbnail; the mini UI stays underneath for projects without one */
.projectCard .projImg {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.projectCard .projImg ~ .thumbMeta,
.projectCard .projImg ~ .pulse {
  display: none !important;
}
/* "Progetti chiave": the project cover inside the glass browser window */
.glassBrowser .gbImg {
  display: block;
  width: 100%;
  height: calc(100% - 42px);
  object-fit: cover;
  object-position: 50% 0;
  background: #fff;
}
.glassBrowser .gbImg + .gbBody {
  display: none;
}
/* the panel image is already a device mockup: drop the glass window chrome around it */
.glassBrowser:has(.gbImg) {
  height: auto;
  background: none;
  border: 0;
  backdrop-filter: none;
  box-shadow: 0 42px 70px rgba(0, 0, 0, 0.34);
}
.glassBrowser:has(.gbImg) .gbTop {
  display: none;
}
.glassBrowser .gbImg {
  height: auto;
  border-radius: 20px;
}
/* room for the descenders of the big title (PayFlow, Prodigy…) above the subtitle */
.featureCase h3 {
  margin-bottom: 16px;
}
