/* Premium theme — index.html (page-home) and cities/*.html (page-city) */

.page-home,
.page-city {
  --home-accent: #7eb6ff;
  --home-accent-dim: rgba(126, 182, 255, 0.55);
  --home-violet: #a78bfa;
  --home-violet-dim: rgba(167, 139, 250, 0.45);
  --home-cyan: #5eead4;
  --home-glass: rgba(13, 18, 32, 0.72);
  --home-glass-border: rgba(126, 182, 255, 0.22);
  --home-shadow: 0 32px 64px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.page-home::before,
.page-city::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.32;
  background:
    radial-gradient(circle at 12% 10%, rgba(126, 182, 255, 0.07), transparent 38%),
    radial-gradient(circle at 88% 82%, rgba(167, 139, 250, 0.06), transparent 42%),
    radial-gradient(circle at 50% 50%, rgba(94, 234, 212, 0.03), transparent 55%);
}

.page-home #main,
.page-city #main {
  position: relative;
  z-index: 1;
}

/* ── Hero ── */
.page-home .hero--premium,
.page-city .hero--premium {
  min-height: clamp(520px, 74vh, 760px);
  padding: clamp(48px, 6vw, 72px) 0 clamp(40px, 5vw, 56px);
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(126, 182, 255, 0.16), transparent 52%),
    radial-gradient(ellipse 90% 60% at 100% 30%, rgba(167, 139, 250, 0.12), transparent 48%),
    radial-gradient(ellipse 70% 50% at 0% 60%, rgba(94, 234, 212, 0.08), transparent 45%),
    var(--bg);
}

.page-home .hero--premium .hero__mesh,
.page-city .hero--premium .hero__mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 12% -10%, rgba(126, 182, 255, 0.28), transparent 55%),
    radial-gradient(ellipse 70% 50% at 88% 20%, rgba(167, 139, 250, 0.2), transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(94, 234, 212, 0.06), transparent 40%);
  animation: home-mesh-shift 18s ease-in-out infinite alternate;
}

@keyframes home-mesh-shift {
  0% { transform: scale(1) translate(0, 0); opacity: 1; }
  100% { transform: scale(1.06) translate(-1.5%, 1%); opacity: 0.92; }
}

.page-home .hero__fx,
.page-city .hero__fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.page-home .home-orb,
.page-city .home-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  animation: home-orb-float 14s ease-in-out infinite;
}

.page-home .home-orb--a,
.page-city .home-orb--a {
  width: clamp(180px, 22vw, 320px);
  height: clamp(180px, 22vw, 320px);
  top: 8%;
  right: 10%;
  background: radial-gradient(circle at 30% 30%, rgba(126, 182, 255, 0.32), rgba(126, 182, 255, 0.02) 70%);
  animation-duration: 16s;
}

.page-home .home-orb--b,
.page-city .home-orb--b {
  width: clamp(120px, 14vw, 220px);
  height: clamp(120px, 14vw, 220px);
  bottom: 18%;
  right: 26%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.26), transparent 68%);
  animation-duration: 12s;
  animation-delay: -4s;
}

.page-home .home-orb--c,
.page-city .home-orb--c {
  width: clamp(90px, 10vw, 160px);
  height: clamp(90px, 10vw, 160px);
  top: 22%;
  left: 56%;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.2), transparent 70%);
  animation-duration: 20s;
  animation-delay: -8s;
}

.page-home .home-orb--d,
.page-city .home-orb--d {
  width: clamp(240px, 28vw, 400px);
  height: clamp(240px, 28vw, 400px);
  bottom: -8%;
  left: -4%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.14), transparent 65%);
  animation-duration: 22s;
  animation-delay: -2s;
}

@keyframes home-orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(12px, -18px) scale(1.04); }
  66% { transform: translate(-8px, 10px) scale(0.98); }
}

.page-home .hero__beams,
.page-city .hero__beams {
  position: absolute;
  inset: -20% -10%;
  background: conic-gradient(
    from 210deg at 70% 40%,
    transparent 0deg,
    rgba(126, 182, 255, 0.06) 24deg,
    transparent 48deg,
    rgba(167, 139, 250, 0.05) 120deg,
    transparent 160deg,
    rgba(94, 234, 212, 0.04) 220deg,
    transparent 280deg
  );
  animation: home-beams-rotate 40s linear infinite;
  opacity: 0.9;
}

@keyframes home-beams-rotate {
  to { transform: rotate(360deg); }
}

.page-home .hero__device-scene,
.page-city .hero__device-scene {
  position: absolute;
  right: clamp(2%, 6vw, 10%);
  top: 50%;
  width: clamp(200px, 24vw, 340px);
  height: clamp(240px, 30vw, 380px);
  transform: translateY(-46%) perspective(900px) rotateY(-10deg) rotateX(5deg);
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-home .home-device--hub,
.page-city .home-device--hub {
  position: absolute;
  left: 8%;
  top: 12%;
  width: 52%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.45), 0 0 40px rgba(126, 182, 255, 0.14);
  transform: translateZ(48px);
  animation: home-hub-float 6s ease-in-out infinite;
}

.page-home .home-device__core,
.page-city .home-device__core {
  width: 56%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(126, 182, 255, 0.22), rgba(7, 10, 18, 0.85));
  border: 1px solid rgba(126, 182, 255, 0.28);
}

.page-home .home-device__core .ico,
.page-city .home-device__core .ico {
  width: 52%;
  height: 52%;
}

.page-home .home-device__ring,
.page-city .home-device__ring {
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  border: 1px dashed rgba(167, 139, 250, 0.35);
  animation: home-ring-spin 24s linear infinite;
}

@keyframes home-ring-spin {
  to { transform: rotate(360deg); }
}

@keyframes home-hub-float {
  0%, 100% { transform: translateZ(48px) translateY(0); }
  50% { transform: translateZ(64px) translateY(-10px); }
}

.page-home .home-device--chip,
.page-city .home-device--chip {
  position: absolute;
  right: 0;
  bottom: 10%;
  width: 54%;
  height: 36%;
  border-radius: 16px;
  padding: 18px;
  background: var(--home-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--home-glass-border);
  box-shadow: var(--home-shadow);
  transform: translateZ(72px) rotateY(-6deg);
  animation: home-chip-float 7s ease-in-out infinite;
  animation-delay: -1.5s;
}

@keyframes home-chip-float {
  0%, 100% { transform: translateZ(72px) rotateY(-6deg) translateY(0); }
  50% { transform: translateZ(88px) rotateY(-2deg) translateY(-8px); }
}

.page-home .home-device__line,
.page-city .home-device__line {
  display: block;
  height: 6px;
  border-radius: 999px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, var(--home-accent-dim), rgba(167, 139, 250, 0.25));
}

.page-home .home-device__line--short,
.page-city .home-device__line--short { width: 55%; }

.page-home .home-device__dot,
.page-city .home-device__dot {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--home-cyan);
  box-shadow: 0 0 12px rgba(94, 234, 212, 0.45);
}

.page-home .home-device--mini,
.page-city .home-device--mini {
  position: absolute;
  right: 18%;
  top: 4%;
  width: 28%;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  padding: 6px;
  display: grid;
  place-items: center;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transform: translateZ(96px) rotateY(8deg);
  animation: home-mini-float 5.5s ease-in-out infinite;
  animation-delay: -2s;
}

.page-home .home-device--mini .ico,
.page-city .home-device--mini .ico {
  width: 58%;
  height: 58%;
}

@keyframes home-mini-float {
  0%, 100% { transform: translateZ(96px) rotateY(8deg) translateY(0); }
  50% { transform: translateZ(108px) rotateY(4deg) translateY(-6px); }
}

.page-home .hero--premium .hero__grid,
.page-city .hero--premium .hero__grid {
  z-index: 1;
}

.page-home .hero--premium .hero__inner,
.page-city .hero--premium .hero__inner {
  z-index: 2;
}

.page-home .hero--premium .hero__title,
.page-city .hero--premium .hero__title {
  background-image: linear-gradient(120deg, #fff 0%, #d8ebff 35%, #c4b5fd 70%, #e8f4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(0 1px 0 rgba(143, 192, 255, 0.45))
    drop-shadow(0 8px 24px rgba(126, 182, 255, 0.18));
}

.page-home .hero__panel--premium,
.page-city .hero__panel--premium {
  perspective: 900px;
}

.page-home .stack-card--3d,
.page-city .stack-card--3d {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
  overflow: hidden;
  position: relative;
}

.page-home .stack-card--3d::after,
.page-city .stack-card--3d::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.06) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.page-home .stack-card--3d:hover,
.page-city .stack-card--3d:hover {
  border-color: rgba(126, 182, 255, 0.38);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32), 0 0 28px rgba(126, 182, 255, 0.12);
}

.page-home .stack-card--3d:hover::after,
.page-city .stack-card--3d:hover::after {
  transform: translateX(120%);
}

.page-home .stack-card:nth-child(2).stack-card--3d,
.page-city .stack-card:nth-child(2).stack-card--3d {
  transform: translateX(18px);
}

.page-home .stack-card:nth-child(3).stack-card--3d,
.page-city .stack-card:nth-child(3).stack-card--3d {
  transform: translateX(36px);
}

.page-home .hero__actions .btn,
.page-city .hero__actions .btn,
.page-city .lead-actions .btn {
  box-shadow: 0 12px 32px rgba(79, 143, 255, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.page-home .hero__actions .btn--ghost,
.page-city .hero__actions .btn--ghost,
.page-city .lead-actions .btn--ghost {
  border-color: rgba(126, 182, 255, 0.35);
}

.page-home .hero__actions .btn--ghost:hover,
.page-city .hero__actions .btn--ghost:hover,
.page-city .lead-actions .btn--ghost:hover {
  background: rgba(126, 182, 255, 0.1);
  box-shadow: 0 0 24px rgba(126, 182, 255, 0.15);
}

/* ── Sections glow ── */
.page-home .section,
.page-city .section {
  position: relative;
}

.page-home .section::before,
.page-city .section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 55% 35% at 50% 0%, rgba(126, 182, 255, 0.04), transparent 62%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.page-home .section.is-in-view::before,
.page-city .section.is-in-view::before {
  opacity: 1;
}

.page-home .section__head h2,
.page-city .section__head h2 {
  position: relative;
}

.page-home .eyebrow,
.page-city .eyebrow {
  letter-spacing: 0.14em;
}

/* ── Cards ── */
.page-home .service-card,
.page-home .reason,
.page-home .case-card,
.page-home .geo-card,
.page-home .viz-card,
.page-city .viz-card,
.page-city .service-row,
.page-city .module {
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
  position: relative;
  overflow: hidden;
}

.page-home .service-card::after,
.page-home .reason::after,
.page-home .case-card::after,
.page-home .geo-card::after,
.page-home .viz-card::after,
.page-city .viz-card::after,
.page-city .service-row::after,
.page-city .module::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.65s ease;
  pointer-events: none;
}

.page-home .service-card:hover,
.page-home .reason:hover,
.page-home .case-card:hover,
.page-home .geo-card:hover,
.page-home .viz-card:hover,
.page-city .viz-card:hover,
.page-city .service-row:hover,
.page-city .module:hover {
  border-color: rgba(126, 182, 255, 0.32);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.32), 0 0 28px rgba(126, 182, 255, 0.1);
}

.page-home .service-card:hover::after,
.page-home .reason:hover::after,
.page-home .case-card:hover::after,
.page-home .geo-card:hover::after,
.page-home .viz-card:hover::after,
.page-city .viz-card:hover::after,
.page-city .service-row:hover::after,
.page-city .module:hover::after {
  transform: translateX(120%);
}

.page-home .service-card--featured {
  background:
    linear-gradient(145deg, rgba(126, 182, 255, 0.08), rgba(167, 139, 250, 0.04)),
    var(--bg-elevated);
}

.page-home .service-card__index {
  color: var(--home-accent-dim);
}

/* ── Steps ── */
.page-home .step,
.page-city .step {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-home .step:hover,
.page-city .step:hover {
  transform: translateY(-4px);
}

.page-home .step .num,
.page-city .step .step__num {
  border-color: rgba(126, 182, 255, 0.4);
  background: linear-gradient(145deg, rgba(126, 182, 255, 0.18), rgba(167, 139, 250, 0.08));
  box-shadow: 0 0 24px rgba(126, 182, 255, 0.18);
  animation: home-step-glow 3s ease-in-out infinite;
}

@keyframes home-step-glow {
  0%, 100% { box-shadow: 0 0 16px rgba(126, 182, 255, 0.12); }
  50% { box-shadow: 0 0 32px rgba(126, 182, 255, 0.3); }
}

/* ── Viz orbit & layer stack ── */
.page-home .viz-orbit__ring {
  animation: home-orbit-spin 20s linear infinite;
  box-shadow: 0 0 48px rgba(124, 58, 237, 0.22), inset 0 0 40px rgba(79, 143, 255, 0.1);
}

@keyframes home-orbit-spin {
  to { transform: rotate(360deg); }
}

.page-home .viz-sat {
  animation: home-sat-pulse 3s ease-in-out infinite;
}

.page-home .viz-sat:nth-child(3) { animation-delay: 0s; }
.page-home .viz-sat:nth-child(4) { animation-delay: -0.8s; }
.page-home .viz-sat:nth-child(5) { animation-delay: -1.6s; }
.page-home .viz-sat:nth-child(6) { animation-delay: -2.4s; }

@keyframes home-sat-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}

.page-home .layer-stack span {
  animation: home-layer-float 5s ease-in-out infinite;
}

.page-home .layer-stack span:nth-child(1) { animation-delay: 0s; }
.page-home .layer-stack span:nth-child(2) { animation-delay: -0.6s; }
.page-home .layer-stack span:nth-child(3) { animation-delay: -1.2s; }

@keyframes home-layer-float {
  0%, 100% { transform: rotateX(12deg) translateY(0); }
  50% { transform: rotateX(12deg) translateY(-6px); }
}

.page-home .layer-stack span:nth-child(2) {
  animation-name: home-layer-float-2;
}

@keyframes home-layer-float-2 {
  0%, 100% { transform: rotateX(12deg) translateX(12px) translateY(0); }
  50% { transform: rotateX(12deg) translateX(12px) translateY(-6px); }
}

.page-home .layer-stack span:nth-child(3) {
  animation-name: home-layer-float-3;
}

@keyframes home-layer-float-3 {
  0%, 100% { transform: rotateX(12deg) translateX(24px) translateY(0); }
  50% { transform: rotateX(12deg) translateX(24px) translateY(-6px); }
}

.page-home .studio {
  position: relative;
}

.page-home .quote-band {
  border-color: rgba(126, 182, 255, 0.2);
  background:
    linear-gradient(110deg, rgba(126, 182, 255, 0.06), rgba(167, 139, 250, 0.05)),
    var(--bg-elevated);
}

/* ── FAQ ── */
.page-home #faq details,
.page-city #faq details {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.page-home #faq details[open],
.page-city #faq details[open] {
  border-color: rgba(126, 182, 255, 0.3);
  box-shadow: 0 12px 32px rgba(126, 182, 255, 0.08);
}

.page-home #faq summary:hover,
.page-city #faq summary:hover {
  color: var(--home-accent);
}

/* ── Contacts aurora ── */
.page-home #contacts,
.page-city #contacts {
  position: relative;
  overflow: hidden;
}

.page-home #contacts::before,
.page-city #contacts::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 100%, rgba(126, 182, 255, 0.1), transparent 55%),
    radial-gradient(ellipse 70% 50% at 80% 0%, rgba(167, 139, 250, 0.08), transparent 50%);
  pointer-events: none;
  animation: home-aurora 12s ease-in-out infinite alternate;
}

@keyframes home-aurora {
  0% { opacity: 0.7; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

.page-home #contacts > .container,
.page-city #contacts > .container {
  position: relative;
  z-index: 1;
}

.page-home #contacts .form,
.page-city #contacts .form {
  border-color: rgba(126, 182, 255, 0.2);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35), 0 0 40px rgba(126, 182, 255, 0.06);
}

/* ── Scroll reveal ── */
.page-home [data-reveal],
.page-city [data-reveal] {
  opacity: 0;
  transform: translateY(36px) scale(0.98);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-home [data-reveal].is-revealed,
.page-city [data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.page-home .hero--premium [data-reveal],
.page-city .hero--premium [data-reveal] {
  opacity: 1;
  transform: none;
}

/* ── Responsive ── */
@media (max-width: 1199px) {
  .page-home .hero__device-scene,
  .page-city .hero__device-scene {
    opacity: 0.55;
    right: -2%;
    transform: translateY(-46%) perspective(900px) rotateY(-6deg) rotateX(4deg) scale(0.85);
  }
}

@media (max-width: 960px) {
  .page-home .hero__device-scene,
  .page-city .hero__device-scene {
    display: none;
  }

  .page-home .hero--premium,
  .page-city .hero--premium {
    min-height: auto;
  }

  .page-home .stack-card:nth-child(2).stack-card--3d,
  .page-home .stack-card:nth-child(3).stack-card--3d,
  .page-city .stack-card:nth-child(2).stack-card--3d,
  .page-city .stack-card:nth-child(3).stack-card--3d {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .hero__mesh,
  .page-city .hero__mesh,
  .page-home .home-orb,
  .page-city .home-orb,
  .page-home .hero__beams,
  .page-city .hero__beams,
  .page-home .home-device--hub,
  .page-city .home-device--hub,
  .page-home .home-device--chip,
  .page-city .home-device--chip,
  .page-home .home-device--mini,
  .page-city .home-device--mini,
  .page-home .home-device__ring,
  .page-city .home-device__ring,
  .page-home .viz-orbit__ring,
  .page-home .viz-sat,
  .page-home .layer-stack span,
  .page-home .step .num,
  .page-city .step .step__num,
  .page-home #contacts::before,
  .page-city #contacts::before {
    animation: none !important;
  }

  .page-home [data-reveal],
  .page-city [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
