/* MT5 Mini Connector × Magic UI-inspired visual effects.
   Standalone CSS adaptation for the existing static site (no React runtime).
   Reduced motion supported; all effects are decorative. */
@property --magic-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
:root {
  --magic-cyan: #50f5f2;
  --magic-mint: #68ffcd;
  --magic-blue: #399ffb;
  --magic-border: rgba(85, 235, 242, .22);
}

/* Animated grid + floating particles behind hero content. */
.hero { position: relative; isolation: isolate; }
.hero::before {
  content: '';
  position: absolute;
  inset: 20px -35px 30px;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(75, 226, 233, .075) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(75, 226, 233, .075) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 58% 48%, #000 0%, transparent 69%);
  mask-image: radial-gradient(ellipse at 58% 48%, #000 0%, transparent 69%);
  animation: magic-grid-breathe 9s ease-in-out infinite alternate;
}
.hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 14% 4% 13%;
  pointer-events: none;
  background: radial-gradient(ellipse at 70% 50%, rgba(38, 197, 228, .085), transparent 55%);
}
.magic-particles {
  position: absolute;
  z-index: -1;
  inset: 2% -1%;
  overflow: hidden;
  pointer-events: none;
}
.magic-particle {
  position: absolute;
  left: var(--p-x);
  top: var(--p-y);
  width: var(--p-size);
  height: var(--p-size);
  border-radius: 100%;
  background: #a4fff5;
  box-shadow: 0 0 13px 2px rgba(68, 246, 238, .32);
  opacity: 0;
  animation: magic-particle var(--p-duration) ease-in-out var(--p-delay) infinite;
}
@keyframes magic-grid-breathe {
  0% { opacity: .50; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(16px); }
}
@keyframes magic-particle {
  0%, 100% { opacity: 0; transform: translateY(8px) scale(.7); }
  35%, 65% { opacity: .60; }
  50% { transform: translateY(-13px) scale(1.08); }
}

/* Animated Gradient Text + shiny status pill. */
.hero .text-gradient {
  background: linear-gradient(100deg, #78ffe0, #42cde9, #afe5ff, #50f0ce, #78ffe0);
  background-size: 340% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: magic-gradient 9s linear infinite;
}
@keyframes magic-gradient { to { background-position: 340% 50%; } }
.hero .pill {
  background: linear-gradient(110deg, rgba(20, 61, 72, .95), rgba(12, 37, 53, .94));
  box-shadow: inset 0 1px rgba(154, 255, 234, .1), 0 0 28px rgba(38, 224, 204, .055);
}
.pill-dot { animation: magic-led 2.8s ease-in-out infinite; }
@keyframes magic-led {
  0%, 100% { box-shadow: 0 0 6px #79f7b7, 0 0 0 0 rgba(85, 240, 184, .22); }
  50% { box-shadow: 0 0 15px #79f7b7, 0 0 0 5px rgba(85, 240, 184, 0); }
}

/* Magic UI-style Shimmer Button; remains a real accessible link. */
.btn-primary {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(205, 255, 255, .60);
  background: linear-gradient(110deg, #68f4d3 0%, #4fdce9 52%, #43d9ec 100%);
  box-shadow: 0 8px 28px rgba(50, 215, 211, .20), 0 0 0 1px rgba(113, 255, 242, .09), inset 0 1px rgba(255,255,255,.5);
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: -70% auto -70% -80%;
  width: 48%;
  z-index: 1;
  transform: skewX(-23deg);
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0, rgba(255,255,255,.12) 25%, rgba(255,255,255,.68) 50%, rgba(255,255,255,.12) 75%, transparent 100%);
  animation: magic-shimmer 5.8s ease-in-out infinite;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 43px rgba(44, 227, 219, .34), 0 0 20px rgba(48,238,219,.17); }
.btn-primary:active { transform: translateY(0) scale(.98); }
@keyframes magic-shimmer { 0%, 55% { left: -80%; } 82%, 100% { left: 140%; } }
.btn-outline { transition: transform .2s, box-shadow .25s, border-color .25s, background .25s; }
.btn-outline:hover { box-shadow: 0 0 30px rgba(36, 216, 226, .13), inset 0 0 22px rgba(43, 177, 208, .065); }

/* Border Beam. Masked conic border keeps interiors fully readable. */
.phone-frame, .cta-section, .feature-card-main, .screen-card:nth-child(2) { isolation: isolate; }
.phone-frame::after, .cta-section::after, .feature-card-main::before, .screen-card:nth-child(2)::before {
  content: '';
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from var(--magic-angle), transparent 0deg, transparent 235deg, rgba(54, 199, 241, .02) 260deg, #85ffec 299deg, #36baff 314deg, transparent 350deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: magic-border-spin 9s linear infinite;
}
@keyframes magic-border-spin { to { --magic-angle: 360deg; } }
.phone-frame::after { inset: -6px; border-radius: 54px; padding: 3px; }
.feature-card-main::before, .screen-card:nth-child(2)::before { animation-duration: 13s; }
.cta-section::after { padding: 2px; animation-duration: 10s; }
.cta-section { box-shadow: 0 0 60px rgba(19,202,216,.11), inset 0 0 30px rgba(30,224,211,.04); }

/* Magic Card — local cursor spotlight on desktop; no pointer interception. */
.feature-card, .screen-card, .step { transition: transform .32s ease, box-shadow .32s ease, border-color .32s ease; }
.feature-card:hover, .screen-card:hover, .step:hover {
  transform: translateY(-5px);
  border-color: rgba(103, 250, 236, .53);
  box-shadow: 0 17px 45px rgba(0, 2, 14, .28), 0 0 24px rgba(67, 229, 223, .08);
}
.feature-card { --magic-x: 50%; --magic-y: 25%; }
.feature-card::after {
  content: '';
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(290px circle at var(--magic-x) var(--magic-y), rgba(76, 246, 228, .13), transparent 74%);
  opacity: 0;
  transition: opacity .28s ease;
  pointer-events: none;
}
.feature-card:hover::after { opacity: 1; }
.feature-card-main::before { z-index: 4; }
.feature-symbol { box-shadow: inset 0 1px rgba(199, 255, 255, .09), 0 0 18px rgba(52, 220, 224, .11); }

/* Very light floating motion on the phone, avoiding scroll-coupled scripts. */
.phone { animation: magic-phone-float 6s ease-in-out infinite; }
@keyframes magic-phone-float {
  0%,100% { transform: perspective(1100px) rotateY(-8deg) rotateX(2deg) translateY(0); }
  50% { transform: perspective(1100px) rotateY(-7deg) rotateX(2deg) translateY(-9px); }
}
.phone:hover { animation-play-state: paused; }
.float-card-one { animation: magic-float-tag 6s ease-in-out infinite; }
.float-card-two { animation: magic-float-tag 6s ease-in-out -2s infinite; }
@keyframes magic-float-tag { 0%,100% { translate: 0 0; } 50% { translate: 0 -7px; } }

/* Blur Fade on first entry; readable without JS, keyboard-friendly. */
.magic-reveal { transition: opacity .78s cubic-bezier(.2,.8,.2,1), transform .78s cubic-bezier(.2,.8,.2,1), filter .78s ease; transition-delay: var(--magic-delay,0ms); }
.magic-motion-ready .magic-reveal:not(.magic-visible) { opacity: 0; transform: translateY(22px); filter: blur(4px); }
.magic-motion-ready .magic-reveal.magic-visible { opacity: 1; transform: translateY(0); filter: blur(0); }

/* Subtle site microinteractions */
.nav a { position: relative; }
.nav a::after { content: ''; position: absolute; inset: auto 0 -9px; height: 2px; border-radius: 5px; background: linear-gradient(90deg, transparent, var(--magic-cyan), transparent); transform: scaleX(0); transition: transform .23s ease; }
.nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); }
.stats-strip { position: relative; box-shadow: 0 16px 60px rgba(0,0,0,.12), inset 0 1px rgba(157,255,247,.04); }
.stats-strip::before {
  content:'';
  position:absolute;
  left:3%;right:3%;top:0;height:1px;
  background:linear-gradient(90deg,transparent,rgba(73,240,227,.7),transparent);
  opacity:.7;
  pointer-events:none;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(118, 243, 241, .16) .7px, transparent .7px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent 25%, black 100%);
  mask-image: linear-gradient(90deg, transparent 25%, black 100%);
  pointer-events: none;
}
@media (max-width:700px) {
  .hero::before { inset: 0 -16px 15px; opacity: .5; background-size: 35px 35px; }
  .magic-particles { inset: 0; }
  .nav a::after { inset: auto 5px 6px; transform-origin: left; }
  .phone-frame::after { inset: -5px; }
  .feature-card:hover, .screen-card:hover, .step:hover { transform: none; }
}
@media (prefers-reduced-motion:reduce) {
  .hero::before,.hero .text-gradient,.pill-dot,.btn-primary::before,
  .phone-frame::after,.cta-section::after,.feature-card-main::before,.screen-card:nth-child(2)::before,
  .phone,.float-card,.magic-particle { animation: none !important; }
  .magic-motion-ready .magic-reveal:not(.magic-visible),.magic-motion-ready .magic-reveal.magic-visible { opacity:1; transform:none; filter:none; }
  .magic-reveal { transition:none !important; }
}

/* v1.3.1: меньше постоянных анимаций — бережём батарею и плавность прокрутки.
   Оставлены: блик на главной кнопке, переливающийся заголовок, световая обводка телефона. */
.hero::before{animation:none;opacity:.8}
.phone,.float-card-one,.float-card-two{animation:none}
.feature-card-main::before,.screen-card:nth-child(2)::before,.cta-section::after{animation:none;display:none}
.pill-dot{animation:none}
