/* Ai2Life cinematic depth system */

:root {
  --cinema-ink: #0b0e10;
  --cinema-panel: #151a1d;
  --cinema-paper: #f5f7f4;
  --cinema-mist: #dfe8e5;
  --cinema-teal: #35d6b4;
  --cinema-gold: #e8b642;
  --cinema-coral: #ff7258;
  --cinema-depth: 0 54px 120px rgba(0, 0, 0, 0.38);
  --cinema-soft-depth: 0 42px 100px rgba(11, 14, 16, 0.18);
}

.future-ui {
  letter-spacing: 0;
}

.future-ui .site-header {
  z-index: 100;
  background: rgba(11, 14, 16, 0.76);
  box-shadow: 0 22px 72px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(28px) saturate(155%);
}

.future-ui .site-header.is-scrolled {
  background: rgba(11, 14, 16, 0.94);
}

.future-ui .brand-mark img {
  filter: drop-shadow(0 12px 22px rgba(232, 182, 66, 0.18));
}

.home-page .cinematic-hero {
  position: relative;
  min-height: min(880px, calc(100svh - 20px));
  overflow: clip;
  isolation: isolate;
  background: var(--cinema-ink);
}

.home-page .cinematic-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.68;
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.2) 29%,
    #000 58%,
    #000 100%
  );
}

.home-page .cinematic-horizon {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.34;
}

.home-page .cinematic-horizon span {
  position: absolute;
  right: -8%;
  width: 58%;
  height: 1px;
  background: rgba(53, 214, 180, 0.42);
  transform-origin: center;
}

.home-page .cinematic-horizon span:nth-child(1) {
  top: 27%;
  transform: rotate(-8deg) translate3d(0, calc(var(--cinema-scroll, 0) * -38px), 0);
}

.home-page .cinematic-horizon span:nth-child(2) {
  top: 51%;
  right: -4%;
  width: 48%;
  background: rgba(232, 182, 66, 0.34);
  transform: rotate(5deg) translate3d(0, calc(var(--cinema-scroll, 0) * 26px), 0);
}

.home-page .cinematic-horizon span:nth-child(3) {
  top: 74%;
  right: 3%;
  width: 38%;
  transform: rotate(-3deg) translate3d(0, calc(var(--cinema-scroll, 0) * -18px), 0);
}

.home-page .cinematic-hero .hero-inner {
  position: relative;
  z-index: 3;
  min-height: min(808px, calc(100svh - 92px));
  padding-top: 116px;
  padding-bottom: 110px;
  grid-template-columns: minmax(0, 0.88fr) minmax(520px, 1.12fr);
  gap: 50px;
}

.home-page .cinematic-hero .hero-copy {
  align-self: center;
  max-width: 660px;
  transform: translate3d(0, calc(var(--cinema-scroll, 0) * 48px), 0);
  will-change: transform;
}

.home-page .cinematic-hero .eyebrow {
  color: var(--cinema-teal);
}

.home-page .cinematic-hero h1 {
  max-width: 700px;
  margin-top: 28px;
  font-size: clamp(66px, 6.3vw, 98px);
  line-height: 0.92;
  letter-spacing: 0;
}

.home-page .cinematic-hero .hero-title-accent {
  display: inline-block;
  color: var(--cinema-gold);
  transform: translate3d(calc(var(--cinema-scroll, 0) * -16px), 0, 0);
}

.home-page .cinematic-hero .hero-lede {
  max-width: 590px;
  margin-top: 34px;
  font-size: clamp(17px, 1.3vw, 21px);
  line-height: 1.7;
}

.home-page .cinematic-hero .hero-actions {
  margin-top: 34px;
}

.home-page .cinematic-hero .button-primary {
  min-height: 58px;
  padding-inline: 28px;
  box-shadow: 0 26px 62px rgba(232, 182, 66, 0.2);
}

.home-page .cinematic-hero .hero-assurance {
  margin-top: 36px;
}

.home-page .cinematic-hero .hero-app-stage {
  position: relative;
  align-self: stretch;
  min-height: 650px;
  overflow: visible;
  transform-style: preserve-3d;
  perspective: 1500px;
  transform:
    translate3d(0, calc(var(--cinema-scroll, 0) * -62px), 0)
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg));
  transition: transform 900ms cubic-bezier(0.18, 0.82, 0.2, 1);
  will-change: transform;
}

.home-page .cinematic-hero .hero-app-stage::before {
  display: block;
  content: "";
  position: absolute;
  inset: 15% -8% 8% 12%;
  z-index: -1;
  background: rgba(53, 214, 180, 0.035);
  box-shadow: inset 0 0 100px rgba(53, 214, 180, 0.05);
  clip-path: polygon(12% 0, 100% 8%, 88% 100%, 0 88%);
  transform: translateZ(-120px) rotate(-3deg);
}

.home-page .cinematic-hero .hero-brand-art {
  right: -118px;
  bottom: -30px;
  z-index: -1;
  width: 680px;
  opacity: 0.065;
  filter: saturate(130%);
  transform: translate3d(calc(var(--cinema-pointer-x, 0) * -18px), calc(var(--cinema-pointer-y, 0) * -12px), -160px) rotate(-5deg);
}

.home-page .cinematic-screen-echo {
  position: absolute;
  top: 126px;
  right: 66px;
  z-index: 0;
  width: 404px;
  max-height: 620px;
  object-fit: cover;
  object-position: top;
  opacity: 0.34;
  filter: blur(22px) saturate(155%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 78%, transparent 100%);
  transform: translate3d(46px, 30px, -70px) scale(1.08);
  animation: cinematic-echo 9s ease-in-out infinite alternate;
}

.home-page .cinematic-hero .hero-shiftworth-art {
  top: 98px;
  right: 120px;
  z-index: 3;
  width: 390px;
  max-height: 610px;
  object-fit: cover;
  object-position: top;
  border-radius: 7px;
  box-shadow: var(--cinema-depth);
  mask-image: linear-gradient(to bottom, #000 0%, #000 88%, transparent 100%);
  transform: translate3d(calc(var(--cinema-pointer-x, 0) * 8px), calc(var(--cinema-pointer-y, 0) * 7px), 56px) rotate(-1.5deg) scale(1.02);
  animation: cinematic-screen-drift 8s cubic-bezier(0.42, 0, 0.58, 1) infinite alternate;
  transition:
    opacity 500ms ease,
    filter 500ms ease;
}

.home-page .cinematic-foreground-icon {
  position: absolute;
  right: 404px;
  bottom: 50px;
  z-index: 7;
  width: 116px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 22%;
  box-shadow: 0 32px 74px rgba(0, 0, 0, 0.48);
  transform: translate3d(calc(var(--cinema-pointer-x, 0) * 22px), calc(var(--cinema-pointer-y, 0) * 18px), 150px) rotate(-7deg);
  transition: transform 800ms cubic-bezier(0.18, 0.82, 0.2, 1);
}

.home-page .cinematic-screen-echo.is-switching,
.home-page .cinematic-foreground-icon.is-switching {
  animation: cinematic-layer-switch 650ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.home-page .cinematic-hero .hero-stage-meta {
  top: 26px;
  left: 58px;
  z-index: 8;
  transform: translateZ(110px);
}

.home-page .cinematic-hero .hero-stage-meta strong {
  font-size: 30px;
}

.home-page .cinematic-hero .hero-stage-signal {
  top: 32px;
  right: 26px;
  z-index: 8;
  transform: translateZ(120px);
}

.home-page .cinematic-hero .hero-app-switch {
  right: 0;
  z-index: 9;
  width: 72px;
  height: 72px;
  transform: translateZ(130px);
  transition:
    transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 600ms ease,
    opacity 300ms ease;
}

.home-page .cinematic-hero .hero-app-switch:hover,
.home-page .cinematic-hero .hero-app-switch:focus-visible {
  transform: translate3d(-10px, 0, 155px) scale(1.08);
}

.home-page .cinematic-hero .hero-app-switch.is-active {
  transform: translate3d(-16px, 0, 170px) scale(1.08);
}

.home-page .cinematic-hero .hero-capabilities {
  position: relative;
  z-index: 7;
  height: 76px;
  background: rgba(21, 26, 29, 0.96);
  box-shadow: 0 -30px 80px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
}

.home-page .home-section-nav {
  position: sticky;
  top: 72px;
  z-index: 40;
  background: rgba(245, 247, 244, 0.9);
  backdrop-filter: blur(22px) saturate(150%);
}

/* Product scenes */

.home-page .apps-showcase {
  position: relative;
  z-index: 2;
  padding-top: clamp(100px, 12vw, 176px);
  background: var(--cinema-mist);
}

.home-page .apps-showcase > .section-shell {
  position: relative;
}

.home-page .apps-heading {
  max-width: 1040px;
}

.home-page .apps-heading h2 {
  max-width: 940px;
  font-size: clamp(54px, 6vw, 92px);
  line-height: 0.96;
}

.home-page .apps-heading > p:last-child {
  max-width: 650px;
  margin-top: 34px;
  font-size: 20px;
  line-height: 1.65;
}

.home-page .portfolio-explorer {
  position: sticky;
  top: 142px;
  z-index: 30;
  margin-top: 72px;
  background: rgba(11, 14, 16, 0.92);
  box-shadow: 0 34px 90px rgba(11, 14, 16, 0.26);
  backdrop-filter: blur(24px) saturate(145%);
}

.home-page .portfolio-tracker {
  margin-top: 24px;
  overflow: hidden;
  background: #151a1d;
  box-shadow: 0 42px 100px rgba(11, 14, 16, 0.2);
}

.home-page .portfolio-section-heading {
  margin-top: 138px;
}

.home-page .portfolio-section-heading h3 {
  font-size: clamp(40px, 4.6vw, 68px);
  line-height: 1;
}

.home-page .live-app-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 58px;
  margin-top: 52px;
}

.home-page .product-card {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  min-height: 650px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--cinema-paper);
  box-shadow: var(--cinema-soft-depth);
  transform:
    perspective(1500px)
    translate3d(0, calc((var(--section-progress, 0.5) - 0.5) * -20px), 0)
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg));
  transform-style: preserve-3d;
  transition:
    transform 900ms cubic-bezier(0.18, 0.82, 0.2, 1),
    box-shadow 900ms ease;
}

.home-page .product-card:nth-child(even) {
  grid-template-columns: minmax(390px, 0.92fr) minmax(0, 1.08fr);
}

.home-page .product-card:nth-child(even) .product-card-visual {
  order: 2;
}

.home-page .product-card-visual {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  isolation: isolate;
}

.home-page .product-card-visual::before {
  content: "";
  position: absolute;
  inset: 12% 11%;
  z-index: -1;
  background: rgba(255, 255, 255, 0.12);
  clip-path: polygon(8% 0, 100% 7%, 90% 100%, 0 91%);
  transform: translate3d(calc((var(--section-progress, 0.5) - 0.5) * 24px), calc((var(--section-progress, 0.5) - 0.5) * -30px), 0) rotate(-4deg);
}

.home-page .product-card-screen {
  width: min(78%, 520px);
  max-height: 620px;
  object-fit: cover;
  object-position: top;
  filter: drop-shadow(0 38px 50px rgba(0, 0, 0, 0.3));
  mask-image: linear-gradient(to bottom, transparent 0%, #000 8%, #000 86%, transparent 100%);
  transform:
    perspective(1300px)
    translate3d(calc((var(--section-progress, 0.5) - 0.5) * -24px), calc((var(--section-progress, 0.5) - 0.5) * 74px), 60px)
    rotateY(-6deg)
    scale(1.08);
  transition: transform 1200ms cubic-bezier(0.18, 0.82, 0.2, 1);
}

.home-page .product-card:nth-child(even) .product-card-screen {
  transform:
    perspective(1300px)
    translate3d(calc((var(--section-progress, 0.5) - 0.5) * 24px), calc((var(--section-progress, 0.5) - 0.5) * 74px), 60px)
    rotateY(6deg)
    scale(1.08);
}

.home-page .product-card:hover {
  box-shadow: 0 64px 130px rgba(11, 14, 16, 0.26);
}

.home-page .product-card:hover .product-card-screen {
  transform: perspective(1300px) translate3d(0, -12px, 80px) rotateY(0deg) scale(1.12);
}

.home-page .product-card-body {
  position: relative;
  z-index: 4;
  align-self: center;
  padding: clamp(44px, 5vw, 78px);
  transform: translateZ(80px);
}

.home-page .product-card-title > img {
  box-shadow: 0 18px 46px rgba(11, 14, 16, 0.2);
}

.home-page .product-card-title h3 {
  font-size: clamp(30px, 3vw, 46px);
  line-height: 1;
}

.home-page .product-card-title p {
  color: rgba(11, 14, 16, 0.54);
}

.home-page .product-card-points {
  color: rgba(11, 14, 16, 0.7);
  opacity: 1;
}

.home-page .product-card-points li {
  color: inherit;
}

.home-page .next-app-grid {
  gap: 24px;
}

.home-page .next-app-card {
  box-shadow: 0 30px 76px rgba(11, 14, 16, 0.14);
  transform: translate3d(0, calc((var(--section-progress, 0.5) - 0.5) * -18px), 0);
  transition:
    transform 800ms cubic-bezier(0.18, 0.82, 0.2, 1),
    box-shadow 800ms ease;
}

.home-page .next-app-card:nth-child(3n + 2) {
  transform: translate3d(0, calc((var(--section-progress, 0.5) - 0.5) * 22px), 0);
}

.home-page .next-app-card:hover {
  transform: translate3d(0, -10px, 0);
  box-shadow: 0 46px 100px rgba(11, 14, 16, 0.22);
}

.home-page .next-app-screen {
  mask-image: linear-gradient(to bottom, transparent 0%, #000 9%, #000 90%, transparent 100%);
}

/* Cinematic section changes */

.home-page .web-product,
.home-page .product-values,
.home-page .app-request,
.home-page .automation,
.home-page .healthcare,
.home-page .mission,
.home-page .approach,
.home-page .contact {
  position: relative;
  overflow: clip;
}

.home-page .web-product-inner > img,
.home-page .about-visual,
.future-ui .team-solution-media,
.future-ui .team-workflow-preview,
.future-ui .team-knowledge-preview {
  mask-image: linear-gradient(to bottom, transparent 0%, #000 8%, #000 92%, transparent 100%);
  transform: translate3d(0, calc((var(--section-progress, 0.5) - 0.5) * 42px), 0) scale(1.04);
  transition: transform 1100ms cubic-bezier(0.18, 0.82, 0.2, 1);
}

.home-page .product-values article,
.home-page .automation-outcomes article,
.home-page .healthcare-workflows article,
.home-page .step {
  transition:
    transform 650ms cubic-bezier(0.18, 0.82, 0.2, 1),
    background-color 650ms ease,
    box-shadow 650ms ease;
}

.home-page .product-values article:hover,
.home-page .automation-outcomes article:hover,
.home-page .healthcare-workflows article:hover,
.home-page .step:hover {
  transform: translate3d(0, -8px, 0);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.18);
}

.cinema-enter {
  opacity: 0;
  clip-path: inset(0 0 18% 0);
  transform: translate3d(0, 54px, 0) scale(0.985);
  transition:
    opacity 900ms ease,
    clip-path 1200ms cubic-bezier(0.18, 0.82, 0.2, 1),
    transform 1200ms cubic-bezier(0.18, 0.82, 0.2, 1);
}

.cinema-enter.is-cinema-visible {
  opacity: 1;
  clip-path: inset(0 0 0 0);
  transform: translate3d(0, 0, 0) scale(1);
}

.cinema-enter:nth-child(2) {
  transition-delay: 90ms;
}

.cinema-enter:nth-child(3) {
  transition-delay: 180ms;
}

.future-ui .founder-hero,
.future-ui .policy-hero,
.future-ui .app-support-hero {
  overflow: clip;
  isolation: isolate;
}

.future-ui .founder-hero-art {
  transform: translate3d(0, calc(var(--page-scene-progress, 0) * -36px), 0) scale(1.06);
  will-change: transform;
}

@keyframes cinematic-screen-drift {
  0% {
    transform: translate3d(-6px, 8px, 56px) rotate(-2.2deg) scale(1.01);
  }
  100% {
    transform: translate3d(8px, -10px, 62px) rotate(-0.5deg) scale(1.045);
  }
}

@keyframes cinematic-echo {
  0% {
    transform: translate3d(38px, 36px, -70px) scale(1.06);
    opacity: 0.26;
  }
  100% {
    transform: translate3d(58px, 18px, -70px) scale(1.12);
    opacity: 0.4;
  }
}

@keyframes cinematic-layer-switch {
  0% {
    opacity: 0;
    filter: blur(12px) saturate(140%);
  }
  100% {
    opacity: 1;
  }
}

@media (max-width: 1120px) {
  .home-page .cinematic-hero .hero-inner {
    grid-template-columns: minmax(0, 0.9fr) minmax(450px, 1.1fr);
    gap: 24px;
  }

  .home-page .cinematic-hero h1 {
    font-size: clamp(60px, 7vw, 82px);
  }

  .home-page .cinematic-hero .hero-shiftworth-art {
    right: 92px;
    width: 340px;
  }

  .home-page .cinematic-screen-echo {
    right: 46px;
    width: 360px;
  }

  .home-page .cinematic-foreground-icon {
    right: 340px;
  }
}

@media (max-width: 900px) {
  .home-page .cinematic-hero {
    min-height: auto;
  }

  .home-page .cinematic-hero .hero-inner {
    min-height: auto;
    padding-top: 128px;
    grid-template-columns: 1fr;
  }

  .home-page .cinematic-hero .hero-copy {
    max-width: 720px;
  }

  .home-page .cinematic-hero .hero-app-stage {
    width: min(680px, 100%);
    min-height: 610px;
    margin-inline: auto;
  }

  .home-page .product-card,
  .home-page .product-card:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .home-page .product-card:nth-child(even) .product-card-visual {
    order: 0;
  }

  .home-page .product-card-visual {
    min-height: 540px;
  }
}

@media (max-width: 760px) {
  .future-ui .site-header {
    background: rgba(11, 14, 16, 0.9);
  }

  .home-page .cinematic-hero .hero-inner {
    gap: 42px;
    padding-top: 108px;
    padding-bottom: 58px;
  }

  .home-page .cinematic-canvas {
    opacity: 0.46;
    mask-image: linear-gradient(to bottom, transparent 0%, #000 24%, #000 100%);
  }

  .home-page .cinematic-horizon span {
    right: -28%;
    width: 92%;
  }

  .home-page .cinematic-hero .hero-copy {
    transform: none;
  }

  .home-page .cinematic-hero h1 {
    margin-top: 22px;
    font-size: clamp(48px, 15vw, 66px);
    line-height: 0.94;
  }

  .home-page .cinematic-hero .hero-title-accent {
    transform: none;
  }

  .home-page .cinematic-hero .hero-lede {
    margin-top: 26px;
    font-size: 17px;
    line-height: 1.6;
  }

  .home-page .cinematic-hero .hero-actions {
    align-items: stretch;
  }

  .home-page .cinematic-hero .hero-app-stage {
    min-height: 450px;
    height: 450px;
    transform: none;
  }

  .home-page .cinematic-hero .hero-app-stage::before {
    inset: 18% -16% 2% 6%;
  }

  .home-page .cinematic-hero .hero-stage-meta {
    top: 16px;
    left: 20px;
  }

  .home-page .cinematic-hero .hero-stage-meta strong {
    font-size: 24px;
  }

  .home-page .cinematic-hero .hero-stage-signal {
    top: 22px;
    right: 8px;
  }

  .home-page .cinematic-hero .hero-shiftworth-art {
    top: 82px;
    right: 58px;
    width: 230px;
    max-height: 390px;
    animation-duration: 9s;
  }

  .home-page .cinematic-screen-echo {
    top: 96px;
    right: 26px;
    width: 250px;
    max-height: 380px;
  }

  .home-page .cinematic-foreground-icon {
    right: auto;
    bottom: 18px;
    left: 18px;
    width: 76px;
  }

  .home-page .cinematic-hero .hero-brand-art {
    right: -116px;
    width: 440px;
  }

  .home-page .cinematic-hero .hero-app-switch {
    right: 0;
    width: 54px;
    height: 54px;
  }

  .home-page .cinematic-hero .hero-app-switch:hover,
  .home-page .cinematic-hero .hero-app-switch:focus-visible,
  .home-page .cinematic-hero .hero-app-switch.is-active {
    transform: translate3d(-6px, 0, 0) scale(1.04);
  }

  .home-page .cinematic-hero .hero-capabilities {
    height: auto;
  }

  .home-page .home-section-nav {
    top: 72px;
  }

  .home-page .apps-showcase {
    padding-top: 96px;
  }

  .home-page .apps-heading h2 {
    font-size: clamp(46px, 13vw, 64px);
  }

  .home-page .apps-heading > p:last-child {
    font-size: 17px;
  }

  .home-page .portfolio-explorer {
    position: relative;
    top: auto;
    margin-top: 48px;
  }

  .home-page .portfolio-section-heading {
    margin-top: 94px;
  }

  .home-page .live-app-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-columns: auto;
    grid-auto-flow: row;
    gap: 30px;
    padding: 0;
    overflow: visible;
    scroll-snap-type: none;
  }

  .home-page .product-card,
  .home-page .product-card:nth-child(even) {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    transform: none;
  }

  .home-page .product-card-visual {
    min-height: 430px;
  }

  .home-page .product-card-screen,
  .home-page .product-card:nth-child(even) .product-card-screen {
    width: min(82%, 330px);
    max-height: 440px;
    transform: perspective(1100px) translate3d(0, calc((var(--section-progress, 0.5) - 0.5) * 42px), 30px) rotateY(-4deg) scale(1.06);
  }

  .home-page .product-card-body {
    padding: 38px 26px 44px;
    transform: none;
  }

  .home-page .product-card-title h3 {
    font-size: 30px;
  }

  .home-page .next-app-card,
  .home-page .next-app-card:nth-child(3n + 2) {
    transform: none;
  }

  .cinema-enter {
    clip-path: inset(0 0 10% 0);
    transform: translate3d(0, 34px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .cinematic-screen-echo,
  .home-page .cinematic-hero .hero-shiftworth-art,
  .home-page .cinematic-screen-echo.is-switching,
  .home-page .cinematic-foreground-icon.is-switching {
    animation: none !important;
  }

  .home-page .cinematic-hero .hero-copy,
  .home-page .cinematic-hero .hero-app-stage,
  .home-page .product-card,
  .home-page .product-card-screen,
  .home-page .next-app-card,
  .home-page .web-product-inner > img,
  .home-page .about-visual,
  .future-ui .founder-hero-art {
    transform: none !important;
  }

  .cinema-enter,
  .cinema-enter.is-cinema-visible {
    opacity: 1;
    clip-path: none;
    transform: none;
    transition: none;
  }
}
