/* ============ Base ============ */
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
::selection { background: #00e5ff; color: #05070d; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #05070d; }
::-webkit-scrollbar-thumb { background: linear-gradient(#00e5ff, #8b5cf6); border-radius: 10px; }

.font-display { letter-spacing: -0.02em; }

/* ============ Backdrop ============ */
.bg-grid {
  position: fixed; inset: 0; z-index: -3;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

.bg-glow {
  position: fixed; z-index: -2; border-radius: 50%;
  filter: blur(120px); opacity: 0.35; pointer-events: none;
}
.bg-glow-1 { width: 600px; height: 600px; background: #00e5ff; top: -200px; left: -150px; animation: drift1 22s ease-in-out infinite; }
.bg-glow-2 { width: 500px; height: 500px; background: #8b5cf6; top: 20%; right: -180px; animation: drift2 26s ease-in-out infinite; }
.bg-glow-3 { width: 550px; height: 550px; background: #ff2ec4; bottom: -220px; left: 30%; opacity: 0.22; animation: drift1 30s ease-in-out infinite reverse; }

@keyframes drift1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(60px, 40px); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-50px, 60px); } }

/* ============ Loader ============ */
#loader { transition: opacity .6s ease, visibility .6s ease; }
#loader.loaded { opacity: 0; visibility: hidden; }
.loader-mark { color: #fff; }
.loader-bar { width: 160px; height: 3px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, #00e5ff, #8b5cf6); animation: loadbar 1s ease-in-out infinite; }
@keyframes loadbar { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

/* ============ Navbar ============ */
#navbar { background: transparent; }
#navbar.scrolled { background: rgba(5,7,13,0.75); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(255,255,255,0.06); }
.nav-link { position: relative; transition: color .25s ease; }
.nav-link:hover { color: #fff; }
.nav-link::after { content:''; position:absolute; left:0; bottom:-6px; width:0; height:2px; background: linear-gradient(90deg,#00e5ff,#8b5cf6); transition: width .25s ease; }
.nav-link:hover::after { width: 100%; }
.mobile-link { display: block; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }

/* ============ Buttons ============ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 26px; border-radius: 999px;
  background: linear-gradient(90deg, #00e5ff, #8b5cf6);
  color: #05070d; font-weight: 600; font-size: 14px;
  box-shadow: 0 8px 30px -6px rgba(0,229,255,0.45);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 12px 34px -6px rgba(139,92,246,0.55); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15); color: #fff; font-weight: 500; font-size: 14px;
  transition: border-color .25s ease, background .25s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.3); }

.shadow-glow { box-shadow: 0 0 25px rgba(0,229,255,0.5); }

/* ============ Logo mark ============ */
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 0; transition: transform .25s ease, background .25s ease;
  background: radial-gradient(ellipse at center, rgba(148,197,255,0.16), rgba(148,197,255,0.05) 70%, transparent 100%);
  border-radius: 12px; padding: 6px 10px;
}
.logo-mark img { height: 34px; width: auto; display: block; }
a:hover .logo-mark { transform: translateY(-1px); background: radial-gradient(ellipse at center, rgba(148,197,255,0.24), rgba(148,197,255,0.08) 70%, transparent 100%); }
.logo-mark-lg img { height: 64px; }
.logo-mark-lg { padding: 14px 20px; }

.brand-tagline {
  font-size: 10px; font-weight: 600; color: #64748b;
  text-transform: uppercase; letter-spacing: 0.14em;
  margin-top: 2px;
}

/* ============ Badge / titles ============ */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: #a5f3fc; background: rgba(0,229,255,0.08); border: 1px solid rgba(0,229,255,0.25);
  letter-spacing: .02em;
}
.section-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: #fff; font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1.15; }
.text-gradient { background: linear-gradient(90deg, #00e5ff, #8b5cf6 55%, #ff2ec4); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ============ Hero card ============ */
.hero-card {
  background: rgba(15,21,36,0.7); backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 24px; padding: 32px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.mini-stat {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 10px 12px; font-size: 12px; color: #cbd5e1;
}

.floating-chip {
  position: absolute; display: flex; align-items: center; gap: 8px;
  background: rgba(11,15,26,0.9); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 14px;
  padding: 10px 14px; font-size: 12px; font-weight: 600; color: #fff;
  box-shadow: 0 15px 40px -10px rgba(0,0,0,0.6);
}
.chip-1 { top: -18px; right: -10px; color: #34d399; animation: floaty 5s ease-in-out infinite; }
.chip-1 i { color: #34d399; }
.chip-2 { bottom: -18px; left: -18px; animation: floaty 7s ease-in-out infinite reverse; }
.chip-2 i { color: #00e5ff; }

.scroll-cue {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.15);
  display: grid; place-items: center; color: #94a3b8;
  animation: bounce 2.2s ease-in-out infinite;
}
@keyframes bounce { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,8px); } }

/* ============ About ============ */
.about-frame { padding: 24px; }
.about-panel {
  border-radius: 1.6rem; background: linear-gradient(140deg, rgba(0,229,255,0.5), rgba(139,92,246,0.4), rgba(255,46,196,0.4));
  aspect-ratio: 4/3;
}
.check-icon {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px;
  background: rgba(0,229,255,0.12); border: 1px solid rgba(0,229,255,0.3);
  display: grid; place-items: center; color: #00e5ff; font-size: 12px; margin-top: 2px;
}

/* ============ Service cards ============ */
.service-card {
  background: rgba(15,21,36,0.6); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px; padding: 32px 28px; transition: transform .3s ease, border-color .3s ease, background .3s ease;
}
.service-card:hover { transform: translateY(-6px); border-color: rgba(0,229,255,0.35); background: rgba(15,21,36,0.9); }
.service-icon {
  width: 54px; height: 54px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(0,229,255,0.18), rgba(139,92,246,0.18));
  border: 1px solid rgba(255,255,255,0.08);
  display: grid; place-items: center; font-size: 20px; color: #00e5ff;
}

/* ============ Portfolio ============ */
.filter-btn {
  padding: 9px 20px; border-radius: 999px; font-size: 13px; font-weight: 500;
  border: 1px solid rgba(255,255,255,0.1); color: #94a3b8; transition: all .25s ease;
}
.filter-btn:hover { color: #fff; border-color: rgba(0,229,255,0.4); }
.filter-btn.active { background: linear-gradient(90deg,#00e5ff,#8b5cf6); color: #05070d; border-color: transparent; font-weight: 600; }

.port-card {
  background: rgba(15,21,36,0.6); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px; overflow: hidden; transition: transform .3s ease, border-color .3s ease;
}
.port-card:hover { transform: translateY(-6px); border-color: rgba(139,92,246,0.4); }
.port-card.hide { display: none; }
.port-thumb { height: 170px; position: relative; overflow: hidden; }
.port-tag { position: absolute; top: 14px; left: 14px; z-index: 2; background: rgba(5,7,13,0.6); backdrop-filter: blur(6px); color: #fff; font-size: 11px; font-weight: 600; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.15); }
.port-illustration { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .4s ease; }
.port-card:hover .port-illustration { transform: scale(1.05); }
.thumb-1 { background: linear-gradient(135deg,#00e5ff55,#0b0f1a); }
.thumb-2 { background: linear-gradient(135deg,#8b5cf655,#0b0f1a); }
.thumb-3 { background: linear-gradient(135deg,#ff2ec455,#0b0f1a); }
.thumb-4 { background: linear-gradient(135deg,#34d39955,#0b0f1a); }
.thumb-5 { background: linear-gradient(135deg,#fbbf2455,#0b0f1a); }
.thumb-6 { background: linear-gradient(135deg,#60a5fa55,#0b0f1a); }

/* ============ Process ============ */
.process-card { background: rgba(15,21,36,0.5); border: 1px solid rgba(255,255,255,0.07); border-radius: 18px; padding: 26px; position: relative; }
.process-num { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 34px; background: linear-gradient(90deg,#00e5ff,#8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ============ Testimonials ============ */
.testimonial-track { display: flex; transition: transform .6s cubic-bezier(.65,0,.35,1); }
.testimonial-slide {
  min-width: 100%; background: rgba(15,21,36,0.6); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 22px; padding: 40px;
}
.avatar {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg,#00e5ff,#8b5cf6); color: #05070d; font-weight: 700; font-size: 13px;
}
#testimonialDots button { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.2); transition: all .25s ease; }
#testimonialDots button.active { width: 24px; background: linear-gradient(90deg,#00e5ff,#8b5cf6); }

/* ============ CTA ============ */
.cta-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  padding: 44px; border-radius: 26px;
  background: linear-gradient(120deg, rgba(0,229,255,0.12), rgba(139,92,246,0.12));
  border: 1px solid rgba(255,255,255,0.1);
}

/* ============ Contact ============ */
.contact-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: rgba(0,229,255,0.1); border: 1px solid rgba(0,229,255,0.25);
  display: grid; place-items: center; color: #00e5ff;
}
.social-icon {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,0.12); color: #cbd5e1; transition: all .25s ease;
}
.social-icon:hover { background: linear-gradient(135deg,#00e5ff,#8b5cf6); color: #05070d; border-color: transparent; }

.form-panel { background: rgba(15,21,36,0.6); border: 1px solid rgba(255,255,255,0.08); border-radius: 22px; padding: 34px; }
.field { position: relative; }
.field input, .field textarea {
  width: 100%; background: rgba(5,7,13,0.5); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px; padding: 16px 14px 8px; color: #fff; font-size: 14px; outline: none;
  transition: border-color .25s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { border-color: #00e5ff; }
.field label {
  position: absolute; left: 14px; top: 16px; color: #64748b; font-size: 14px; pointer-events: none;
  transition: all .2s ease;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  top: 6px; font-size: 10.5px; color: #00e5ff; letter-spacing: .03em; text-transform: uppercase;
}
.field .err { display: none; color: #fb7185; font-size: 11px; margin-top: 5px; }
.field.invalid input, .field.invalid textarea { border-color: #fb7185; }
.field.invalid .err { display: block; }

/* ============ Footer ============ */
.footer-link { transition: color .2s ease; }
.footer-link:hover { color: #00e5ff; }

.back-to-top {
  position: fixed; bottom: 26px; right: 26px; width: 46px; height: 46px; z-index: 40;
  border-radius: 50%; background: linear-gradient(135deg,#00e5ff,#8b5cf6); color: #05070d;
  display: grid; place-items: center; box-shadow: 0 10px 30px -8px rgba(0,229,255,0.5);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .3s ease;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* ============ Scroll reveal ============ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

@media (max-width: 1023px) {
  .floating-chip { display: none; }
}
