/* === Swiftech-Art v3: direct contact and richer motion === */

.ambient-bg::before,
.ambient-bg::after {
  content: "";
  position: absolute;
  pointer-events: none;
  will-change: transform;
}
.ambient-bg::before {
  inset: -35%;
  opacity: .26;
  background-image:
    linear-gradient(rgba(69,159,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(69,159,255,.08) 1px, transparent 1px);
  background-size: 74px 74px;
  mask-image: radial-gradient(circle at 50% 45%, #000 0 34%, transparent 72%);
  animation: motionGridDrift 34s linear infinite;
}
.ambient-bg::after {
  width: 62vw;
  height: 62vw;
  min-width: 620px;
  min-height: 620px;
  right: -22vw;
  top: 18vh;
  border-radius: 50%;
  opacity: .24;
  filter: blur(28px);
  background: conic-gradient(from 35deg, transparent, rgba(99,190,255,.28), transparent 36%, rgba(20,111,255,.14), transparent 72%);
  animation: auroraOrbit 25s ease-in-out infinite alternate;
}
html[data-theme="dark"] .ambient-bg::before { opacity: .17; }
html[data-theme="dark"] .ambient-bg::after { opacity: .34; }
@keyframes motionGridDrift { to { transform: translate3d(74px,74px,0) rotate(.001deg); } }
@keyframes auroraOrbit {
  0% { transform: translate3d(-7vw,-8vh,0) rotate(0deg) scale(.88); }
  55% { transform: translate3d(-21vw,18vh,0) rotate(110deg) scale(1.08); }
  100% { transform: translate3d(-4vw,44vh,0) rotate(220deg) scale(.94); }
}
.ambient-item.dot { width: 12px !important; height: 12px !important; }
.ambient-item.dot i { border-radius: 50%; background: rgba(55,156,255,.62); border: 0; box-shadow: 0 0 0 8px rgba(65,164,255,.08), 0 0 28px rgba(25,132,255,.38); }
.ambient-item.cross i { position: relative; background: transparent; border: 0; box-shadow: none; }
.ambient-item.cross i::before,
.ambient-item.cross i::after { content:""; position:absolute; left:50%; top:50%; border-radius:999px; background:rgba(53,151,255,.28); transform:translate(-50%,-50%); }
.ambient-item.cross i::before { width:100%; height:2px; }
.ambient-item.cross i::after { width:2px; height:100%; }

.cursor-trail-dot {
  position: fixed;
  left: 0;
  top: 0;
  width: 7px;
  height: 7px;
  z-index: 950;
  border-radius: 50%;
  background: rgba(45,149,255,.62);
  box-shadow: 0 0 18px rgba(31,136,255,.42);
  pointer-events: none;
  transform: translate3d(-50%,-50%,0);
  opacity: 0;
  will-change: left, top, opacity, transform;
}

.section-motion-rail {
  position: absolute;
  z-index: 1;
  width: min(560px, 44vw);
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(34,139,255,.5), transparent);
  filter: drop-shadow(0 0 9px rgba(23,129,255,.3));
  animation: railSweep 9s ease-in-out infinite alternate;
}
.section-motion-rail::after {
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  width:9px;
  height:9px;
  border-radius:50%;
  background:#63b6ff;
  box-shadow:0 0 0 7px rgba(59,159,255,.08), 0 0 20px rgba(42,146,255,.55);
  transform:translate(-50%,-50%);
  animation: railNode 4.5s ease-in-out infinite alternate;
}
.section-motion-rail.rail-a { left: -6vw; top: 18%; transform: rotate(-12deg); }
.section-motion-rail.rail-b { right: -8vw; bottom: 17%; transform: rotate(14deg); animation-delay: -4.5s; }
@keyframes railSweep { from { translate: -5vw -14px; opacity:.25; } to { translate: 8vw 18px; opacity:.8; } }
@keyframes railNode { from { left: 12%; } to { left: 88%; } }


.motion-surface { isolation:isolate; }
.motion-surface .surface-glow { position:absolute; z-index:0; left:0; top:0; width:260px; height:260px; border-radius:50%; background:radial-gradient(circle, rgba(71,163,255,.16), transparent 68%); transform:translate3d(calc(var(--surface-x, -400px) - 50%), calc(var(--surface-y, -400px) - 50%), 0); pointer-events:none; opacity:0; transition:opacity .25s; }
.motion-surface:hover .surface-glow { opacity:1; }
.service-card.motion-surface > :not(.surface-glow),
.benefit.motion-surface > :not(.surface-glow),
.portfolio-proof > div.motion-surface > :not(.surface-glow),
.contact-form.motion-surface > :not(.surface-glow) { position:relative; z-index:1; }
.project-preview { transition: transform .45s cubic-bezier(.2,.75,.25,1), box-shadow .45s ease; }
.project-preview::after { content:""; position:absolute; inset:-35%; z-index:10; background:linear-gradient(115deg, transparent 38%, rgba(255,255,255,.34) 48%, transparent 58%); transform:translateX(-68%) rotate(4deg); transition:transform .8s cubic-bezier(.2,.75,.25,1); pointer-events:none; }
.project-card:hover .project-preview { transform:translateY(-7px) scale(1.008); box-shadow:0 34px 86px rgba(21,70,143,.2); }
.project-card:hover .project-preview::after { transform:translateX(68%) rotate(4deg); }
.button { position:relative; overflow:hidden; }
.button::after { content:""; position:absolute; top:-120%; left:-38%; width:24%; height:340%; background:linear-gradient(90deg, transparent, rgba(255,255,255,.32), transparent); transform:rotate(18deg) translateX(-220%); transition:transform .65s ease; pointer-events:none; }
.button:hover::after { transform:rotate(18deg) translateX(650%); }

.contact { overflow:hidden; }
.form-status { min-height:0; margin:-2px 0 0; padding:0; border-radius:11px; font-size:11px; font-weight:750; line-height:1.45; opacity:0; transform:translateY(5px); transition:opacity .25s, transform .25s, padding .25s, background .25s; }
.form-status.show { min-height:40px; padding:11px 13px; opacity:1; transform:none; }
.form-status.success { background:#e8f8ef; color:#187143; }
.form-status.info { background:#edf5ff; color:#175cae; }
.form-status.error { background:#fff0f0; color:#b52c2c; }
.contact-form.is-sending { pointer-events:none; }
.contact-form.is-sending .button { opacity:.72; }
.contact-form .button .submit-spinner { width:15px; height:15px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:submitSpin .65s linear infinite; }
@keyframes submitSpin { to { transform:rotate(360deg); } }
html[data-theme="dark"] .form-status.success { background:#123527; color:#9de4bd; }
html[data-theme="dark"] .form-status.info { background:#10294b; color:#a8ceff; }
html[data-theme="dark"] .form-status.error { background:#3a1d24; color:#ffc0c8; }

@media (max-width: 800px) {
  .section-motion-rail { width:70vw; opacity:.6; }
  .ambient-bg::before { background-size:54px 54px; }
  .cursor-trail-dot { display:none; }
}
@media (prefers-reduced-motion: reduce) {
  .ambient-bg::before,.ambient-bg::after,.section-motion-rail,.section-motion-rail::after,
  .cursor-trail-dot,.button::after,.project-preview::after { animation:none!important; transition:none!important; }
}
.contact-form .button .submit-spinner { display:inline-block; flex:0 0 auto; }
