:root {
  --bg: #0a0912;
  --bg-2: #12101f;
  --ink: #f4f1ff;
  --muted: #a49fbd;
  --line: rgba(255, 255, 255, 0.09);
  --a1: #ff4d8d;
  --a2: #7b5cff;
  --a3: #22e3c4;
  --grad: linear-gradient(100deg, var(--a1), var(--a2) 50%, var(--a3));
  --display: 'Syne', system-ui, sans-serif;
  --body: 'Manrope', system-ui, sans-serif;
  --pad: clamp(16px, 5vw, 72px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
::selection { background: var(--a2); color: #fff; }

/* Grain overlay */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: 0.05;
  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='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Cursor */
.cursor, .cursor-glow { position: fixed; top: 0; left: 0; pointer-events: none; border-radius: 50%; z-index: 99; }
.cursor { width: 56px; height: 56px; margin: -28px 0 0 -28px; background: #fff; mix-blend-mode: difference; scale: .18; transition: scale .3s var(--ease); }
.cursor.big { scale: 1; }
.cursor-glow { width: 520px; height: 520px; translate: -50% -50%; background: radial-gradient(circle, rgba(123, 92, 255, .16), transparent 60%); z-index: 0; }
@media (hover: none) { .cursor, .cursor-glow { display: none; } }

.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); z-index: 60; }

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 32px; padding: 20px var(--pad);
  transition: padding .4s var(--ease), background .4s, backdrop-filter .4s;
}
.nav.scrolled { padding-block: 12px; background: rgba(10, 9, 18, .7); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav.hidden { transform: translateY(-100%); }
.nav { transition: transform .4s var(--ease), padding .4s var(--ease), background .4s; }
.logo { font-family: var(--display); font-weight: 800; font-size: 1.5rem; display: flex; align-items: center; gap: 8px; letter-spacing: -0.02em; }
.logo-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 16px var(--a1); animation: pulse 2s infinite; }
@keyframes pulse { 50% { transform: scale(1.4); box-shadow: 0 0 28px var(--a2); } }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { position: relative; color: var(--muted); font-weight: 500; transition: color .3s; }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -4px; height: 2px; width: 100%; background: var(--grad); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.burger { display: none; background: none; border: 0; width: 32px; height: 24px; position: relative; cursor: pointer; }
.burger span { position: absolute; left: 0; right: 0; height: 2px; background: var(--ink); transition: .3s var(--ease); }
.burger span:first-child { top: 6px; } .burger span:last-child { bottom: 6px; }
.nav.open .burger span:first-child { top: 11px; rotate: 45deg; }
.nav.open .burger span:last-child { bottom: 11px; rotate: -45deg; }

/* Buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; overflow: hidden;
  padding: 16px 28px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 1rem var(--body); color: #fff; background: var(--grad); background-size: 200% 100%;
  transition: background-position .6s var(--ease), box-shadow .4s, transform .3s var(--ease);
  box-shadow: 0 10px 40px -10px rgba(255, 77, 141, .6);
}
.btn:hover { background-position: 100% 0; box-shadow: 0 16px 50px -10px rgba(123, 92, 255, .8); }
.btn i { font-style: normal; transition: transform .3s var(--ease); }
.btn:hover i { transform: translateX(5px); }
.btn-ghost { background: transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px #fff; background: rgba(255,255,255,.06); }
.btn-small { padding: 10px 20px; font-size: .9rem; }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; padding: 140px var(--pad) 100px; overflow: hidden; isolation: isolate; }
#particles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; z-index: -2; animation: float 18s ease-in-out infinite; }
.b1 { width: 520px; height: 520px; background: var(--a2); top: -10%; left: -8%; }
.b2 { width: 440px; height: 440px; background: var(--a1); bottom: -15%; right: -6%; animation-delay: -6s; }
.b3 { width: 320px; height: 320px; background: var(--a3); top: 40%; left: 55%; opacity: .3; animation-delay: -12s; }
@keyframes float {
  33% { transform: translate(80px, -60px) scale(1.1); }
  66% { transform: translate(-60px, 40px) scale(.9); }
}
.hero-inner { max-width: 1100px; text-align: center; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--a3); margin-bottom: 20px; }
.hero-title { font-family: var(--display); font-weight: 800; font-size: clamp(2.8rem, 9vw, 7.5rem); line-height: .95; letter-spacing: -0.04em; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .08em; }
.split .word { display: inline-block; white-space: nowrap; }
.split .ch { display: inline-block; transform: translateY(110%); animation: rise .9s var(--ease) forwards; }
@keyframes rise { to { transform: translateY(0); } }
.rotator { display: inline-block; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: shimmer 4s linear infinite; }
@keyframes shimmer { to { background-position: 200% 0; } }
.caret { display: inline-block; width: .06em; height: .8em; margin-left: .05em; background: var(--a1); vertical-align: -.05em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-sub { max-width: 620px; margin: 28px auto 40px; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.2rem); }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.scroll-hint { position: absolute; bottom: 28px; left: 50%; translate: -50% 0; width: 24px; height: 40px; border: 2px solid rgba(255,255,255,.3); border-radius: 12px; }
.scroll-hint span { position: absolute; left: 50%; top: 6px; width: 4px; height: 8px; translate: -50% 0; border-radius: 2px; background: #fff; animation: scrollDot 1.8s infinite; }
@keyframes scrollDot { 80%, 100% { transform: translateY(14px); opacity: 0; } }

/* Marquee */
.marquee { border-block: 1px solid var(--line); padding: 26px 0; overflow: hidden; background: var(--bg-2); mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 30s linear infinite; font-family: var(--display); font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 700; color: rgba(255,255,255,.35); }
.marquee-track b { color: var(--a1); font-weight: 400; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); padding: 80px var(--pad); gap: 24px; }
.stat { text-align: center; }
.stat-num { font-family: var(--display); font-weight: 800; font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1; color: var(--ink); }
.stat-label { color: var(--muted); margin-top: 10px; }

/* Sections */
.section { padding: 110px var(--pad); position: relative; }
.section-head { max-width: 760px; margin-bottom: 60px; }
.section-head h2, .contact h2 { font-family: var(--display); font-size: clamp(2rem, 4.5vw, 3.6rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; }

/* Service cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.card {
  position: relative; padding: 34px 28px; border-radius: 24px; overflow: hidden;
  background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.015));
  border: 1px solid var(--line); transform-style: preserve-3d;
  transition: transform .4s var(--ease), border-color .4s;
}
.card:hover { border-color: rgba(255,255,255,.22); }
.card-glow { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(123,92,255,.28), transparent 40%); }
.card:hover .card-glow { opacity: 1; }
.card-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; font-size: 1.5rem; background: var(--grad); margin-bottom: 26px; transform: translateZ(40px); box-shadow: 0 10px 30px -8px var(--a2); }
.card h3 { font-family: var(--display); font-size: 1.4rem; margin-bottom: 10px; transform: translateZ(30px); }
.card p { color: var(--muted); transform: translateZ(20px); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tags li { font-size: .78rem; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }

/* Process timeline */
.timeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding-top: 40px; }
.timeline-bar { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--line); border-radius: 2px; }
.timeline-fill { height: 100%; width: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 20px var(--a2); }
.step { position: relative; }
.step::before { content: ''; position: absolute; top: -47px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--a2); }
.step-num { font-family: var(--display); font-size: 3.4rem; font-weight: 800; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.3); }
.step h3 { font-family: var(--display); font-size: 1.4rem; margin: 10px 0 8px; }
.step p { color: var(--muted); }

/* Work */
.work-grid { display: grid; grid-template-columns: 1.3fr 1fr; grid-auto-rows: 320px; gap: 20px; }
.work-card:first-child { grid-row: span 2; }
.work-card { position: relative; border-radius: 28px; overflow: hidden; display: flex; align-items: flex-end; padding: 30px; border: 1px solid var(--line); background: hsl(var(--h) 60% 10%); }
.work-art { position: absolute; inset: 0; transition: transform .8s var(--ease); }
.work-card:hover .work-art { transform: scale(1.08); }
.orb { position: absolute; width: 70%; aspect-ratio: 1; top: -10%; right: -15%; border-radius: 50%; background: radial-gradient(circle at 30% 30%, hsl(var(--h) 95% 70%), hsl(calc(var(--h) + 40) 90% 45%) 45%, transparent 70%); filter: blur(10px); animation: float 14s ease-in-out infinite; }
.grid-lines { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 40px 40px; mask: linear-gradient(to top, transparent, #000); }
.work-meta { position: relative; }
.work-client { font-size: .8rem; letter-spacing: .15em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.work-meta h3 { font-family: var(--display); font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.1; margin: 6px 0 14px; }
.work-result { display: inline-block; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.12); backdrop-filter: blur(8px); font-weight: 600; font-size: .9rem; transition: background .4s; }
.work-card:hover .work-result { background: #fff; color: #000; }

/* Testimonials */
.testimonials { text-align: center; }
.quote-wrap { position: relative; max-width: 900px; margin: 0 auto; min-height: 260px; }
.quote { position: absolute; inset: 0; opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); pointer-events: none; }
.quote.active { opacity: 1; transform: none; pointer-events: auto; }
.quote blockquote { font-family: var(--display); font-size: clamp(1.4rem, 3vw, 2.3rem); line-height: 1.25; letter-spacing: -0.02em; font-weight: 500; }
.quote figcaption { margin-top: 24px; color: var(--muted); }
.quote figcaption strong { color: var(--ink); }
.quote-dots { position: absolute; bottom: 0; left: 50%; translate: -50% 0; display: flex; gap: 10px; }
.quote-dots button { width: 10px; height: 10px; border-radius: 999px; border: 0; background: rgba(255,255,255,.25); cursor: pointer; transition: width .4s var(--ease), background .4s; }
.quote-dots button.on { width: 34px; background: var(--grad); }

/* Contact */
.contact-card {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; padding: clamp(28px, 5vw, 64px); border-radius: 32px;
  background: radial-gradient(circle at 0 0, rgba(123,92,255,.25), transparent 50%), radial-gradient(circle at 100% 100%, rgba(255,77,141,.2), transparent 50%), var(--bg-2);
  border: 1px solid var(--line);
}
.muted { color: var(--muted); margin-top: 16px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form .full { grid-column: 1 / -1; }
.form label span { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.form input, .form textarea {
  width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.04);
  color: var(--ink); font: inherit; resize: vertical; transition: border-color .3s, box-shadow .3s;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--a2); box-shadow: 0 0 0 4px rgba(123,92,255,.2); }
.form button { justify-content: center; }
.form-status { min-height: 1.5em; font-weight: 500; }
.form-status.ok { color: var(--a3); }
.form-status.err { color: var(--a1); }

/* Footer */
.footer { padding: 40px var(--pad) 30px; border-top: 1px solid var(--line); overflow: hidden; }
.footer-big { font-family: var(--display); font-weight: 800; font-size: clamp(5rem, 22vw, 20rem); line-height: .85; letter-spacing: -0.06em; background: linear-gradient(180deg, rgba(255,255,255,.14), transparent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.footer-big span { color: var(--a1); -webkit-text-fill-color: var(--a1); }
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: .9rem; margin-top: 20px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a:hover { color: var(--ink); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(40px); filter: blur(6px); transition: opacity 1s var(--ease) var(--d, 0s), transform 1s var(--ease) var(--d, 0s), filter 1s var(--ease) var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; filter: none; }

/* Responsive */
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .timeline { grid-template-columns: 1fr 1fr; }
  .timeline-bar, .step::before { display: none; }
  .work-grid { grid-template-columns: 1fr; grid-auto-rows: 300px; }
  .work-card:first-child { grid-row: auto; }
  .contact-card { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav { gap: 16px; }
  .nav .btn-small { display: none; }
  .burger { display: block; margin-left: auto; }
  .nav-links {
    position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; align-items: center; gap: 28px;
    background: rgba(10,9,18,.96); backdrop-filter: blur(20px); font-family: var(--display); font-size: 2rem;
    clip-path: circle(0 at calc(100% - 40px) 36px); transition: clip-path .7s var(--ease);
  }
  .nav.open .nav-links { clip-path: circle(150% at calc(100% - 40px) 36px); }
  .timeline { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .section { padding-block: 80px; }
  .quote-wrap { min-height: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
}
