/* ─── RESET & BASE ─────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:      #080810;
  --bg2:     #0d0d1a;
  --accent:  #7c5cfc;
  --accent2: #c05cfc;
  --white:   #f0f0ff;
  --muted:   #5a5a80;
  --glass:   rgba(255,255,255,0.04);
  --border:  rgba(255,255,255,0.08);
  --glow:    rgba(124,92,252,0.35);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: 'Segoe UI', system-ui, sans-serif;
  overflow-x: hidden;
  cursor: none;
}

::selection { background: var(--accent); color: #fff; }

/* ─── CUSTOM CURSOR ────────────────────────────────────────────────────── */
#cursor {
  position: fixed; top: 0; left: 0; z-index: 9999;
  pointer-events: none; mix-blend-mode: exclusion;
}
#cursor .dot {
  position: absolute; width: 8px; height: 8px;
  background: #fff; border-radius: 50%;
  transform: translate(-50%,-50%);
  transition: transform .15s ease, opacity .15s ease;
}
#cursor .ring {
  position: absolute; width: 36px; height: 36px;
  border: 1.5px solid rgba(255,255,255,.6); border-radius: 50%;
  transform: translate(-50%,-50%);
  transition: transform .4s cubic-bezier(.17,.67,.83,.67), width .3s, height .3s, opacity .3s;
}
body.hovering #cursor .ring { width: 60px; height: 60px; opacity: .4; }
body.hovering #cursor .dot  { transform: translate(-50%,-50%) scale(2); }

/* ─── CANVAS BACKGROUND ────────────────────────────────────────────────── */
#bg-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
}

/* ─── NOISE OVERLAY ────────────────────────────────────────────────────── */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
  opacity: .5;
}

/* ─── SCROLL PROGRESS ──────────────────────────────────────────────────── */
#progress {
  position: fixed; top: 0; left: 0; z-index: 1000;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width .1s linear;
  box-shadow: 0 0 12px var(--accent);
}

/* ─── NAVIGATION ───────────────────────────────────────────────────────── */
nav {
  position: fixed; top: 24px; left: 50%; z-index: 100;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 10px 20px;
  transition: all .4s ease;
}
nav.scrolled {
  background: rgba(8,8,16,.8);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.nav-logo {
  font-size: .9rem; font-weight: 700; letter-spacing: .08em;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-right: 16px; white-space: nowrap;
}
nav a {
  color: var(--muted); text-decoration: none;
  font-size: .8rem; font-weight: 500; letter-spacing: .04em;
  padding: 6px 14px; border-radius: 100px;
  transition: color .3s, background .3s;
}
nav a:hover { color: var(--white); background: var(--glass); }

/* hamburger button */
.nav-hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 36px; height: 36px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--muted); border-radius: 2px;
  transition: all .3s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile nav links dropdown */
.nav-links {
  display: flex; align-items: center; gap: 8px;
}

@media (max-width: 640px) {
  nav {
    top: 16px;
    padding: 8px 16px;
    border-radius: 100px;
    flex-wrap: nowrap;
  }
  .nav-logo { display: none; }
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute; top: calc(100% + 10px); left: 50%;
    transform: translateX(-50%);
    flex-direction: column; gap: 4px;
    background: rgba(8,8,16,.95);
    backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 12px;
    min-width: 160px;
  }
  .nav-links.open { display: flex; }
  nav a {
    text-align: center; width: 100%;
    padding: 8px 16px;
  }
}

@media (max-width: 400px) {
  nav { top: 12px; }
}

/* ─── WRAPPER ──────────────────────────────────────────────────────────── */
.wrapper { position: relative; z-index: 2; }

/* ─── HERO ─────────────────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center; padding: 120px 24px 80px;
  position: relative; overflow: hidden;
}

.hero-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .72rem; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent);
  background: rgba(124,92,252,.1);
  border: 1px solid rgba(124,92,252,.25);
  padding: 6px 16px; border-radius: 100px;
  margin-bottom: 32px;
  animation: fadeUp .8s .2s both;
}
.hero-label span { display: inline-block; animation: pulse 2s infinite; }

.hero-title {
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 800; line-height: 1.0;
  letter-spacing: -.04em;
  animation: fadeUp .8s .35s both;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line span {
  display: block;
  animation: slideUp .9s cubic-bezier(.22,1,.36,1) both;
}
.hero-title .line:nth-child(2) span { animation-delay: .15s; }
.hero-title .line:nth-child(3) span { animation-delay: .28s; }
.hero-title .gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 60%, #fc5c8a 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.hero-sub {
  margin-top: 28px; max-width: 520px;
  font-size: 1.05rem; color: var(--muted); line-height: 1.7;
  animation: fadeUp .8s .6s both;
}

.hero-cta {
  display: flex; gap: 16px; margin-top: 48px; flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp .8s .75s both;
}
.btn-primary {
  padding: 14px 32px; border-radius: 100px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-weight: 600; font-size: .9rem;
  text-decoration: none; letter-spacing: .03em;
  box-shadow: 0 0 32px var(--glow);
  transition: transform .25s, box-shadow .25s;
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg,rgba(255,255,255,.15),transparent);
  opacity: 0; transition: opacity .3s;
}
.btn-primary:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 0 48px var(--glow); }
.btn-primary:hover::after { opacity: 1; }

.btn-ghost {
  padding: 14px 32px; border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--white); font-weight: 500; font-size: .9rem;
  text-decoration: none; letter-spacing: .03em;
  backdrop-filter: blur(10px);
  transition: border-color .3s, background .3s, transform .25s;
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: rgba(124,92,252,.08);
  transform: translateY(-2px);
}

/* floating badges */
.float-badge {
  position: absolute; display: flex; align-items: center; gap: 8px;
  background: var(--glass); border: 1px solid var(--border);
  backdrop-filter: blur(12px); border-radius: 12px;
  padding: 10px 16px; font-size: .78rem; color: var(--muted);
  animation: float 6s ease-in-out infinite;
  white-space: nowrap;
}
.float-badge .icon {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; font-size: 1rem;
}
.fb1 { bottom: 22%; left: 8%;  animation-delay: 0s;   }
.fb2 { bottom: 30%; right: 8%; animation-delay: -2s;  }
.fb3 { top:    28%; left: 5%;  animation-delay: -4s;  }

/* ─── STATS STRIP ──────────────────────────────────────────────────────── */
#stats {
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-inner {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
  gap: 32px; text-align: center;
}
.stat-num {
  font-size: 2.8rem; font-weight: 800; letter-spacing: -.04em;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-label { font-size: .78rem; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-top: 4px; }

/* ─── SECTION COMMON ───────────────────────────────────────────────────── */
section { padding: 100px 24px; }
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .72rem; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 20px;
}
.section-label::before {
  content: ''; display: block; width: 24px; height: 1px; background: var(--accent);
}
.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800;
  letter-spacing: -.04em; line-height: 1.1;
}
.section-sub {
  margin-top: 16px; color: var(--muted); max-width: 480px; line-height: 1.7;
}

/* reveal animation */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ─── PROJECTS ─────────────────────────────────────────────────────────── */
#projects .inner {
  max-width: 1200px; margin: 0 auto;
}
#projects .head { margin-bottom: 64px; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.project-card {
  position: relative; border-radius: 20px; overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--border);
  transition: transform .4s cubic-bezier(.17,.67,.83,.67), box-shadow .4s;
  transform-style: preserve-3d;
  cursor: none;
}
.project-card::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%),
    rgba(124,92,252,.12) 0%, transparent 65%);
  opacity: 0; transition: opacity .4s;
}
.project-card:hover::before { opacity: 1; }
.project-card:hover { box-shadow: 0 24px 64px rgba(0,0,0,.5), 0 0 0 1px rgba(124,92,252,.25); }

.card-visual {
  height: 220px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.card-visual .app-icon {
  width: 80px; height: 80px; border-radius: 22px;
  display: grid; place-items: center; font-size: 2.5rem;
  position: relative; z-index: 2;
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
  transition: transform .4s cubic-bezier(.17,.67,.83,.67);
}
.project-card:hover .app-icon { transform: translateY(-8px) scale(1.05); }

.card-visual .rings {
  position: absolute; inset: 0; display: grid; place-items: center;
}
.card-visual .rings span {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.06);
  animation: spinRing 12s linear infinite;
}
.card-visual .rings span:nth-child(1) { width: 120px; height: 120px; }
.card-visual .rings span:nth-child(2) { width: 180px; height: 180px; animation-direction: reverse; animation-duration: 18s; }
.card-visual .rings span:nth-child(3) { width: 240px; height: 240px; animation-duration: 24s; }

.card-body { padding: 24px; position: relative; z-index: 1; }
.card-tags {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
}
.tag {
  font-size: .68rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 100px;
  background: rgba(124,92,252,.12); color: var(--accent);
  border: 1px solid rgba(124,92,252,.2);
}
.tag.alt { background: rgba(192,92,252,.1); color: var(--accent2); border-color: rgba(192,92,252,.2); }
.tag.rose { background: rgba(252,92,138,.1); color: #fc5c8a; border-color: rgba(252,92,138,.2); }

.card-name {
  font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: 8px;
}
.card-desc { font-size: .88rem; color: var(--muted); line-height: 1.6; }

.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--border);
}
.card-meta { font-size: .78rem; color: var(--muted); }
.card-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 600; color: var(--accent);
  text-decoration: none; letter-spacing: .02em;
  transition: gap .25s;
}
.card-link:hover { gap: 10px; }

/* featured card */
.project-card.featured {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1fr 1fr;
}
.project-card.featured .card-visual { height: auto; min-height: 280px; }
@media(max-width:700px) {
  .project-card.featured { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
}

/* ─── TECH MARQUEE ─────────────────────────────────────────────────────── */
#tech {
  padding: 60px 0; overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.marquee-track {
  display: flex; gap: 48px; width: max-content;
  animation: marquee 20s linear infinite;
}
.marquee-track:nth-child(2) { animation-direction: reverse; margin-top: 24px; }
.tech-item {
  display: flex; align-items: center; gap: 10px;
  font-size: .85rem; font-weight: 600; color: var(--muted);
  white-space: nowrap; letter-spacing: .04em;
  transition: color .3s;
}
.tech-item:hover { color: var(--white); }
.tech-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .5; }

/* ─── FEATURES ─────────────────────────────────────────────────────────── */
#features .inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center;
}
@media(max-width:768px) { #features .inner { grid-template-columns: 1fr; gap: 48px; } }

.feat-list { margin-top: 40px; display: flex; flex-direction: column; gap: 20px; }
.feat-item {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px; border-radius: 16px;
  border: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.feat-item:hover {
  border-color: var(--border);
  background: var(--glass);
}
.feat-icon {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.2rem;
  background: linear-gradient(135deg, rgba(124,92,252,.2), rgba(192,92,252,.1));
}
.feat-text h3 { font-size: .95rem; font-weight: 700; margin-bottom: 4px; }
.feat-text p  { font-size: .83rem; color: var(--muted); line-height: 1.6; }

/* device mockup */
.device-wrap {
  display: flex; justify-content: center; align-items: center;
  position: relative;
}
.device {
  width: 260px; height: 520px; border-radius: 44px;
  border: 8px solid #1a1a2e;
  background: linear-gradient(160deg, #12122a 0%, #0d0d1a 100%);
  position: relative; overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.06),
              inset 0 0 60px rgba(124,92,252,.05);
}
.device::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 100px; height: 28px; background: #1a1a2e;
  border-radius: 0 0 20px 20px; z-index: 10;
}
.device-screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; padding: 50px 16px 20px;
  gap: 10px; overflow: hidden;
}
.ds-bar {
  height: 8px; border-radius: 4px;
  background: rgba(255,255,255,.07);
}
.ds-bar.accent { background: linear-gradient(90deg, var(--accent), var(--accent2)); width: 60%; }
.ds-card {
  background: rgba(255,255,255,.04); border-radius: 12px;
  border: 1px solid rgba(255,255,255,.06); padding: 12px;
  flex-shrink: 0;
}
.ds-card .ds-bar { margin-bottom: 6px; }
.ds-card .ds-bar.short { width: 40%; margin-bottom: 0; }
.device-glow {
  position: absolute; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,252,.25) 0%, transparent 70%);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  animation: glowPulse 4s ease-in-out infinite;
}

/* ─── PROCESS ──────────────────────────────────────────────────────────── */
#process .inner { max-width: 900px; margin: 0 auto; }
#process .head { text-align: center; margin-bottom: 64px; }
#process .head .section-sub { margin: 16px auto 0; }

.process-steps {
  display: grid; gap: 1px; position: relative;
}
.process-steps::before {
  content: ''; position: absolute; left: 32px; top: 0; bottom: 0;
  width: 1px; background: linear-gradient(180deg, transparent, var(--accent), var(--accent2), transparent);
}
.step {
  display: flex; gap: 24px; padding: 32px 0 32px 0;
  position: relative;
}
.step-num {
  flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg2); border: 1px solid var(--border);
  font-size: 1.1rem; font-weight: 800; color: var(--accent);
  position: relative; z-index: 1;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.step:hover .step-num {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--glow);
  background: rgba(124,92,252,.1);
}
.step-content { padding-top: 16px; }
.step-content h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.step-content p  { font-size: .88rem; color: var(--muted); line-height: 1.7; }

/* ─── TESTIMONIALS ─────────────────────────────────────────────────────── */
#testimonials { text-align: center; }
#testimonials .inner { max-width: 1100px; margin: 0 auto; }
#testimonials .head { margin-bottom: 64px; }
#testimonials .head .section-label,
#testimonials .head .section-sub { margin-left: auto; margin-right: auto; }
#testimonials .head .section-label { justify-content: center; }
#testimonials .head .section-label::before { display: none; }

.testi-grid {
  display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 20px;
}
.testi-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; padding: 28px; text-align: left;
  transition: border-color .3s, transform .3s;
}
.testi-card:hover { border-color: rgba(124,92,252,.3); transform: translateY(-4px); }
.testi-stars { color: var(--accent); font-size: 1rem; letter-spacing: 2px; margin-bottom: 16px; }
.testi-text { font-size: .9rem; color: var(--muted); line-height: 1.7; margin-bottom: 24px; }
.testi-author { display: flex; align-items: center; gap: 12px; }
.testi-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center; font-weight: 700; font-size: .9rem; flex-shrink: 0;
}
.testi-name { font-size: .88rem; font-weight: 600; }
.testi-role { font-size: .78rem; color: var(--muted); }

/* ─── CTA SECTION ──────────────────────────────────────────────────────── */
#cta {
  text-align: center; padding: 120px 24px;
  position: relative; overflow: hidden;
}
#cta .glow-orb {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
  pointer-events: none;
}
#cta .glow-orb.a { width: 500px; height: 500px; top: -100px; left: 50%; transform: translateX(-50%); }
#cta .glow-orb.b { width: 300px; height: 300px; bottom: -100px; left: 20%; opacity: .5; }
#cta .inner { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
#cta h2 {
  font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800;
  letter-spacing: -.04em; line-height: 1.1; margin-bottom: 20px;
}
#cta p { color: var(--muted); font-size: 1rem; line-height: 1.7; margin-bottom: 40px; }

/* ─── FOOTER ───────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.footer-logo {
  font-size: 1rem; font-weight: 700; letter-spacing: .08em;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.footer-copy { font-size: .78rem; color: var(--muted); }
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-size: .78rem; color: var(--muted); text-decoration: none;
  transition: color .3s;
}
.footer-links a:hover { color: var(--white); }

/* ─── ANIMATIONS ───────────────────────────────────────────────────────── */
@keyframes fadeUp   { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:none; } }
@keyframes slideUp  { from { transform:translateY(110%); } to { transform:translateY(0); } }
@keyframes float    { 0%,100% { transform:translateY(0) rotate(-1deg); } 50% { transform:translateY(-16px) rotate(1deg); } }
@keyframes spinRing { from { transform:rotate(0deg); } to { transform:rotate(360deg); } }
@keyframes marquee  { from { transform:translateX(0); } to { transform:translateX(-50%); } }
@keyframes glowPulse{ 0%,100%{ opacity:.6; transform:translate(-50%,-50%) scale(1); } 50%{ opacity:1; transform:translate(-50%,-50%) scale(1.15); } }
@keyframes pulse    { 0%,100%{ opacity:1; } 50%{ opacity:.4; } }
