/* ============================================================
   Neuralex OÜ — one-page site
   Font: Inter Variable (SIL Open Font License 1.1 — free commercial)

   Palette note: deliberately a *soft* dark. The background is lifted well
   off pure black and the accent is a muted steel blue rather than a neon
   cyan, because high-contrast black + neon is what causes eye strain on a
   page people are expected to read all the way down.
   ============================================================ */

@font-face {
  font-family: 'InterVar';
  src: url('/assets/fonts/InterVariable.woff2?v=29d4e094') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:        #161a21;
  --bg-2:      #1a1f27;
  --card:      #1d222b;
  --card-hi:   #232935;
  --line:      rgba(255, 255, 255, .07);
  --line-hi:   rgba(255, 255, 255, .145);

  --text:      #dde2e8;
  --muted:     #8d97a4;
  --subtle:    #6a7382;

  --accent:    #6e9bd8;
  --accent-ink:#0f1620;                        /* text on an accent fill */
  --accent-dim: rgba(110, 155, 216, .12);

  --wrap:      1180px;
  --r-sm:      10px;
  --r:         16px;
  --r-lg:      22px;

  --ease:      cubic-bezier(.22, .8, .28, 1);
}

/* ── reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'InterVar', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: 'cv05' 1, 'ss01' 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol, dl { list-style: none; padding: 0; }

h1, h2, h3, h4 { line-height: 1.14; letter-spacing: -.02em; font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; }

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

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

.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 200;
  padding: 10px 16px; background: var(--accent); color: var(--accent-ink);
  border-radius: var(--r-sm); font-weight: 600;
  transform: translateY(-160%);
  transition: transform .2s var(--ease);
}
.skip-link:focus-visible { transform: none; }

/* ── layout primitives ─────────────────────────────────── */
.wrap { width: min(100% - 44px, var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 44px, 760px); }

.section { padding: clamp(74px, 10vw, 138px) 0; position: relative; }
.section--alt { background: var(--bg-2); }
.section--alt::before,
.section--alt::after {
  content: ''; position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-hi), transparent);
}
.section--alt::before { top: 0; }
.section--alt::after  { bottom: 0; }

.head { text-align: center; max-width: 720px; margin: 0 auto clamp(44px, 5.5vw, 70px); }

h2, .head h2 { font-size: clamp(1.95rem, 4vw, 2.85rem); }
.head h2 { margin-bottom: 18px; }

.badge {
  display: inline-block;
  padding: 5px 15px;
  border: 1px solid var(--line-hi);
  border-radius: 100px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.eyebrow {
  color: var(--muted);
  font-size: clamp(.72rem, 1.5vw, .82rem);
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  margin-bottom: 26px;
}

.lede { color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.08rem); margin-bottom: 18px; }
.lede--center { margin-inline: auto; }
.accent-text { color: var(--accent); }

/* ── buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 600; font-size: .95rem; letter-spacing: -.005em;
  border: 1px solid transparent;
  transition: transform .22s var(--ease), background-color .22s var(--ease),
              border-color .22s var(--ease), box-shadow .22s var(--ease), color .22s var(--ease);
  white-space: nowrap;
}
.btn--sm { padding: 9px 19px; font-size: .87rem; }

.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px -12px rgba(110, 155, 216, .7);
}

.btn--ghost { border-color: var(--line-hi); color: var(--text); background: rgba(255,255,255,.02); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ── nav ───────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(22, 26, 33, .82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav__inner {
  width: min(100% - 44px, var(--wrap));
  margin-inline: auto;
  height: 74px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}

/* padding-block keeps the logo a comfortable tap target without changing its look */
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); padding-block: 9px; }
.brand__mark { width: 27px; height: 27px; color: var(--accent); flex-shrink: 0; }
.brand__word { font-weight: 700; letter-spacing: .19em; font-size: .95rem; }
.brand--sm .brand__mark { width: 23px; height: 23px; }
.brand--sm .brand__word { font-size: .85rem; }

.nav__links { display: flex; align-items: center; gap: 32px; }
.nav__links a { color: var(--muted); font-size: .92rem; font-weight: 500; transition: color .2s var(--ease); }
.nav__links a:hover { color: var(--text); }
.nav__cta { color: var(--accent-ink) !important; }

.nav__toggle {
  display: none; width: 42px; height: 42px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav__toggle span {
  display: block; width: 20px; height: 1.6px; background: var(--text); border-radius: 2px;
  transition: transform .28s var(--ease), opacity .2s var(--ease);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

/* ── hero ──────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid; place-items: center;
  padding: 120px 0 100px;
  overflow: hidden;
  isolation: isolate;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(72% 55% at 50% 42%, rgba(110,155,216,.10), transparent 70%),
    radial-gradient(56% 46% at 82% 14%, rgba(110,155,216,.07), transparent 72%),
    linear-gradient(180deg, transparent 44%, var(--bg) 96%);
}

.hero__content { width: min(100% - 44px, 900px); margin-inline: auto; text-align: center; }
.hero__title { font-size: clamp(2.5rem, 7vw, 4.7rem); font-weight: 640; margin-bottom: 30px; }
.hero__title span { display: block; }
.hero__lede {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.8vw, 1.2rem);
  max-width: 620px; margin: 0 auto 40px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

.hero__meta {
  margin-top: 40px;
  color: var(--subtle); font-size: .84rem; letter-spacing: .05em;
  display: inline-flex; align-items: center; gap: 9px;
}
.dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: pulse 2.8s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(110,155,216,.45); }
  70%  { box-shadow: 0 0 0 9px rgba(110,155,216,0); }
  100% { box-shadow: 0 0 0 0 rgba(110,155,216,0); }
}

.hero__scroll {
  position: absolute; bottom: 30px; left: 50%; translate: -50% 0;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  color: var(--subtle); font-size: .68rem; letter-spacing: .24em; text-transform: uppercase;
  animation: float 2.8s ease-in-out infinite;
}
.hero__scroll svg { width: 17px; height: 17px; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(9px); } }

/* ── split (company) ───────────────────────────────────── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(38px, 6vw, 72px); align-items: center; }
.split__text h2 { font-size: clamp(1.85rem, 3.5vw, 2.55rem); margin-bottom: 24px; }

.framed {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); background: var(--card);
  aspect-ratio: 4 / 3.2;
}
.framed img { width: 100%; height: 100%; object-fit: cover; }

.facts { display: grid; gap: 1px; margin-top: 34px; background: var(--line); border-radius: var(--r); overflow: hidden; }
.facts li { background: var(--card); padding: 17px 22px; display: flex; flex-direction: column; }
.facts strong { font-size: .96rem; font-weight: 600; }
.facts span { color: var(--subtle); font-size: .85rem; }

/* ── pillars ───────────────────────────────────────────── */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pillar {
  position: relative;
  padding: 36px 30px 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color .3s var(--ease), transform .3s var(--ease), background-color .3s var(--ease);
}
.pillar:hover { border-color: var(--line-hi); transform: translateY(-3px); background: var(--card-hi); }

.pillar__num {
  display: block; color: var(--subtle); font-size: .74rem;
  letter-spacing: .2em; font-weight: 600; margin-bottom: 22px;
}
.pillar__icon { width: 38px; height: 38px; color: var(--accent); margin-bottom: 20px; }
.pillar h3 { font-size: 1.28rem; margin-bottom: 12px; }
.pillar p { color: var(--muted); font-size: .95rem; }

/* ── capability cards ──────────────────────────────────── */
/* 6-column track so 3 thirds and 2 halves both sit on a clean grid */
.cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }

.card {
  grid-column: span 2;
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color .3s var(--ease), transform .3s var(--ease), background-color .3s var(--ease);
}
.card--half { grid-column: span 3; }
.card:hover { border-color: var(--line-hi); transform: translateY(-3px); background: var(--card-hi); }

.card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg); }
.card--half .card__media { aspect-ratio: 16 / 7; }
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease);
}
.card:hover .card__media img { transform: scale(1.04); }

/* Only the bottom edge fades, purely so the photo blends into the card behind
   the icon. No full-height wash — the copy sits below the image, not on it, so
   dimming the whole photo just greys it out for nothing. */
.card__media::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 34%;
  background: linear-gradient(180deg, rgba(29,34,43,0), var(--card));
}

/* sits on the seam between photo and body, so it needs an opaque fill */
.card__icon {
  position: relative; z-index: 2;
  width: 46px; height: 46px;
  margin: -23px 0 0 30px;
  border-radius: 13px;
  background: var(--card-hi);
  border: 1px solid var(--line-hi);
  display: grid; place-items: center;
  color: var(--accent);
}
.card__icon svg { width: 23px; height: 23px; }

.card__body { flex: 1; display: flex; flex-direction: column; padding: 20px 30px 32px; }
.card__kicker {
  color: var(--accent); font-size: .72rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; margin-bottom: 10px;
}
.card__body h3 { font-size: 1.32rem; margin-bottom: 12px; }
.card__body > p { color: var(--muted); font-size: .95rem; margin-bottom: 22px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.tags li {
  padding: 5px 13px; border: 1px solid var(--line);
  border-radius: 100px; font-size: .78rem; color: var(--subtle);
  background: rgba(255,255,255,.02);
}

/* ── why us ────────────────────────────────────────────── */
.grid-6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: var(--r-lg); overflow: hidden; }
.mini { background: var(--bg); padding: 32px 28px; transition: background-color .3s var(--ease); }
.mini:hover { background: var(--card); }
.mini h4 { font-size: 1.04rem; margin-bottom: 10px; }
.mini h4::before {
  content: ''; display: block; width: 22px; height: 2px;
  background: var(--accent); border-radius: 2px; margin-bottom: 16px;
}
.mini p { color: var(--muted); font-size: .92rem; }

/* ── contact ───────────────────────────────────────────── */
.contact { text-align: center; }
.contact .wrap { position: relative; }
.contact h2 { margin-bottom: 20px; }

.mailto {
  display: inline-flex; align-items: center; gap: 13px;
  margin: 34px 0 12px;
  padding: 17px 34px;
  border: 1px solid var(--line-hi);
  border-radius: 100px;
  background: rgba(255,255,255,.03);
  font-size: clamp(1rem, 2.2vw, 1.22rem); font-weight: 600; letter-spacing: -.01em;
  transition: border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), background-color .25s var(--ease);
}
.mailto svg { width: 21px; height: 21px; color: var(--accent); flex-shrink: 0; }
.mailto:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); background: var(--accent-dim); }

.registry {
  margin-top: 50px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; text-align: left;
}
.registry > div { background: var(--bg-2); padding: 22px 24px; }
.registry dt { color: var(--subtle); font-size: .73rem; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 7px; }
.registry dd { font-size: .93rem; color: var(--text); }

/* ── footer ────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); padding: 32px 0; background: var(--bg); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer__copy { color: var(--subtle); font-size: .84rem; }

/* ── 404 ───────────────────────────────────────────────── */
.notfound {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; text-align: center; padding: 40px 24px;
  background: radial-gradient(60% 50% at 50% 42%, rgba(110,155,216,.08), transparent 72%);
}
.notfound .brand { margin-bottom: 44px; }
.notfound__code {
  color: var(--accent); font-size: .78rem; font-weight: 600;
  letter-spacing: .3em; margin-bottom: 14px;
}
.notfound h1 { font-size: clamp(1.85rem, 5vw, 2.8rem); margin-bottom: 16px; }
.notfound .lede { margin-bottom: 34px; max-width: 420px; }

/* ── scroll reveal ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.is-in { opacity: 1; transform: none; }

/* stagger steps — kept as classes so the CSP can stay `style-src 'self'` */
.d1 { --d: .05s; }
.d2 { --d: .10s; }
.d3 { --d: .15s; }
.d4 { --d: .20s; }
.d5 { --d: .25s; }
.d6 { --d: .30s; }
.d7 { --d: .40s; }
.d8 { --d: .50s; }

/* ── responsive ────────────────────────────────────────── */
@media (max-width: 1000px) {
  .pillars    { grid-template-columns: 1fr; }
  .grid-6     { grid-template-columns: repeat(2, 1fr); }
  .split      { grid-template-columns: 1fr; }
  .split__media { order: -1; }
  .framed     { aspect-ratio: 16 / 9; }

  .cards      { grid-template-columns: repeat(2, 1fr); }
  .card, .card--half { grid-column: span 1; }
}

@media (max-width: 860px) {
  html { scroll-padding-top: 74px; }

  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed; inset: 66px 12px auto 12px;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 14px;
    background: rgba(26, 31, 39, .98);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--line-hi);
    border-radius: var(--r);
    opacity: 0; visibility: hidden; transform: translateY(-12px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links a { padding: 13px 14px; border-radius: var(--r-sm); font-size: 1rem; }
  .nav__links a:hover { background: rgba(255,255,255,.05); }
  .nav__cta { justify-content: center; margin-top: 6px; }
  .nav.is-menu-open { background: rgba(22,26,33,.92); backdrop-filter: blur(14px); border-bottom-color: var(--line); }

  .registry { grid-template-columns: 1fr; }
  .footer__inner { justify-content: center; text-align: center; }
}

@media (max-width: 620px) {
  .wrap, .wrap--narrow, .nav__inner, .hero__content { width: calc(100% - 32px); }
  .grid-6 { grid-template-columns: 1fr; }
  .cards  { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 100%; }
  .card__icon { margin-left: 24px; }
  .card__body { padding: 20px 24px 28px; }
  .card--half .card__media { aspect-ratio: 16 / 9; }
  .pillar { padding: 30px 26px 28px; }
}

/* ── reduced motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
