@media (prefers-color-scheme: dark) {
  .art-card::after,
  .ai-flow-grid .art-card::after {
    background:
      linear-gradient(180deg, rgba(17, 19, 21, 0.02) 0%, rgba(17, 19, 21, 0.18) 46%, rgba(17, 19, 21, 0.76) 100%),
      linear-gradient(90deg, rgba(17, 19, 21, 0.08) 0%, rgba(17, 19, 21, 0.02) 54%, rgba(17, 19, 21, 0.1) 100%) !important;
  }

  .ai-flow-grid .ai-wave-feature-card::after {
    background:
      linear-gradient(180deg, rgba(17, 19, 21, 0.01) 0%, rgba(17, 19, 21, 0.14) 42%, rgba(17, 19, 21, 0.74) 100%),
      linear-gradient(90deg, rgba(17, 19, 21, 0.08) 0%, rgba(17, 19, 21, 0.02) 58%, rgba(17, 19, 21, 0.08) 100%) !important;
  }

  .card-art,
  .ai-flow-grid .card-art {
    filter: brightness(0.84) contrast(1.06) saturate(0.96) !important;
    opacity: 0.94 !important;
  }

  .ai-flow-grid .ai-wave-feature-card .card-art {
    filter: brightness(0.9) contrast(1.08) saturate(1) !important;
    opacity: 0.96 !important;
  }

  .ai-flow-grid .ai-card h3,
  .ai-flow-grid .ai-card p {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.42);
  }

  .mini-card .media-bg,
  .art-card .card-art {
    display: block !important;
    visibility: visible !important;
  }
}

.appmost-ski-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  opacity: 0;
  pointer-events: none;
  image-rendering: pixelated;
  transition: opacity 120ms linear;
}

.appmost-ski-foreground-canvas {
  position: fixed;
  inset: 0;
  z-index: 90;
  width: 100vw;
  height: 100vh;
  opacity: 0;
  pointer-events: none;
  image-rendering: pixelated;
  transition: opacity 120ms linear;
}

.appmost-ski-trigger {
  position: fixed;
  top: 4px;
  left: 0;
  z-index: 130;
  width: 34px;
  height: 34px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #dceeff;
  cursor: pointer;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.54)) drop-shadow(0 0 5px rgba(124, 185, 255, 0.42));
  opacity: 0;
  transform: translate3d(-140%, 0, 0);
  animation: appmost-snowflake-pass 10s cubic-bezier(0.22, 1, 0.36, 1) 1.2s infinite both;
}

.appmost-ski-trigger svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 1.8;
  shape-rendering: geometricPrecision;
}

.appmost-ski-trigger:hover,
.appmost-ski-trigger:focus-visible {
  animation-play-state: paused;
  color: #ffffff;
}

.appmost-ski-trigger:focus-visible {
  outline: 2px solid #2455c5;
  outline-offset: 2px;
}

.appmost-ski-hud {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 135;
  display: none;
  align-items: flex-start;
  gap: 5px;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.2;
  color: #000;
  pointer-events: none;
}

.appmost-ski-hud span {
  min-width: 94px;
  border: 1px solid #9a9a9a;
  padding: 3px 4px 2px;
  background: #fff;
  box-shadow: 1px 1px 0 #d6d6d6;
  white-space: pre-line;
}

.appmost-ski-close {
  width: 22px;
  height: 20px;
  border: 1px solid #9a9a9a;
  border-radius: 0;
  background: #fff;
  color: #000;
  font: 13px/1 "Courier New", ui-monospace, monospace;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 1px 1px 0 #d6d6d6;
}

.appmost-ski-close:hover,
.appmost-ski-close:focus-visible {
  outline: 2px solid #2455c5;
  outline-offset: 1px;
}

body.appmost-ski-mode {
  overflow-x: hidden;
  background: #fff !important;
  color-scheme: light;
}

body.appmost-ski-mode .appmost-ski-canvas {
  opacity: 1;
}

body.appmost-ski-mode .appmost-ski-foreground-canvas {
  opacity: 1;
}

body.appmost-ski-mode .appmost-ski-trigger {
  display: none;
}

body.appmost-ski-mode .appmost-ski-hud {
  display: inline-flex;
}

body.appmost-ski-mode [data-appmost-header],
body.appmost-ski-mode .page,
body.appmost-ski-mode [data-appmost-footer] {
  position: relative;
  z-index: 2;
}

body.appmost-ski-mode [data-appmost-header],
body.appmost-ski-mode [data-appmost-footer] {
  pointer-events: none;
}

body.appmost-ski-mode .topbar,
body.appmost-ski-mode .hero,
body.appmost-ski-mode .case-card,
body.appmost-ski-mode .service {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: none;
}

body.appmost-ski-mode .site-footer,
body.appmost-ski-mode .tiles,
body.appmost-ski-mode .section:not(.ski-slalom-block),
body.appmost-ski-mode .case-actions,
body.appmost-ski-mode .contact-section,
body.appmost-ski-mode .form-text {
  display: none !important;
}

body.appmost-ski-mode .page {
  width: min(calc(100% - 48px), 1060px);
  padding: 0 0 110vh;
}

body.appmost-ski-mode main {
  display: block;
}

body.appmost-ski-mode .showcase {
  display: block;
  width: min(76vw, 780px);
  margin: clamp(110px, 18vh, 180px) auto clamp(520px, 92vh, 920px) 0;
}

body.appmost-ski-mode .hero {
  min-height: clamp(330px, 42vh, 460px);
  border-radius: 8px;
}

body.appmost-ski-mode .hero .media-bg {
  content: url("../img/home-redesign/hero-phones.webp");
  opacity: 0.08;
}

body.appmost-ski-mode .hero-content {
  max-width: 540px;
}

body.appmost-ski-mode .hero h1 {
  font-size: clamp(48px, 7vw, 72px);
}

body.appmost-ski-mode .hero-lead {
  max-width: 520px;
}

body.appmost-ski-mode .ski-slalom-block {
  width: min(76vw, 820px);
  margin-top: clamp(520px, 92vh, 980px);
}

body.appmost-ski-mode .ski-slalom-left {
  margin-right: auto;
  margin-left: 0;
}

body.appmost-ski-mode .ski-slalom-right {
  margin-right: 0;
  margin-left: auto;
}

body.appmost-ski-mode .ski-slalom-block .section-head {
  margin-bottom: 18px;
}

body.appmost-ski-mode .ski-slalom-block h2 {
  max-width: 680px;
  font-size: clamp(34px, 5vw, 48px);
}

body.appmost-ski-mode .case-grid,
body.appmost-ski-mode .service-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body.appmost-ski-mode .case-card:nth-child(n + 3),
body.appmost-ski-mode .service:nth-child(n + 3) {
  display: none;
}

body.appmost-ski-mode .case-media,
body.appmost-ski-mode .service > img {
  opacity: 0.2;
}

body.appmost-ski-free-run [data-appmost-header],
body.appmost-ski-free-run .page,
body.appmost-ski-free-run [data-appmost-footer] {
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 720px) {
  .appmost-ski-trigger {
    display: none;
  }

  .appmost-ski-hud {
    top: 88px;
    left: 12px;
  }

  body.appmost-ski-mode .page {
    width: min(calc(100% - 36px), 420px);
  }

  body.appmost-ski-mode .showcase,
  body.appmost-ski-mode .ski-slalom-block {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
  }

  body.appmost-ski-mode .showcase {
    margin-top: 210px;
  }

  body.appmost-ski-mode .hero {
    min-height: 430px;
  }

  body.appmost-ski-mode .case-grid,
  body.appmost-ski-mode .service-grid {
    grid-template-columns: 1fr;
  }

  body.appmost-ski-mode .case-card:nth-child(n + 2),
  body.appmost-ski-mode .service:nth-child(n + 2) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .appmost-ski-trigger {
    animation: none;
    transform: translate3d(14px, 0, 0);
  }

  .appmost-ski-canvas {
    transition: none;
  }
}

@keyframes appmost-snowflake-pass {
  0% {
    opacity: 0;
    transform: translate3d(-140%, 0, 0) rotate(0deg);
  }

  5% {
    opacity: 1;
    transform: translate3d(-40%, 0, 0) rotate(18deg);
  }

  20% {
    opacity: 1;
    transform: translate3d(18px, 0, 0) rotate(72deg);
  }

  92% {
    opacity: 1;
    transform: translate3d(calc(100vw - 42px), 0, 0) rotate(330deg);
  }

  100% {
    opacity: 0;
    transform: translate3d(calc(100vw + 48px), 0, 0) rotate(360deg);
  }
}
