/* ============================================================
   Nexora Legal — Design System (DARK MONOCHROME)
   No blue accent — white CTA + steel link only.
   ============================================================ */

/* r5 perf: woff2-сабсет (latin+cyrillic) грузится первым — Inter 876→191KB,
   Manrope 165→40KB. TTF оставлен как фолбэк для старых браузеров. */
@font-face {
  font-family: "Manrope";
  src: url("fonts/Manrope-Variable.subset.woff2") format("woff2"),
       url("fonts/Manrope-Variable.ttf") format("truetype-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Variable.subset.woff2") format("woff2"),
       url("fonts/Inter-Variable.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---------- Color: dark monochrome base ---------- */
  --graphite:        #1E2026; /* page background */
  --graphite-soft:   #262932; /* secondary section background */
  --bg-deep:         #16181D; /* deepest, for layered fades */
  --milk:            #1E2026; /* alias of page bg (legacy var) */
  --milk-2:          #262932; /* alias of section bg (legacy var) */
  --white:           #2D313B; /* card surface (was "white") */
  --surface-hover:   #373C47; /* hover / active elevated surface */
  --surface-elevated:#424754; /* highest elevated surface */
  --warm-gray:       #B4B6BD; /* secondary text — lifted for daylight legibility */
  --warm-gray-2:     #8E909A; /* meta / placeholder */
  --border:          rgba(255,255,255,0.10); /* hairline — stronger on lighter grey */
  --border-strong:   rgba(255,255,255,0.17); /* strong / focused */

  /* ---------- Accent system (monochrome) ---------- */
  /* White is the ONE filled accent — reserved for the primary CTA. */
  --accent:          #FFFFFF;
  --accent-fg:       #1E2026;
  --accent-hover:    #F2F2EE;
  --accent-pressed:  #E0E0D8;
  /* Steel — technical hint color. Only for text links, focus ring,
     and active TOC items. Never CTAs, never large blocks. */
  --link:            #5B6B8C;
  --link-hover:      #7B8AAB;

  /* Legacy blue tokens kept as aliases — all resolve to monochrome
     equivalents so existing styles flip automatically. */
  --blue:            #FFFFFF;
  --blue-hover:      #F2F2EE;
  --blue-pressed:    #E0E0D8;
  --blue-deep:       #373C47;
  --blue-soft:       #373C47;
  --blue-soft-2:     #424754;

  /* ---------- Color: semantic (dark) ---------- */
  --success:         #6BCB8F;
  --success-soft:    #1A2A22;
  --warning:         #E6B547;
  --warning-soft:    #2A2519;
  --danger:          #F26F5F;
  --danger-soft:     #2B1A1A;

  /* ---------- Semantic surfaces ---------- */
  --bg:              var(--graphite);
  --bg-2:            var(--graphite-soft);
  --surface:         var(--white);
  --surface-dark:    var(--bg-deep);

  --fg:              #F2F2EE;
  --fg-muted:        var(--warm-gray);
  --fg-faint:        var(--warm-gray-2);
  --fg-on-dark:      #F2F2EE;
  --fg-on-dark-muted: #A7A8AE;

  --accent-on-dark:  #FFFFFF;

  /* ---------- Type families ---------- */
  --font-display: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* ---------- Type scale (desktop first) ---------- */
  --h1-size: 88px;   --h1-line: 1.02;  --h1-track: -0.035em; --h1-weight: 800;
  --h2-size: 60px;   --h2-line: 1.05;  --h2-track: -0.03em;  --h2-weight: 700;
  --h3-size: 40px;   --h3-line: 1.12;  --h3-track: -0.02em;  --h3-weight: 700;
  --h4-size: 26px;   --h4-line: 1.25;  --h4-track: -0.01em;  --h4-weight: 700;

  --lead-size:  22px; --lead-line: 1.5;
  --body-size:  17px; --body-line: 1.6;
  --small-size: 15px; --small-line: 1.55;
  --caption-size: 13px; --caption-line: 1.45;

  --label-size: 12px; --label-line: 1.2; --label-track: 0.14em; --label-weight: 600;

  /* ---------- Spacing (8 px scale + 4 px micro) ---------- */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-7:  32px;
  --space-8:  40px;
  --space-9:  56px;
  --space-10: 72px;
  --space-11: 96px;
  --space-12: 128px;
  --space-13: 160px;

  /* ---------- Radius ---------- */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --radius-full: 999px;

  /* ---------- Shadows (dark monochrome — almost none) ---------- */
  --shadow-1: 0 1px 0 rgba(0,0,0,0.30);
  --shadow-2: 0 1px 0 rgba(0,0,0,0.30), 0 8px 18px -10px rgba(0,0,0,0.45);
  --shadow-3: 0 1px 0 rgba(0,0,0,0.30), 0 22px 40px -24px rgba(0,0,0,0.55);
  /* Soft white ambient — for CTA emphasis, hero glow, behind primary buttons. */
  --shadow-glow: 0 0 0 1px rgba(255,255,255,0.10), 0 0 40px -6px rgba(255,255,255,0.18);
  --shadow-focus: 0 0 0 3px rgba(91,107,140,0.45); /* steel ring */

  /* ---------- Grain (subtle film texture, 3–5%) ---------- */
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");

  /* inlined logo silhouette — preloader tile mask (no extra request, no 404 risk) */
  --nx-logo-mask: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTExIiBoZWlnaHQ9IjUzIiB2aWV3Qm94PSIwIDAgMTExIDUzIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTkzLjc5MjEgMjcuMjlIOTEuNDk1MUw5MC4zOTgxIDI1LjA1NDJIODMuOTg5MUw4Mi44OTIxIDI3LjI5SDgwLjU5NTdMODUuOTU5MSAxNi4zNjMzSDg2LjEzMjFIODguMjU1MUg4OC40MjgxTDkzLjc5MjEgMjcuMjlaTTg5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Dc4LjIwMjQgMjIuNDk3TDc4LjIwMDcgMjIuNDk1MkM3Ny43ODE3IDIyLjkxMzUgNzcuMjcxOSAyMy4xNjEgNzYuNyAyMy4yODUzTDc5LjkzNzQgMjcuMjkwMVoiIGZpbGw9IiNGRUZFRkUiPjwvcGF0aD4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zMC44NjcyIDE2LjM0NDdIMzkuMzUzN1YxOC4xNDY2SDMyLjkzNjhWMjAuOTE2N0gzNi44Njg3VjIyLjcxODZIMzIuOTM2OFYyNS40ODMzSDM5LjM1MzdWMjcuMjg1MkgzMC44NjcyVjE2LjM0NDdaIiBmaWxsPSIjRkVGRUZFIj48L3BhdGg+Cjwvc3ZnPg==");

  /* ---------- Motion ---------- */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 140ms;
  --dur:      220ms;
  --dur-slow: 360ms;

  /* r5 scroll-reveal motion (cinematic, compositor-only) */
  --nx-ease-enter: cubic-bezier(0.22, 1, 0.36, 1);  /* entrances — clean decelerate */
  --nx-ease-snap:  cubic-bezier(0.16, 1, 0.3, 1);   /* assemble snap — expo-out (= preloader nx-tile3d-in) */
  --nx-stagger:    60ms;                             /* sibling stagger step */
}

.nx-reset, .nx-reset * { box-sizing: border-box; }

.nx-body {
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: var(--body-line);
  color: var(--fg);
  background: var(--bg);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.nx-h1, h1.nx { font-family: var(--font-display); font-weight: var(--h1-weight);
  font-size: var(--h1-size); line-height: var(--h1-line); letter-spacing: var(--h1-track);
  color: var(--fg); margin: 0; }
.nx-h2, h2.nx { font-family: var(--font-display); font-weight: var(--h2-weight);
  font-size: var(--h2-size); line-height: var(--h2-line); letter-spacing: var(--h2-track);
  color: var(--fg); margin: 0; }
.nx-h3, h3.nx { font-family: var(--font-display); font-weight: var(--h3-weight);
  font-size: var(--h3-size); line-height: var(--h3-line); letter-spacing: var(--h3-track);
  color: var(--fg); margin: 0; }
.nx-h4, h4.nx { font-family: var(--font-display); font-weight: var(--h4-weight);
  font-size: var(--h4-size); line-height: var(--h4-line); letter-spacing: var(--h4-track);
  color: var(--fg); margin: 0; }

.nx-lead    { font-family: var(--font-body); font-size: var(--lead-size); line-height: var(--lead-line);
              color: var(--fg); font-weight: 400; letter-spacing: -0.005em; }
.nx-text    { font-family: var(--font-body); font-size: var(--body-size); line-height: var(--body-line);
              color: var(--fg); }
.nx-small   { font-family: var(--font-body); font-size: var(--small-size); line-height: var(--small-line);
              color: var(--fg-muted); }
.nx-caption { font-family: var(--font-body); font-size: var(--caption-size); line-height: var(--caption-line);
              color: var(--fg-faint); }

.nx-label   { font-family: var(--font-body); font-size: var(--label-size); line-height: var(--label-line);
              letter-spacing: var(--label-track); font-weight: var(--label-weight);
              text-transform: uppercase; color: var(--fg-muted); }
.nx-label--accent { color: var(--fg); }

/* Inline accents — text link uses steel */
.nx-link {
  color: var(--link);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: color var(--dur) var(--ease-out);
}
.nx-link:hover { color: var(--link-hover); }

.nx-mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0; }


/* ============================================================
   [A2] Balanced section headings — убираем «зияющую пустоту»
   справа у двухстрочных заголовков. text-wrap:balance даёт
   ровные строки (где поддерживается); max-width не даёт строке
   растягиваться на всю колонку.  (added 2026-06-03)
   ============================================================ */
.nx-h1, h1.nx,
.nx-h2, h2.nx,
.nx-h3, h3.nx,
.sec-head h2,
.cta-card .head h2,
.result-card h2 {
  text-wrap: balance;
}
/* Заголовки секций — разумный потолок ширины, чтобы перенос
   шёл по смыслу, а не оставлял одинокое короткое слово справа. */
.sec-head h2          { max-width: 20ch; }
.cta-card .head h2    { max-width: 22ch; }
/* Лиды под заголовками тоже балансируем — короткий хвост не висит. */
.sec-head .lead,
.cta-card .head .sub  { text-wrap: pretty; }


/* ============================================================
   [B6] Mono client logos — единый монохром на тёмном фоне.
   grayscale + brightness(0) invert(1) превращает любой логотип
   (тёмный или цветной) в чистый кремово-белый силуэт.
   TODO: заменить на реальные ч/б логотипы (генерация через ChatGPT)
   ============================================================ */
.mono-logos img {
  filter: grayscale(1) brightness(0) invert(1);
  opacity: 0.78;
  transition: opacity 0.3s var(--ease-out);
}
.mono-logos img:hover { opacity: 1; }


/* ============================================================
   Motion — scroll reveal + brand tile texture  (added 2026-05-22)
   ============================================================ */
html.anim section > .container > *,
html.anim section > .container-narrow > *,
html.anim .trust > .container > * {
  opacity: 0;
  transform: translateY(56px);   /* r5.3: выезжают СНИЗУ — выраженный подъём */
  transition: opacity 0.7s var(--nx-ease-snap),
              transform 0.7s var(--nx-ease-snap);
}
html.anim section > .container > *.in,
html.anim section > .container-narrow > *.in,
html.anim .trust > .container > *.in {
  opacity: 1;
  transform: none;
}
html.anim section > .container > *:nth-child(2),
html.anim section > .container-narrow > *:nth-child(2) { transition-delay: 0.07s; }
html.anim section > .container > *:nth-child(3),
html.anim section > .container-narrow > *:nth-child(3) { transition-delay: 0.14s; }
html.anim section > .container > *:nth-child(4),
html.anim section > .container-narrow > *:nth-child(4) { transition-delay: 0.21s; }
html.anim section > .container > *:nth-child(5),
html.anim section > .container-narrow > *:nth-child(5) { transition-delay: 0.28s; }
html.anim section > .container > *:nth-child(n+6),
html.anim section > .container-narrow > *:nth-child(n+6) { transition-delay: 0.34s; }

/* Brand tile texture — faint breathing grid behind hero (motif from hero visual) */
.hero, .a-hero { position: relative; }
.hero > .container, .hero > .container-narrow,
.a-hero > .container, .a-hero > .container-narrow { position: relative; z-index: 1; }
.hero::after, .a-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(ellipse 75% 85% at 85% 0%, #000 0%, transparent 72%);
          mask-image: radial-gradient(ellipse 75% 85% at 85% 0%, #000 0%, transparent 72%);
  /* r5 perf: промоутим в свой слой — opacity-анимация идёт на компоситоре,
     а не перерисовывает сетку 36px по всей площади героя каждый кадр. */
  will-change: opacity;
  animation: nx-tile-breathe 8s ease-in-out infinite;
}
@keyframes nx-tile-breathe { 0%,100% { opacity: 0.4; } 50% { opacity: 0.85; } }

@media (prefers-reduced-motion: reduce) {
  html.anim section > .container > *,
  html.anim section > .container-narrow > *,
  html.anim .trust > .container > * {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
  .hero::after, .a-hero::after { animation: none; opacity: 0.5; }
}

/* ============================================================
   TILE FIELD — мотив «тайлы». Точная копия тайлов hero-визуала
   главной: те же цвета, та же press-анимация, пропорции (тайл
   шире, чем выше, ~1.37:1), gap 6px, radius 3px.  (added 2026-05-22)
   ============================================================ */
.tilefield { position: absolute; inset: 0; pointer-events: none; display: grid; gap: 6px; z-index: 0; }
.tilefield i {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 3px;
  transform: translateZ(0);
  animation: hero-tile-press var(--td, 6s) cubic-bezier(0.4,0,0.2,1) infinite;
  animation-delay: var(--tdl, 0s);
}
/* r5 perf: компоситорная press-анимация (opacity + transform). Раньше
   анимировались background/border/box-shadow = paint каждый кадр —
   на скролле это просаживало FPS на слабых машинах. Теперь 0 repaint. */
@keyframes hero-tile-press {
  0%,90%,100% { opacity: 1;    transform: scale(1); }
  8%          { opacity: 0.32; transform: scale(0.94); }
  14%         { opacity: 0.5;  transform: scale(0.95); }
  34%         { opacity: 0.6;  transform: scale(0.96); }
  52%         { opacity: 1;    transform: scale(1); }
}

/* Where a tile field is dropped in, retire the old faint hero grid */
.hero:has(.tilefield)::after,
.a-hero:has(.tilefield)::after { display: none; }

/* Variant A — HERO half-screen field (no frame, fades out by mask) */
.tilefield--hero {
  left: 44%;
  -webkit-mask-image: linear-gradient(to left,#000 36%,transparent 92%),
                      linear-gradient(to bottom,transparent,#000 13%,#000 84%,transparent);
          mask-image: linear-gradient(to left,#000 36%,transparent 92%),
                      linear-gradient(to bottom,transparent,#000 13%,#000 84%,transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
@media (max-width: 760px) { .tilefield--hero { left: 6%; } }

/* Variant B — horizontal band divider (clean separator, no heading) */
.tile-band {
  position: relative; height: 240px; overflow: hidden;
  background: var(--bg-2);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.tilefield--band {
  height: 74%; top: 13%;
  -webkit-mask-image: linear-gradient(to right,transparent,#000 16%,#000 84%,transparent),
                      linear-gradient(to bottom,transparent,#000,transparent);
          mask-image: linear-gradient(to right,transparent,#000 16%,#000 84%,transparent),
                      linear-gradient(to bottom,transparent,#000,transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
@media (max-width: 760px) { .tile-band { height: 170px; } }

/* Variant C — tiles inside cards (animate only on hover) */
/* isolation:isolate makes the card its own stacking context, so the
   negative-z tile field paints above the card surface but below text. */
.has-tiles { position: relative; overflow: hidden; isolation: isolate; }
.tilefield--card {
  z-index: -1;
  height: 48%; bottom: 0; top: auto; opacity: 0.55;
  transition: opacity 0.45s var(--ease-out);
  -webkit-mask-image: linear-gradient(to top,#000,transparent);
          mask-image: linear-gradient(to top,#000,transparent);
}
.tilefield--card i { animation-play-state: paused; }
.has-tiles:hover .tilefield--card i { animation-play-state: running; }
.has-tiles:hover .tilefield--card { opacity: 1; }
/* card icon nudges on hover — picked up by .ico / .ic / .mark */
.has-tiles .ico, .has-tiles .ic, .has-tiles .mark {
  transition: transform 0.4s var(--ease-out), background 0.4s var(--ease-out);
}
.has-tiles:hover .ico, .has-tiles:hover .ic, .has-tiles:hover .mark {
  transform: scale(1.08) rotate(-6deg);
}

@media (prefers-reduced-motion: reduce) { .tilefield i { animation: none; } }

/* ============================================================
   Tile motif — polish pass r2  (2026-05-22)
   ============================================================ */
/* Card with a tile field: hide the divider hairline so the field
   doesn't visually collide with it. Padding is kept intact. */
.has-tiles .more,
.has-tiles .read,
.has-tiles .ft,
.has-tiles .value { border-top-color: transparent !important; }

/* Breadcrumbs sit on their own line — never inline with the eyebrow */
.hero .crumbs, .a-hero .crumbs { display: flex; }

/* Mobile nav drawer fix — the drawer is a fixed child of .site-hdr, whose
   backdrop-filter makes it the containing block. `inset` then resolves
   against the 64px header, squashing the drawer. Pin it to the viewport
   with explicit height instead. Selector beats the per-page inline rule. */
@media (max-width: 768px) {
  .site-hdr .nav-drawer {
    inset: auto; top: 64px; left: 0; right: 0;
    height: 100vh; height: calc(100dvh - 64px);
    /* solid fill — nested backdrop-filter under the header composites
       unreliably, so don't depend on translucency here */
    background: #1E2026;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  /* Panel-card sections need clear air above on mobile so the card
     does not glue to the previous block. Beats per-page inline rules. */
  section.cta-sec, section.quiz-sec { padding-top: 40px; }
}

/* Tile band — breathing room from neighbouring sections */
.tile-band { margin: 64px 0; }
@media (max-width: 760px) { .tile-band { margin: 40px 0; } }

/* ---- Running-light glow — conic edge, like the Litau widget ---- */
@property --nx-glow { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes nx-glow-spin { to { --nx-glow: 360deg; } }

.cta-card::after,
.glow-edge {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit; padding: 1.5px;
  pointer-events: none; z-index: 1;
  background: conic-gradient(from var(--nx-glow),
    transparent 0 56%,
    rgba(255,255,255,0.22) 68%,
    rgba(255,255,255,0.90) 80%,
    rgba(255,255,255,0.22) 92%,
    transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: nx-glow-spin 7s linear infinite;
}
.glow-edge { z-index: 2; }

/* ---- Orbit deco — slow rotation (home featured case, about team promo) ---- */
.orbit-spin { animation: nx-orbit 90s linear infinite; transform-origin: 50% 50%; }
@keyframes nx-orbit { to { transform: rotate(360deg); } }

/* ---- Radar sweep — rotating sector (home featured case) ---- */
.radar-sweep { animation: nx-orbit 9s linear infinite; }

/* ---- Deco node pulse (about practices grid, point graph) ---- */
@keyframes nx-node-pulse { 0%,100% { opacity: 0.35; } 50% { opacity: 1; } }
.nx-pulse-g { animation: nx-node-pulse 3.4s ease-in-out infinite; }
.nx-pulse-g:nth-of-type(odd) { animation-delay: -1.7s; }

/* ---- Node graph (team — "понятно, к кому обращаться") ---- */
.flow-line { stroke-dasharray: 2 6; animation: nx-flow 1.4s linear infinite; }
.flow-line:nth-child(2) { animation-delay: -0.4s; }
.flow-line:nth-child(3) { animation-delay: -0.8s; }
.flow-line:nth-child(4) { animation-delay: -0.2s; }
.flow-line:nth-child(5) { animation-delay: -0.9s; }
.flow-line:nth-child(6) { animation-delay: -0.5s; }
.flow-line:nth-child(7) { animation-delay: -1.1s; }
@keyframes nx-flow { to { stroke-dashoffset: -8; } }
.pulse-ring { transform-box: fill-box; transform-origin: center;
  animation: nx-ring 3.2s ease-out infinite; }
.pulse-ring.d1 { animation-delay: -0.8s; }
.pulse-ring.d2 { animation-delay: -1.6s; }
.pulse-ring.d3 { animation-delay: -2.4s; }
@keyframes nx-ring { 0% { transform: scale(0.7); opacity: 0.5; }
  70%,100% { transform: scale(1.7); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .cta-card::after, .glow-edge, .orbit-spin, .radar-sweep,
  .nx-pulse-g, .flow-line, .pulse-ring { animation: none; }
  .pulse-ring { opacity: 0; }
}

/* ============================================================
   Clickable cards — stretched-link pattern
   Whole card becomes clickable; bottom "Подробнее" link still visible.
   ============================================================ */

.practice,
.practice.has-tiles,
.media-card,
.media-card.has-tiles,
.doc-card,
.case,
.case.has-tiles,
.case-card,
.prac-card,
.pc-card,
.a-card,
.pub,
.person {
  position: relative;
  cursor: pointer;
}

.practice > .more::after,
.practice.has-tiles > .more::after,
.media-card > .more::after,
.media-card.has-tiles > .more::after,
.doc-card > .more::after,
.case > .more::after,
.case.has-tiles > .more::after,
.case-card > .more::after,
.prac-card > .more::after,
.pc-card > .more::after,
.a-card > .more::after,
.pub > .more::after,
.person > .more::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Visible "Подробнее" anchor keeps its place in flow; its ::after overlay
   sits absolute-positioned inside the card. The card's child text (h3/p)
   stays at default z-index, so the overlay floats above the text and the
   click lands on the anchor's href. */

/* Hover affordance — lift + subtle scale tells user the card is clickable. */
.practice, .practice.has-tiles,
.media-card, .media-card.has-tiles,
.doc-card,
.case, .case.has-tiles, .case-card,
.prac-card, .pc-card, .a-card, .pub,
.person {
  transition: transform 0.25s cubic-bezier(0.22,0.61,0.36,1),
              box-shadow 0.25s cubic-bezier(0.22,0.61,0.36,1),
              border-color 0.25s cubic-bezier(0.22,0.61,0.36,1);
}
.practice:hover, .practice.has-tiles:hover,
.media-card:hover, .media-card.has-tiles:hover,
.doc-card:hover,
.case:hover, .case.has-tiles:hover, .case-card:hover,
.prac-card:hover, .pc-card:hover, .a-card:hover, .pub:hover,
.person:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 22px 40px -24px rgba(0,0,0,0.55);
  border-color: rgba(255,255,255,0.14);
}

/* Person card — visible "Подробнее" button inside .meta area */
.person > .more {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 14px 18px 18px;
  font: 600 12.5px/1 var(--font-body); letter-spacing: -0.005em;
  color: var(--fg);
  transition: color 0.2s ease, transform 0.2s ease;
}
.person:hover > .more { color: #FFFFFF; }
.person:hover > .more::before {
  /* visual cue arrow shift on hover */
}

@media (prefers-reduced-motion: reduce) {
  .practice, .practice.has-tiles,
  .media-card, .media-card.has-tiles,
  .doc-card,
  .case, .case.has-tiles, .case-card,
  .prac-card, .pc-card, .a-card, .pub,
  .person {
    transition: none;
  }
  .practice:hover, .media-card:hover, .doc-card:hover,
  .case:hover, .case-card:hover, .prac-card:hover,
  .pc-card:hover, .a-card:hover, .pub:hover, .person:hover {
    transform: none;
  }
}

/* Smooth scroll + offset so anchors don't hide under sticky header */
html { scroll-behavior: smooth; }
.profile, .profile.flip { scroll-margin-top: 96px; }

/* ============================================================
   PRELOADER — tile-logo reveal. NEXORA wordmark assembled from
   the brand press-tiles. Three variants via [data-variant]:
   assemble (default) · breathe · stream.   (added 2026-06-03)
   ============================================================ */
.nx-loader {
  position: fixed; inset: 0; z-index: 2147483000; /* above chat widget during its brief life */
  display: grid; place-items: center;
  background: var(--bg-deep);
  /* same breathing grid texture as the hero, for atmosphere */
  background-image:
    radial-gradient(ellipse 70% 60% at 50% 42%, rgba(255,255,255,0.06), transparent 70%),
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: auto, 38px 38px, 38px 38px;
  opacity: 1;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  will-change: opacity, transform;
}
.nx-loader.is-done {
  opacity: 0;
  transform: scale(1.06); /* push toward the viewer on exit */
  pointer-events: none;
}
/* film grain over the loader to match body texture */
.nx-loader::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--grain); background-size: 160px 160px;
  opacity: 0.5; mix-blend-mode: overlay;
}
/* keep the chat widget + cookie banner (max z-index) hidden while the loader is up */
html.nx-loading, html:has(.nx-loader) { overflow: hidden; }
html.nx-loading #litau-widget-root,
html.nx-loading #nx-cookie,
html:has(.nx-loader) #litau-widget-root,
html:has(.nx-loader) #nx-cookie { opacity: 0 !important; pointer-events: none !important; }

.nx-loader__inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(24px, 3.4vw, 38px);
}

/* logo box keeps the real wordmark aspect ratio (111:53) and is the
   3D camera — children live in a perspective scene */
.nx-loader__logo {
  position: relative;
  width: clamp(300px, 66vw, 640px);
  aspect-ratio: 111 / 53;
  perspective: 900px;
  perspective-origin: 50% 34%;
}

/* the 3D stage — each <i> is a block placed only where the wordmark has
   ink (canvas-sampled in JS). Idle parallax keeps the logo alive in 3D. */
.nx-loader__tiles {
  position: absolute; inset: 0;
  display: grid; gap: 2px;
  transform-style: preserve-3d;
  transform: rotateX(15deg) rotateY(-6deg);
  will-change: transform;
  transition: transform 0.85s var(--ease-out), opacity 0.65s var(--ease-out);
  animation: nx-stage-float 11s ease-in-out infinite;
}
@keyframes nx-stage-float {
  0%,100% { transform: rotateX(15deg) rotateY(-6deg); }
  50%     { transform: rotateX(17deg) rotateY(6deg); }
}

/* a tile = a lit, bevelled 3D block (top-lit gradient + inset bevel + cast
   shadow for thickness). Only transform/opacity animate → GPU-smooth. */
.nx-loader__tiles i {
  border-radius: 2px;
  background: linear-gradient(155deg, #ffffff 0%, #d4d7df 46%, #8d909c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.6),
    0 3px 5px rgba(0,0,0,0.5); /* lighter paint → smoother compositing */
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* fallback (no canvas / tainted): full grid clipped by the flat SVG mask */
.nx-loader__tiles--masked {
  transform-style: flat;
  transform: none;
  animation: none;
  -webkit-mask: var(--nx-logo-mask) center / contain no-repeat;
          mask: var(--nx-logo-mask) center / contain no-repeat;
}
.nx-loader__logo:has(.nx-loader__tiles--masked) { perspective: none; }
.nx-loader__tiles--masked i {
  background: rgba(255,255,255,0.78);
  box-shadow: none;
  opacity: 0;
  /* !important so the 3D variant rules never apply to the flat fallback */
  animation: nx-load-fade 0.7s var(--ease-out) var(--d, 0s) both !important;
}
@keyframes nx-load-fade { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } }

/* progress hairline under the wordmark */
.nx-loader__bar {
  position: relative; height: 2px; width: clamp(150px, 30vw, 280px);
  background: rgba(255,255,255,0.10); border-radius: 999px; overflow: hidden;
}
.nx-loader__bar::after {
  content: ""; position: absolute; inset: 0; transform-origin: left;
  background: linear-gradient(90deg, rgba(255,255,255,0.35), #FFFFFF);
  animation: nx-load-bar 1.25s var(--ease-out) forwards;
}
@keyframes nx-load-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---- Variant A · assemble (default) & B share the 3D flip-up reveal ---- */
.nx-loader[data-variant="assemble"] .nx-loader__tiles i,
.nx-loader[data-variant="breathe"]  .nx-loader__tiles i {
  opacity: 0;
  /* expo-out, monotonic (no overshoot) → buttery settle, no micro-stutter */
  animation: nx-tile3d-in 1.3s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0s) both;
}
@keyframes nx-tile3d-in {
  0%   { opacity: 0; transform: translateZ(-90px) rotateX(-90deg) rotateZ(calc(var(--r, 0) * 6deg)); }
  55%  { opacity: 1; }
  100% { opacity: 1; transform: translateZ(0) rotateX(0deg) rotateZ(0deg); }
}

/* ---- Variant B · breathe: same flip-in, but stronger 3D drift ---- */
.nx-loader[data-variant="breathe"] .nx-loader__tiles {
  animation: nx-stage-float-strong 9s ease-in-out infinite;
}
@keyframes nx-stage-float-strong {
  0%,100% { transform: rotateX(14deg) rotateY(-12deg); }
  50%     { transform: rotateX(19deg) rotateY(12deg); }
}

/* ---- Variant C · stream: blocks surge toward the viewer in a L→R wave ---- */
.nx-loader[data-variant="stream"] .nx-loader__tiles i {
  animation: nx-tile3d-surge 2.1s ease-in-out var(--d, 0s) infinite;
}
@keyframes nx-tile3d-surge {
  0%,100% { transform: translateZ(0)    rotateX(0deg); }
  50%     { transform: translateZ(34px) rotateX(-9deg); }
}

/* exit — the whole logo pushes toward the viewer, then fades */
.nx-loader.is-done .nx-loader__tiles {
  animation: none;
  transform: rotateX(14deg) translateZ(160px);
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .nx-loader__tiles { animation: none !important; transform: none !important; transition: none !important; }
  .nx-loader__tiles i { animation: none !important; opacity: 1 !important; transform: none !important; }
  .nx-loader__bar::after { animation: none; transform: scaleX(1); }
  .nx-loader { transition: none !important; }
  .nx-loader.is-done, .nx-loader.is-done .nx-loader__tiles { transform: none; }
}

/* ============================================================
   HEADER LOGO — always-on animated tile wordmark.
   Crisp letterforms (logo SVG mask) filled with a tile grid; a
   looping light highlight sweeps through so the tiles read as
   continuously "alive" — same motif as the hero press-tiles.
   Variant via [data-h]: wave (default) · pulse · scan.
   Injected by loader.js on every page. Cheap: 1 animated layer.
   (added 2026-06-03)
   ============================================================ */
.nx-sr { position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }

.nx-hlogo {
  position: relative; display: inline-block;
  aspect-ratio: 111 / 53;   /* width is set inline to match the old logo */
  vertical-align: middle;
}
/* tiles + sweep are clipped to the NEXORA band only (top ~55%) — LEGAL
   is too small to read under the tile noise, so it gets a crisp layer */
.nx-hlogo__fill, .nx-hlogo__glow {
  position: absolute; inset: 0;
  -webkit-mask: var(--nx-logo-mask) center / contain no-repeat,
                linear-gradient(#000 0 55%, transparent 60%);
          mask: var(--nx-logo-mask) center / contain no-repeat,
                linear-gradient(#000 0 55%, transparent 60%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
}
/* crisp, static LEGAL (bottom band) — readable, no tile noise */
.nx-hlogo__legal {
  position: absolute; inset: 0;
  background: var(--nx-logo-mask) center / contain no-repeat;
  -webkit-mask: linear-gradient(transparent 0 56%, #000 61%);
          mask: linear-gradient(transparent 0 56%, #000 61%);
}
/* tile grid: light squares separated by header-coloured gaps */
.nx-hlogo__fill {
  --cell: 4px; --gap: 1px;
  background-color: rgba(242,242,238,0.88); /* stays clearly readable between sweeps */
  background-image:
    linear-gradient(to right,  #1E2026 var(--gap), transparent var(--gap)),
    linear-gradient(to bottom, #1E2026 var(--gap), transparent var(--gap));
  background-size: var(--cell) var(--cell);
}
/* moving highlight that lights up the tiles */
.nx-hlogo__glow {
  mix-blend-mode: screen;
  pointer-events: none;
}

/* ---- wave (default): diagonal sweep L→R, tiles ignite in sequence ---- */
.nx-hlogo[data-h="wave"] .nx-hlogo__glow {
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,0.92) 50%, transparent 62%);
  background-size: 220% 100%; background-repeat: no-repeat;
  animation: nx-hl-wave 3.4s linear infinite;
}
@keyframes nx-hl-wave { 0% { background-position: 150% 0; } 100% { background-position: -60% 0; } }

/* ---- pulse: whole wordmark gently breathes brighter ---- */
.nx-hlogo[data-h="pulse"] .nx-hlogo__fill { animation: nx-hl-pulsefill 3s ease-in-out infinite; }
.nx-hlogo[data-h="pulse"] .nx-hlogo__glow {
  background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,0.6), transparent 70%);
  animation: nx-hl-pulse 3s ease-in-out infinite;
}
@keyframes nx-hl-pulse     { 0%,100% { opacity: 0.05; } 50% { opacity: 0.5; } }
@keyframes nx-hl-pulsefill { 0%,100% { background-color: rgba(242,242,238,0.74); } 50% { background-color: rgba(242,242,238,0.97); } }

/* ---- scan: thin vertical light bar passes across ---- */
.nx-hlogo[data-h="scan"] .nx-hlogo__glow {
  background: linear-gradient(90deg, transparent 44%, rgba(255,255,255,0.95) 50%, transparent 56%);
  background-size: 55% 100%; background-repeat: no-repeat;
  animation: nx-hl-scan 2.8s cubic-bezier(0.65,0,0.35,1) infinite;
}
@keyframes nx-hl-scan { 0% { background-position: -25% 0; } 100% { background-position: 125% 0; } }

@media (prefers-reduced-motion: reduce) {
  .nx-hlogo__glow { animation: none !important; opacity: 0.18; }
  .nx-hlogo__fill { animation: none !important; }
}

/* ============================================================
   AMBIENT LIGHT FIELD — soft white glows that fade in at random
   spots, drift, and fade out across the dark background (same
   atmosphere as the preloader). Lives behind all content; most
   sections are transparent so it shows through site-wide.
   Injected by loader.js. Toggle: ?amb=off  ·  window.NX_AMBIENT=false
   (added 2026-06-03)
   ============================================================ */
html { background: var(--bg); }                  /* base colour on the root … */
body { background: transparent !important; }      /* … so the field shows behind body */

.nx-ambient {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none; overflow: hidden;
}
.nx-ambient b {
  position: absolute; display: block; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.17), rgba(255,255,255,0) 70%);
  opacity: 0;
  animation: nx-amb var(--dur, 20s) ease-in-out var(--del, 0s) infinite;
}
@keyframes nx-amb {
  0%   { opacity: 0;             transform: translate3d(0,0,0) scale(0.82); }
  30%  { opacity: var(--peak, 0.5); }
  70%  { opacity: var(--peak, 0.5); }
  100% { opacity: 0;             transform: translate3d(var(--dx, 40px), var(--dy, -34px), 0) scale(1.16); }
}
@media (prefers-reduced-motion: reduce) { .nx-ambient { display: none; } }


/* ============================================================
   MOBILE POLISH PASS — small-screen legibility & touch targets.
   Loaded site-wide; targets SHARED template patterns (breadcrumbs,
   eyebrows, case-card footer, chips, header logo) so every page is
   fixed from one place. This sheet loads BEFORE per-page inline
   <style>, so a few leaf text/size props use !important to win
   over inline mobile rules that shrink them too far.
   (added 2026-06-04 — mobile optimization pass, incl. 320px)
   ============================================================ */

/* Long Russian compound words (Конфиденциальность, регулировании…)
   must wrap, never clip their column. Safe at all widths: break-word
   only acts when a word would actually overflow. */
.nx-h1, h1.nx, .nx-h2, h2.nx, .nx-h3, h3.nx, .nx-h4, h4.nx,
.hero h1, .a-hero h1, .sec-head h2, .cta-card .head h2,
.principle h3, .case h3, .practice h3, .pub h3, .media-card h3 {
  overflow-wrap: break-word;
}

@media (max-width: 768px) {
  /* ---- Breadcrumbs: stop the inline rules shrinking them to
     10–10.5px; give links a real vertical tap area; let the long
     current-page label wrap instead of running off-screen. ---- */
  .crumbs { font-size: 11.5px !important; }
  .crumbs a { display: inline-block; padding: 4px 0; }
  .crumbs .cur { white-space: normal !important; max-width: none !important; }

  /* ---- Eyebrow labels with a leading ::before hairline + wide
     tracking can push past a 320px line — let them wrap. ---- */
  .hero .eyebrow, .a-hero .eyebrow, .sec-head .eyebrow,
  .cta-card .head .eyebrow { flex-wrap: wrap; }

  /* ---- Case listing card footer: redacted chip + "Подробнее"
     collide and clip the arrow on one space-between line at ≤360px.
     Stack them so both stay fully visible and tappable. ---- */
  .case .ft { flex-direction: column; align-items: flex-start; gap: 12px; }

  /* ---- Interactive pills/chips → comfortable ~36px touch height. ---- */
  .chip, .dir, .filter-bar .chip {
    min-height: 36px;
    display: inline-flex; align-items: center;
  }

  /* ---- Micro meta-labels were shrinking to 9.5–10.5px on phones;
     floor them at the site's standard 11px label size. ---- */
  .rubric-chip, .pc-tag, .case dt, .logo-cell .tag {
    font-size: 11px !important;
  }

  /* ---- Sticky header: a touch more opaque + crisper tile-logo so
     body text never bleeds through the translucent bar on scroll. ---- */
  .site-hdr { background: rgba(30,32,38,0.92); }
  .nx-hlogo__fill { background-color: rgba(242,242,238,0.96) !important; }
}

@media (max-width: 480px) {
  /* Tighter tracking keeps the long hero eyebrow on fewer lines at 320px. */
  .hero .eyebrow, .a-hero .eyebrow, .sec-head .eyebrow,
  .cta-card .head .eyebrow { letter-spacing: 0.12em; }
}
