/* ---------- Tokens ---------- */
:root{
  --bg:          #0A0E17;
  --bg-panel:    #121826;
  --bg-panel-2:  #171F30;
  --line:        rgba(255,255,255,.08);
  --text:        #EDEFF5;
  --text-muted:  #8B93A7;
  --violet:      #7C5CFC;
  --violet-deep: #5B3DE0;
  --cyan:        #33E1E8;
  --green:       #25D366;

  --font-display: 'Unbounded', sans-serif;
  --font-body:    'Manrope', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --radius-lg: 24px;
  --radius-md: 16px;
  --container: 1140px;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }

body{
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
  position:relative;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *{ animation-duration:0.01ms !important; transition-duration:0.01ms !important; }
}

a{ color:inherit; text-decoration:none; }
ul{ list-style:none; }
.mono{ font-family:var(--font-mono); }

:focus-visible{
  outline:2px solid var(--cyan);
  outline-offset:3px;
  border-radius:4px;
}

/* ---------- Background layers ---------- */
.bg-grid{
  position:fixed; inset:0; z-index:0; pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size:56px 56px;
  mask-image:radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
}
.bg-glow{
  position:fixed; z-index:0; pointer-events:none;
  border-radius:50%; filter:blur(90px);
}
.glow-1{
  width:560px; height:560px; top:-200px; left:-160px;
  background:radial-gradient(circle, rgba(124,92,252,.35), transparent 70%);
  animation:drift1 22s ease-in-out infinite;
}
.glow-2{
  width:520px; height:520px; top:20%; right:-200px;
  background:radial-gradient(circle, rgba(51,225,232,.22), transparent 70%);
  animation:drift2 26s ease-in-out infinite;
}
@keyframes drift1{
  0%,100%{ transform:translate(0,0); }
  50%{ transform:translate(40px,30px); }
}
@keyframes drift2{
  0%,100%{ transform:translate(0,0); }
  50%{ transform:translate(-35px,-25px); }
}
.grain{
  position:fixed; inset:0; z-index:2; pointer-events:none;
  opacity:.045; mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, header, footer{ position:relative; z-index:1; }

/* ---------- Type ---------- */
.eyebrow{
  font-family:var(--font-mono);
  font-weight:500;
  letter-spacing:.08em;
  font-size:.82rem;
  color:var(--cyan);
  margin-bottom:.9rem;
}
.eyebrow.center{ text-align:center; }
.section-title{
  font-family:var(--font-display);
  font-weight:600;
  font-size:clamp(1.9rem, 3.6vw, 2.6rem);
  margin-bottom:1rem;
  letter-spacing:-.01em;
  position:relative;
}
.section-title.center{ text-align:center; }
.eyebrow{ display:flex; align-items:center; gap:.6rem; }
.eyebrow::before{
  content:"";
  width:22px; height:1.5px;
  background:linear-gradient(90deg, var(--violet), var(--cyan));
  border-radius:2px;
}
.eyebrow.center{ justify-content:center; }

/* ---------- Buttons ---------- */
.btn{
  position:relative;
  display:inline-flex; align-items:center; gap:.6rem;
  padding:.95rem 1.7rem;
  border-radius:999px;
  font-family:var(--font-body);
  font-weight:700;
  font-size:.95rem;
  transition:transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
  white-space:nowrap;
  overflow:hidden;
}
.btn-primary{
  background:linear-gradient(135deg, var(--violet), var(--cyan));
  color:#0A0E17;
  box-shadow:0 10px 28px -10px rgba(124,92,252,.6);
}
.btn-primary::after{
  content:"";
  position:absolute; top:0; left:-60%; width:40%; height:100%;
  background:linear-gradient(115deg, transparent, rgba(255,255,255,.45), transparent);
  transform:skewX(-20deg);
  transition:left .6s ease;
}
.btn-primary:hover::after{ left:130%; }
.btn-primary:hover{ transform:translateY(-2px); box-shadow:0 16px 34px -10px rgba(51,225,232,.5); }
.btn-ghost{
  background:transparent;
  color:var(--text);
  border:1.5px solid var(--line);
}
.btn-ghost:hover{ border-color:var(--cyan); color:var(--cyan); }

/* ---------- Nav ---------- */
.nav{
  position:fixed; top:0; left:0; right:0; z-index:50;
  padding:1.1rem 0;
  background:rgba(10,14,23,.7);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
  transition:box-shadow .3s ease;
}
.nav-inner{
  max-width:var(--container); margin:0 auto; padding:0 1.5rem;
  display:flex; align-items:center; justify-content:space-between; gap:1rem;
}
.nav-logo{
  display:flex; align-items:center; gap:.55rem;
  font-family:var(--font-display);
  font-weight:600;
  font-size:1.05rem;
}
.nav-logo .dot{
  width:9px; height:9px; border-radius:50%;
  background:linear-gradient(135deg, var(--violet), var(--cyan));
  box-shadow:0 0 12px rgba(51,225,232,.7);
  animation:pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot{
  0%,100%{ box-shadow:0 0 8px rgba(51,225,232,.6); }
  50%{ box-shadow:0 0 18px rgba(51,225,232,1), 0 0 30px rgba(124,92,252,.6); }
}
.nav-logo .cursor{
  color:var(--cyan);
  animation:blink 1.1s step-end infinite;
}
@keyframes blink{ 50%{ opacity:0; } }

.nav-links{ display:flex; gap:2rem; font-weight:600; font-size:.9rem; }
.nav-links a{ color:var(--text-muted); transition:color .2s; }
.nav-links a:hover{ color:var(--text); }
.nav-cta{
  background:var(--text); color:var(--bg);
  padding:.6rem 1.3rem; border-radius:999px;
  font-weight:700; font-size:.86rem;
  transition:background .2s, color .2s;
}
.nav-cta:hover{ background:var(--cyan); }

@media (max-width:840px){
  .nav-links{ display:none; }
}

/* ---------- Hero ---------- */
.hero{
  padding:9rem 1.5rem 6rem;
}
.hero-inner{
  max-width:var(--container); margin:0 auto;
  display:grid; grid-template-columns:1.05fr .95fr; gap:3.5rem;
  align-items:center;
}
.hero-title{
  font-family:var(--font-display);
  font-weight:500;
  font-size:clamp(1.9rem, 3.4vw, 2.7rem);
  line-height:1.22;
  letter-spacing:-.015em;
}
.hero-title em{
  font-style:normal;
  font-weight:700;
  background:linear-gradient(135deg, var(--violet), var(--cyan));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  filter:drop-shadow(0 0 22px rgba(124,92,252,.35));
}
.hero-sub{
  color:var(--text-muted);
  font-size:1.06rem;
  max-width:480px;
  margin:1.4rem 0 2.2rem;
}
.hero-actions{ display:flex; gap:1rem; flex-wrap:wrap; }

/* ---------- Demo terminal ---------- */
.demo-window{
  position:relative;
  background:var(--bg-panel);
  border:1px solid rgba(124,92,252,.25);
  border-radius:var(--radius-lg);
  overflow:hidden;
  box-shadow:0 30px 60px -30px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.02), 0 0 60px -20px rgba(124,92,252,.35);
  animation:hover-float 6s ease-in-out infinite;
}
@keyframes hover-float{
  0%,100%{ transform:translateY(0); }
  50%{ transform:translateY(-8px); }
}
.demo-bar{
  display:flex; align-items:center; gap:.4rem;
  padding:.8rem 1rem;
  background:var(--bg-panel-2);
  border-bottom:1px solid var(--line);
}
.demo-dot{
  width:9px; height:9px; border-radius:50%;
  background:rgba(255,255,255,.15);
}
.demo-title{
  margin-left:.6rem;
  font-size:.76rem;
  color:var(--text-muted);
}
.demo-body{
  padding:1.4rem;
  min-height:280px;
  display:flex; flex-direction:column; gap:.7rem;
  justify-content:flex-end;
}
.bubble{
  max-width:82%;
  padding:.65rem .95rem;
  border-radius:14px;
  font-size:.88rem;
  line-height:1.45;
}
.bubble.client{
  align-self:flex-start;
  background:var(--bg-panel-2);
  border:1px solid var(--line);
  border-bottom-left-radius:4px;
}
.bubble.bot{
  align-self:flex-end;
  background:linear-gradient(135deg, var(--violet-deep), var(--violet));
  border-bottom-right-radius:4px;
}
.bubble .caret{
  display:inline-block;
  width:2px; height:1em;
  background:currentColor;
  margin-left:2px;
  vertical-align:-2px;
  animation:blink 1s step-end infinite;
}

/* ---------- Services ---------- */
.services{
  max-width:var(--container); margin:0 auto;
  padding:6rem 1.5rem 5rem;
}
.cards{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(250px, 1fr));
  gap:1.5rem;
  margin-top:3rem;
}
.card{
  position:relative;
  background:var(--bg-panel);
  border:1px solid var(--line);
  border-radius:var(--radius-md);
  padding:2rem 1.7rem;
  overflow:hidden;
  transition:transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.card::before{
  content:"";
  position:absolute; top:0; left:0; right:0; height:2px;
  background:linear-gradient(90deg, var(--violet), var(--cyan));
  transform:scaleX(0); transform-origin:left;
  transition:transform .4s ease;
}
.card:hover{
  transform:translateY(-6px);
  border-color:rgba(51,225,232,.4);
  box-shadow:0 24px 48px -28px rgba(124,92,252,.5);
}
.card:hover::before{ transform:scaleX(1); }
.card-icon{
  width:50px; height:50px;
  border-radius:12px;
  background:linear-gradient(135deg, rgba(124,92,252,.18), rgba(51,225,232,.14));
  border:1px solid rgba(124,92,252,.25);
  color:var(--cyan);
  display:flex; align-items:center; justify-content:center;
  margin-bottom:1.3rem;
  transition:box-shadow .35s ease, transform .35s ease;
}
.card:hover .card-icon{
  box-shadow:0 0 22px rgba(124,92,252,.35);
  transform:scale(1.06);
}
.card-icon svg{ width:24px; height:24px; }
.card h3{
  font-family:var(--font-display);
  font-weight:600;
  font-size:1.15rem;
  margin-bottom:.6rem;
}
.card p{ color:var(--text-muted); font-size:.92rem; }

/* ---------- Case ---------- */
.case{
  max-width:var(--container); margin:0 auto;
  padding:2rem 1.5rem 6rem;
}
.case-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:1.5rem;
  margin-top:2.4rem;
}
.case-block{
  background:var(--bg-panel);
  border:1px solid var(--line);
  border-left:2px solid var(--violet);
  border-radius:var(--radius-md);
  padding:1.6rem 1.7rem;
  transition:transform .3s ease, box-shadow .3s ease, border-left-color .3s ease;
}
.case-block:hover{
  transform:translateY(-4px);
  border-left-color:var(--cyan);
  box-shadow:0 20px 40px -26px rgba(51,225,232,.35);
}
.case-label{
  display:inline-block;
  font-size:.75rem;
  color:var(--cyan);
  margin-bottom:.7rem;
}
.case-block p{ color:var(--text-muted); font-size:.94rem; }

/* ---------- Why ---------- */
.why{
  max-width:var(--container); margin:0 auto;
  padding:2rem 1.5rem 6rem;
}
.why-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:2rem;
  margin-top:3rem;
}
.why-item{ text-align:left; }
.why-num{
  display:inline-flex; align-items:center; justify-content:center;
  width:38px; height:38px;
  border-radius:50%;
  border:1px solid rgba(124,92,252,.35);
  background:linear-gradient(135deg, rgba(124,92,252,.12), rgba(51,225,232,.08));
  font-size:.78rem;
  color:var(--cyan);
  margin-bottom:1rem;
  transition:box-shadow .35s ease, border-color .35s ease;
}
.why-item:hover .why-num{
  box-shadow:0 0 18px rgba(51,225,232,.35);
  border-color:rgba(51,225,232,.6);
}
.why-item h3{
  font-family:var(--font-display);
  font-weight:600;
  font-size:1.1rem;
  margin-bottom:.5rem;
}
.why-item p{ color:var(--text-muted); font-size:.92rem; }

/* ---------- CTA band ---------- */
.cta-band{
  max-width:var(--container); margin:0 auto 6rem;
  background:linear-gradient(135deg, var(--bg-panel), var(--bg-panel-2));
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  text-align:center;
  padding:4.5rem 1.5rem;
  position:relative;
  overflow:hidden;
}
.cta-band::before{
  content:"";
  position:absolute; inset:0;
  background:radial-gradient(ellipse 60% 80% at 50% 100%, rgba(124,92,252,.25), transparent 70%);
  pointer-events:none;
}
.cta-band h2{
  font-family:var(--font-display);
  font-weight:600;
  font-size:clamp(1.7rem, 3.6vw, 2.3rem);
  margin-bottom:.8rem;
  position:relative;
}
.cta-band p{
  color:var(--text-muted);
  margin-bottom:2rem;
  position:relative;
}
.cta-band .btn{ position:relative; }

/* ---------- Footer ---------- */
.footer{ padding:3rem 1.5rem 1.5rem; }
.footer-inner{
  max-width:var(--container); margin:0 auto;
  display:flex; flex-wrap:wrap; gap:1rem;
  align-items:center; justify-content:space-between;
  padding-bottom:2rem;
}
.footer-note{ color:var(--text-muted); font-size:.9rem; }
.footer-bottom{
  position:relative;
  text-align:center; font-size:.8rem; color:var(--text-muted);
  padding-top:1.5rem;
  max-width:var(--container); margin:0 auto;
}
.footer-bottom::before{
  content:"";
  position:absolute; top:0; left:50%; transform:translateX(-50%);
  width:120px; height:1px;
  background:linear-gradient(90deg, transparent, rgba(51,225,232,.5), transparent);
}

/* ---------- Floating CTA ---------- */
.float-cta{
  position:fixed; bottom:1.6rem; right:1.6rem; z-index:60;
  width:58px; height:58px; border-radius:50%;
  background:var(--green);
  color:#0A0E17;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 12px 28px -8px rgba(37,211,102,.6);
  transition:transform .25s ease;
  animation:breathe 2.8s ease-in-out infinite;
}
@keyframes breathe{
  0%,100%{ box-shadow:0 12px 28px -8px rgba(37,211,102,.6); }
  50%{ box-shadow:0 12px 34px -6px rgba(37,211,102,.9), 0 0 0 8px rgba(37,211,102,.08); }
}
.float-cta:hover{ transform:scale(1.08); animation-play-state:paused; }

/* ---------- Reveal ---------- */
.reveal{
  opacity:0; transform:translateY(22px);
  transition:opacity .7s ease, transform .7s ease;
}
.reveal.is-visible{ opacity:1; transform:translateY(0); }

.cards .reveal:nth-child(2){ transition-delay:.08s; }
.cards .reveal:nth-child(3){ transition-delay:.16s; }
.case-grid .reveal:nth-child(2){ transition-delay:.08s; }
.case-grid .reveal:nth-child(3){ transition-delay:.16s; }
.why-grid .reveal:nth-child(2){ transition-delay:.06s; }
.why-grid .reveal:nth-child(3){ transition-delay:.12s; }
.why-grid .reveal:nth-child(4){ transition-delay:.18s; }

/* ---------- Responsive ---------- */
@media (max-width:900px){
  .hero-inner{ grid-template-columns:1fr; }
  .hero-text{ text-align:center; }
  .hero-sub{ margin-left:auto; margin-right:auto; }
  .hero-actions{ justify-content:center; }
}
