/* ============================================================
   NEVRIX — full-stack web studio
   Concept: nerve + matrix. The connective nervous system of a
   product. Deep indigo base, coral→periwinkle signal duo,
   engineered type. Signature: a continuous "signal path" that
   threads the page, with nodes lighting up on scroll.
   ============================================================ */

:root {
  --ink:      #0A0B14;
  --ink-2:    #10121F;
  --ink-3:    #171A2B;
  --line:     rgba(255, 255, 255, 0.08);
  --line-2:   rgba(255, 255, 255, 0.14);

  --coral:    #FF6B4A;
  --peri:     #6E7BFF;
  --signal:   linear-gradient(135deg, #FF6B4A 0%, #B06BE0 48%, #6E7BFF 100%);

  --text:     #EDEEF5;
  --muted:    #9A9DB5;
  --faint:    #676A85;

  --display:  "Bricolage Grotesque", system-ui, sans-serif;
  --body:     "IBM Plex Sans", system-ui, sans-serif;
  --mono:     "IBM Plex Mono", ui-monospace, monospace;

  --edge:     clamp(20px, 6vw, 96px);   /* page gutter */
  --maxw:     1180px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* subtle top glow anchored to the hero */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 80vh;
  background:
    radial-gradient(60% 55% at 22% 8%, rgba(255,107,74,0.14), transparent 70%),
    radial-gradient(55% 55% at 82% 0%, rgba(110,123,255,0.16), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ambient nerve canvas — behind everything, only over the hero region */
#nerve-field {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
}

main, .nav, .footer { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }

::selection { background: rgba(255,107,74,0.30); color: #fff; }

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

/* ───────────────────────── shared bits ───────────────────────── */

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  text-transform: uppercase;
}
.eyebrow__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 0 rgba(255,107,74,0.6);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,107,74,0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(255,107,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,107,74,0); }
}
@media (prefers-reduced-motion: reduce) { .eyebrow__dot { animation: none; } }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  padding: 0.85em 1.4em;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
  will-change: transform;
}
.btn--primary {
  background: var(--signal);
  color: #0A0B14;
  font-weight: 500;
  box-shadow: 0 8px 30px -10px rgba(255,107,74,0.5);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -10px rgba(110,123,255,0.6);
}
.btn--ghost {
  border-color: var(--line-2);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--coral); transform: translateY(-2px); }
.btn--lg { font-size: 1.05rem; padding: 1.05em 1.8em; }

/* ───────────────────────────── nav ───────────────────────────── */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--edge);
  transition: background .3s ease, border-color .3s ease, padding .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(10,11,20,0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding-top: 12px;
  padding-bottom: 12px;
}
.nav__brand { display: flex; align-items: center; gap: 10px; }
.nav__mark { width: 34px; height: 34px; object-fit: contain; }
.nav__word {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
  transition: color .2s ease;
}
.nav__links a:hover { color: var(--text); }
.nav__cta {
  color: var(--text) !important;
  border: 1px solid var(--line-2);
  padding: 0.55em 1.1em;
  border-radius: 999px;
  transition: border-color .2s ease, color .2s ease !important;
}
.nav__cta:hover { border-color: var(--coral); }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav__toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  transition: transform .25s ease, opacity .25s ease;
}
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child  { transform: translateY(-3.5px) rotate(-45deg); }

/* ──────────────────────────── hero ───────────────────────────── */

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(140px, 22vh, 220px) var(--edge) clamp(80px, 12vh, 130px);
}
.hero .eyebrow { margin-bottom: 28px; }
.hero__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.6rem, 7.2vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin-bottom: 30px;
}
.hero__title em {
  font-style: normal;
  background: var(--signal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lede {
  max-width: 40ch;
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  color: var(--muted);
  margin-bottom: 40px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 64px; }
.hero__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 48px;
  max-width: 720px;
  border-top: 1px solid var(--line);
  padding-top: 30px;
}
.hero__meta dt {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--coral);
  margin-bottom: 6px;
}
.hero__meta dd { color: var(--muted); font-size: 0.95rem; }

/* ─────────────────────────── sections ─────────────────────────── */

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(70px, 11vh, 120px) var(--edge);
}
.section__head { max-width: 760px; margin-bottom: 60px; }
.section__head .eyebrow { margin-bottom: 20px; }
.section__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.section__intro { color: var(--muted); font-size: 1.08rem; max-width: 58ch; }

/* rail sections get the signature vertical signal line on the left */
.section--rail { position: relative; }
.section--rail::before {
  content: "";
  position: absolute;
  left: max(16px, calc(var(--edge) - 32px));   /* spine sits in the gutter, 32px clear of content */
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line-2) 12%, var(--line-2) 88%, transparent);
}

/* ────────────────────────── capabilities ─────────────────────── */

.caps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.cap {
  position: relative;
  background: var(--ink-2);
  padding: 38px 34px 34px;
  transition: background .3s ease;
}
.cap:hover { background: var(--ink-3); }
.cap__node {
  position: absolute;
  top: 40px; right: 34px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 16px 2px rgba(255,107,74,0.4);
}
.cap__idx {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
}
.cap__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin: 14px 0 12px;
}
.cap__body { color: var(--muted); font-size: 0.98rem; margin-bottom: 22px; }
.cap__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.cap__tags li {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text);
  padding: 5px 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
}

/* ───────────────────────────── steps ─────────────────────────── */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  counter-reset: none;
}
.step {
  position: relative;
  padding-top: 26px;
  border-top: 1px solid var(--line-2);
}
.step::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 40px; height: 2px;
  background: var(--signal);
}
.step__num {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--peri);
  letter-spacing: 0.05em;
}
.step__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
  margin: 14px 0 10px;
}
.step p { color: var(--muted); font-size: 0.95rem; }

/* ─────────────────────────── what we build ───────────────────── */

.build {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.build__card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 30px;
  display: flex;
  flex-direction: column;
  min-height: 210px;
  transition: transform .22s ease, border-color .3s ease, background .3s ease;
}
.build__card:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  background: var(--ink-3);
}
.build__card--wide {
  grid-column: span 2;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(110,123,255,0.14), transparent 55%),
    var(--ink-2);
}
.build__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.build__card--wide .build__title { font-size: 1.9rem; }
.build__body { color: var(--muted); font-size: 0.97rem; }
.build__stack {
  margin-top: auto;
  padding-top: 20px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--coral);
}

/* ──────────────────────────── stats band ─────────────────────── */

.band {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--edge);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.band__item {
  background: var(--ink-2);
  padding: 40px 34px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.band__k {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  background: var(--signal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  width: max-content;
}
.band__v { color: var(--muted); font-size: 0.96rem; }

/* ──────────────────────────── contact ────────────────────────── */

.contact { text-align: center; }
.contact__inner { max-width: 640px; margin: 0 auto; }
.contact .eyebrow { margin-bottom: 22px; }
.contact__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin-bottom: 20px;
}
.contact__lede { color: var(--muted); font-size: 1.1rem; margin-bottom: 36px; }
.contact__aside {
  margin-top: 26px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--faint);
}

/* ──────────────────────────── footer ─────────────────────────── */

.footer {
  border-top: 1px solid var(--line);
  padding: 56px var(--edge) 48px;
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}
.footer__brand { display: flex; align-items: center; gap: 10px; }
.footer__mark { width: 30px; height: 30px; object-fit: contain; }
.footer__word { font-family: var(--display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
.footer__tag { color: var(--muted); font-size: 0.98rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 24px; }
.footer__links a { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); transition: color .2s; }
.footer__links a:hover { color: var(--text); }
.footer__legal { font-family: var(--mono); font-size: 0.75rem; color: var(--faint); }

/* ─────────────────── scroll-reveal (progressive) ──────────────── */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ───────────────────────────── responsive ────────────────────── */

@media (max-width: 820px) {
  .nav__links {
    position: fixed;
    inset: 0 0 auto 0;
    top: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 92px var(--edge) 32px;
    background: rgba(10,11,20,0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-100%);
    transition: transform .32s cubic-bezier(.4,0,.2,1);
  }
  .nav__links.is-open { transform: none; }
  .nav__links a { font-size: 1.1rem; padding: 8px 0; }
  .nav__cta { margin-top: 10px; }
  .nav__toggle { display: flex; z-index: 101; }

  .section--rail::before { display: none; }
  .caps { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 22px 20px; }
  .build { grid-template-columns: repeat(2, 1fr); }
  .build__card--wide { grid-column: span 2; }
  .band { grid-template-columns: 1fr; }
  .hero__meta { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .steps { grid-template-columns: 1fr; }
  .build { grid-template-columns: 1fr; }
  .build__card--wide { grid-column: span 1; }
  .cap__node { top: 34px; right: 28px; }
}
