/* HERO — Digital Lab 2.0, same composition */
.page-home .hero {
  background: radial-gradient(circle at 78% 38%, rgba(8, 41, 78, 0.055), transparent 28%),
    linear-gradient(180deg, #fff 0%, #fbfcfd 76%, #f5f7f9 100%);
}
/* the hero lab is now the isometric stack: see BITERS 3D at the end of this file */
.page-home .labBit {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.35;
  box-shadow: 0 0 12px rgba(166, 142, 93, 0.35);
  animation: wowBitFloat var(--dur, 7s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes wowBitFloat {
  50% {
    transform: translate3d(var(--dx, 8px), var(--dy, -12px), 0) scale(1.35);
    opacity: 0.75;
  }
}

/* service bento feels more physical without changing grid */
.page-home .tile {
  transition:
    transform 0.45s var(--wow-ease),
    box-shadow 0.45s,
    border-color 0.45s;
}
.page-home .tile:hover {
  transform: translateY(-8px) scale(1.008);
}
.page-home .tile.dark:after {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  right: -100px;
  top: -100px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow:
    0 0 0 48px rgba(255, 255, 255, 0.018),
    0 0 0 96px rgba(255, 255, 255, 0.012);
  pointer-events: none;
}

/* preserve the selected-work layout; make it more cinematic */
.page-home .case {
  counter-increment: casewow;
}
.page-home .casesStage {
  counter-reset: casewow;
}
.page-home .caseStamp {
  position: absolute;
  right: 24px;
  top: 21px;
  z-index: 5;
  font:
    800 8px/1 ui-monospace,
    monospace;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.46);
}
.page-home .caseStamp b {
  color: var(--gold2);
  font-size: 10px;
}
.page-home .case:after {
  content: attr(data-wow-index);
  position: absolute;
  right: 2.5%;
  bottom: -4%;
  font-size: clamp(130px, 17vw, 250px);
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.08em;
  color: rgba(255, 255, 255, 0.025);
  pointer-events: none;
  z-index: 1;
}
.page-home .case .browser,
.page-home .case .phoneMock {
  transition:
    transform 0.65s var(--wow-ease),
    filter 0.65s;
}
.page-home .case.case-active .browser {
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.2));
}
.page-home .case.case-active .widget {
  animation: wowWidgetIn 0.7s var(--wow-ease) both;
}
.page-home .case.case-active .widget:nth-child(2) {
  animation-delay: 0.08s;
}
.page-home .case.case-active .widget:nth-child(3) {
  animation-delay: 0.16s;
}
@keyframes wowWidgetIn {
  from {
    opacity: 0.25;
    transform: translateY(8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* AI: a subtle scanning line */
.page-home .terminal {
  position: relative;
  isolation: isolate;
}
.page-home .terminal:after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -2px;
  height: 1px;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--gold2), transparent);
  opacity: 0;
}
.page-home .terminal.running:after {
  animation: wowScan 2.4s ease 1;
  opacity: 0.75;
}
@keyframes wowScan {
  from {
    top: 48px;
  }
  to {
    top: 100%;
  }
}

/* process: gold signal travels down on hover */
.page-home .step {
  position: relative;
  overflow: hidden;
}
.page-home .step:after {
  content: '';
  position: absolute;
  left: -1px;
  top: 0;
  width: 2px;
  height: 0;
  background: linear-gradient(var(--gold2), transparent);
  transition: height 0.45s var(--wow-ease);
}
.page-home .step:hover:after {
  height: 100%;
}

@media (max-width: 720px) {
  .page-home .labBit {
    display: none;
  }
  .page-home .case:after {
    font-size: 115px;
  }
}

/* =========================================================
   HOME / REAL USE CASES
   Keeps the approved sticky-card language, improves meaning.
   ========================================================= */
.casesUseCase {
  padding-top: 112px;
}
.casesUseCaseHead {
  margin-bottom: 34px;
}
.useCaseMap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, #fff, #f7f9fb);
  padding: 28px 30px;
  display: grid;
  grid-template-columns: 1.05fr 2fr auto;
  gap: 26px;
  align-items: center;
  margin-bottom: 54px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(8, 41, 78, 0.055);
}
.useCaseMap:after {
  content: '';
  position: absolute;
  right: -120px;
  top: -160px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(166, 142, 93, 0.12), transparent 68%);
  pointer-events: none;
}
.useCaseMapIntro,
.useCaseDomains,
.useCaseMapLink {
  position: relative;
  z-index: 1;
}
.useCaseMapIntro > span {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--gold);
}
.useCaseMapIntro strong {
  display: block;
  margin-top: 11px;
  font-size: 19px;
  line-height: 1.22;
  letter-spacing: -0.02em;
}
.useCaseMapIntro em {
  font-style: normal;
  color: var(--gold);
}
.useCaseDomains {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.useCaseDomain {
  min-height: 72px;
  border: 1px solid #e4e9ee;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.78);
  padding: 11px 12px;
  transition: 0.3s var(--ease);
}
.useCaseDomain:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(8, 41, 78, 0.07);
  border-color: rgba(166, 142, 93, 0.28);
}
.useCaseDomain b {
  font:
    800 8px/1 ui-monospace,
    monospace;
  color: var(--gold);
  letter-spacing: 0.12em;
}
.useCaseDomain span {
  display: block;
  font-size: 10.5px;
  line-height: 1.23;
  font-weight: 760;
  color: #344a62;
  margin-top: 7px;
}
.useCaseMapLink {
  font-size: 11px;
  font-weight: 850;
  color: var(--navy);
  white-space: nowrap;
}
.useCaseMapLink span {
  color: var(--gold);
  margin-left: 7px;
}

.useCaseReal .caseIn {
  grid-template-columns: 0.93fr 1.07fr;
  gap: 44px;
}
.useCaseReal .caseMeta {
  justify-content: center;
}
.useCaseReal .caseIntro {
  font-size: 15px;
  line-height: 1.62;
  max-width: 540px;
  margin-bottom: 23px;
}
.caseNarrative {
  display: grid;
  gap: 9px;
  margin-top: 20px;
}
.caseNarrative > div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.caseNarrative b {
  font:
    800 8px/1.3 ui-monospace,
    monospace;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gold2);
}
.caseNarrative span {
  font-size: 11px;
  line-height: 1.52;
  color: #d0dae3;
}
.caseProof {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 23px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.caseProof > span {
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: #8397aa;
}
.caseProof a {
  font-size: 11px;
  font-weight: 850;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.caseProof a i {
  font-style: normal;
  color: var(--gold2);
  width: 27px;
  height: 27px;
  border: 1px solid rgba(210, 184, 122, 0.35);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: 0.25s;
}
.caseProof a:hover i {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
  transform: translate(2px, -2px);
}

.semanticBrowser {
  height: 410px;
}
.semanticBrowser .browserTop span {
  margin-left: auto;
  font:
    700 7px/1 ui-monospace,
    monospace;
  letter-spacing: 0.12em;
  color: #8497aa;
}
.semanticScreen {
  grid-template-columns: 0.22fr 0.78fr;
  padding: 14px;
}
.semanticSide {
  padding: 12px;
}
.semanticSide strong {
  font:
    850 8px/1 ui-monospace,
    monospace;
  letter-spacing: 0.12em;
  color: #d9e1e8;
  display: block;
  margin-bottom: 20px;
}
.semanticSide i {
  height: 6px !important;
  margin: 12px 0 !important;
}
.caseVisualLabel {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  font-size: 7.5px;
  letter-spacing: 0.16em;
  color: #8fa1b1;
  white-space: nowrap;
}

/* PayFlow visual */
.payflowUI {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  grid-template-rows: 86px 72px 1fr !important;
  gap: 10px !important;
}
.ucMetric,
.ucFlow,
.ucChart {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  position: relative;
  overflow: hidden;
}
.ucMetric {
  padding: 12px;
}
.ucMetric small {
  font:
    750 7px/1 ui-monospace,
    monospace;
  letter-spacing: 0.1em;
  color: #8294a6;
}
.ucMetric strong {
  display: block;
  font-size: 25px;
  margin-top: 9px;
}
.ucMetric em {
  position: absolute;
  right: 10px;
  top: 10px;
  font:
    800 6px/1 ui-monospace,
    monospace;
  font-style: normal;
  color: var(--gold2);
}
.ucFlow {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.ucFlow span {
  font:
    800 7px/1 ui-monospace,
    monospace;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #d9e3ec;
}
.ucFlow i {
  font-style: normal;
  color: var(--gold2);
}
.ucChart {
  grid-column: 1/-1;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
}
.ucChart i {
  position: absolute;
  left: 8%;
  right: 7%;
  bottom: 20%;
  height: 46%;
  background: linear-gradient(180deg, rgba(210, 184, 122, 0.35), rgba(210, 184, 122, 0.02));
  clip-path: polygon(
    0 82%,
    15% 58%,
    28% 72%,
    41% 39%,
    55% 51%,
    70% 14%,
    82% 34%,
    100% 4%,
    100% 100%,
    0 100%
  );
}

/* DBDoc visual */
.docFlowUI {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 56px;
  bottom: 14px;
  display: grid;
  grid-template-columns: 1.1fr 0.18fr 0.9fr 0.18fr 0.9fr;
  gap: 10px;
  align-items: center;
}
.docPile {
  height: 235px;
  position: relative;
}
.docCard {
  position: absolute;
  width: 145px;
  height: 190px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.045));
  padding: 15px;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.18);
}
.docCard b {
  font:
    850 9px/1 ui-monospace,
    monospace;
  color: #cbbfff;
}
.docCard i {
  display: block;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.11);
  margin: 13px 0;
}
.docCard i:nth-of-type(2) {
  width: 68%;
}
.docCard.d1 {
  left: 3px;
  top: 28px;
  transform: rotate(-9deg);
}
.docCard.d2 {
  left: 31px;
  top: 12px;
  transform: rotate(1deg);
}
.docCard.d3 {
  left: 58px;
  top: 31px;
  transform: rotate(9deg);
}
.docArrow {
  text-align: center;
  color: #b8a9ff;
  font-size: 22px;
}
.aiExtract,
.workflowBox {
  height: 210px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.035);
  padding: 16px;
}
.aiExtract small,
.workflowBox small {
  font:
    800 7px/1 ui-monospace,
    monospace;
  color: #b7aaff;
  letter-spacing: 0.1em;
}
.aiExtract strong {
  display: block;
  font-size: 35px;
  margin-top: 24px;
  color: #eeeaff;
}
.extractRows {
  margin-top: 20px;
}
.extractRows i {
  display: block;
  height: 20px;
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(183, 170, 255, 0.18), rgba(255, 255, 255, 0.035));
  margin: 7px 0;
}
.workflowBox span {
  display: block;
  margin-top: 17px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  font:
    700 8px/1 ui-monospace,
    monospace;
  color: #b7c4d2;
}

/* AgriFlow visual */
.agriUI {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 56px;
  bottom: 14px;
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 10px;
}
.agriMap {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 13px;
  background: #0b2b34;
  overflow: hidden;
}
.fieldPlot {
  position: absolute;
  border: 1px solid rgba(137, 187, 113, 0.32);
  background: rgba(112, 164, 96, 0.08);
  transform: rotate(-8deg);
}
.fieldPlot.p1 {
  left: 8%;
  top: 14%;
  width: 42%;
  height: 31%;
  clip-path: polygon(7% 0, 100% 12%, 88% 100%, 0 78%);
}
.fieldPlot.p2 {
  left: 46%;
  top: 36%;
  width: 44%;
  height: 32%;
  clip-path: polygon(12% 0, 100% 10%, 84% 100%, 0 77%);
}
.fieldPlot.p3 {
  left: 13%;
  top: 61%;
  width: 37%;
  height: 26%;
  clip-path: polygon(0 10%, 90% 0, 100% 88%, 13% 100%);
}
.agriPin {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold2);
  box-shadow: 0 0 0 6px rgba(210, 184, 122, 0.08);
}
.agriPin.a1 {
  left: 23%;
  top: 47%;
}
.agriPin.a2 {
  left: 52%;
  top: 43%;
}
.agriPin.a3 {
  left: 77%;
  top: 34%;
}
.agriMapTag {
  position: absolute;
  font:
    800 6px/1 ui-monospace,
    monospace;
  letter-spacing: 0.08em;
  color: #bbd0bd;
  background: rgba(5, 25, 34, 0.65);
  padding: 6px 8px;
  border-radius: 999px;
}
.agriMapTag.t1 {
  left: 8%;
  top: 7%;
}
.agriMapTag.t2 {
  right: 7%;
  bottom: 8%;
}
.agriDash {
  display: grid;
  gap: 8px;
}
.agriDash > div {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
}
.agriDash small {
  font:
    750 7px/1 ui-monospace,
    monospace;
  color: #81949f;
}
.agriDash strong {
  display: block;
  font-size: 24px;
  margin-top: 8px;
}
.agriSync b {
  display: block;
  font:
    850 10px/1 ui-monospace,
    monospace;
  color: #98c899;
  margin-top: 13px;
}
.agriPhone {
  right: -1%;
  bottom: 20px;
  width: 158px;
  height: 315px;
}
.agriPhone:after {
  display: none;
}
.agriPhoneInner {
  position: absolute;
  inset: 19px 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, #0d3b44, #071b27);
  padding: 22px 14px;
  color: #fff;
}
.agriPhoneInner small {
  font:
    800 7px/1 ui-monospace,
    monospace;
  color: var(--gold2);
}
.agriPhoneInner b {
  display: block;
  font-size: 13px;
  line-height: 1.25;
  margin: 14px 0 20px;
}
.agriPhoneInner i {
  display: block;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  margin: 8px 0;
}

.portfolioBridge {
  margin-top: 36px;
  border-radius: 30px;
  background: radial-gradient(circle at 84% 24%, rgba(210, 184, 122, 0.28), transparent 25%),
    linear-gradient(120deg, #06182f, #0b355f);
  color: #fff;
  padding: 48px 52px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 58px;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(5, 25, 47, 0.13);
}
.portfolioBridge:before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 27px 27px;
  mask-image: linear-gradient(90deg, transparent, #000 55%);
  pointer-events: none;
}
.portfolioBridgeCopy,
.portfolioBridgeAction {
  position: relative;
  z-index: 1;
}
.portfolioBridge h3 {
  font-size: clamp(42px, 4.8vw, 66px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  margin: 15px 0 18px;
}
.portfolioBridge h3 span {
  color: var(--gold2);
}
.portfolioBridge p {
  font-size: 13px;
  line-height: 1.72;
  color: #b9c7d4;
  max-width: 660px;
}
.portfolioBridgeAction {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}
.portfolioTags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.portfolioTags span {
  font:
    750 8px/1 ui-monospace,
    monospace;
  letter-spacing: 0.08em;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  color: #aebdca;
  background: rgba(255, 255, 255, 0.035);
}
.portfolioSecondary {
  font-size: 11px;
  font-weight: 780;
  color: #c8d3dd;
}
.portfolioSecondary:hover {
  color: #fff;
}

@media (max-width: 1050px) {
  .useCaseMap {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .useCaseDomains {
    grid-template-columns: repeat(3, 1fr);
  }
  .useCaseReal .caseIn {
    grid-template-columns: 1fr;
  }
  .caseVisualLabel {
    bottom: 8px;
  }
  .portfolioBridge {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
@media (max-width: 720px) {
  .casesUseCase {
    padding-top: 76px;
  }
  .useCaseMap {
    padding: 22px 18px;
    margin-bottom: 34px;
    border-radius: 22px;
  }
  .useCaseDomains {
    grid-template-columns: 1fr 1fr;
  }
  .useCaseDomain {
    min-height: 65px;
  }
  .useCaseReal .caseIn {
    padding: 26px !important;
  }
  .useCaseReal .caseIntro {
    font-size: 13px;
  }
  .caseNarrative > div {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 10px 0;
  }
  .caseNarrative span {
    font-size: 10.5px;
  }
  .caseProof {
    align-items: flex-start;
    flex-direction: column;
  }
  .semanticBrowser {
    height: 270px !important;
  }
  .caseVisual {
    min-height: 290px !important;
  }
  .semanticScreen {
    grid-template-columns: 0.18fr 0.82fr;
    padding: 8px;
  }
  .payflowUI {
    grid-template-rows: 70px 58px 1fr !important;
  }
  .ucMetric strong {
    font-size: 20px;
  }
  .ucFlow {
    gap: 3px;
  }
  .ucFlow span {
    font-size: 5.5px;
    padding: 6px;
  }
  .docFlowUI {
    left: 8px;
    right: 8px;
    top: 48px;
    bottom: 8px;
    grid-template-columns: 1fr 0.12fr 0.75fr;
  }
  .docPile {
    height: 170px;
  }
  .docCard {
    width: 98px;
    height: 135px;
    padding: 10px;
  }
  .docCard.d1 {
    left: 0;
  }
  .docCard.d2 {
    left: 20px;
  }
  .docCard.d3 {
    left: 39px;
  }
  .workflowBox,
  .docFlowUI > .docArrow:nth-of-type(2) {
    display: none;
  }
  .aiExtract {
    height: 155px;
    padding: 11px;
  }
  .aiExtract strong {
    font-size: 28px;
    margin-top: 15px;
  }
  .extractRows i {
    height: 14px;
    margin: 5px 0;
  }
  .agriUI {
    grid-template-columns: 1fr;
  }
  .agriDash {
    display: none;
  }
  .agriPhone {
    display: block !important;
    width: 112px;
    height: 230px;
    right: -3%;
    bottom: 5px;
  }
  .agriPhoneInner {
    inset: 14px 8px;
    padding: 16px 9px;
  }
  .agriPhoneInner i {
    height: 27px;
  }
  .portfolioBridge {
    padding: 34px 24px;
    border-radius: 24px;
  }
  .portfolioBridge h3 {
    font-size: 43px;
  }
}
@media (max-width: 420px) {
  .useCaseDomains {
    grid-template-columns: 1fr;
  }
  .caseVisualLabel {
    font-size: 6px;
  }
  .portfolioBridge h3 {
    font-size: 39px;
  }
}

/* =========================================================
   Layout fixes
   ========================================================= */
@media (max-width: 480px) {
  /* The use-case kicker is wider than a 320px screen with the default tracking. */
  section.casesUseCase .casesUseCaseHead .kicker {
    letter-spacing: 0.14em !important; /* polish.css forces 0.2em !important on small screens */
    gap: 9px;
  }
  .casesUseCaseHead {
    grid-template-columns: minmax(0, 1fr);
  }
  /* PayFlow mock: drop the decorative sidebar so the metrics stay readable. */
  .semanticScreen {
    grid-template-columns: 1fr;
  }
  .semanticSide {
    display: none;
  }
  .ucMetric {
    padding: 9px;
  }
  .ucMetric strong {
    font-size: 18px;
  }
}

/* Hero: the generic `section { padding: 110px 0 }` was adding to the hero's own top spacing,
   leaving a large empty band under the menu. Keep only the hero's spacing. */
.page-home .hero {
  padding-top: 0;
  align-items: flex-start;
}
.page-home .heroGrid {
  padding-top: 144px;
}
@media (max-width: 720px) {
  .page-home .heroGrid {
    padding-top: 126px;
  }
}
/* the bite mark sits in the top-right corner: corner labels make room for it */
.page-home .tile .num,
.page-home .caseStamp {
  right: 60px;
}

/* =========================================================
   BITERS 3D — exploded isometric stack in the hero
   The four layers of a product (Cloud, Software, AI, App) as 3D slabs
   linked to the hero cards. Markup: .stackRig + .stackLinks inside #lab.
   Needs biters-3d.css (shared engine) loaded before this file: it holds
   the 3D entrances, the card tilt and the case scenes (.b3Scene).
   ========================================================= */
.page-home .lab {
  --sv: 194;
  --thv: 14;
  --s: calc(var(--sv) * 1px);
  --th: calc(var(--thv) * 1px);
  perspective: 2000px;
  perspective-origin: 50% 47%;
  transform-style: flat;
  transition:
    opacity 1.1s var(--ease),
    transform 1.1s var(--ease);
}
.stackRig {
  position: absolute;
  left: 50%;
  top: 47%;
  width: var(--s);
  height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  transform-style: preserve-3d;
  transform-origin: 50% 50% calc(var(--s) * 0.5);
  transform: rotateX(57deg) rotateZ(-45deg);
  --gapv: calc(var(--sv) * 0.29);
  --gap: calc(var(--gapv) * 1px);
}

/* ground: blueprint grid, soft shadow, scan pulse, engraved brand tag */
.stackFloor {
  position: absolute;
  left: -75%;
  top: -75%;
  width: 250%;
  height: 250%;
  transform: translateZ(-2px);
  pointer-events: none;
  background-image:
    linear-gradient(rgba(8, 41, 78, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 41, 78, 0.15) 1px, transparent 1px);
  background-size: calc(var(--s) / 7) calc(var(--s) / 7);
  background-position: center;
  -webkit-mask-image: radial-gradient(closest-side, #000 25%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 25%, transparent 100%);
}
.stackShadow {
  position: absolute;
  left: -14%;
  top: -6%;
  width: 136%;
  height: 136%;
  transform: translateZ(-1px);
  pointer-events: none;
  background: radial-gradient(
    closest-side,
    rgba(4, 24, 47, 0.34),
    rgba(4, 24, 47, 0.12) 55%,
    transparent
  );
}
.stackPulse {
  position: absolute;
  left: -25%;
  top: -25%;
  width: 150%;
  height: 150%;
  border: 1px solid rgba(166, 142, 93, 0.6);
  border-radius: 50%;
  pointer-events: none;
  transform: translateZ(-1px) scale(0.45);
  opacity: 0;
  animation: stackPulse 4.2s ease-out infinite;
}
@keyframes stackPulse {
  0% {
    transform: translateZ(-1px) scale(0.45);
    opacity: 0.9;
  }
  100% {
    transform: translateZ(-1px) scale(1.2);
    opacity: 0;
  }
}
.stackTag {
  position: absolute;
  left: 0;
  top: calc(100% + 30px);
  width: 100%;
  transform: translateZ(-1px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font:
    800 8px/1 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  letter-spacing: 0.24em;
  color: rgba(8, 41, 78, 0.6);
  white-space: nowrap;
  pointer-events: none;
}
.stackTag.w {
  left: -34px;
  top: 0;
  width: var(--s);
  transform-origin: 0 0;
  transform: translateZ(-1px) rotateZ(90deg);
  letter-spacing: 0.3em;
  color: rgba(166, 142, 93, 0.85);
}
.page-home .lab .sideLegend {
  display: none;
}
.stackTag .coreGlyph {
  position: relative;
  left: auto;
  top: auto;
  flex: none;
  width: 56px;
  height: 48px;
  margin: -16px -12px -16px -14px;
  transform: scale(0.5);
  filter: none;
}

/* slabs: top face + two visible sides, stacked with a live gap */
.slab {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--i) * var(--gap)));
  translate: 0 0 0;
  transition: translate 0.5s var(--ease);
  animation: slabDrop 1.2s var(--ease) backwards;
  animation-delay: calc(0.2s + var(--i) * 0.13s);
}
.slab.l1 {
  --i: 0;
}
.slab.l2 {
  --i: 1;
}
.slab.l3 {
  --i: 2;
}
.slab.l4 {
  --i: 3;
}
.slab.is-hot {
  translate: 0 0 16px;
}
@keyframes slabDrop {
  from {
    translate: 0 0 300px;
  }
}
.slab .face {
  position: absolute;
  inset: 0;
  transform: translateZ(var(--th));
  border-radius: 5px;
  overflow: hidden;
  background: linear-gradient(135deg, #0e3c69 0%, #08294e 48%, #051c37 100%);
  border: 1px solid rgba(210, 184, 122, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    border-color 0.35s,
    box-shadow 0.35s;
  animation: faceIn 0.9s ease backwards;
  animation-delay: inherit;
}
.slab.light .face {
  background: linear-gradient(135deg, #fff 0%, #f3f6f9 60%, #e8edf2 100%);
  border-color: rgba(166, 142, 93, 0.55);
}
.slab .side {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: var(--th);
  transform-origin: 0 0;
  border-bottom: 1px solid rgba(210, 184, 122, 0.6);
  animation: faceIn 0.9s ease backwards;
  animation-delay: inherit;
}
.slab .side.s {
  transform: translateY(var(--s)) rotateX(90deg);
  background: linear-gradient(90deg, #0b3157, #061b35);
}
.slab .side.w {
  transform: rotateZ(90deg) rotateX(90deg);
  background: linear-gradient(90deg, #041327, #08264a);
}
.slab.light .side.s {
  background: linear-gradient(90deg, #dfe5eb, #c6cfd9);
}
.slab.light .side.w {
  background: linear-gradient(90deg, #b4bfcb, #cfd6de);
}
.slab.is-hot .face {
  border-color: rgba(210, 184, 122, 0.95);
  box-shadow:
    inset 0 0 0 1px rgba(210, 184, 122, 0.45),
    inset 0 0 46px rgba(210, 184, 122, 0.22);
}
@keyframes faceIn {
  from {
    opacity: 0;
  }
}

/* layer contents (blueprint-style, lying on each slab) */
.lyLabel {
  position: absolute;
  left: 12px;
  top: 11px;
  font:
    800 7.5px/1 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  letter-spacing: 0.2em;
  color: var(--gold2);
}
.slab.light .lyLabel {
  color: var(--gold);
}
.lyRacks {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 30px;
  bottom: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.lyRacks i {
  position: relative;
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.lyRacks i:before,
.lyRacks i:after {
  content: '';
  position: absolute;
  left: 8px;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold2);
  animation: lyBlink 2.4s ease-in-out infinite;
}
.lyRacks i:after {
  top: 18px;
  background: #7fc89a;
  animation-delay: -1.2s;
}
.lyRacks i:nth-child(2n):before {
  animation-delay: -0.7s;
}
.lyRacks i:nth-child(3n):after {
  animation-delay: -1.9s;
}
@keyframes lyBlink {
  50% {
    opacity: 0.2;
  }
}
.lyCode {
  position: absolute;
  left: 14px;
  top: 34px;
  width: 44%;
  display: grid;
  gap: 10px;
}
.lyCode i {
  display: block;
  height: 6px;
  border-radius: 9px;
  background: #c9d2dc;
}
.lyCode i:nth-child(1) {
  width: 82%;
}
.lyCode i:nth-child(2) {
  width: 55%;
  background: var(--gold);
}
.lyCode i:nth-child(3) {
  width: 94%;
}
.lyCode i:nth-child(4) {
  width: 40%;
}
.lyCode i:nth-child(5) {
  width: 72%;
  background: #8fa0b3;
}
.lyCode i:nth-child(6) {
  width: 50%;
}
.lyWin {
  position: absolute;
  right: 14px;
  top: 32px;
  width: 38%;
  bottom: 14px;
  border-radius: 8px;
  border: 1px solid rgba(8, 41, 78, 0.14);
  background: linear-gradient(180deg, #fff, #eef2f6);
}
.lyWin:before {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  top: 8px;
  height: 30%;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--navy), #0c355f);
}
.lyWin:after {
  content: '';
  position: absolute;
  left: 8px;
  right: 32%;
  bottom: 10px;
  height: 6px;
  border-radius: 9px;
  background: var(--gold);
}
.lyNet {
  position: absolute;
  left: 10px;
  top: 26px;
  width: calc(100% - 20px);
  height: calc(100% - 36px);
}
.lyNet line {
  stroke: rgba(210, 184, 122, 0.38);
  stroke-width: 0.7;
}
.lyNet circle {
  fill: #d2b87a;
  animation: lyBlink 2.6s ease-in-out infinite;
}
.lyPhones {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 30px;
  bottom: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 9px;
}
.lyPhones i {
  position: relative;
  width: 27%;
  height: 86%;
  border-radius: 10px;
  border: 2px solid #0b2b4e;
  background: linear-gradient(180deg, #0e3c66 0 32%, #f4f6f9 32%);
}
.lyPhones i:nth-child(2) {
  height: 100%;
}
.lyPhones i:before {
  content: '';
  position: absolute;
  left: 14%;
  right: 14%;
  top: 44%;
  height: 7%;
  border-radius: 9px;
  background: #c9d2dc;
  box-shadow: 0 12px 0 #dde3ea;
}
.lyPhones i:after {
  content: '';
  position: absolute;
  left: 14%;
  right: 40%;
  bottom: 9%;
  height: 7%;
  border-radius: 9px;
  background: var(--gold);
}
.anchor {
  position: absolute;
  width: 2px;
  height: 2px;
  pointer-events: none;
}
.anchor.a-l {
  left: 0;
  top: 50%;
}
.anchor.a-r {
  left: 50%;
  bottom: 0;
}

/* data columns + packets rising through the stack */
.beam {
  position: absolute;
  left: var(--bx);
  top: var(--by);
  width: 2px;
  height: 100px;
  margin-left: -1px;
  pointer-events: none;
  transform-origin: 1px 0;
  transform: rotateZ(45deg) rotateX(90deg) scaleY(calc((3 * var(--gapv) + var(--thv) + 30) / 100));
  background: linear-gradient(
    180deg,
    rgba(210, 184, 122, 0.05),
    rgba(210, 184, 122, 0.65) 50%,
    rgba(210, 184, 122, 0.05)
  );
}
.packet {
  position: absolute;
  left: var(--bx);
  top: var(--by);
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, #fff6da 0, #e2c98f 35%, rgba(210, 184, 122, 0) 70%);
  animation: packetRise 3.6s linear infinite;
  animation-delay: var(--d, 0s);
}
@keyframes packetRise {
  0% {
    transform: translateZ(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    transform: translateZ(calc(3 * var(--gap) + var(--th) + 26px));
    opacity: 0;
  }
}

/* cards become callouts linked to their layer */
.page-home .lab .fc2 {
  left: auto;
  right: -8px;
  top: 34px;
  bottom: auto;
  width: 166px;
}
.page-home .lab .fc3 {
  left: -8px;
  right: auto;
  top: 150px;
  bottom: auto;
  width: 172px;
}
.page-home .lab .fc1 {
  left: auto;
  right: -8px;
  top: auto;
  bottom: 118px;
  width: 168px;
}
.page-home .lab .fc4 {
  left: -8px;
  right: auto;
  top: auto;
  bottom: 22px;
  width: 168px;
}
.page-home .lab .floatingCard {
  transition:
    border-color 0.3s,
    box-shadow 0.3s,
    background 0.3s;
}
.page-home .lab .floatingCard.is-hot {
  border-color: rgba(210, 184, 122, 0.8);
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 26px 60px rgba(9, 35, 62, 0.2),
    0 0 0 3px rgba(210, 184, 122, 0.14);
}
.stackLinks {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.stackLinks path {
  fill: none;
  stroke: rgba(166, 142, 93, 0.85);
  stroke-width: 1.1;
  stroke-dasharray: 3 3;
  transition:
    stroke 0.3s,
    stroke-width 0.3s;
}
.stackLinks path.is-hot {
  stroke: #a68e5d;
  stroke-dasharray: none;
  stroke-width: 1.5;
}
.stackLinks circle {
  fill: #fff;
  stroke: #a68e5d;
  stroke-width: 1.4;
  transition: fill 0.3s;
}
.stackLinks circle.is-hot {
  fill: #d2b87a;
}

@media (max-width: 1050px) and (min-width: 721px) {
  .page-home .lab {
    --sv: 220;
  }
}
@media (max-width: 720px) {
  .page-home .lab {
    --sv: 140;
    --thv: 10;
    perspective: 1400px;
  }
  /* smartphone: all four cards, compact (label + title), one per layer */
  .page-home .lab .floatingCard {
    display: block;
    width: 136px;
    padding: 10px 12px;
    border-radius: 14px;
  }
  .page-home .lab .floatingCard .cap {
    font-size: 8px;
    margin-bottom: 5px;
  }
  .page-home .lab .floatingCard strong {
    font-size: 14px;
  }
  .page-home .lab .floatingCard small,
  .page-home .lab .floatingCard .signal {
    display: none;
  }
  .page-home .lab .fc3 .codeLine {
    font-size: 9px;
    line-height: 1.6;
  }
  .page-home .lab .fc2 {
    left: auto;
    right: 0;
    top: 4px;
    bottom: auto;
  }
  .page-home .lab .fc3 {
    left: 0;
    right: auto;
    top: 74px;
    bottom: auto;
  }
  .page-home .lab .fc1 {
    left: auto;
    right: 0;
    top: auto;
    bottom: 84px;
  }
  .page-home .lab .fc4 {
    left: 0;
    right: auto;
    top: auto;
    bottom: 8px;
  }
  .lyLabel {
    font-size: 6px;
    left: 9px;
    top: 8px;
  }
  .lyRacks,
  .lyPhones {
    top: 22px;
  }
  .lyCode {
    top: 26px;
    gap: 7px;
  }
  .lyWin {
    top: 24px;
  }
}

/* ---------- Service tiles: 3D tilt with parallax layers ---------- */
.page-home .tile.t3d.tilt-live {
  transition:
    box-shadow 0.45s var(--wow-ease),
    border-color 0.45s;
  box-shadow: calc(var(--mx, 0) * -18px) calc(26px + var(--my, 0) * -14px) 60px
    rgba(7, 32, 58, 0.16);
}
.tile.t3d h3 {
  translate: calc(var(--mx, 0) * 6px) calc(var(--my, 0) * 5px);
}
.tile.t3d p {
  translate: calc(var(--mx, 0) * 4px) calc(var(--my, 0) * 3px);
}
.tile.t3d .techPills,
.tile.t3d .aiPrompt {
  translate: calc(var(--mx, 0) * 9px) calc(var(--my, 0) * 7px);
}
.tile.t3d .networkViz {
  translate: calc(var(--mx, 0) * 14px) calc(var(--my, 0) * 10px);
}
.tile.t3d .miniDevice {
  translate: calc(var(--mx, 0) * 18px) calc(var(--my, 0) * 12px);
}

/* ---------- Case studies: screens in a 3D scene (.b3Scene from the engine) ---------- */
.case .b3Scene:before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(620px, 90%);
  height: 360px;
  border-radius: 24px;
  pointer-events: none;
  transform: translate(-50%, -50%) translateZ(-90px);
  background:
    radial-gradient(circle at 75% 25%, rgba(210, 184, 122, 0.22), transparent 55%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(210, 184, 122, 0.2);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.case .b3Scene .browser {
  transform: translateZ(0);
}
.case:hover .b3Scene .browser {
  transform: translateZ(26px);
}
.case .b3Scene .phoneMock {
  transform: translateZ(110px) rotate(8deg);
}
.case .b3Scene .caseVisualLabel {
  transform: translateX(-50%) translateZ(60px);
}
.caseShade {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  border-radius: inherit;
  background: #020b16;
  opacity: calc(var(--deck, 0) * 0.62);
}
@media (min-width: 1051px) and (prefers-reduced-motion: no-preference) {
  .page-home .casesStage > .case.reveal {
    transform-origin: 50% 100%;
    transform: perspective(1800px) rotateX(calc(var(--deck, 0) * 11deg))
      scale(calc(1 - var(--deck, 0) * 0.07));
    transition:
      opacity 1s var(--ease),
      translate 1s var(--ease),
      filter 0.45s ease;
  }
  .page-home .casesStage > .case.reveal:not(.visible) {
    translate: 0 40px;
  }
}
@media (max-width: 720px) {
  .case .b3Scene .phoneMock {
    transform: translateZ(60px) rotate(8deg);
  }
  .case .b3Scene:before {
    height: 240px;
  }
}

/* ---------- AI: terminal as a tilted screen ---------- */
.page-home .terminal.reveal.visible {
  box-shadow:
    -24px 34px 70px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
@media (max-width: 720px) {
  .page-home .terminal.t3d.reveal.visible {
    transform: perspective(1200px) rotateX(3deg) rotateY(-4deg) !important;
  }
}

/* ---------- Closing boxes: light tilt + content parallax ---------- */
.manifestoBox.t3d .manifestoText {
  translate: calc(var(--mx, 0) * 10px) calc(var(--my, 0) * 8px);
}
.payoffShell.t3d .payoffArt img {
  translate: calc(var(--mx, 0) * 16px) calc(var(--my, 0) * 12px);
}
.portfolioBridge.t3d .portfolioBridgeCopy {
  translate: calc(var(--mx, 0) * 8px) calc(var(--my, 0) * 6px);
}

/* ---------- Latest projects: 3D tilt ---------- */
.page-home .latestCard.t3d.tilt-live {
  transition:
    box-shadow 0.4s,
    border-color 0.4s;
  box-shadow: calc(var(--mx, 0) * -16px) calc(24px + var(--my, 0) * -12px) 56px
    rgba(8, 41, 78, 0.13);
}
.latestCard.t3d .latestBody h3 {
  translate: calc(var(--mx, 0) * 6px) calc(var(--my, 0) * 4px);
}
.latestCard.t3d .latestBody p {
  translate: calc(var(--mx, 0) * 4px) calc(var(--my, 0) * 3px);
}

/* ---------- H1 rotating words: drawn by CSS from data-w, so the heading text
   read by search engines is one clean sentence (the .sr-only phrase) ---------- */
.hero h1 .kinetic span::before {
  content: attr(data-w);
}
