/* ============================================================
   VF ANALYTICS — precision instrument aesthetic
   ink near-black / graph-paper grid / chartreuse signal accent
   Zodiak (display serif) · Switzer (body) · Spline Sans Mono (data)
   ============================================================ */

:root {
  --ink: #0b0c0a;
  --ink-2: #121410;
  --paper: #edebe2;
  --muted: #97978b;
  --line: rgba(237, 235, 226, 0.1);
  --accent: #c8f031;
  --accent-dim: rgba(200, 240, 49, 0.14);

  --font-display: "Zodiak", Georgia, serif;
  --font-body: "Switzer", "Helvetica Neue", sans-serif;
  --font-mono: "Spline Sans Mono", "Courier New", monospace;

  --pad: clamp(1.25rem, 4vw, 4rem);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
em { font-style: italic; }
sup { font-size: 0.45em; vertical-align: super; }

/* ---------- noise overlay ---------- */
.noise {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noise-shift 0.6s steps(2) infinite;
}
@keyframes noise-shift {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-1.5%, 1%); }
  100% { transform: translate(1%, -1.5%); }
}

/* ---------- preloader ---------- */
.preloader {
  position: fixed; inset: 0;
  z-index: 10000;
  background: var(--ink);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.25rem;
}
.preloader__inner {
  display: flex; align-items: baseline; gap: 1.5rem;
}
.preloader__mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 8vw, 5rem);
  color: var(--paper);
}
.preloader__count {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.preloader__label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.25em;
  color: var(--muted);
}

/* ---------- custom cursor ---------- */
.cursor { display: none; }
@media (pointer: fine) {
  .cursor { display: block; position: fixed; top: 0; left: 0; z-index: 9500; pointer-events: none; }
  .cursor__dot {
    position: absolute; top: -3px; left: -3px;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent);
  }
  .cursor__ring {
    position: absolute; top: -18px; left: -18px;
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid rgba(200, 240, 49, 0.5);
    transition: transform 0.25s var(--ease-out), opacity 0.25s;
  }
  .cursor.is-hover .cursor__ring { transform: scale(1.8); opacity: 0.9; background: rgba(200,240,49,0.08); }
}

/* ---------- header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 8000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--pad);
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: rgba(11, 12, 10, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header__logo { display: flex; align-items: baseline; gap: 0.45rem; }
.header__logo-mark {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.35rem; color: var(--accent);
}
.header__logo-text {
  font-family: var(--font-mono); font-size: 0.8rem;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.header__nav { display: flex; gap: 2.25rem; }
.header__link {
  position: relative;
  font-family: var(--font-mono); font-size: 0.75rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
  overflow: hidden;
  transition: color 0.3s;
}
.header__link::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 100%;
  color: var(--accent);
  transition: transform 0.35s var(--ease-out);
}
.header__link > span { display: block; transition: transform 0.35s var(--ease-out); }
.header__link:hover > span,
.header__link:hover::after { transform: translateY(-100%); }
.header__link:hover { color: var(--paper); }
.header__cta {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid var(--line);
  padding: 0.65rem 1.2rem; border-radius: 999px;
  transition: border-color 0.3s, background 0.3s, color 0.3s;
}
.header__cta:hover { border-color: var(--accent); background: var(--accent-dim); }
.header__cta-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 240, 49, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(200, 240, 49, 0); }
}
.header__burger { display: none; }

/* ---------- mobile menu ---------- */
.mmenu {
  position: fixed; inset: 0; z-index: 7500;
  background: var(--ink);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 7rem var(--pad) 2.5rem;
  transform: translateY(-100%);
  transition: transform 0.6s var(--ease-out);
  visibility: hidden;
}
.mmenu.is-open { transform: translateY(0); visibility: visible; }
.mmenu__link {
  display: flex; align-items: baseline; gap: 1rem;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.25rem, 9vw, 3.5rem);
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.mmenu__num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); }
.mmenu__foot {
  display: flex; flex-direction: column; gap: 0.4rem;
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted);
}
.mmenu__foot a { color: var(--accent); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 7rem var(--pad) 5rem;
  overflow: hidden;
}
.hero__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}
.hero__grid {
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(237, 235, 226, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(237, 235, 226, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 75% at 50% 45%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 75% at 50% 45%, black 30%, transparent 75%);
}
.hero__frame { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hero__frame-item {
  position: absolute;
  font-family: var(--font-mono); font-size: 0.625rem;
  letter-spacing: 0.2em; color: var(--muted);
}
.hero__frame-item--tl { top: 5.5rem; left: var(--pad); }
.hero__frame-item--tr { top: 5.5rem; right: var(--pad); }
.hero__frame-item--bl { bottom: 2rem; left: var(--pad); }
.hero__frame-item--br { bottom: 2rem; right: var(--pad); color: var(--accent); }

.hero__content { position: relative; z-index: 3; max-width: 1200px; }
.hero__kicker {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.22em; color: var(--muted);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.hero__kicker-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.2s infinite;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.25rem, 11.5vw, 9.5rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
  margin-bottom: clamp(1.75rem, 3.5vw, 3rem);
}
.hero__title em { color: var(--accent); font-weight: 400; }
.hero__dot { color: var(--accent); }

.line { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.line__inner { display: block; will-change: transform; }

.hero__sub { max-width: 34rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.hero__sub p { color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.15rem); }

.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 0.78rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.95rem 1.8rem; border-radius: 999px;
  transition: background 0.35s, color 0.35s, border-color 0.35s, transform 0.35s;
}
.btn--solid { background: var(--accent); color: var(--ink); }
.btn--solid:hover { background: var(--paper); }
.btn--ghost { border: 1px solid var(--line); color: var(--paper); }
.btn--ghost:hover { border-color: var(--accent); background: var(--accent-dim); }

.hero__scroll {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 0.6rem;
  letter-spacing: 0.3em; color: var(--muted);
}
.hero__scroll-line {
  width: 1px; height: 44px;
  background: linear-gradient(var(--accent), transparent);
  animation: scroll-drip 2s var(--ease-out) infinite;
  transform-origin: top;
}
@keyframes scroll-drip {
  0% { transform: scaleY(0); }
  45% { transform: scaleY(1); }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- sections ---------- */
.section { padding: clamp(5rem, 11vw, 9.5rem) var(--pad); scroll-margin-top: 4rem; }

.section__head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem clamp(1.5rem, 4vw, 4rem);
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 5.5rem);
}
.section__index {
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--accent); letter-spacing: 0.15em;
  align-self: start; padding-top: 0.8rem;
}
.section__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.75rem, 7.5vw, 6rem);
  line-height: 0.98; letter-spacing: -0.02em;
}
.section__title em { color: var(--accent); font-weight: 400; }
.section__desc {
  grid-column: 2;
  max-width: 26rem; color: var(--muted);
  font-size: 1rem;
}

/* ---------- services: full-screen chapters ---------- */
.chapters { border-top: 1px solid var(--line); }
.chapter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  min-height: 88vh;
  padding: clamp(3rem, 6vw, 5rem) 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.chapter__rail {
  position: sticky;
  top: 16vh;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.chapter__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(7rem, 16vw, 15rem);
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(200, 240, 49, 0.55);
  user-select: none;
}
.chapter__tag {
  font-family: var(--font-mono); font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  padding-left: 0.4rem;
}
.chapter__body { padding-top: clamp(1rem, 4vw, 3.5rem); max-width: 38rem; }
.chapter__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.02; letter-spacing: -0.015em;
  margin-bottom: 1.4rem;
}
.chapter__title em { color: var(--accent); font-weight: 400; }
.chapter__desc {
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  margin-bottom: 1.75rem;
  max-width: 32rem;
}
.chapter__specs { border-top: 1px solid var(--line); margin-bottom: 2rem; }
.chapter__specs li {
  display: grid; grid-template-columns: 5.4rem 1fr; gap: 0.8rem;
  padding: 0.7rem 0.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--paper);
}
.chapter__specs li span {
  font-family: var(--font-mono); font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  padding-top: 0.3rem;
}
.chapter__cta {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-family: var(--font-mono); font-size: 0.78rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--paper);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.45rem;
  transition: color 0.3s, gap 0.3s var(--ease-out);
}
.chapter__cta svg { color: var(--accent); transition: transform 0.35s var(--ease-out); }
.chapter__cta:hover { color: var(--accent); gap: 1rem; }
.chapter__cta:hover svg { transform: translate(3px, -3px); }

/* ---------- process: horizontal strip in the vertical flow ---------- */
.process { background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.process__viewport { overflow: hidden; }
.process__track {
  display: flex;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  width: max-content;
  will-change: transform;
  padding-bottom: 0.5rem;
}
.pstep {
  position: relative;
  flex: 0 0 auto;
  width: min(480px, 76vw);
  background: var(--ink);
  border: 1px solid var(--line);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  min-height: 17rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.pstep--end { background: var(--accent-dim); border-color: rgba(200, 240, 49, 0.4); }
.pstep__num { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); letter-spacing: 0.15em; }
.pstep h3 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin-top: auto;
}
.pstep p { color: var(--muted); font-size: 0.93rem; max-width: 30rem; }
.pstep__line {
  position: absolute;
  top: 2.6rem;
  right: calc(-1 * clamp(1.25rem, 2.5vw, 2rem));
  width: clamp(1.25rem, 2.5vw, 2rem);
  height: 1px;
  background: var(--line);
}
.pstep:last-child .pstep__line { display: none; }

/* ---------- about ---------- */
.about__body {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.about__lead {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  line-height: 1.25;
  margin-bottom: 1.75rem;
}
.about__text p:not(.about__lead) { color: var(--muted); margin-bottom: 1.25rem; max-width: 36rem; }
.about__facts { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.about__fact {
  display: grid; grid-template-columns: 6rem 1fr; gap: 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}
.about__fact-label { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.2em; color: var(--accent); padding-top: 0.2rem; }
.about__fact-value { font-size: 0.95rem; color: var(--paper); }

/* ---------- contact ---------- */
.contact {
  position: relative;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 55% at 50% 110%, rgba(200, 240, 49, 0.1), transparent 70%),
    var(--ink);
  text-align: center;
  padding-top: clamp(6rem, 13vw, 11rem);
  padding-bottom: clamp(6rem, 13vw, 11rem);
}
.contact__inner { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.contact__kicker {
  font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.28em; color: var(--muted);
}
.contact__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(3.5rem, 12vw, 10rem);
  line-height: 0.95; letter-spacing: -0.02em;
}
.contact__title em { color: var(--accent); font-weight: 400; }
.contact__mail {
  display: inline-flex; align-items: center; gap: 1rem;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 3.2vw, 1.8rem);
  padding: 1.1rem clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-top: 1rem;
  transition: border-color 0.35s, background 0.35s, color 0.35s;
  max-width: calc(100vw - 2 * var(--pad));
}
.contact__mail:hover { border-color: var(--accent); background: var(--accent); color: var(--ink); }
.contact__mail:hover .contact__mail-arrow { transform: translate(4px, -4px); }
.contact__mail-text { overflow-wrap: anywhere; }
.contact__mail-arrow { transition: transform 0.35s var(--ease-out); display: inline-flex; }
.contact__note { max-width: 28rem; color: var(--muted); font-size: 0.95rem; }
.contact__status {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-family: var(--font-mono); font-size: 0.66rem;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-top: 0.5rem;
}
.contact__status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.2s infinite;
}

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 2.25rem var(--pad); background: var(--ink-2); }
.footer__top {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
  padding-bottom: 1.5rem; margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.footer__brand { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.footer__nav { display: flex; gap: 1.75rem; flex-wrap: wrap; }
.footer__nav a {
  font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}
.footer__nav a:hover { color: var(--accent); }
.footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem;
  font-family: var(--font-mono); font-size: 0.65rem;
  letter-spacing: 0.1em; color: var(--muted);
}
.footer__tag { font-style: italic; font-family: var(--font-display); letter-spacing: 0.02em; font-size: 0.8rem; }
.footer__clock { color: var(--accent); font-variant-numeric: tabular-nums; }

/* ---------- reveal defaults (JS animates these) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(40px); }
.js .line__inner { transform: translateY(115%); }
.js [data-intro] { opacity: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .chapter { grid-template-columns: 1fr; min-height: 0; gap: 1rem; }
  .chapter__rail { position: static; flex-direction: row; align-items: baseline; gap: 1.25rem; }
  .chapter__num { font-size: clamp(4rem, 12vw, 7rem); }
  .chapter__body { padding-top: 0; }
  .about__body { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .header__nav, .header__cta { display: none; }
  .header__burger {
    display: flex; flex-direction: column; gap: 7px;
    background: none; border: none; cursor: pointer;
    padding: 0.5rem;
  }
  .header__burger span {
    display: block; width: 26px; height: 1.5px;
    background: var(--paper);
    transition: transform 0.35s var(--ease-out);
  }
  .header__burger[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
  .header__burger[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }

  .hero { padding-top: 6rem; padding-bottom: 6.5rem; }
  .hero__frame-item--tl, .hero__frame-item--tr, .hero__frame-item--bl { display: none; }
  .hero__frame-item--br { bottom: 1.25rem; }
  .hero__scroll { display: none; }
  .hero__actions .btn { width: 100%; justify-content: center; }

  .section__head { grid-template-columns: 1fr; align-items: start; }
  .section__desc { grid-column: 1; }

  .chapter { padding: 2.5rem 0; }

  /* process strip stacks vertically on mobile (no pin) */
  .process__track { flex-direction: column; width: auto; }
  .pstep { width: auto; min-height: 0; }
  .pstep h3 { margin-top: 0.25rem; }
  .pstep__line { display: none; }

  .footer__bottom { flex-direction: column; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .noise { animation: none; }
  .hero__scroll-line, .header__cta-dot, .hero__kicker-dot, .contact__status-dot { animation: none; }
  .js [data-reveal], .js .line__inner, .js [data-intro] {
    opacity: 1 !important; transform: none !important;
  }
}
