:root {
  --bg: #071225;
  --bg-2: #0b1930;
  --surface: #10233f;
  --surface-2: #152b4b;
  --ink: #f6f8fb;
  --muted: #bcc8d8;
  --line: rgba(246, 248, 251, 0.16);
  --gold: #d5b66a;
  --blue: #6f9bd6;
  color-scheme: dark;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 78% 4%, rgba(91, 128, 192, 0.28), transparent 34rem),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  color: var(--ink);
}

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

.container {
  width: min(1500px, calc(100% - 80px));
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  min-height: 86px;
  padding: 12px clamp(20px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 18, 37, 0.9);
  backdrop-filter: blur(16px);
}

.brand img {
  width: 158px;
  display: block;
}

.nav,
.header-actions,
.actions,
.contact-strip {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav {
  justify-content: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 15px;
}

.nav-services {
  position: relative;
  color: var(--muted);
  font-size: 15px;
}

.nav-services summary {
  list-style: none;
  cursor: pointer;
}

.nav-services summary::-webkit-details-marker { display: none; }
.nav-services summary::after { content: " ↓"; color: var(--blue); }

.services-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  display: grid;
  width: 310px;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #10233f;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  transform: translateX(-50%);
}

.services-menu a {
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--muted);
  line-height: 1.3;
}

.services-menu a:hover { background: var(--surface-2); color: var(--ink); }

.nav a:hover,
.header-actions a:hover {
  color: #fff;
}

.header-actions {
  justify-content: end;
  font-weight: 700;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(16, 35, 63, .7);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.nav-toggle:hover { border-color: rgba(213, 182, 106, .55); }
.nav-toggle span:first-child,
.nav-toggle span:first-child::before,
.nav-toggle span:first-child::after {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
}
.nav-toggle span:first-child { position: relative; }
.nav-toggle span:first-child::before,
.nav-toggle span:first-child::after { position: absolute; left: 0; content: ""; }
.nav-toggle span:first-child::before { top: -5px; }
.nav-toggle span:first-child::after { top: 5px; }

.round {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.hero,
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(86px, 11vw, 156px) 0;
}

.page-hero::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  content: "";
  background: url("assets/hero-logo.png") no-repeat right center / min(58vw, 860px) auto;
  opacity: 0.9;
}

.page-hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, var(--bg) 0%, rgba(9, 23, 47, 0.96) 30%, rgba(9, 23, 47, 0.48) 58%, rgba(9, 23, 47, 0.08) 100%);
}

.director-hero::before,
.director-hero::after {
  display: none;
}

.hero::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  content: "";
  background-image: url("assets/hero-logo.png");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: min(72vw, 980px) auto;
  opacity: 0.92;
}

.hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, var(--bg) 0%, rgba(9, 23, 47, 0.96) 28%, rgba(9, 23, 47, 0.48) 57%, rgba(9, 23, 47, 0.06) 100%);
}

.hero-content,
.two-col,
.director-grid,
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(34px, 6vw, 76px);
  align-items: center;
}

.split {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: clamp(40px, 8vw, 120px);
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
  text-wrap: balance;
}

h1 {
  max-width: 900px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 1.08;
}

h2 {
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.12;
}

h3 {
  line-height: 1.18;
}

p,
li {
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.75;
}

.label {
  margin: 0 0 20px;
  color: var(--ink);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  line-height: 1.2;
}

.split h2 {
  max-width: 760px;
  font-size: clamp(36px, 4.4vw, 64px);
  line-height: 1.12;
}

.two-col img {
  width: 100%;
  height: auto;
  display: block;
}

.button,
.button-outline {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 8px;
  font-weight: 800;
}

.button {
  background: var(--ink);
  color: var(--bg);
}

.button-outline {
  border: 1px solid var(--line);
}

.stats {
  border-block: 1px solid var(--line);
  background: rgba(8, 21, 42, 0.78);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.stats-grid div {
  padding: 28px clamp(18px, 3vw, 34px);
  border-right: 1px solid var(--line);
}

.stats-grid div:last-child {
  border-right: 0;
}

.stats strong {
  display: block;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1;
}

.section,
.director,
.request {
  padding: clamp(66px, 9vw, 118px) 0;
}

.director,
.request {
  border-block: 1px solid var(--line);
  background: rgba(9, 24, 47, 0.76);
}

.section-head {
  max-width: 760px;
  margin-bottom: 34px;
}

.reviews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 14px;
}

.services-carousel {
  overflow: hidden;
}

.services-viewport {
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
}

.services-viewport:active {
  cursor: grabbing;
}

.services {
  display: flex;
  gap: 14px;
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.services-carousel .reviews {
  display: flex;
  gap: 14px;
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.tile,
.review,
.panel,
.form-shell {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(16, 35, 63, 0.78);
}

.page-hero .two-col {
  grid-template-columns: minmax(0, 1fr);
}

.page-hero .two-col > img {
  display: none;
}

.page-hero .two-col > div {
  position: relative;
  z-index: 1;
  max-width: 58%;
}

.page-hero .two-col p:not(.label) {
  max-width: min(720px, 100%);
}

.page-hero > .container > p:not(.label) {
  max-width: 720px;
  text-wrap: pretty;
}

.tile {
  flex: 0 0 calc((100% - 28px) / 3);
  min-height: 220px;
  padding: 24px;
  cursor: pointer;
}

.review {
  flex: 0 0 calc((100% - 28px) / 3);
  min-height: 270px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
}

.review blockquote {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.review blockquote::before {
  display: block;
  margin-bottom: 18px;
  color: var(--blue);
  content: "\201c";
  font-size: 42px;
  font-weight: 900;
  line-height: 0.7;
}

.review figcaption {
  margin-top: 28px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 22px;
}

.carousel-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
}

.carousel-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.carousel-status {
  min-width: 72px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.tile span {
  display: block;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}

.director img,
.page-photo {
  width: min(100%, 430px);
  border: 1px solid var(--line);
  border-radius: 14px;
  justify-self: end;
}

.review {
  margin: 0;
  padding: 24px;
}

.review figcaption {
  margin-top: 22px;
  font-weight: 800;
}

.request-grid {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
}

.panel,
.form-shell {
  padding: clamp(24px, 5vw, 52px);
}

.list {
  display: grid;
  gap: 18px;
  margin: 0 0 34px;
  padding: 0;
  list-style: none;
  counter-reset: service;
}

.list li {
  position: relative;
  padding-left: 56px;
  counter-increment: service;
}

.list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 56px;
  margin: 0 0 34px;
  padding: 0;
  list-style: none;
}

.list li {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.list li::before {
  display: none;
}

.panel:has(.list) {
  border: 0;
  background: transparent;
}

.list li::before {
  position: absolute;
  left: 0;
  top: 0;
  content: counter(service, decimal-leading-zero);
  color: var(--gold);
  font-weight: 900;
}

.contact-strip {
  flex-wrap: wrap;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* Судебная практика: отдельная карточка дела с прикреплёнными актами. */
.practice-cases-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 18px;
}

.practice-case-card,
.practice-legacy-documents {
  min-width: 0;
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(20, 43, 75, 0.88), rgba(10, 26, 50, 0.88));
}

.practice-case-card h2,
.practice-legacy-documents h2 {
  margin: 0 0 17px;
  color: var(--ink);
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.practice-case-documents h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.practice-case-documents p {
  margin: 0;
}

.practice-document-links {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 10px;
}

.practice-document-links > p { margin: 0; }

.practice-pdf-link {
  position: relative;
  display: inline-flex;
  min-width: 62px;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid rgba(213, 182, 106, .42);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(21, 43, 75, .96), rgba(9, 23, 44, .96));
  color: #f0d68d;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .16);
  text-decoration: none;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.practice-pdf-link:hover {
  border-color: var(--gold);
  background: #183253;
  color: #ffe6a0;
  box-shadow: 0 7px 20px rgba(0, 0, 0, .28);
  transform: translateY(-2px);
}

.practice-pdf-link:focus-visible {
  outline: 3px solid #f2d788;
  outline-offset: 3px;
}

.practice-pdf-icon { display: block; width: 21px; height: 23px; flex: 0 0 auto; }
.practice-pdf-label { color: #e5d29d; font-size: 9px; font-weight: 850; letter-spacing: .06em; line-height: 1; }
.practice-pdf-index { position: absolute; top: -6px; right: -6px; display: grid; min-width: 19px; height: 19px; place-items: center; padding: 0 4px; border: 1px solid rgba(7,18,37,.9); border-radius: 999px; background: var(--gold); color: #101a2b; font-size: 10px; font-weight: 850; line-height: 1; }

.practice-legacy-documents .practice-document-links { margin-top: 5px; }

@media (prefers-reduced-motion: reduce) {
  .practice-pdf-link { transition: none; }
  .practice-pdf-link:hover { transform: none; }
}

.practice-legacy-documents { grid-column: 1 / -1; }

@media (max-width: 760px) {
  .practice-cases-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .practice-legacy-documents { grid-column: auto; }
}

.form-shell {
  width: min(100%, 980px);
  max-width: 980px;
  border-color: rgba(111, 155, 214, 0.28);
  background: linear-gradient(145deg, rgba(20, 43, 75, 0.94), rgba(10, 26, 50, 0.94));
}

.form-shell form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 18px;
  min-width: 0;
}

.form-shell label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.form-shell input,
.form-shell textarea {
  min-width: 0;
  font: inherit;
  width: 100%;
  border: 1px solid rgba(188, 200, 216, 0.22);
  border-radius: 10px;
  background: #09172c;
  color: var(--ink);
  padding: 16px 18px;
  outline: none;
}

.form-shell label:nth-of-type(4),
.form-shell button,
.form-shell form + p {
  grid-column: 1 / -1;
}

.form-shell textarea {
  min-height: 150px;
  resize: vertical;
}

.form-shell input:focus,
.form-shell textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(111, 155, 214, 0.14);
}

.form-shell button {
  min-height: 48px;
  border: 1px solid rgba(246, 248, 251, 0.16);
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 800;
}

.form-shell > p {
  margin: 24px 0 0;
  max-width: 65ch;
  font-size: 15px;
  line-height: 1.55;
}

.footer {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 34px;
  padding: 48px clamp(20px, 4vw, 52px) 32px;
  border-top: 1px solid var(--line);
  background: #050f20;
}

.footer img {
  width: 150px;
}

.footer address,
.footer nav {
  display: grid;
  gap: 10px;
  font-style: normal;
}

.footer small {
  grid-column: 1 / -1;
  color: var(--muted);
}

@media (max-width: 900px) {
  .header,
  .hero-content,
  .two-col,
  .director-grid,
  .split,
  .footer {
    grid-template-columns: 1fr;
  }

  .nav,
  .header-actions {
    justify-content: start;
  }

  .director img,
  .page-photo {
    justify-self: start;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .request-grid {
    align-items: start;
    flex-direction: column;
  }

  .form-shell form {
    grid-template-columns: 1fr;
  }

  .form-shell label:nth-of-type(4),
  .form-shell button,
  .form-shell form + p {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 28px, 1500px);
  }

  .brand img {
    width: 136px;
  }

  .services-menu {
    left: 0;
    width: min(310px, calc(100vw - 28px));
    transform: none;
  }

  .tile {
    flex-basis: 100%;
  }

  .review {
    flex-basis: 100%;
  }

  .hero {
    padding: 72px 0 88px;
  }

  .hero::before {
    background-position: 155% center;
    background-size: 760px auto;
    opacity: 0.72;
  }

  .page-hero::before {
    background-position: 155% center;
    background-size: 760px auto;
    opacity: 0.72;
  }

  .page-hero .two-col > div {
    max-width: 100%;
  }

  .page-hero::after {
    background: linear-gradient(90deg, var(--bg) 0%, rgba(9, 23, 47, 0.94) 42%, rgba(9, 23, 47, 0.2) 100%);
  }

  .list {
    grid-template-columns: 1fr;
  }

  .hero::after {
    background: linear-gradient(90deg, var(--bg) 0%, rgba(9, 23, 47, 0.94) 42%, rgba(9, 23, 47, 0.2) 100%);
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: clamp(38px, 14vw, 54px);
  }
}

@media (max-width: 760px) {
  .header {
    grid-template-columns: 1fr;
    align-items: center;
    gap: 8px 12px;
    min-height: 70px;
    padding: 10px 14px;
  }

  .header.has-mobile-nav { grid-template-columns: minmax(0, 1fr) auto; }
  .brand { grid-column: 1; grid-row: 1; }
  .nav-toggle { display: inline-flex; grid-column: 2; grid-row: 1; }
  .nav.is-collapsible { grid-column: 1 / -1; grid-row: 2; width: 100%; align-items: stretch; flex-direction: column; gap: 0; padding: 7px 0 2px; border-top: 1px solid var(--line); }
  .nav.is-collapsible[hidden] { display: none !important; }
  .nav.is-collapsible > a,
  .nav.is-collapsible > .nav-services { display: flex; min-height: 46px; align-items: center; padding: 0 5px; border-bottom: 1px solid rgba(246,248,251,.08); }
  .nav.is-collapsible > .nav-services { display: block; padding-top: 12px; }
  .nav.is-collapsible .nav-services summary { display: flex; min-height: 32px; align-items: center; }
  .nav.is-collapsible .services-menu { position: static; width: 100%; margin: 3px 0 8px; padding: 2px 0 5px 12px; border: 0; border-radius: 0; background: transparent; box-shadow: none; transform: none; }
  .nav.is-collapsible .services-menu a { min-height: 42px; display: flex; align-items: center; padding: 7px 9px; }
  .header-actions { grid-column: 1 / -1; grid-row: 3; justify-content: start; padding: 3px 5px 4px; }
}
