:root {
  --bg: #07060d;
  --bg-2: #0e0c18;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f3f1ff;
  --muted: #9b97b3;
  --violet: #7c5cff;
  --cyan: #00e0ff;
  --pink: #ff3d9a;
  --lime: #c6ff3d;
  --grad: linear-gradient(100deg, var(--violet), var(--cyan) 55%, var(--lime));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 22px;
  --pad: clamp(20px, 5vw, 72px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::after { /* film grain */
  content: ""; position: fixed; inset: -50%; pointer-events: none; z-index: 100; opacity: 0.05;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain { 0%,100%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-4%)} 60%{transform:translate(-4%,1%)} 80%{transform:translate(3%,3%)} }

::selection { background: var(--violet); color: #fff; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: "Space Grotesk", sans-serif; line-height: 1.02; letter-spacing: -0.03em; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% auto; animation: shine 6s linear infinite; }
@keyframes shine { to { background-position: 200% center; } }

/* progress + cursor */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--grad); z-index: 60; }
.cursor, .cursor-dot { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 90; border-radius: 50%; opacity: 0; transition: opacity .3s; }
.cursor { width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1.5px solid rgba(255,255,255,.5); transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), background .3s, border-color .3s, opacity .3s; mix-blend-mode: difference; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff; }
.cursor.hover { width: 72px; height: 72px; margin: -36px 0 0 -36px; background: #fff; border-color: #fff; }
@media (hover: hover) and (pointer: fine) { body.has-cursor .cursor, body.has-cursor .cursor-dot { opacity: 1; } }

/* buttons */
.btn {
  --mx: 0px; --my: 0px;
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 28px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 15px/1 "Inter", sans-serif; color: #07060d;
  background: var(--grad); background-size: 200% auto;
  transform: translate(var(--mx), var(--my));
  transition: transform .4s var(--ease), background-position .6s var(--ease), box-shadow .4s;
  box-shadow: 0 10px 40px -10px rgba(124, 92, 255, .7);
  overflow: hidden;
}
.btn:hover { background-position: 100% center; box-shadow: 0 14px 50px -8px rgba(0, 224, 255, .7); }
.btn i { font-style: normal; transition: transform .4s var(--ease); }
.btn:hover i { transform: translateX(4px); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); box-shadow: none; backdrop-filter: blur(10px); }
.btn-ghost:hover { border-color: rgba(255,255,255,.35); box-shadow: none; }
.btn-small { padding: 11px 20px; font-size: 14px; }
.btn-full { width: 100%; justify-content: center; padding: 19px; font-size: 16px; }
.btn:disabled { opacity: .6; cursor: wait; }

/* nav */
.nav {
  position: fixed; inset: 16px var(--pad) auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 10px 10px 22px; border-radius: 999px;
  transition: background .4s, border-color .4s, backdrop-filter .4s, transform .5s var(--ease);
  border: 1px solid transparent;
}
.nav.scrolled { background: rgba(14, 12, 24, .6); border-color: var(--border); backdrop-filter: blur(18px) saturate(160%); }
.nav.hidden { transform: translateY(-130%); }
.logo { display: flex; align-items: baseline; font-family: "Space Grotesk"; font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.logo-mark { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; align-items: center; gap: 30px; font-size: 14px; font-weight: 500; }
.nav-links a:not(.btn) { color: var(--muted); position: relative; transition: color .3s; }
.nav-links a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 100%; background: var(--text); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-links a:not(.btn):hover::after { transform: scaleX(1); transform-origin: left; }
.menu-toggle { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); cursor: pointer; position: relative; }
.menu-toggle span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--text); transition: transform .4s var(--ease); }
.menu-toggle span:first-child { top: 17px; } .menu-toggle span:last-child { top: 25px; }
.nav.open .menu-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
.nav.open .menu-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* hero */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; padding: 120px var(--pad) 80px; overflow: hidden; isolation: isolate; }
#hero-canvas { 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(--violet); top: -10%; left: -8%; }
.b2 { width: 440px; height: 440px; background: var(--cyan); bottom: -15%; right: -6%; animation-delay: -6s; opacity: .35; }
.b3 { width: 300px; height: 300px; background: var(--pink); top: 40%; left: 55%; animation-delay: -12s; opacity: .25; }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(80px,-60px) scale(1.15); } 66% { transform: translate(-60px,50px) scale(.9); } }
.hero-inner { max-width: 1100px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); backdrop-filter: blur(10px); font-size: 13px; color: var(--muted); margin-bottom: 34px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 var(--lime); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(198,255,61,0); } 100% { box-shadow: 0 0 0 0 rgba(198,255,61,0); } }
.hero-title { font-size: clamp(52px, 11vw, 168px); font-weight: 700; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .word { display: inline-block; transform: translateY(110%) rotate(6deg); transition: transform 1.2s var(--ease); }
.loaded .hero-title .word { transform: none; }
.loaded .hero-title .line:nth-child(2) .word { transition-delay: .12s; }
.loaded .hero-title .line:nth-child(3) .word { transition-delay: .24s; }
.rotator { font-style: italic; font-weight: 500; color: var(--cyan); text-shadow: 0 0 40px rgba(0,224,255,.45); }
.rot-text { display: inline-block; transition: transform .6s var(--ease), opacity .6s var(--ease), filter .6s; }
.rot-text.out { transform: translateY(-40%); opacity: 0; filter: blur(8px); }
.rot-text.in { transform: translateY(40%); opacity: 0; filter: blur(8px); transition: none; }
.hero-sub { max-width: 620px; margin: 30px auto 0; font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }
.scroll-hint { position: absolute; bottom: 30px; left: 50%; translate: -50% 0; width: 26px; height: 42px; border: 1.5px solid rgba(255,255,255,.3); border-radius: 20px; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: #fff; animation: scroll 1.8s var(--ease) infinite; }
@keyframes scroll { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(16px); opacity: 0; } }

/* marquee */
.marquee { border-block: 1px solid var(--border); background: var(--bg-2); padding: 26px 0; overflow: hidden; transform: rotate(-1.5deg) scale(1.03); }
.marquee-track { display: flex; gap: 40px; width: max-content; animation: marquee 32s linear infinite; font-family: "Space Grotesk"; font-size: clamp(26px, 4vw, 48px); font-weight: 700; white-space: nowrap; }
.marquee-track span:nth-child(4n+1) { color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.6); }
.marquee-track b { color: var(--cyan); font-size: .6em; align-self: center; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* sections */
.section { padding: clamp(90px, 14vw, 170px) var(--pad); max-width: 1400px; margin: 0 auto; }
.section-head { margin-bottom: 70px; }
.kicker { font-family: "Space Grotesk"; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); margin-bottom: 20px; }
.section h2 { font-size: clamp(40px, 6.5vw, 92px); font-weight: 700; }

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

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; perspective: 1200px; }
.card {
  --rx: 0deg; --ry: 0deg; --px: 50%; --py: 50%;
  position: relative; padding: 34px 30px; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.015));
  border: 1px solid var(--border); overflow: hidden;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .5s var(--ease), border-color .4s, opacity 1s var(--ease), filter 1s var(--ease);
}
.card.reveal:not(.in) { transform: translateY(50px); }
.card:hover { border-color: rgba(124, 92, 255, .5); }
.card-glow { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(400px circle at var(--px) var(--py), rgba(124,92,255,.25), transparent 45%); }
.card:hover .card-glow { opacity: 1; }
.icon { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 16px; margin-bottom: 28px; color: var(--cyan); background: rgba(0,224,255,.08); border: 1px solid rgba(0,224,255,.2); transform: translateZ(40px); transition: transform .5s var(--ease), color .4s; }
.icon svg { width: 30px; height: 30px; }
.card:hover .icon { transform: translateZ(60px) rotate(-8deg) scale(1.08); color: var(--lime); }
.card h3 { font-size: 24px; margin-bottom: 14px; transform: translateZ(30px); }
.card p { color: var(--muted); font-size: 15px; transform: translateZ(20px); }
.card ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.card li { font-size: 12px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1400px; margin: 0 auto; padding: 0 var(--pad); gap: 20px; }
.stat { padding: 40px 10px; border-top: 1px solid var(--border); }
.stat .num, .stat .plus { font-family: "Space Grotesk"; font-size: clamp(48px, 7vw, 96px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.stat .plus { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat p { color: var(--muted); margin-top: 10px; }

/* timeline */
.timeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; padding-top: 50px; }
.timeline-line { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--border); }
.timeline-line span { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); box-shadow: 0 0 20px var(--cyan); }
.step { position: relative; }
.step::before { content: ""; position: absolute; top: -57px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--cyan); box-shadow: 0 0 16px var(--cyan); }
.step-num { font-family: "Space Grotesk"; font-size: 64px; font-weight: 700; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.25); line-height: 1; display: block; margin-bottom: 18px; }
.step h3 { font-size: 26px; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 15px; }

/* work */
.work-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.work { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); min-height: 420px; display: flex; flex-direction: column; justify-content: flex-end; }
.w1 { grid-column: span 7; } .w2 { grid-column: span 5; } .w3 { grid-column: span 5; } .w4 { grid-column: span 7; }
.work-art { position: absolute; inset: 0; display: grid; place-items: center; transition: transform 1s var(--ease); }
.w1 .work-art { background: radial-gradient(circle at 30% 30%, #3b1f9e, #0e0c18 70%); }
.w2 .work-art { background: radial-gradient(circle at 70% 30%, #00616f, #0e0c18 70%); }
.w3 .work-art { background: radial-gradient(circle at 50% 80%, #5a1640, #0e0c18 70%); }
.w4 .work-art { background: radial-gradient(circle at 60% 40%, #3f5a00, #0e0c18 70%); }
.work:hover .work-art { transform: scale(1.06); }
.work-meta { position: relative; padding: 30px; background: linear-gradient(transparent, rgba(7,6,13,.9)); display: flex; flex-direction: column; gap: 6px; }
.work-meta span { font-size: 13px; color: var(--muted); }
.work-meta h3 { font-size: clamp(28px, 3vw, 40px); transition: transform .5s var(--ease); }
.work:hover .work-meta h3 { transform: translateX(10px); }
.shape { transition: transform 1s var(--ease); }
.s-ring { width: 200px; height: 200px; border-radius: 50%; border: 22px solid transparent; background: conic-gradient(from 0deg, var(--violet), var(--cyan), var(--lime), var(--violet)) border-box; -webkit-mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0); animation: spin 10s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.s-phone { width: 120px; height: 230px; border-radius: 26px; border: 2px solid rgba(255,255,255,.5); background: linear-gradient(180deg, rgba(0,224,255,.35), rgba(124,92,255,.2)); box-shadow: 0 30px 80px -20px var(--cyan); animation: bob 5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-16px) rotate(-4deg); } }
.s-bars { display: flex; align-items: flex-end; gap: 14px; height: 200px; }
.s-bars i { width: 26px; border-radius: 8px; background: linear-gradient(var(--pink), var(--violet)); animation: bar 2.4s var(--ease) infinite alternate; }
.s-bars i:nth-child(1) { height: 30%; } .s-bars i:nth-child(2) { height: 50%; animation-delay: .2s; } .s-bars i:nth-child(3) { height: 45%; animation-delay: .4s; } .s-bars i:nth-child(4) { height: 75%; animation-delay: .6s; } .s-bars i:nth-child(5) { height: 100%; animation-delay: .8s; }
@keyframes bar { from { transform: scaleY(.4); transform-origin: bottom; } to { transform: scaleY(1); transform-origin: bottom; } }
.s-cube { width: 150px; height: 150px; border-radius: 30px; background: linear-gradient(135deg, var(--lime), var(--cyan)); animation: morph 8s var(--ease) infinite; box-shadow: 0 30px 90px -20px var(--lime); }
@keyframes morph { 0%,100% { border-radius: 30px; transform: rotate(0); } 33% { border-radius: 50%; transform: rotate(120deg) scale(.9); } 66% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: rotate(240deg); } }

/* contact */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 100px); align-items: start; }
.contact-info > p:not(.kicker) { color: var(--muted); font-size: 18px; margin-top: 28px; max-width: 440px; }
.contact-points { display: flex; gap: 40px; margin-top: 44px; }
.contact-points span { display: block; font-size: 13px; color: var(--muted); }
.contact-points strong { font-family: "Space Grotesk"; font-size: 22px; }
.form { position: relative; padding: clamp(26px, 4vw, 44px); border-radius: 28px; background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); border: 1px solid var(--border); backdrop-filter: blur(20px); display: grid; gap: 18px; }
.form::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: conic-gradient(from var(--a, 0deg), transparent 70%, var(--cyan), var(--violet), transparent); -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); animation: border-spin 6s linear infinite; pointer-events: none; }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes border-spin { to { --a: 360deg; } }
.field { position: relative; }
.field input, .field textarea { width: 100%; padding: 24px 18px 10px; border-radius: 14px; border: 1px solid var(--border); background: rgba(7,6,13,.5); color: var(--text); font: 16px "Inter", sans-serif; resize: vertical; outline: none; transition: border-color .3s, box-shadow .3s; }
.field textarea { min-height: 130px; }
.field label { position: absolute; left: 18px; top: 17px; color: var(--muted); font-size: 16px; pointer-events: none; transform-origin: 0 0; transition: transform .3s var(--ease), color .3s; }
.field input:focus, .field textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(124,92,255,.18); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-10px) scale(.75); color: var(--cyan); }
.field.error input, .field.error textarea { border-color: var(--pink); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.chips { border: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips legend { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border); font-size: 14px; transition: all .3s var(--ease); }
.chips label:hover span { border-color: rgba(255,255,255,.35); }
.chips input:checked + span { background: var(--grad); color: #07060d; border-color: transparent; font-weight: 600; transform: scale(1.05); }
.chips input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { min-height: 1.4em; font-size: 15px; text-align: center; }
.form-status.ok { color: var(--lime); } .form-status.err { color: var(--pink); }

/* footer */
.footer { padding: 40px var(--pad) 30px; border-top: 1px solid var(--border); overflow: hidden; }
.footer-big { font-family: "Space Grotesk"; font-weight: 700; font-size: clamp(80px, 21vw, 340px); line-height: .85; letter-spacing: -0.06em; text-align: center; background: linear-gradient(180deg, rgba(255,255,255,.14), transparent 85%); -webkit-background-clip: text; background-clip: text; color: transparent; user-select: none; }
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: 30px; font-size: 14px; color: var(--muted); }
.footer-row a:hover { color: var(--text); }

/* responsive */
@media (max-width: 960px) {
  .timeline { grid-template-columns: 1fr 1fr; row-gap: 60px; }
  .timeline-line, .step::before { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .contact-wrap { grid-template-columns: 1fr; }
  .w1, .w2, .w3, .w4 { grid-column: span 12; }
  .work { min-height: 340px; }
}
@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .nav { inset: 12px 12px auto; }
  .nav-links { position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; gap: 28px; font-size: 26px; background: rgba(7,6,13,.96); backdrop-filter: blur(20px); clip-path: circle(0 at calc(100% - 40px) 40px); transition: clip-path .7s var(--ease); border-radius: 0; }
  .nav.open .nav-links { clip-path: circle(150% at calc(100% - 40px) 40px); }
  .nav.open { background: transparent; border-color: transparent; backdrop-filter: none; }
  .nav-links a:not(.btn) { color: var(--text); }
  .timeline { grid-template-columns: 1fr; }
  .contact-points { gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; filter: none; }
  .hero-title .word { transform: none; }
}
