.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.45;
  mix-blend-mode: soft-light;
  animation: orb-float 14s ease-in-out infinite;
}

.ambient__orb--a {
  width: 42vw;
  height: 42vw;
  left: -8%;
  top: 12%;
  background: radial-gradient(circle, rgba(120, 190, 255, 0.7) 0%, rgba(120, 190, 255, 0) 70%);
}

.ambient__orb--b {
  width: 36vw;
  height: 36vw;
  right: -6%;
  top: 28%;
  background: radial-gradient(circle, rgba(180, 220, 255, 0.65) 0%, rgba(180, 220, 255, 0) 70%);
  animation-delay: -4s;
}

.ambient__orb--c {
  width: 48vw;
  height: 48vw;
  left: 30%;
  bottom: -18%;
  background: radial-gradient(circle, rgba(90, 160, 255, 0.4) 0%, rgba(90, 160, 255, 0) 70%);
  animation-delay: -8s;
}

@keyframes orb-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(2%, -3%, 0) scale(1.06); }
}

.glass-sheet {
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.38) 100%);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow:
    0 18px 40px rgba(40, 90, 160, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(30, 60, 110, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

body.nav-open .mobile-drawer {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer__panel {
  position: absolute;
  top: calc(64px + env(safe-area-inset-top, 0px));
  right: 14px;
  left: 14px;
  border-radius: 22px;
  padding: 18px 16px 20px;
  display: grid;
  gap: 6px;
  transform: translateY(-12px) scale(0.98);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

body.nav-open .mobile-drawer__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.mobile-drawer__link {
  text-decoration: none;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 14px;
  border-radius: 14px;
  transition: background 0.25s ease, color 0.25s ease;
}

.mobile-drawer__link:active,
.mobile-drawer__link:hover {
  background: rgba(47, 123, 255, 0.1);
  color: var(--accent);
}

.btn-consult--block {
  margin-top: 8px;
  width: 100%;
  height: 46px;
}

.lottie-box {
  pointer-events: none;
}

.lottie-box--scroll {
  width: 56px;
  height: 56px;
  margin: 0 auto;
}

.lottie-box--success {
  width: 96px;
  height: 96px;
  margin: 0 auto 8px;
}

.hero {
  position: relative;
}

.page-home .scroll-hint {
  pointer-events: auto;
}

.page-dots {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-dots button {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: rgba(47, 123, 255, 0.28);
  transition: height 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.page-dots button.is-active {
  height: 22px;
  background: var(--accent);
  box-shadow: 0 6px 14px rgba(47, 123, 255, 0.35);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(20px);
  z-index: 80;
  min-width: min(320px, calc(100% - 32px));
  padding: 18px 20px 16px;
  border-radius: 22px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.35s;
}

.toast.is-show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.toast p {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

@media (max-width: 900px) {
  #bg-stage {
    height: var(--app-h, 100%);
    background: linear-gradient(180deg, #8ec4ef 0%, #b7d7f4 42%, #eaf3fb 100%);
  }

  body.is-page-0 .bg-layer {
    inset: auto;
    top: 0;
    left: 0;
    width: 100%;
    height: 48%;
    object-fit: cover;
    object-position: 70% 42%;
  }

  body.is-page-0 #bg-stage::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 38%;
    height: 16%;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(
      180deg,
      rgba(183, 215, 244, 0) 0%,
      rgba(234, 243, 251, 0.55) 45%,
      #eaf3fb 100%
    );
  }

  body:not(.is-page-0) .bg-layer {
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 78% 36%;
  }

  body:not(.is-page-0) #bg-stage::after {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .btn-consult:not(.btn-consult--block) {
    display: none;
  }

  .page-dots {
    right: 10px;
  }

  .page-home {
    pointer-events: auto;
  }

  .page-home .hero {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    height: 100%;
    padding: 0;
    overflow: hidden;
  }

  .page-home .hero__content {
    width: 100%;
    max-width: none;
    max-height: min(54%, calc(var(--app-h, 100vh) * 0.54));
    margin-top: auto;
    padding:
      18px 16px
      calc(64px + env(safe-area-inset-bottom, 0px));
    border-radius: 28px 28px 0 0;
    background:
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.72) 0%,
        rgba(244, 249, 255, 0.9) 40%,
        rgba(236, 245, 252, 0.96) 100%
      );
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-bottom: 0;
    box-shadow: 0 -18px 40px rgba(40, 90, 160, 0.12);
    backdrop-filter: blur(22px) saturate(1.15);
    -webkit-backdrop-filter: blur(22px) saturate(1.15);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }

  .page-home .hero__title {
    margin-bottom: 10px;
    gap: 4px;
  }

  .page-home .hero__title-line {
    font-size: clamp(24px, 6.4vw, 30px);
  }

  .page-home .hero__desc {
    font-size: 13px;
    line-height: 1.65;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .page-home .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin-bottom: 14px;
  }

  .page-home .feature-card {
    min-height: 0;
    padding: 12px 10px 10px;
    border-radius: 16px;
  }

  .page-home .feature-card__icon {
    width: 48px;
    height: 48px;
    margin-bottom: 6px;
  }

  .page-home .feature-card__title {
    font-size: 13px;
    margin-bottom: 4px;
  }

  .page-home .feature-card__desc {
    font-size: 10px;
    line-height: 1.4;
  }

  .page-home .btn-more {
    height: 44px;
    font-size: 14px;
    width: 100%;
    justify-content: center;
    padding: 0 16px 0 8px;
  }

  .page-home .scroll-hint {
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 6;
  }

  .page-home .scroll-hint__text {
    display: none;
  }

  .lottie-box--scroll {
    width: 42px;
    height: 42px;
  }

  .page-panel {
    overflow: hidden;
  }

  .panel {
    width: calc(100% - 24px);
    max-height: 100%;
    padding:
      calc(64px + env(safe-area-inset-top, 0px) + 12px)
      0
      calc(20px + env(safe-area-inset-bottom, 0px));
    justify-content: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }
}

@media (max-width: 560px) {
  body.is-page-0 .bg-layer {
    height: 46%;
    object-position: 68% 40%;
  }

  body.is-page-0 #bg-stage::after {
    top: 34%;
    height: 18%;
  }

  .site-header {
    height: calc(60px + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
  }

  .page-home .hero__content {
    max-height: min(56%, calc(var(--app-h, 100vh) * 0.56));
    padding:
      16px 14px
      calc(58px + env(safe-area-inset-bottom, 0px));
    border-radius: 24px 24px 0 0;
  }

  .page-dots {
    display: none;
  }

  .panel__title {
    font-size: 24px;
  }

  .panel__desc {
    font-size: 13.5px;
  }

  .glass-card,
  .case-card {
    border-radius: 16px;
    padding: 16px;
  }

  .service-grid,
  .solution-grid,
  .case-grid,
  .about-grid,
  .contact-layout,
  .stat-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .case-card p {
    min-height: 0;
  }

  .toast {
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-height: 720px) and (max-width: 900px) {
  body.is-page-0 .bg-layer {
    height: 40%;
  }

  .page-home .hero__content {
    max-height: 62%;
  }

  .page-home .hero__desc {
    -webkit-line-clamp: 1;
    margin-bottom: 10px;
  }

  .page-home .feature-card__desc {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient__orb,
  .feature-card,
  .hero-anim,
  .reveal-item {
    animation: none !important;
    transition: none !important;
  }
}
