:root {
  --bg: #f7f8fc;
  --bg-alt: #eef1f8;
  --surface: #ffffff;
  --border: #e2e6ef;
  --ink: #0b1220;
  --muted: #5a6478;
  --brand: #4f46e5;
  --brand-2: #06b6d4;
  --grad: linear-gradient(120deg, var(--brand), var(--brand-2));
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .04), 0 24px 48px rgba(79, 70, 229, .14);
  --radius: 18px;
  --gutter: 24px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { display: block; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--brand); color: #fff; padding: 8px 12px; border-radius: 8px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  transition: background .3s, box-shadow .3s;
}
.top.is-scrolled { background: rgba(255, 255, 255, .8); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--border); }
.top__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.02em; text-decoration: none; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { position: relative; color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 600; transition: color .2s; }
.nav a:not(.nav__phone)::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 2px;
  background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }
.nav__phone { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--ink); color: #fff !important; white-space: nowrap; transition: transform .25s var(--ease), box-shadow .25s; }
.nav__phone:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(11, 18, 32, .25); }
.nav__phone svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Hero */
.hero { position: relative; isolation: isolate; overflow: hidden; margin-top: -72px; padding: 160px 0 96px; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }

/* Code window */
.code { border-radius: 18px; background: #0f172a; color: #cbd5e1; box-shadow: 0 30px 60px rgba(15, 23, 42, .25), 0 0 0 1px rgba(255, 255, 255, .06) inset; overflow: hidden; transform: perspective(1200px) rotateY(-8deg) rotateX(4deg); transition: transform .6s var(--ease); animation: bob 7s ease-in-out infinite; }
.code:hover { transform: perspective(1200px) rotateY(0) rotateX(0); }
@keyframes bob { 50% { translate: 0 -10px; } }
.code__bar { display: flex; align-items: center; gap: 7px; padding: 14px 16px; background: rgba(255, 255, 255, .04); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.code__bar i { width: 11px; height: 11px; border-radius: 50%; background: #ef4444; }
.code__bar i:nth-child(2) { background: #f59e0b; }
.code__bar i:nth-child(3) { background: #10b981; }
.code__bar span { margin-left: 10px; font: 500 12px/1 "JetBrains Mono", monospace; color: #64748b; }
.code pre { margin: 0; padding: 22px 22px 26px; font: 500 13.5px/1.75 "JetBrains Mono", monospace; overflow-x: auto; }
.code .k { color: #c084fc; } .code .f { color: #38bdf8; } .code .s { color: #34d399; } .code .c { color: #64748b; }
.caret { display: inline-block; width: 8px; height: 16px; margin-left: 4px; vertical-align: -3px; background: #38bdf8; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero__glow {
  position: absolute; z-index: -2; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(circle at 30% 30%, rgba(79, 70, 229, .18), transparent 60%), radial-gradient(circle at 70% 60%, rgba(6, 182, 212, .16), transparent 60%);
  filter: blur(20px); animation: float 14s ease-in-out infinite alternate;
}
@keyframes float { to { transform: translate(-8%, 10%) scale(1.08); } }

.pill {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 28px; padding: 7px 14px;
  border: 1px solid var(--border); border-radius: 999px; background: rgba(255, 255, 255, .7); backdrop-filter: blur(8px);
  font-size: 14px; font-weight: 600; color: var(--muted);
}
.pill__dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #10b981; }
.pill__dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #10b981; animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { to { transform: scale(2.6); opacity: 0; } }

h1 { margin: 0; max-width: 16ch; font-size: clamp(40px, 6.6vw, 76px); line-height: 1.04; letter-spacing: -.04em; font-weight: 800; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: shine 6s linear infinite; }
@keyframes shine { to { background-position: -200% 0; } }
.lead { max-width: 58ch; margin: 24px 0 0; color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 24px;
  border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 15.5px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 10px 24px rgba(79, 70, 229, .3); }
.btn--primary:hover { box-shadow: 0 14px 32px rgba(79, 70, 229, .4); }
.btn--primary span { transition: transform .25s var(--ease); }
.btn--primary:hover span { transform: translateX(4px); }
.btn--ghost { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.btn--white { background: #fff; color: var(--ink); }
.btn--outline { border: 1px solid rgba(255, 255, 255, .45); color: #fff; }
.btn--outline:hover { background: rgba(255, 255, 255, .12); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 72px 0 0; padding: 0; list-style: none; }
.stats li { display: flex; flex-direction: column; padding: 22px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(255, 255, 255, .75); backdrop-filter: blur(8px); box-shadow: var(--shadow); }
.stats strong { font-size: 36px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; letter-spacing: -.03em; }
.stats span { color: var(--muted); font-size: 14px; }

/* Sections */
.section { padding: 112px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 640px; margin-bottom: 56px; }
.kicker { margin: 0 0 12px; font: 500 13px/1 "JetBrains Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.kicker--light { color: rgba(255, 255, 255, .8); }
h2 { margin: 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.1; letter-spacing: -.035em; font-weight: 800; }
.section__lead { margin: 16px 0 0; color: var(--muted); font-size: 18px; }

.grid, .work { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative; padding: 30px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card:hover::before { opacity: 1; }
.card__icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(79, 70, 229, .12), rgba(6, 182, 212, .12));
  transition: transform .35s var(--ease);
}
.card:hover .card__icon { transform: rotate(-6deg) scale(1.06); }
.card__icon svg { width: 26px; height: 26px; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin: 22px 0 10px; font-size: 20px; letter-spacing: -.02em; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }

.work__item {
  padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.work__item:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.work__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.work__top h3 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.work__item p { margin: 14px 0 18px; color: var(--muted); font-size: 15.5px; }
.badge { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #f1f5f9; color: var(--muted); white-space: nowrap; }
.badge--live { background: #ecfdf5; color: #047857; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags li { padding: 4px 10px; border-radius: 8px; background: var(--bg-alt); font-size: 13px; font-weight: 600; color: var(--muted); }

.marquee { overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; gap: 16px; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span {
  padding: 16px 28px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  font-size: 18px; font-weight: 700; letter-spacing: -.01em; box-shadow: var(--shadow); white-space: nowrap;
}
.marquee + .marquee { margin-top: 16px; }
.marquee--reverse .marquee__track { animation-direction: reverse; animation-duration: 38s; }
@keyframes marquee { to { transform: translateX(calc(-50% - 8px)); } }

.contact {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center;
  padding: 64px; border-radius: 28px; color: #fff; background: var(--grad); box-shadow: 0 30px 60px rgba(79, 70, 229, .25);
}
.contact::after {
  content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%;
  background: rgba(255, 255, 255, .12); animation: float 10s ease-in-out infinite alternate;
}
.contact h2 { color: #fff; }
.contact__text p:last-child { margin: 16px 0 0; color: rgba(255, 255, 255, .85); font-size: 18px; }
.contact__links { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; }
.contact__links .btn { justify-content: center; }
.contact__phone { display: inline-block; margin-top: 24px; font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; letter-spacing: -.02em; color: #fff; text-decoration: none; border-bottom: 2px solid rgba(255, 255, 255, .4); transition: border-color .25s; }
.contact__phone:hover { border-color: #fff; }

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.step { position: relative; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.step__n { font: 500 13px/1 "JetBrains Mono", monospace; color: var(--brand); }
.step h3 { margin: 14px 0 8px; font-size: 20px; letter-spacing: -.02em; }
.step p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* Floating call button (mobile) */
.fab { position: fixed; right: 18px; bottom: 18px; z-index: 30; display: none; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--grad); box-shadow: 0 12px 28px rgba(79, 70, 229, .4); }
.fab::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 2s var(--ease) infinite; z-index: -1; }
.fab svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.foot { padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
.foot__inner { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--border); padding-top: 28px; }
.foot a { text-decoration: none; font-weight: 600; }
.foot a:hover { color: var(--brand); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .code { transform: none; }
  .stats, .steps, .grid, .work { grid-template-columns: repeat(2, 1fr); }
  .contact { grid-template-columns: 1fr; padding: 40px 28px; }
  .nav a:not(.nav__phone) { display: none; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .nav__phone { padding: 8px 12px; font-size: 13.5px; }
  .fab { display: grid; }
  .hero { padding: 120px 0 72px; }
  .stats, .steps { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stats li { padding: 16px; }
  .section { padding: 80px 0; }
  .stats strong { font-size: 28px; }
  .steps, .grid, .work { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
