:root {
  --bg: #0a0a0a;
  --gray: #1a1a1a;
  --neon: #00f2ff;
  --purple: #bc13fe;
}

* { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  font-family: 'Inter', sans-serif;
  background: #0a0a0a;
  cursor: none;
}

#smooth-wrapper {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}
#smooth-content {
  will-change: transform;
}

.font-montserrat { font-family: 'Montserrat', sans-serif; }

#cursor-dot, #cursor-ring {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transition: transform 0.15s ease-out, width 0.2s, height 0.2s;
  mix-blend-mode: difference;
}
#cursor-dot {
  width: 8px; height: 8px;
  background: white;
  transform: translate(-50%, -50%);
}
#cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.5);
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease-out, width 0.2s, height 0.2s, border-color 0.2s;
}
.cursor-hover #cursor-ring {
  width: 60px; height: 60px;
  border-color: var(--neon);
}

@media (max-width: 768px) {
  body { cursor: auto; }
  #cursor-dot, #cursor-ring { display: none; }
  #smooth-wrapper { position: static; }
}

.letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  background: linear-gradient(180deg, #fff 0%, #b8b8b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(0, 242, 255, 0.4);
  filter: drop-shadow(0 0 12px rgba(0,242,255,0.25));
}

.hero-bg {
  will-change: transform;
}

.cta-glow {
  position: relative;
  transition: all 0.4s ease;
  box-shadow: 0 0 30px rgba(0, 242, 255, 0.2);
  overflow: hidden;
}
.cta-glow:hover {
  box-shadow: 0 0 50px rgba(0, 242, 255, 0.5), 0 0 80px rgba(188, 19, 254, 0.3);
  transform: translateY(-2px);
}

.ripple {
  position: relative;
  overflow: hidden;
}
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transform: scale(0);
  animation: ripple-anim 0.7s ease-out;
  pointer-events: none;
}
@keyframes ripple-anim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.fade-up {
  opacity: 0;
  transform: translateY(30px);
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
}

.sticky-layer {
  position: relative;
}

.overlap-section {
  position: relative;
  margin-top: -2px;
}

.service-card {
  position: relative;
  background: linear-gradient(135deg, rgba(26,26,26,0.8), rgba(10,10,10,0.6));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 32px 28px;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, transparent, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s, background 0.4s;
}
.service-card:hover {
  transform: translateY(-8px);
  background: linear-gradient(135deg, rgba(26,26,26,1), rgba(20,15,30,0.8));
  box-shadow: 0 20px 50px rgba(0, 242, 255, 0.15), 0 0 0 1px rgba(0, 242, 255, 0.2);
}
.service-card:hover::before {
  opacity: 1;
  background: linear-gradient(135deg, var(--neon), var(--purple));
}
.service-card:hover .service-icon {
  color: var(--neon);
  transform: scale(1.1);
}

.service-icon {
  display: inline-flex;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0,242,255,0.1), rgba(188,19,254,0.1));
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  transition: all 0.4s ease;
  margin-bottom: 20px;
}
.service-icon svg { width: 26px; height: 26px; }

.flow-step {
  position: relative;
  text-align: center;
  padding: 32px 20px;
  background: rgba(26,26,26,0.4);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  opacity: 0.4;
  transform: translateY(20px);
}
.flow-step.active {
  opacity: 1;
  transform: translateY(0);
  border-color: rgba(0,242,255,0.4);
  box-shadow: 0 0 40px rgba(0,242,255,0.2), inset 0 0 20px rgba(0,242,255,0.05);
}
.flow-step.active .flow-icon {
  color: var(--neon);
  border-color: var(--neon);
  box-shadow: 0 0 30px rgba(0,242,255,0.5);
}
.flow-step.active .flow-pulse {
  opacity: 1;
}
.flow-icon {
  display: inline-flex;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0,242,255,0.15), rgba(188,19,254,0.15));
  border: 1px solid rgba(0,242,255,0.3);
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  transition: all 0.6s ease;
}
.flow-icon svg { width: 28px; height: 28px; }

.flow-pulse {
  position: absolute;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--neon);
  opacity: 0;
  animation: flow-ping 1.8s ease-out infinite;
  pointer-events: none;
}
@keyframes flow-ping {
  0% { transform: translateX(-50%) scale(0.8); opacity: 0.8; }
  100% { transform: translateX(-50%) scale(2); opacity: 0; }
}

#flow-svg {
  top: 32px;
  height: 64px;
  z-index: 1;
}
#flow-path {
  stroke-dashoffset: 1000;
  stroke-dasharray: 1000;
}

.portfolio-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 320px;
  background: #1a1a1a;
}
.portfolio-card img,
.portfolio-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 320px;
  transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}
.portfolio-card:hover img,
.portfolio-card:hover video {
  transform: scale(1.05);
}
.portfolio-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 28px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.9));
  transform: translateY(20px);
  transition: transform 0.5s ease;
  z-index: 5;
}
.portfolio-card:hover .portfolio-overlay {
  transform: translateY(0);
}

.video-mockup {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  overflow: hidden;
}

.zoom-img {
  will-change: transform;
}

.grid-pattern {
  background-image:
    linear-gradient(rgba(0,242,255,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,242,255,0.1) 1px, transparent 1px);
  background-size: 40px 40px;
}

#whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(37,211,102,0.4);
  transition: transform 0.3s;
}
#whatsapp-float:hover { transform: scale(1.1); }

.wa-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(37,211,102,0.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

#ai-assistant {
  position: fixed;
  bottom: 24px;
  right: 92px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(10,10,10,0.7);
  border: 1px solid rgba(0,242,255,0.3);
  backdrop-filter: blur(20px);
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  cursor: none;
  transition: all 0.4s ease;
  box-shadow: 0 10px 40px rgba(0,242,255,0.2);
}
#ai-assistant:hover {
  border-color: var(--neon);
  box-shadow: 0 10px 50px rgba(0,242,255,0.4), 0 0 30px rgba(188,19,254,0.3);
  transform: translateY(-2px);
}

.ai-orb {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-core {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: black;
  z-index: 2;
}
.ai-pulse, .ai-pulse-2 {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon), var(--purple));
  animation: ai-pulse 2.4s ease-out infinite;
  z-index: 1;
}
.ai-pulse-2 { animation-delay: 1.2s; }
@keyframes ai-pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(2); opacity: 0; }
}

.ai-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: white;
  background: linear-gradient(90deg, var(--neon), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (max-width: 640px) {
  .ai-label { display: none; }
  #ai-assistant { padding: 8px; right: 88px; }
}

#ai-chat {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 500px;
  max-height: calc(100vh - 140px);
  background: rgba(12,12,16,0.95);
  border: 1px solid rgba(0,242,255,0.25);
  border-radius: 20px;
  backdrop-filter: blur(30px);
  z-index: 101;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 60px rgba(0,242,255,0.15);
  animation: chat-in 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
@keyframes chat-in {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(0,242,255,0.05), transparent);
}
.ai-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: black;
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.ai-chat-messages::-webkit-scrollbar { width: 4px; }
.ai-chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.ai-msg {
  display: flex;
  animation: msg-in 0.3s ease-out;
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.ai-msg-bot { justify-content: flex-start; }
.ai-msg-user { justify-content: flex-end; }

.ai-msg-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
}
.ai-msg-bot .ai-msg-bubble {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(0,242,255,0.15);
  color: rgba(255,255,255,0.9);
  border-bottom-left-radius: 4px;
}
.ai-msg-user .ai-msg-bubble {
  background: linear-gradient(135deg, var(--neon), var(--purple));
  color: black;
  font-weight: 500;
  border-bottom-right-radius: 4px;
}
.ai-msg-typing .ai-msg-bubble {
  display: flex;
  gap: 4px;
}
.ai-msg-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--neon);
  animation: typing 1.2s infinite;
}
.ai-msg-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-msg-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.ai-chat-input {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.4);
}
#ai-chat-field {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 10px 16px;
  color: white;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
#ai-chat-field:focus {
  border-color: rgba(0,242,255,0.4);
}
#ai-chat-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: black;
  transition: transform 0.2s;
}
#ai-chat-send:hover { transform: scale(1.08); }
#ai-chat-send:disabled { opacity: 0.5; transform: none; }

::selection { background: var(--neon); color: black; }
