/* ───────── Tokens ───────── */
:root {
  --bg: #050505;
  --bg-2: #0c0c0e;
  --panel: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f2f2f0;
  --muted: #9a9a9a;
  --accent: #FFE500;
  --accent-2: #6A00FF;
  --font: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 5vw, 80px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: #000; }

/* ───────── Background layers ───────── */
.bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.noise {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; 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='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.cursor {
  position: fixed; top: 0; left: 0; width: 14px; height: 14px; border-radius: 50%;
  border: 1px solid var(--accent); z-index: 100; pointer-events: none;
  transform: translate(-50%, -50%); transition: width .25s, height .25s, background .25s;
  mix-blend-mode: difference;
}
.cursor.is-hover { width: 44px; height: 44px; background: rgba(255, 229, 0, 0.15); }
@media (hover: none) { .cursor { display: none; } }

/* ───────── Loader ───────── */
.loader {
  position: fixed; inset: 0; z-index: 90; background: var(--bg);
  display: grid; place-items: center; align-content: center; gap: 12px;
  transition: opacity .8s var(--ease), visibility .8s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__word { font-size: clamp(28px, 6vw, 72px); font-weight: 700; letter-spacing: 0.18em; }
.loader__pct { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.3em; }

/* Scatter letters */
[data-scatter] .ch, [data-scatter-on-view] .ch {
  display: inline-block; opacity: 0;
  transform: translate(var(--dx, 0), var(--dy, 0)) rotate(var(--rot, 0)) scale(1.3);
  filter: blur(8px);
  transition: transform 1.1s var(--ease), opacity .9s ease, filter .9s ease;
  transition-delay: var(--d, 0s);
  will-change: transform, opacity, filter;
}
[data-scatter].is-in .ch, [data-scatter-on-view].is-in .ch { opacity: 1; transform: none; filter: blur(0); }
[data-scatter] .wd, [data-scatter-on-view] .wd { display: inline-block; white-space: nowrap; }

/* ───────── Nav ───────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background .4s, backdrop-filter .4s, padding .4s;
}
.nav.is-scrolled { background: rgba(5, 5, 5, 0.7); backdrop-filter: blur(14px); padding: 12px var(--gutter); border-bottom: 1px solid var(--line); }
.nav__logo { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.22em; font-size: 13px; color: var(--accent); }
.nav__logo span { color: var(--text); }
.nav__links { display: flex; gap: 32px; align-items: center; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.nav__links a { transition: color .3s; }
.nav__links a:hover { color: var(--text); }
.nav__cta { color: var(--text); border: 1px solid var(--line); padding: 8px 14px; transition: border-color .3s, background .3s, color .3s; }
.nav__cta:hover { background: var(--accent); color: #000 !important; border-color: var(--accent); }
.nav__burger { display: none; background: none; border: 0; width: 36px; height: 36px; cursor: pointer; flex-direction: column; gap: 6px; align-items: center; justify-content: center; }
.nav__burger span { width: 22px; height: 1.5px; background: var(--text); transition: transform .3s; }
.nav.is-open .nav__burger span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav.is-open .nav__burger span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* ───────── Shared ───────── */
main { position: relative; z-index: 2; }
section { padding: clamp(80px, 14vh, 160px) var(--gutter); position: relative; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(30px, 4.6vw, 58px); }
.section-head__hint { margin-top: 16px; font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.15em; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* Buttons with bracket corners (Edolus-style) */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 30px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em;
  border: 0; cursor: pointer; isolation: isolate; transition: transform .3s var(--ease);
}
.btn span { position: relative; z-index: 1; }
.btn::before, .btn::after {
  content: ""; position: absolute; width: 8px; height: 8px; border: 1.5px solid currentColor;
  transition: inset .35s var(--ease), opacity .3s; opacity: .9;
}
.btn::before { top: -6px; left: -6px; border-right: 0; border-bottom: 0; }
.btn::after { bottom: -6px; right: -6px; border-left: 0; border-top: 0; }
.btn:hover::before { top: -10px; left: -10px; }
.btn:hover::after { bottom: -10px; right: -10px; }
.btn--primary { background: var(--text); color: #000; }
.btn--primary::before, .btn--primary::after { border-color: var(--text); }
.btn--primary:hover { background: var(--accent); }
.btn--ghost { background: transparent; color: var(--text); outline: 1px solid var(--line); outline-offset: -1px; }
.btn--ghost:hover { outline-color: var(--text); }
.btn--full { width: 100%; }

/* ───────── Hero ───────── */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding-top: 120px; padding-bottom: 120px;
}
.hero__title { font-size: clamp(32px, 6.4vw, 92px); line-height: .98; letter-spacing: -0.03em; max-width: 1200px; }
.hero__line { display: block; }
.hero__line--accent { color: var(--accent); }
.hero__sub { max-width: 620px; margin-top: 32px; font-size: clamp(16px, 1.4vw, 20px); color: var(--muted); }
.hero__actions { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 44px; }
.hero__ticker {
  position: absolute; left: 0; right: 0; bottom: 0; overflow: hidden;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted);
  background: rgba(5,5,5,.5); backdrop-filter: blur(6px);
}
.ticker__track { display: flex; width: max-content; animation: ticker 40s linear infinite; }
.ticker__track span { padding: 14px 40px; position: relative; white-space: nowrap; }
.ticker__track span::after { content: "✦"; position: absolute; right: -6px; color: var(--accent); }
@keyframes ticker { to { transform: translateX(-50%); } }
.scroll-hint { position: absolute; left: 50%; bottom: 70px; width: 1px; height: 48px; background: var(--line); overflow: hidden; }
.scroll-hint span { position: absolute; inset: 0; background: var(--accent); animation: drop 2s var(--ease) infinite; }
@keyframes drop { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

/* ───────── Manifesto ───────── */
.manifesto { max-width: 1100px; margin: 0 auto; }
.manifesto__text { font-size: clamp(24px, 3.4vw, 48px); font-weight: 500; line-height: 1.2; letter-spacing: -0.015em; }
.manifesto__text .w { display: inline-block; color: rgba(255,255,255,.18); transition: color .5s; }
.manifesto__text .w.is-lit { color: var(--text); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); margin-top: 72px; border: 1px solid var(--line); }
.stat { background: var(--bg); padding: 28px 24px; }
.stat strong { display: block; font-size: clamp(34px, 4vw, 56px); font-weight: 700; letter-spacing: -0.03em; color: var(--accent); line-height: 1; }
.stat span { display: block; margin-top: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

/* ───────── Services rail ───────── */
.services { padding-right: 0; }
.rail {
  display: flex; gap: 20px; overflow-x: auto; padding-right: var(--gutter); padding-bottom: 14px;
  scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab;
}
.rail::-webkit-scrollbar { display: none; }
.rail.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.card {
  flex: 0 0 clamp(300px, 34vw, 460px); scroll-snap-align: start;
  background: var(--panel); border: 1px solid var(--line); padding: 26px;
  display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden;
  transition: border-color .4s, transform .5s var(--ease), background .4s;
}
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(255,229,0,.08), transparent 45%);
}
.card:hover { border-color: rgba(255,255,255,.25); transform: translateY(-6px); }
.card:hover::after { opacity: 1; }
.card__eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }
.card h3 { font-size: clamp(22px, 2.2vw, 30px); }
.card ul { display: grid; gap: 8px; color: var(--muted); font-size: 15px; }
.card li { padding-left: 18px; position: relative; }
.card li::before { content: ""; position: absolute; left: 0; top: .65em; width: 8px; height: 1px; background: var(--accent); }
.card__visual { height: 170px; border: 1px solid var(--line); background: var(--bg-2); display: grid; place-items: center; overflow: hidden; }

.card__visual--code pre { margin: 0; font-family: var(--mono); font-size: 11px; line-height: 1.6; color: #d7d7d7; padding: 0 16px; }
.card__visual--code .k { color: var(--accent); }
.card__visual--code .p { color: #b58cff; }
.card__visual--code .c { color: #7ee787; }

.card__visual--flow svg { width: 100%; height: 100%; }
.flow-nodes rect { fill: rgba(255,255,255,.04); stroke: var(--line); }
.flow-nodes text { fill: var(--text); font-family: var(--mono); font-size: 10px; text-anchor: middle; letter-spacing: .1em; }
.flow-lines path { fill: none; stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 6 6; animation: dash 1.6s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -24; } }

.funnel { width: 80%; display: grid; gap: 6px; }
.funnel div { width: var(--w); margin: 0 auto; height: 22px; background: linear-gradient(90deg, rgba(255,229,0,.65), rgba(106,0,255,.6)); display: grid; place-items: center; transform-origin: center; animation: pulse 3s ease-in-out infinite; }
.funnel div:nth-child(2) { animation-delay: .2s } .funnel div:nth-child(3) { animation-delay: .4s } .funnel div:nth-child(4) { animation-delay: .6s } .funnel div:nth-child(5) { animation-delay: .8s }
.funnel span { font-family: var(--mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: #000; }
@keyframes pulse { 50% { transform: scaleX(1.04); filter: brightness(1.25); } }

.grid-art { display: grid; grid-template-columns: repeat(4, 28px); gap: 10px; }
.grid-art i { width: 28px; height: 28px; border: 1px solid var(--line); animation: tile 2.4s ease-in-out infinite; }
.grid-art i:nth-child(odd) { animation-delay: .4s } .grid-art i:nth-child(3n) { animation-delay: .8s } .grid-art i:nth-child(5n) { animation-delay: 1.2s }
@keyframes tile { 50% { background: var(--accent); border-color: var(--accent); transform: scale(.85); } }

/* ───────── Principles ───────── */
.principles__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.principle { background: var(--bg); padding: 36px 30px; transition: background .4s; }
.principle:hover { background: var(--bg-2); }
.principle__n { font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: .2em; }
.principle h3 { font-size: 22px; margin: 18px 0 12px; }
.principle p { color: var(--muted); font-size: 15px; }

/* ───────── Process ───────── */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 40px; position: relative; }
.timeline::before { content: ""; position: absolute; top: 18px; left: 0; right: 0; height: 1px; background: var(--line); }
.timeline li { position: relative; padding-top: 48px; }
.timeline li::before { content: ""; position: absolute; top: 12px; left: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 1px solid var(--accent); }
.timeline__step { font-family: var(--mono); font-size: 11px; letter-spacing: .25em; color: var(--muted); }
.timeline h3 { font-size: 22px; margin: 10px 0; }
.timeline p { color: var(--muted); font-size: 15px; }

/* ───────── Contact ───────── */
.contact { background: linear-gradient(180deg, transparent, rgba(106,0,255,.08) 60%, transparent); }
.contact__inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; max-width: 1200px; margin: 0 auto; }
.contact h2 { font-size: clamp(36px, 5.5vw, 76px); letter-spacing: -0.03em; }
.contact__copy p:not(.eyebrow) { margin-top: 24px; color: var(--muted); max-width: 460px; font-size: 17px; }
.contact__meta { margin-top: 40px; display: grid; gap: 14px; font-size: 15px; }
.contact__meta span { display: inline-block; width: 70px; font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.contact__meta a { border-bottom: 1px solid var(--line); transition: border-color .3s; }
.contact__meta a:hover { border-color: var(--accent); }
.form { display: grid; gap: 18px; background: var(--panel); border: 1px solid var(--line); padding: 30px; }
.field { display: grid; gap: 8px; }
.field label { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text);
  padding: 14px; font: inherit; font-size: 15px; border-radius: 0; transition: border-color .3s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.field :is(input, select, textarea):focus { outline: 0; border-color: var(--accent); }
.form__status { font-family: var(--mono); font-size: 12px; color: var(--accent); min-height: 1em; }

/* ───────── Footer ───────── */
.footer { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 28px var(--gutter); border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--muted); }
.footer__brand { display: flex; align-items: center; gap: 8px; color: var(--accent); letter-spacing: .22em; }
.footer__top:hover { color: var(--text); }

/* ───────── Responsive ───────── */
@media (max-width: 860px) {
  .nav__links { position: fixed; inset: 0; background: var(--bg); flex-direction: column; justify-content: center; font-size: 20px; gap: 28px; transform: translateY(-100%); transition: transform .5s var(--ease); z-index: -1; }
  .nav.is-open .nav__links { transform: none; }
  .nav__burger { display: flex; }
  .contact__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__actions { gap: 16px; }
  .btn { padding: 14px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal, [data-scatter] .ch, [data-scatter-on-view] .ch { opacity: 1; transform: none; filter: none; }
}

/* ───────── Copy additions ───────── */
.card__lead { color: var(--text); font-size: 15px; line-height: 1.45; }
.form__note { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .08em; text-align: center; }
.principles .section-head { max-width: 900px; }
.principles .section-head h2 { font-size: clamp(26px, 3.4vw, 44px); line-height: 1.15; }

/* ───────── Careers page ───────── */
.hero--sub { min-height: 70svh; padding-bottom: 60px; }
.role__tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.role__tags li { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--text); border: 1px solid var(--line); padding: 8px 12px; }
.role__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.role__block { background: var(--bg); padding: 34px 30px; }
.role__block h3 { font-size: 20px; margin-bottom: 14px; }
.role__block p { color: var(--muted); font-size: 15px; }
.role__block ul { display: grid; gap: 9px; color: var(--muted); font-size: 15px; }
.role__block ul li { padding-left: 18px; position: relative; }
.role__block ul li::before { content: ""; position: absolute; left: 0; top: .65em; width: 8px; height: 1px; background: var(--accent); }
.role__steps { margin: 0; padding-left: 18px; display: grid; gap: 9px; color: var(--muted); font-size: 15px; }
.role__steps strong { color: var(--text); font-weight: 500; }
.contact__link { color: var(--accent); border-bottom: 1px solid rgba(255,229,0,.4); }
.apply-card { align-self: start; }
.apply-card__list { display: grid; gap: 10px; font-size: 15px; color: var(--muted); }
.apply-card__list li { padding-left: 22px; position: relative; }
.apply-card__list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); }
.nav__links a[aria-current="page"] { color: var(--text); }
.footer__careers { color: var(--muted); }
.footer__careers:hover { color: var(--text); }
