:root {
  --bg: #0a0a0c;
  --bg-2: #111115;
  --line: #24242b;
  --text: #ecebe6;
  --muted: #8a8a93;
  --accent: #c6ff3d;
  --accent-ink: #0a0a0c;
  --pad: clamp(16px, 5vw, 72px);
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: var(--accent-ink); }

.mono { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.02em; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--pad);
}
.loader__inner { display: flex; justify-content: space-between; align-items: flex-end; }
.loader__label { color: var(--muted); }
.loader__count { font-family: var(--display); font-size: clamp(5rem, 18vw, 14rem); line-height: 0.8; font-weight: 700; }
.loader__bar { height: 2px; background: var(--line); margin-top: 24px; }
.loader__bar span { display: block; height: 100%; width: 0; background: var(--accent); }

/* ---------- Cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 90;
  width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; background: var(--accent);
  pointer-events: none; mix-blend-mode: difference;
  transition: width .25s, height .25s, margin .25s;
}
.cursor.is-hover { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
@media (hover: none) { .cursor { display: none; } }

/* ---------- 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: background .3s, padding .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(10,10,12,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding-top: 14px; padding-bottom: 14px; border-color: var(--line); }
.nav__logo { font-family: var(--display); font-weight: 700; font-size: 1.4rem; }
.nav__logo span { color: var(--accent); }
.nav__links { display: flex; gap: 28px; margin-left: auto; font-size: .92rem; }
.nav__links a { position: relative; color: var(--muted); transition: color .2s; }
.nav__links a:hover { color: var(--text); }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .3s; }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__mail { color: var(--muted); }
.nav__mail:hover { color: var(--accent); }
.nav__burger { display: none; background: none; border: 0; width: 32px; height: 24px; position: relative; cursor: pointer; margin-left: auto; }
.nav__burger span { position: absolute; left: 0; right: 0; height: 2px; background: var(--text); transition: transform .3s, top .3s; }
.nav__burger span:first-child { top: 6px; }
.nav__burger span:last-child { top: 16px; }
.nav__burger[aria-expanded="true"] span:first-child { top: 11px; transform: rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { top: 11px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--pad) 40px;
  overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 30% 50%, transparent 0%, var(--bg) 85%); }
.hero__content { position: relative; z-index: 2; max-width: 1100px; }
.hero__kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); border: 1px solid var(--line); padding: 6px 14px; border-radius: 99px; background: rgba(10,10,12,.6); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(198,255,61,.6); 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__name { font-family: var(--display); font-weight: 700; font-size: clamp(3.6rem, 14vw, 12rem); line-height: .88; letter-spacing: -0.04em; margin: 28px 0 24px; text-transform: uppercase; }
.hero__name .line { display: block; overflow: hidden; }
.hero__name .line > span { display: inline-block; }
.hero__name em { color: var(--accent); font-style: normal; }
.hero__role { display: flex; flex-wrap: wrap; gap: 0 .4em; font-family: var(--display); font-size: clamp(1.25rem, 3vw, 2.2rem); line-height: 1.25; }
.hero__role-pre { color: var(--muted); }
.hero__rotator { position: relative; display: inline-grid; color: var(--accent); }
.hero__rotator span { grid-area: 1 / 1; opacity: 0; transform: translateY(60%); transition: opacity .5s, transform .5s; }
.hero__rotator span.is-active { opacity: 1; transform: none; }
.hero__rotator span.is-out { opacity: 0; transform: translateY(-60%); }
.hero__sub { color: var(--muted); margin-top: 16px; max-width: 640px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn { display: inline-flex; align-items: center; padding: 14px 26px; border-radius: 99px; font-weight: 600; font-size: .95rem; transition: transform .2s, background .2s, color .2s; }
.btn--solid { background: var(--accent); color: var(--accent-ink); }
.btn--solid:hover { transform: translateY(-2px); }
.btn--ghost { border: 1px solid var(--line); background: rgba(10,10,12,.5); }
.btn--ghost:hover { border-color: var(--text); }
.hero__meta { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: auto; padding-top: 48px; color: var(--muted); }
.hero__scroll { animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 40px var(--pad); border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-family: var(--display); font-size: clamp(2.6rem, 5vw, 4.4rem); line-height: 1; color: var(--accent); font-weight: 700; letter-spacing: -0.03em; }
.stat span { display: block; margin-top: 12px; color: var(--muted); font-size: .9rem; line-height: 1.4; }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 12vw, 160px) var(--pad); }
.eyebrow { color: var(--accent); margin-bottom: 28px; }
.section__title { font-family: var(--display); font-size: clamp(2.4rem, 6vw, 5rem); line-height: 1; letter-spacing: -0.03em; margin-bottom: clamp(40px, 6vw, 80px); }
.subhead { font-family: var(--display); font-size: 1.4rem; margin: 96px 0 24px; }

/* About */
.about__text { font-family: var(--display); font-weight: 500; font-size: clamp(1.6rem, 3.6vw, 3rem); line-height: 1.2; letter-spacing: -0.02em; max-width: 1200px; }
.about__text .w { opacity: .15; transition: opacity .2s; }
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 64px; max-width: 1000px; margin-left: auto; color: var(--muted); }
.about__grid strong { color: var(--text); font-weight: 600; }

/* Services accordion */
.services__list { border-top: 1px solid var(--line); }
.svc { border-bottom: 1px solid var(--line); }
.svc__head { display: grid; grid-template-columns: 60px 1fr auto 40px; align-items: center; gap: 20px; padding: 32px 0; cursor: pointer; }
.svc__num { color: var(--muted); }
.svc__head h3 { font-family: var(--display); font-size: clamp(1.5rem, 3.4vw, 2.6rem); font-weight: 500; letter-spacing: -0.02em; transition: color .3s, transform .3s; }
.svc__tag { color: var(--muted); font-size: .95rem; }
.svc__plus { font-size: 1.8rem; text-align: right; transition: transform .3s, color .3s; }
.svc:hover h3 { color: var(--accent); transform: translateX(8px); }
.svc.is-open .svc__plus { transform: rotate(45deg); color: var(--accent); }
.svc__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s ease; }
.svc.is-open .svc__body { grid-template-rows: 1fr; }
.svc__body > div { overflow: hidden; padding-left: 80px; max-width: 900px; }
.svc__body p { color: var(--muted); margin-bottom: 14px; }
.svc__value b { color: var(--text); }
.svc__body .chips { padding-bottom: 32px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-family: var(--mono); font-size: .75rem; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); }
.chips--lg li { font-size: .85rem; padding: 8px 16px; color: var(--text); }

/* Experience timeline */
.timeline { position: relative; padding-left: 40px; }
.timeline__rail { position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--line); }
.timeline__rail span { display: block; width: 100%; height: 0; background: var(--accent); }
.job { position: relative; display: grid; grid-template-columns: 240px 1fr; gap: 40px; padding: 40px 0; border-bottom: 1px solid var(--line); }
.job:last-child { border-bottom: 0; }
.job::before { content: ""; position: absolute; left: -46px; top: 48px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); transition: border-color .3s, background .3s; }
.job.is-active::before { border-color: var(--accent); background: var(--accent); }
.job__date { color: var(--muted); display: block; }
.job__metric { display: block; font-family: var(--display); font-size: clamp(2.6rem, 5vw, 4rem); font-weight: 700; color: var(--accent); line-height: 1; margin-top: 12px; letter-spacing: -0.03em; }
.job__main h3 { font-family: var(--display); font-size: clamp(1.3rem, 2.4vw, 1.8rem); font-weight: 500; line-height: 1.2; }
.job__co { color: var(--muted); margin: 6px 0 18px; font-size: .92rem; }
.job__main li { position: relative; padding-left: 22px; margin-bottom: 10px; color: #c4c3be; }
.job__main li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }

/* Builds */
.builds { display: grid; gap: clamp(48px, 8vw, 120px); }
.build { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.build:nth-child(even) .build__visual { order: 2; }
.build__visual { position: relative; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 20px; background: var(--bg-2); overflow: hidden; }
.build__visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.build__idx { position: absolute; top: 18px; left: 20px; color: var(--muted); }
.build__info h3 { font-family: var(--display); font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -0.03em; line-height: 1; }
.build__kind { color: var(--accent); margin: 12px 0 20px; }
.build__info > p:not(.build__kind) { color: var(--muted); margin-bottom: 24px; }
.build__link { display: inline-block; margin-top: 24px; border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.build__link:hover { color: var(--accent); }

.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.product { position: relative; display: block; background: var(--bg); padding: 28px; transition: background .3s; }
a.product:hover { background: var(--bg-2); }
.product span { color: var(--accent); }
.product p { color: var(--muted); margin-top: 10px; font-size: .92rem; }
.product i { position: absolute; top: 24px; right: 24px; font-style: normal; color: var(--muted); transition: transform .3s, color .3s; }
a.product:hover i { transform: translate(3px,-3px); color: var(--accent); }

.clients { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; }
.clients li { display: flex; flex-direction: column; padding: 18px 0; border-bottom: 1px solid var(--line); }
.clients b { font-weight: 600; }
.clients span { color: var(--muted); font-size: .9rem; }

/* Marquee */
.stack { padding: 40px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.marquee { display: flex; overflow: hidden; white-space: nowrap; }
.marquee__track { display: flex; flex-shrink: 0; animation: marquee 40s linear infinite; }
.marquee--rev .marquee__track { animation-direction: reverse; }
.marquee__track span { font-family: var(--display); font-size: clamp(2rem, 5vw, 4rem); font-weight: 700; letter-spacing: -0.03em; padding: 0 .6em; color: transparent; -webkit-text-stroke: 1px #4a4a52; transition: color .3s, -webkit-text-stroke-color .3s; }
.marquee__track span:hover { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.marquee__track span::after { content: "✦"; font-size: .4em; vertical-align: middle; margin-left: 1.2em; color: var(--accent); -webkit-text-stroke: 0; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.step { position: relative; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); transition: border-color .3s, transform .3s; }
.step:hover { border-color: var(--accent); transform: translateY(-4px); }
.step::before { counter-increment: s; content: "0" counter(s); position: absolute; top: 24px; right: 24px; font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.step__when { color: var(--accent); }
.step h3 { font-family: var(--display); font-size: 1.4rem; margin: 14px 0 10px; font-weight: 500; }
.step p { color: var(--muted); font-size: .92rem; }
.industries { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 64px; }

/* Contact */
.contact { padding: clamp(100px, 14vw, 200px) var(--pad); border-top: 1px solid var(--line); }
.contact__title { font-family: var(--display); font-size: clamp(2.8rem, 9vw, 8rem); line-height: .95; letter-spacing: -0.04em; }
.contact__mail { display: inline-flex; align-items: center; gap: 16px; margin-top: 48px; font-family: var(--display); font-size: clamp(1.2rem, 3.4vw, 2.6rem); border-bottom: 2px solid var(--line); padding-bottom: 8px; transition: border-color .3s, color .3s; word-break: break-all; }
.contact__mail i { font-style: normal; transition: transform .3s; }
.contact__mail:hover { color: var(--accent); border-color: var(--accent); }
.contact__mail:hover i { transform: translateX(8px); }
.contact__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 80px; }
.contact__grid span { display: block; margin-bottom: 8px; }
.contact__grid a:hover { color: var(--accent); }

.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px var(--pad); border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.footer a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav__mail { display: none; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .contact__grid { grid-template-columns: repeat(2, 1fr); }
  .products, .clients { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .nav__burger { display: block; }
  .nav__links {
    position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; align-items: flex-start; gap: 18px;
    padding: var(--pad); background: var(--bg); font-family: var(--display); font-size: 2.2rem;
    opacity: 0; pointer-events: none; transition: opacity .3s;
  }
  .nav__links a { color: var(--text); }
  .nav.is-open .nav__links { opacity: 1; pointer-events: auto; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .about__grid { grid-template-columns: 1fr; gap: 20px; }
  .svc__head { grid-template-columns: 36px 1fr 28px; gap: 12px; padding: 24px 0; }
  .svc__tag { display: none; }
  .svc__body > div { padding-left: 48px; }
  .job { grid-template-columns: 1fr; gap: 12px; }
  .build { grid-template-columns: 1fr; }
  .build:nth-child(even) .build__visual { order: 0; }
}
@media (max-width: 560px) {
  .timeline { padding-left: 28px; }
  .job::before { left: -34px; }
  .stat { padding: 28px 16px; }
  .steps, .products, .clients, .contact__grid { grid-template-columns: 1fr; }
  .svc__body > div { padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .about__text .w { opacity: 1; }
}
