:root {
  --bg: #ffffff;
  --bg-elevated: #f6f6fb;
  --bg-elevated-2: #edeef6;
  --border: rgba(10, 10, 20, 0.09);
  --text: #0e0e14;
  --text-muted: #5c5c6b;
  --accent-1: #4f7cff;
  --accent-2: #9b5cff;
  --accent-3: #ff5ca8;
  --gradient: linear-gradient(120deg, var(--accent-1), var(--accent-2) 55%, var(--accent-3));
  --max-width: 1120px;
  --shadow: 0 2px 20px rgba(20, 20, 40, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.kicker {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
}

.section {
  padding: 108px 0;
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  margin-bottom: 16px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 17px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--gradient);
  color: #ffffff;
}

.btn-primary:hover {
  opacity: 0.92;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: rgba(10, 10, 20, 0.22);
}

.btn-arrow {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-ghost .btn-arrow {
  background: rgba(10, 10, 20, 0.05);
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

header > .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #0a0a0f;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

nav .nav-links {
  display: flex;
  gap: 30px;
}

nav .nav-links a {
  font-size: 14.5px;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

nav .nav-links a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-menu {
  display: none;
}

/* Hero */
.hero {
  padding: 120px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -180px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(155, 92, 255, 0.14), transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -220px;
  left: -160px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(79, 124, 255, 0.1), transparent 70%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
}

.hero h1 {
  font-size: clamp(36px, 5.4vw, 62px);
  max-width: 760px;
  margin-bottom: 24px;
}

.hero p.lead {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 560px;
  margin-bottom: 40px;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hero-note {
  font-size: 13.5px;
  color: var(--text-muted);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 999px;
  padding: 6px 14px 6px 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.hero-badge .dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--gradient);
}

/* Problem section */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.problem-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.problem-card .num {
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  color: var(--accent-1);
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}

.problem-card p {
  font-size: 15.5px;
  color: var(--text);
}

.problem-closing {
  font-size: 18px;
  max-width: 620px;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
}

.problem-closing span {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 28px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  border-color: rgba(10, 10, 20, 0.16);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  background: var(--bg-elevated-2);
  border: 1px solid var(--border);
}

.service-icon svg {
  width: 20px;
  height: 20px;
}

.service-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 14.5px;
}

/* Process */
.process-list {
  display: grid;
  gap: 0;
}

.process-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 24px;
  padding: 30px 0;
  border-top: 1px solid var(--border);
}

.process-item:last-child {
  border-bottom: 1px solid var(--border);
}

.process-item .step-num {
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
}

.process-item h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.process-item p {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 520px;
}

/* Why */
.why-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.why-layout h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  margin-bottom: 20px;
}

.why-layout .lead {
  color: var(--text-muted);
  font-size: 16.5px;
  margin-bottom: 24px;
}

.why-points {
  display: grid;
  gap: 16px;
}

.why-point {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--text);
}

.why-point .check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--gradient);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.why-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 24px;
}

.why-card-text {
  flex: 1;
}

.why-card p {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 16px;
}

.why-card .who {
  font-size: 13.5px;
  color: var(--text-muted);
}

.why-card .who strong {
  color: var(--text);
  font-weight: 600;
}

.why-card-photo {
  width: 120px;
  height: 150px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

/* CTA */
.cta-section {
  border-bottom: none;
  text-align: center;
}

.cta-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 72px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.cta-box::before {
  content: "";
  position: absolute;
  top: -140px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(155, 92, 255, 0.16), transparent 70%);
  pointer-events: none;
}

.cta-box h2 {
  font-size: clamp(26px, 3.6vw, 38px);
  max-width: 560px;
  margin: 0 auto 16px;
  position: relative;
}

.cta-box p {
  color: var(--text-muted);
  font-size: 16.5px;
  max-width: 460px;
  margin: 0 auto 32px;
  position: relative;
}

.cta-box .btn {
  position: relative;
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  position: relative;
}

/* Footer */
footer {
  padding: 56px 0 40px;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-brand .logo {
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 280px;
}

.footer-links {
  display: flex;
  gap: 48px;
}

.footer-col h4 {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  font-weight: 600;
}

.footer-col a {
  display: block;
  font-size: 14.5px;
  color: var(--text);
  margin-bottom: 10px;
}

.footer-col a:hover {
  color: var(--accent-1);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding-top: 24px;
}

.footer-bottom .wrap {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--gradient);
  z-index: 100;
  transition: width 0.1s linear;
}

/* Scroll reveal */
.reveal {
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

html.js .reveal {
  opacity: 0;
  transform: translateY(28px);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.problem-grid .reveal:nth-child(1) { transition-delay: 0ms; }
.problem-grid .reveal:nth-child(2) { transition-delay: 90ms; }
.problem-grid .reveal:nth-child(3) { transition-delay: 180ms; }

.services-grid .reveal:nth-child(1) { transition-delay: 0ms; }
.services-grid .reveal:nth-child(2) { transition-delay: 90ms; }
.services-grid .reveal:nth-child(3) { transition-delay: 180ms; }

.process-list .reveal:nth-child(1) { transition-delay: 0ms; }
.process-list .reveal:nth-child(2) { transition-delay: 80ms; }
.process-list .reveal:nth-child(3) { transition-delay: 160ms; }
.process-list .reveal:nth-child(4) { transition-delay: 240ms; }

.why-points .reveal:nth-child(1) { transition-delay: 0ms; }
.why-points .reveal:nth-child(2) { transition-delay: 90ms; }
.why-points .reveal:nth-child(3) { transition-delay: 180ms; }

/* Drifting gradient blobs */
@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 25px) scale(1.08); }
}

@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(25px, -20px) scale(1.05); }
}

html.js .hero::before {
  animation: drift1 14s ease-in-out infinite;
}

html.js .hero::after {
  animation: drift2 16s ease-in-out infinite;
}

html.js .cta-box::before {
  animation: drift1 12s ease-in-out infinite;
}

/* Hero cursor spotlight */
.hero-spotlight {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(155, 92, 255, 0.16), rgba(79, 124, 255, 0.08) 45%, transparent 72%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  left: 50%;
  top: 30%;
  opacity: 0;
  transition: opacity 0.4s ease;
  filter: blur(4px);
  z-index: 0;
}

.hero-spotlight.is-active {
  opacity: 1;
}

/* Hero grid + visual */
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content,
.hero-visual {
  min-width: 0;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.code-card {
  width: 100%;
  max-width: 380px;
  background: #0e0e16;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(20, 20, 45, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.06);
  transform: perspective(900px) rotateY(-6deg) rotateX(2deg);
  transition: transform 0.4s ease;
}

.hero-visual:hover .code-card {
  transform: perspective(900px) rotateY(0deg) rotateX(0deg);
}

.code-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  background: #15151f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cc-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.cc-red { background: #ff5f57; }
.cc-yellow { background: #febc2e; }
.cc-green { background: #28c840; }

.code-card-title {
  margin-left: 8px;
  font-size: 12px;
  color: #6b6b7d;
  font-family: "Space Grotesk", sans-serif;
}

.code-card-body {
  margin: 0;
  padding: 20px 18px 24px;
  font-family: "SF Mono", "Fira Code", Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.9;
  overflow-x: auto;
}

.code-line {
  display: block;
  color: #d5d5e0;
  opacity: 0;
  transform: translateX(-6px);
}

html.js .code-line {
  animation: codeLineIn 0.5s ease forwards;
}

.code-card-body .code-line:nth-child(1) { animation-delay: 0.3s; }
.code-card-body .code-line:nth-child(2) { animation-delay: 0.7s; }
.code-card-body .code-line:nth-child(3) { animation-delay: 1.1s; }
.code-card-body .code-line:nth-child(4) { animation-delay: 1.5s; }
.code-card-body .code-line:nth-child(5) { animation-delay: 1.9s; }
.code-card-body .code-line:nth-child(6) { animation-delay: 2.3s; }

@keyframes codeLineIn {
  to { opacity: 1; transform: translateX(0); }
}

.tok-comment { color: #6b6b7d; }
.tok-kw { color: #9b8cff; }
.tok-str { color: #7ee0a8; }
.tok-fn { color: #6fb4ff; }

.code-cursor {
  display: inline-block;
  width: 6px;
  height: 13px;
  margin-left: 2px;
  background: #9b5cff;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.float-chip {
  position: absolute;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
}

html.js .float-chip {
  animation: chipIn 0.6s ease forwards, bob 4s ease-in-out infinite;
}

.chip-1 {
  top: 6%;
  right: -6%;
  animation-delay: 2.6s, 3.2s !important;
}

.chip-2 {
  bottom: 10%;
  left: -8%;
  animation-delay: 2.9s, 3.5s !important;
}

@keyframes chipIn {
  from { opacity: 0; transform: translateY(10px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Process active step */
.process-item {
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, padding 0.3s ease;
  border-top-color: var(--border);
}

.process-item.is-active .step-num {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.process-item.is-active h3::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  margin-left: 10px;
  vertical-align: middle;
  animation: pulse-dot 1.6s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.4); }
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal,
  html.js .hero::before,
  html.js .hero::after,
  html.js .cta-box::before,
  html.js .code-line,
  html.js .float-chip,
  .code-cursor,
  .process-item.is-active h3::after {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-spotlight {
    display: none;
  }
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .hero-visual {
    justify-content: center;
    padding: 0 20px;
  }

  .code-card {
    transform: none;
  }

  .hero-visual:hover .code-card {
    transform: none;
  }

  .hero-spotlight {
    display: none;
  }

  .float-chip {
    display: none;
  }
}

@media (max-width: 860px) {
  .problem-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .why-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .process-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

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

  header > .wrap > nav > .btn-primary {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  header nav {
    gap: 12px;
  }

  .mobile-menu {
    flex-direction: column;
    gap: 2px;
    padding: 12px 0 20px;
    border-bottom: 1px solid var(--border);
  }

  .mobile-menu .wrap {
    margin: 0;
    width: 100%;
  }

  .mobile-menu.open {
    display: flex;
  }

  .mobile-menu a {
    display: block;
    padding: 12px 4px;
    font-size: 15px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
  }

  .section {
    padding: 72px 0;
  }

  .hero {
    padding: 64px 0 64px;
  }

  .why-card {
    flex-direction: column;
    text-align: center;
  }

  .why-card-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
  }

  .why-card .who {
    justify-content: center;
    display: flex;
  }

  footer .wrap {
    flex-direction: column;
  }
}
