:root {
  --bg: #07070c;
  --bg-2: #0d0d16;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f4f4f8;
  --muted: #a0a0b4;
  --brand: #7c5cff;
  --brand-2: #21d4fd;
  --accent: #ff5ca8;
  --grad: linear-gradient(110deg, #7c5cff 0%, #21d4fd 50%, #ff5ca8 100%);
  --radius: 18px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4, .brand__name, .stat__num {
  font-family: "Space Grotesk", "Inter", sans-serif;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Living animated background ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -5;
  overflow: hidden;
  pointer-events: none;
  /* parallax offsets set from JS */
  --px: 0px;
  --py: 0px;
  --sy: 0px;
}

/* Slowly shifting aurora gradient wash */
.bg-aurora {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(40% 50% at 20% 25%, rgba(124, 92, 255, 0.35), transparent 60%),
    radial-gradient(45% 55% at 80% 20%, rgba(33, 212, 253, 0.28), transparent 60%),
    radial-gradient(50% 55% at 60% 85%, rgba(255, 92, 168, 0.25), transparent 60%);
  filter: blur(40px);
  animation: auroraShift 24s ease-in-out infinite alternate;
}

.bg-grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 35%, transparent 100%);
  transform: translate3d(var(--px), calc(var(--py) + var(--sy)), 0);
  animation: gridDrift 30s linear infinite;
}

.bg-glow {
  position: absolute;
  width: 48vw;
  height: 48vw;
  max-width: 720px;
  max-height: 720px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.55;
  will-change: transform;
}
.bg-glow--one {
  top: -12%;
  left: -10%;
  background: #7c5cff;
  transform: translate3d(var(--px), calc(var(--py) + var(--sy) * 1.4), 0);
  animation: floatOne 18s ease-in-out infinite alternate;
}
.bg-glow--two {
  top: 18%;
  right: -12%;
  background: #21d4fd;
  opacity: 0.4;
  transform: translate3d(calc(var(--px) * -1), calc(var(--py) + var(--sy) * 1.1), 0);
  animation: floatTwo 22s ease-in-out infinite alternate;
}
.bg-glow--three {
  bottom: -18%;
  left: 30%;
  background: #ff5ca8;
  opacity: 0.3;
  transform: translate3d(var(--px), calc(var(--py) - var(--sy) * 0.6), 0);
  animation: floatThree 26s ease-in-out infinite alternate;
}

/* Subtle film grain to add life */
.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%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");
  animation: noiseShift 0.6s steps(2) infinite;
}

@keyframes auroraShift {
  0%   { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  50%  { transform: translate3d(2%, -3%, 0) scale(1.08) rotate(2deg); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.04) rotate(-2deg); }
}
@keyframes gridDrift {
  from { background-position: 0 0; }
  to   { background-position: 60px 60px; }
}
@keyframes floatOne {
  0%   { translate: 0 0; }
  100% { translate: 8% 6%; }
}
@keyframes floatTwo {
  0%   { translate: 0 0; }
  100% { translate: -6% 10%; }
}
@keyframes floatThree {
  0%   { translate: 0 0; }
  100% { translate: 5% -8%; }
}
@keyframes noiseShift {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(-4%, 3%); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
  white-space: nowrap;
}
.btn--primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(124, 92, 255, 0.7);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(124, 92, 255, 0.9); }
.btn--ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { background: var(--surface-2); transform: translateY(-2px); }
.btn--full { width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7, 7, 12, 0.72);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.2rem; }
.brand__mark {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.1rem;
}
.brand__name { font-weight: 700; letter-spacing: -0.03em; }
.brand__name span { color: var(--brand-2); }

.nav__links { display: flex; align-items: center; gap: 32px; }
.nav__links a { color: var(--muted); font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.nav__links a:hover { color: var(--text); }
.nav__cta {
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text) !important;
}
.nav__cta:hover { background: var(--surface-2); }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav__toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 160px 0 80px; }
.hero__inner { max-width: 920px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 12px var(--brand-2); }

.hero__title {
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 700;
  margin: 24px 0 20px;
}
.hero__lead {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--muted);
  max-width: 680px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 36px 0 56px; }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.stat__num { display: block; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
.stat__label { font-size: 0.85rem; color: var(--muted); }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  padding: 18px 0;
}
.marquee__track {
  display: flex;
  gap: 28px;
  white-space: nowrap;
  width: max-content;
  animation: scroll 28s linear infinite;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  color: var(--muted);
  font-size: 1.05rem;
}
.marquee__track span:nth-child(even) { color: var(--brand); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--border); }
.section__head { max-width: 720px; margin-bottom: 56px; }
.section__head .eyebrow { margin-bottom: 18px; }
.section__title { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 700; margin-bottom: 16px; }
.section__sub { color: var(--muted); font-size: 1.08rem; }

/* ---------- Service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
  position: relative;
  overflow: hidden;
}
.card:hover { transform: translateY(-6px); border-color: rgba(124, 92, 255, 0.5); background: var(--surface-2); }
.card__icon {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(124, 92, 255, 0.2), rgba(33, 212, 253, 0.08));
  border: 1px solid var(--border);
  color: var(--brand-2);
  margin-bottom: 18px;
}
.card__icon svg { width: 26px; height: 26px; }
.card--highlight .card__icon { color: var(--text); }
.card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.96rem; margin-bottom: 16px; }
.card__list { list-style: none; display: grid; gap: 8px; }
.card__list li { position: relative; padding-left: 22px; font-size: 0.9rem; color: var(--text); }
.card__list li::before {
  content: "→";
  position: absolute; left: 0;
  color: var(--brand-2);
  font-weight: 700;
}
.card--highlight {
  background: linear-gradient(160deg, rgba(124, 92, 255, 0.16), rgba(33, 212, 253, 0.06));
  border-color: rgba(124, 92, 255, 0.45);
}
.card--highlight::after {
  content: "Most popular";
  position: absolute; top: 18px; right: 18px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
  background: var(--grad); color: #fff;
}

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
}
.step__num {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.4rem; font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  display: block; margin-bottom: 12px;
}
.step h3 { font-size: 1.15rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.92rem; }

/* ---------- Work ---------- */
.work { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.work__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.work__item:hover { transform: translateY(-4px); border-color: rgba(33, 212, 253, 0.5); }
.work__tag {
  display: inline-block;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--brand-2);
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.work__item h3 { font-size: 1.5rem; margin-bottom: 10px; }
.work__item p { color: var(--muted); margin-bottom: 18px; }
.work__metrics { display: flex; gap: 28px; padding-top: 18px; border-top: 1px solid var(--border); }
.work__metrics span { font-size: 0.9rem; color: var(--muted); }
.work__metrics b { display: block; font-size: 1.4rem; color: var(--text); font-family: "Space Grotesk", sans-serif; }

/* ---------- Quotes ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.quote {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}
.quote blockquote { font-size: 1.05rem; margin-bottom: 22px; }
.quote figcaption b { display: block; }
.quote figcaption span { color: var(--muted); font-size: 0.88rem; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.about__text p { color: var(--muted); margin-top: 16px; }
.about__text .section__title { margin-top: 18px; }
.about__pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.about__pills span {
  padding: 8px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 0.85rem; color: var(--text);
}
.about__panel {
  background: linear-gradient(160deg, rgba(124, 92, 255, 0.12), rgba(33, 212, 253, 0.04));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 28px;
}
.panel__row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0; border-bottom: 1px solid var(--border);
}
.panel__row:last-child { border-bottom: 0; }
.panel__row span { color: var(--muted); }
.panel__row b { font-family: "Space Grotesk", sans-serif; font-size: 1.5rem; }

/* ---------- CTA / Form ---------- */
.section--cta { background: var(--bg-2); border-top: 1px solid var(--border); }
.cta { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.cta__text p { color: var(--muted); margin-top: 14px; }
.cta__contacts { list-style: none; margin-top: 28px; display: grid; gap: 16px; }
.cta__contacts li { display: flex; flex-direction: column; }
.cta__contacts span { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.cta__contacts a { font-size: 1.15rem; font-weight: 600; }
.cta__contacts a:hover { color: var(--brand-2); }

.form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  display: grid;
  gap: 16px;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 8px; font-size: 0.85rem; color: var(--muted); }
.form input, .form select, .form textarea {
  width: 100%;
  padding: 13px 15px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.2);
}
.form textarea { resize: vertical; }
.form__note { color: var(--brand-2); font-size: 0.9rem; text-align: center; }
.form__note.is-error { color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 60px 0 28px; background: var(--bg); }
.footer__inner { display: grid; grid-template-columns: 1.4fr 2fr; gap: 48px; }
.footer__brand p { color: var(--muted); margin-top: 14px; max-width: 320px; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer__cols h4 { margin-bottom: 14px; font-size: 0.95rem; }
.footer__cols a { display: block; color: var(--muted); font-size: 0.92rem; padding: 5px 0; transition: color 0.2s; }
.footer__cols a:hover { color: var(--text); }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 0.85rem;
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .cards, .steps, .quotes { grid-template-columns: repeat(2, 1fr); }
  .about, .cta { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav__links {
    position: fixed;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(7, 7, 12, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 24px;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.3s;
  }
  .nav__links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav__links a { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav__cta { text-align: center; margin-top: 12px; }
  .nav__toggle { display: flex; }

  .hero { padding: 130px 0 60px; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .cards, .steps, .work, .quotes { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: 10px; text-align: center; }
  .section { padding: 70px 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
