/* ===================================================================
   NEUROVEX — public site
   Committed dark brand. Every colour is painted explicitly.
   =================================================================== */

:root {
  --ink: #050505;
  --raised: #0c0c0d;
  --line: #1e1e20;
  --line-soft: #141416;
  --bone: #f2f0ec;
  --smoke: #6b6b6e;
  --smoke-dim: #46464a;
  --accent: #e8ff52;

  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --enter: cubic-bezier(0.16, 1, 0.3, 1);
  --move: cubic-bezier(0.65, 0, 0.35, 1);

  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --section: clamp(5rem, 12vh, 11rem);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.035em; text-wrap: balance; }
p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--accent); color: var(--ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 200;
  background: var(--bone); color: var(--ink);
  padding: 10px 16px; font-family: var(--mono); font-size: 12px;
  transition: top .2s;
}
.skip:focus { top: 16px; }

/* ------------------------------ helpers --------------------------- */

.shell { width: 100%; max-width: 108rem; margin-inline: auto; padding-inline: var(--gutter); }

.mono, .eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--smoke);
}
.eyebrow { font-size: 10px; }
.dim { color: var(--smoke); }
.accent { color: var(--accent); }

.rule { height: 1px; background: var(--line); flex: 1; }

.underline {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size .4s var(--enter);
}
.underline:hover { background-size: 100% 1px; }

.grain::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  opacity: .16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* ------------------------------- header --------------------------- */

.site-head {
  position: fixed; inset-inline: 0; top: 0; z-index: 90;
  transition: background-color .5s var(--enter), backdrop-filter .5s;
}
.site-head.scrolled { background: rgba(5,5,5,.82); backdrop-filter: blur(12px); }

.head-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.wordmark { font-size: 15px; font-weight: 600; letter-spacing: .22em; }
.wordmark.lg { font-size: 22px; font-weight: 800; letter-spacing: .2em; }

.head-nav { display: none; gap: 28px; }
.head-nav a {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: .16em; color: var(--smoke); transition: color .3s;
}
.head-nav a:hover, .head-nav a.on { color: var(--bone); }

.menu-btn { display: flex; align-items: center; gap: 12px; }
.menu-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .16em; }
.menu-bars { display: flex; flex-direction: column; justify-content: space-between; width: 20px; height: 12px; }
.menu-bars i { display: block; height: 1px; background: var(--bone); transition: transform .3s, opacity .3s; }
.menu-btn[aria-expanded="true"] .menu-bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-bars i:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: 0; z-index: 85; background: var(--ink);
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 68px;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a { display: block; padding-block: 8px; font-size: 2rem; font-weight: 600; letter-spacing: -.03em; }
.mob-mail { margin-top: 36px; }

/* ------------------------------- cursor --------------------------- */

.cursor {
  position: fixed; left: 0; top: 0; z-index: 100;
  pointer-events: none; mix-blend-mode: difference; display: none;
}
.cursor span {
  display: flex; align-items: center; justify-content: center;
  width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%; background: var(--bone); color: var(--ink);
  font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .14em;
  transition: width .3s var(--enter), height .3s var(--enter), margin .3s var(--enter);
}
.cursor.hot span  { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
.cursor.word span { width: 74px; height: 74px; margin: -37px 0 0 -37px; }
body.cursor-on, body.cursor-on a, body.cursor-on button { cursor: none; }

/* ------------------------------ sections -------------------------- */

.band { padding-block: var(--section); }
.band.tight { padding-top: 0; }

.sec-head { display: flex; align-items: center; gap: 18px; margin-bottom: 40px; }

.display-xl {
  font-size: clamp(3rem, 11vw, 12rem);
  line-height: .84; text-transform: uppercase;
}
.display-lg {
  font-size: clamp(2.1rem, 6vw, 5.6rem);
  line-height: .9; text-transform: uppercase;
}
.title { font-size: clamp(1.4rem, 3.2vw, 2.6rem); line-height: 1; font-weight: 600; letter-spacing: -.025em; }
.lede { font-size: clamp(1.02rem, 1.5vw, 1.4rem); color: var(--smoke); letter-spacing: -.01em; }

/* reveal-on-scroll: visible by default, JS opts in */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--enter), transform .8s var(--enter); }
.js .reveal.in { opacity: 1; transform: none; }

.mask { display: block; overflow: hidden; }
.js .mask > span { display: block; transform: translateY(108%); transition: transform .95s var(--enter); }
.js .mask.in > span { transform: none; }

/* --------------------------------- hero --------------------------- */

.hero { position: relative; display: flex; align-items: flex-end; overflow: hidden; min-height: 100svh; }
.hero.compact { min-height: 66svh; }
.hero-art { position: absolute; inset: 0; }
.hero-art img, .hero-art video { width: 100%; height: 100%; object-fit: cover; }
.hero-veil { position: absolute; inset: 0; background: linear-gradient(to top, var(--ink) 2%, rgba(5,5,5,.38) 55%, rgba(5,5,5,.72) 100%); }
.hero-inner { position: relative; z-index: 2; width: 100%; padding-block: 140px 56px; }

.hero-foot { display: grid; gap: 28px; margin-top: 36px; }
.hero-foot .lede { max-width: 30ch; }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border: 1px solid var(--line);
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .18em;
  transition: border-color .3s, background-color .3s, color .3s;
}
.btn:hover { border-color: var(--bone); }
.btn.solid { background: var(--bone); border-color: var(--bone); color: var(--ink); }
.btn.solid:hover { background: var(--accent); border-color: var(--accent); }

.scroll-cue { display: flex; align-items: center; gap: 14px; margin-top: 48px; }
.scroll-cue .track { position: relative; width: 1px; height: 40px; background: var(--line); overflow: hidden; }
.scroll-cue .track i { position: absolute; inset-inline: 0; height: 16px; background: var(--bone); animation: cue 2.1s var(--move) infinite; }
@keyframes cue { from { top: -16px; } to { top: 40px; } }

/* ------------------------------ pipeline -------------------------- */

.split { display: grid; gap: 48px; }

.pipeline { position: relative; padding-left: 30px; }
.pipeline .track { position: absolute; left: 3px; top: 8px; bottom: 10px; width: 1px; background: var(--line); }
.pipeline .track i { display: block; width: 1px; background: var(--bone); height: 0; transition: height .2s linear; }
.pipeline li { position: relative; padding-block: 10px; }
.pipeline li::before {
  content: ''; position: absolute; left: -30px; top: 22px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--smoke-dim);
  transition: background-color .5s;
}
.pipeline li.in::before { background: var(--bone); }
.pipeline .stage { display: block; font-size: 1.1rem; font-weight: 500; letter-spacing: -.02em; }

/* -------------------------------- work ---------------------------- */

.tiles { display: grid; gap: 24px 20px; }

.tile .frame { position: relative; overflow: hidden; background: var(--raised); aspect-ratio: 4 / 3; }
.tile.wide .frame { aspect-ratio: 16 / 9; }
.tile.tall .frame { aspect-ratio: 3 / 4; }
.tile .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--enter); }
.tile:hover .frame img { transform: scale(1.045); }
.tile .frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .7s; }
.tile:hover .frame video.ready { opacity: 1; }
.tile .frame::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(5,5,5,.7), transparent 58%); }
.tile .idx { position: absolute; left: 16px; top: 14px; z-index: 2; }

.tile-meta {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
  border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px;
}
.tile-meta h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -.025em; transition: transform .5s var(--enter); }
.tile:hover .tile-meta h3 { transform: translateX(4px); }
.tile-meta .desc { margin-top: 4px; font-size: .85rem; color: var(--smoke); }
.tile-meta .right { flex-shrink: 0; text-align: right; }
.tile-meta .right span { display: block; }
.tile-tech { margin-top: 8px; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px 24px; border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 44px; }
.filters button { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .16em; color: var(--smoke); transition: color .3s; }
.filters button:hover, .filters button[aria-pressed="true"] { color: var(--bone); }
.filters .n { font-size: 9px; color: var(--smoke-dim); margin-left: 5px; }

/* ------------------------------ services -------------------------- */

.svc { border-top: 1px solid var(--line); }
.svc > li { border-bottom: 1px solid var(--line); }
.svc .row { display: flex; align-items: baseline; gap: 20px; width: 100%; text-align: left; padding-block: 26px; }
.svc .row h3 { flex: 1; font-size: clamp(1.3rem, 3.2vw, 2.6rem); font-weight: 600; text-transform: uppercase; color: var(--smoke); transition: color .3s; letter-spacing: -.025em; }
.svc .row[aria-expanded="true"] h3, .svc .row:hover h3 { color: var(--bone); }
.svc .plus { font-family: var(--mono); font-size: 1.1rem; transition: transform .5s var(--enter); }
.svc .row[aria-expanded="true"] .plus { transform: rotate(45deg); }
.svc .body { display: grid; gap: 24px; padding-bottom: 32px; }
.svc .body .stmt { font-size: 1.05rem; letter-spacing: -.01em; }
.svc .body .disc { columns: 2; column-gap: 28px; }
.svc .body .disc li { font-size: .85rem; color: var(--smoke); padding-block: 3px; break-inside: avoid; }
.svc .body .more { display: inline-block; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .18em; }

/* ------------------------------- process -------------------------- */

.process { border-top: 1px solid var(--line); }
.process li { border-bottom: 1px solid var(--line); }
.process .row { display: grid; gap: 12px; padding-block: 34px; }
.process h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: -.025em; }
.process p { font-size: .9rem; line-height: 1.7; color: var(--smoke); max-width: 60ch; }

/* -------------------------------- grid stuff ---------------------- */

.cards { display: grid; gap: 0; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.cards > * { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 28px; }
.cards h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -.02em; margin-top: 14px; }
.cards p { font-size: .85rem; line-height: 1.65; color: var(--smoke); margin-top: 10px; }

.clients { display: grid; grid-template-columns: repeat(2, 1fr); border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.clients li {
  display: flex; align-items: center; justify-content: center; text-align: center;
  aspect-ratio: 2 / 1; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .2em;
  color: var(--smoke-dim); transition: color .5s;
}
.clients li:hover { color: var(--bone); }
.clients li .sector { display: block; margin-top: 5px; font-size: 9px; letter-spacing: .16em; color: var(--smoke-dim); }

/* ----------------------------- showreel --------------------------- */

.reel { position: relative; aspect-ratio: 16 / 9; background: var(--raised); overflow: hidden; }
.reel img, .reel video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel .play {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px; background: rgba(5,5,5,.3); transition: background-color .5s;
}
.reel .play:hover { background: rgba(5,5,5,.1); }
.reel .play .ring {
  display: flex; align-items: center; justify-content: center;
  width: 84px; height: 84px; border: 1px solid rgba(242,240,236,.6); border-radius: 50%;
  backdrop-filter: blur(4px); transition: transform .3s var(--enter);
}
.reel .play:hover .ring { transform: scale(1.06); }
.reel .play .ring i { margin-left: 4px; border-block: 9px solid transparent; border-left: 15px solid var(--bone); }
.reel .note {
  position: absolute; inset-inline: 0; bottom: 0; padding: 12px 18px; text-align: center;
  background: rgba(5,5,5,.88); font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: .16em; color: var(--smoke);
}

/* --------------------------- before / after ----------------------- */

.ba { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--raised); touch-action: none; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba .clip { position: absolute; inset: 0; overflow: hidden; width: 50%; }
.ba .clip img { width: var(--ba-w, 100%); max-width: none; }
.ba .tag { position: absolute; bottom: 14px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .2em; color: rgba(242,240,236,.85); }
.ba .tag.l { left: 16px; } .ba .tag.r { right: 16px; }
.ba .handle { position: absolute; inset-block: 0; width: 1px; background: var(--bone); pointer-events: none; }
.ba .handle i {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--bone); border-radius: 50%;
  background: rgba(5,5,5,.7); font-family: var(--mono); font-size: 11px; font-style: normal;
}
.ba input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; }

/* ----------------------------- converge --------------------------- */

.converge { position: relative; }
.cv-line { fill: none; stroke: var(--smoke-dim); stroke-width: 1; }
.cv-out { stroke: var(--accent); stroke-width: 1.6; fill: none; }
.js .cv-line, .js .cv-out { stroke-dasharray: 1200; stroke-dashoffset: 1200; transition: stroke-dashoffset 1.3s var(--enter); }
.js .converge.in .cv-line, .js .converge.in .cv-out { stroke-dashoffset: 0; }
.cv-lab { fill: var(--bone); font-family: var(--display); font-size: 19px; font-weight: 600; }
.cv-note { fill: var(--smoke); font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; }
.cv-o1 { fill: var(--accent); font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em; }
.cv-o2 { fill: var(--bone); font-family: var(--display); font-size: 21px; font-weight: 700; }

/* ------------------------------- forms ---------------------------- */

.form { display: grid; gap: 28px 36px; }
.field label { display: block; margin-bottom: 6px; }
.field .req { color: var(--accent); }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 0; background: transparent; color: var(--bone);
  border: 0; border-bottom: 1px solid var(--line);
  font-family: var(--display); font-size: 1rem; transition: border-color .3s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field select { appearance: none; }
.field select option { background: var(--ink); color: var(--bone); }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--bone); outline: none; }
.field input::placeholder, .field textarea::placeholder { color: var(--smoke-dim); }
.field .err { margin-top: 8px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); }
.form-note { border: 1px solid var(--line); padding: 14px 18px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.sent { border: 1px solid var(--line); padding: 48px 36px; }
.sent p.lede { margin-top: 16px; max-width: 40ch; }

/* ------------------------------ case study ------------------------ */

.notice { border-block: 1px solid var(--line); background: var(--raised); }
.notice p { padding-block: 14px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .16em; color: var(--smoke); }

.facts { display: grid; gap: 22px; border-top: 1px solid var(--line); padding-top: 36px; }
.facts dt { margin-bottom: 8px; }
.facts dd { margin: 0; font-size: .9rem; }

.breakdown { border-top: 1px solid var(--line); padding-top: 28px; display: grid; gap: 28px; }
.breakdown .lbl { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .2em; color: var(--accent); }
.breakdown p { margin-top: 8px; font-size: .88rem; line-height: 1.7; color: var(--smoke); }

.gallery { display: grid; gap: 20px; }
.gallery figure > div { overflow: hidden; background: var(--raised); }
.gallery img, .gallery video { width: 100%; height: 100%; object-fit: cover; }

.credits { display: grid; gap: 10px 36px; border-top: 1px solid var(--line); padding-top: 36px; }
.credits li { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.credits .role { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .16em; color: var(--smoke); }

.pager { display: flex; flex-direction: column; gap: 28px; border-top: 1px solid var(--line); padding-top: 40px; }
.pager .step span { display: block; }
.pager .step .t { margin-top: 8px; font-size: 1.2rem; font-weight: 600; letter-spacing: -.025em; transition: transform .5s var(--enter); }
.pager .step:hover .t { transform: translateX(4px); }

/* -------------------------------- footer -------------------------- */

.site-foot { border-top: 1px solid var(--line); }
.site-foot .shell { padding-block: 64px 40px; }
.foot-grid { display: grid; gap: 44px; }
.foot-col ul { margin-top: 20px; display: grid; gap: 8px; }
.foot-col a { font-size: .88rem; color: var(--smoke); transition: color .3s; }
.foot-col a:hover { color: var(--bone); }
.foot-mail { display: inline-block; margin-top: 26px; font-size: .88rem; }
.foot-bar {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 56px; border-top: 1px solid var(--line); padding-top: 24px;
  font-size: 10px; letter-spacing: .16em;
}
.foot-bar-right { display: flex; flex-wrap: wrap; gap: 20px; }
.foot-bar a:hover { color: var(--bone); }

/* ------------------------------ 404 ------------------------------- */

.nf { display: flex; align-items: center; min-height: 78svh; }

/* ----------------------------- responsive ------------------------- */

@media (min-width: 700px) {
  .split { grid-template-columns: 1.15fr .85fr; gap: 64px; }
  .hero-foot { grid-template-columns: 1fr 1fr; gap: 44px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tiles .tile.span2 { grid-column: span 2; }
  .svc .body { grid-template-columns: 1fr 1fr; gap: 44px; }
  .process .row { grid-template-columns: 60px 1fr 1fr; gap: 32px; align-items: start; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .clients { grid-template-columns: repeat(3, 1fr); }
  .form { grid-template-columns: 1fr 1fr; }
  .form .full { grid-column: span 2; }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery .full { grid-column: span 2; }
  .credits { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 5fr 4fr 3fr; }
  .foot-bar { flex-direction: row; align-items: center; justify-content: space-between; }
  .pager { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (min-width: 1024px) {
  .head-nav { display: flex; }
  .menu-btn { display: none; }
  .mobile-nav { display: none !important; }
  .cursor { display: block; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .tiles .tile.span2 { grid-column: span 2; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .clients { grid-template-columns: repeat(4, 1fr); }
  .facts { grid-template-columns: repeat(5, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .js .mask > span { transform: none; }
  .js .cv-line, .js .cv-out { stroke-dashoffset: 0; }
  .cursor { display: none !important; }
}
