/* Body.home-page: переменные оформления. */
body.home-page {
  --home-edge: #2b4c73;
  --home-edge-soft: #83b6f124;
  --home-secondary: #aec3df;
  --home-radius: 24px;

  & main .glass:not(.development-map) {
    border-color: var(--home-edge);
    border-radius: var(--home-radius);
    background:
      radial-gradient(
        ellipse at var(--mx, 8%) var(--my, 0%),
        #286ab322,
        transparent 65%
      ),
      linear-gradient(145deg, #0e213b, #09182c 55%, #071323);
    box-shadow:
      inset 0 1px #c4e1ff0d,
      0 20px 48px #01081438;
  }
  & main .glass::before {
    opacity: 0.022;
  }
  & .editor-heading {
    row-gap: 24px;
  }
  & main :is(.editor-heading p, .case-feature p, .service-feature p) {
    text-wrap: pretty;
  }
  & .editor-heading .eyebrow {
    margin-bottom: 22px;
  }
  & .hero-proof {
    gap: 10px;
  }
  & .hero-proof span::before {
    box-shadow: 0 0 8px #2e83ff50;
  }
  & .hero-next {
    border-top-color: var(--home-edge-soft);
  }
  & .hero :is(.button-primary, .button-secondary) {
    min-height: 48px;
  }
  & .editorial-section {
    scroll-margin-top: calc(var(--site-header-height, 80px) + 20px);
  }

  & #reliability .ownership-board {
    padding: clamp(22px, 2.6vw, 38px);
  }
  & #reliability .ownership-head {
    gap: 8px 20px;
    letter-spacing: 0.065em;
  }
  & #reliability .ownership-head > span:last-child {
    color: var(--home-secondary);
  }
  & #reliability .layer-stack {
    --layer-gap: 12px;
    gap: var(--layer-gap);
    padding-block: 28px;
  }
  & #reliability .layer {
    position: relative;
  }
  & #reliability .layer:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 4.5px;
    top: 50%;
    width: 1px;
    height: calc(100% + var(--layer-gap));
    background: #37619366;
  }
  & #reliability .layer-index {
    position: relative;
    z-index: 1;
    background: #579bf6;
    box-shadow: 0 0 0 4px #0b1d34;
  }
  & #reliability .layer-primary .layer-index {
    background: #8dc2ff;
  }
  & #reliability .layer-mark {
    height: auto;
    aspect-ratio: 340 / 164;
    width: 100%;
    max-width: 320px;
    justify-self: center;
  }
  & #reliability .layer-mark::before {
    display: none;
  }
  & #reliability .layer-gem {
    width: 100%;
    transform: none;
    filter: drop-shadow(0 8px 14px #0003);
  }
  & #reliability .layer:is(:hover, :focus-within) .layer-gem {
    transform: none;
  }
  & #reliability :is(.layer-surface, .layer-depth, .layer-facet) {
    vector-effect: non-scaling-stroke;
  }
  & #reliability .layer-surface {
    fill: #102d52;
    stroke: #3c7cc5;
    stroke-width: 1;
  }
  & #reliability .layer-primary .layer-surface {
    fill: #143b6b;
    stroke: #6baaff;
  }
  & #reliability .layer-depth {
    fill: #081629;
    stroke: #2c5484;
    stroke-width: 0.8;
  }
  & #reliability .layer-facet {
    fill: #15365f;
    stroke: #5c92d122;
    stroke-width: 0.7;
  }
  & #reliability .layer-well {
    top: 47.561%;
    transform: translate(-50%, -50%);
    background: linear-gradient(145deg, #142f50, #0b203a);
    border-color: #446e9a;
    box-shadow:
      inset 0 1px #d6eaff0d,
      0 6px 12px #0002;
    color: #c5dcf7;
  }
  & #reliability .layer-caption strong {
    font-size: clamp(1rem, 2.8cqi, 1.375rem);
    line-height: 1.35;
  }
  & #reliability .layer-caption small {
    color: var(--home-secondary);
  }
  & #reliability .ownership-foot {
    gap: 12px;
    border-top-color: var(--home-edge-soft);
  }
  & #reliability .ownership-foot svg {
    margin-top: 2px;
    color: #7eb6ff;
  }
  & #reliability .ownership-foot span {
    color: var(--home-secondary);
  }
  & #reliability .responsibility-points li {
    padding-block: 24px;
  }
  & #reliability .responsibility-number {
    color: #809fca;
    font-weight: 500;
  }

  & .service-feature {
    container-type: inline-size;
    padding: clamp(24px, 2.6vw, 38px);
  }
  & main .service-feature h3 {
    margin-top: 22px;
    font-size: var(--type-feature);
    line-height: 1.3;
  }
  & main .service-feature p {
    max-width: 54ch;
    color: #bfd0e6;
  }
  & .service-feature .art-network {
    flex: 1;
    height: clamp(260px, 56cqi, 420px);
    min-height: 260px;
    margin: 24px 0;
    overflow: hidden;
  }
  & .art-network .art-caption {
    top: 0;
    left: 0;
    color: #95afd0;
    font-size: 0.6875rem;
    letter-spacing: 0.09em;
  }
  & .network-connections {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
  }
  & .network-connections path {
    fill: none;
    stroke: #3b80cfa6;
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
  }
  & .network-connections circle {
    fill: #79baff;
  }
  & .network-orbit {
    left: 50%;
    top: 50%;
    width: 52%;
    max-width: 340px;
    height: auto;
    aspect-ratio: 1;
    transform: translate(-50%, -50%) rotate(-25deg) scaleY(0.65);
    border-color: #3874b72a;
    pointer-events: none;
  }
  & .network-orbit.orbit-b {
    width: 74%;
    max-width: 520px;
    transform: translate(-50%, -50%) rotate(30deg) scaleY(0.55);
  }
  & .service-feature .network-hub {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: clamp(82px, 17cqi, 112px);
    height: auto;
    aspect-ratio: 1;
    border: 1px solid #477bb4;
    border-radius: 23%;
    background: linear-gradient(145deg, #214f82, #102b4d);
    box-shadow:
      inset 0 1px #c5e5ff16,
      0 10px 28px #0003,
      0 0 48px #247cff18;
  }
  & .network-hub > span {
    font-size: clamp(1.75rem, 6cqi, 2.5rem);
    line-height: 1.2;
    color: #84bcff;
  }
  & .network-hub small {
    font-size: 0.5625rem;
    line-height: 1.5;
    letter-spacing: 0.03em;
    color: #b8cde8;
    white-space: nowrap;
  }
  & .service-feature .network-node {
    top: 24%;
    bottom: auto;
    padding: 11px clamp(10px, 2cqi, 18px);
    transform: translate(-50%, -50%);
    font-size: clamp(0.6875rem, 2.2cqi, 0.8125rem);
    line-height: 1.5;
    white-space: nowrap;
    background: #102a49;
    border-color: #3c608c;
    border-radius: 9px;
    box-shadow: inset 0 1px #c2e0ff09;
  }
  & .network-node:is(.node-a, .node-c) {
    left: 19%;
    right: auto;
  }
  & .network-node:is(.node-b, .node-d) {
    left: 81%;
    right: auto;
  }
  & .service-feature .network-node:is(.node-c, .node-d) {
    top: 76%;
  }
  & .service-feature > .text-link {
    border-top-color: var(--home-edge-soft);
    padding-block: 20px 0;
    min-height: 48px;
  }

  & .case-feature {
    container-type: inline-size;
  }
  & .case-feature .art-platform {
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    min-height: clamp(360px, 54cqi, 680px);
    padding: 64px 22px 32px;
  }
  & .art-platform .art-caption {
    top: 24px;
    left: clamp(24px, 4cqi, 38px);
    font-size: 0.6875rem;
    color: #95afd0;
  }
  & .case-feature .browser-mock {
    width: 91%;
    max-width: 1160px;
    margin-top: 0;
    border-color: #3a5d88;
    border-radius: 12px;
    background: linear-gradient(145deg, #112b4a, #0a1a2e);
    transform: perspective(1600px) rotateY(-2deg) rotateX(1deg);
    box-shadow:
      inset 0 1px #c6e1ff0b,
      0 18px 40px #0004;
    overflow: hidden;
  }
  & .case-feature .mock-toolbar {
    padding: 12px 16px;
    background: #122d4b;
    border-bottom-color: var(--home-edge-soft);
  }
  & .case-feature .mock-toolbar b {
    font-size: 10px;
  }
  & .case-feature .mock-nav {
    padding-inline: 12px;
    border-right-color: var(--home-edge-soft);
    background: #163454;
  }
  & .case-feature .mock-main {
    padding: 22px;
  }
  & .case-feature .mock-title strong {
    color: #edf5ff;
    font-size: clamp(0.8125rem, 1.8cqi, 1rem);
    font-weight: 550;
  }
  & .case-feature .mock-title > span {
    color: var(--home-secondary);
  }
  & .case-feature .mock-summary {
    margin-block: 20px;
  }
  & .case-feature .mock-summary > div {
    background: #17395c;
    border-color: #7da9dc1c;
    padding: 14px;
  }
  & .case-feature .mock-summary b {
    color: #e5f0ff;
    font-size: clamp(0.8125rem, 1.8cqi, 1rem);
    line-height: 1.4;
  }
  & .case-feature .mock-summary em {
    background: linear-gradient(90deg, #579af1, #579af120);
    border-radius: 2px;
  }
  & .case-feature .mock-table > div {
    gap: 12px;
    padding-block: 12px;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
    border-bottom-color: var(--home-edge-soft);
  }
  & .case-feature .mock-table > div:last-child {
    border-bottom: 0;
  }
  & .case-feature .mock-table > div:not(:first-child) > span:nth-child(2) {
    display: flex;
    align-items: center;
    gap: 7px;
  }
  & .case-feature .mock-table i {
    flex: 0 0 4px;
    height: 4px;
    margin: 0;
    background: #74adf6;
  }
  & .case-feature .mock-table > div:last-child i {
    background: #8acbd0;
  }
  & .case-feature-copy {
    padding: 24px clamp(24px, 4cqi, 38px) 30px;
    border-top: 1px solid #83b6f114;
  }
  & main .case-feature h3 {
    font-size: var(--type-feature);
    line-height: 1.3;
    margin-block: 16px;
  }
  & .case-feature p {
    max-width: 60ch;
    margin-bottom: 18px;
  }
  & .case-feature-copy > .text-link {
    display: flex;
    justify-content: space-between;
    min-height: 48px;
    padding-bottom: 0;
  }
  & .case-side > a:not(.text-link) {
    padding-block: 24px;
  }
  & .case-side .text-link {
    min-height: 44px;
  }

  & .document-art {
    height: clamp(400px, 34vw, 660px);
    min-height: 0;
  }
  & .document-sheet {
    width: 76%;
    max-width: 420px;
    aspect-ratio: 0.78;
    padding: clamp(24px, 2.6vw, 36px);
    border-color: #355575;
    border-top-color: #5a8fca;
    border-radius: 16px;
    background: linear-gradient(145deg, #102541, #0a1729 80%);
    transform: rotate(-4deg);
    box-shadow:
      inset 0 1px #d4eaff0a,
      0 24px 50px #0005;
  }
  & .document-sheet:not(.sheet-back) {
    display: flex;
    flex-direction: column;
  }
  & .document-sheet.sheet-back {
    transform: rotate(6deg) translate(14px, -10px);
    background: #081524;
    border-color: #314863;
  }
  & .document-sheet span {
    padding-bottom: 16px;
    border-bottom: 1px solid #a8cfff22;
    font-size: 0.6875rem;
    letter-spacing: 0.075em;
    color: #a5c2e6;
  }
  & .document-sheet strong {
    font-size: clamp(1.5rem, 2.1vw, 2.125rem);
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-block: 38px 24px;
  }
  & .document-sheet i {
    flex-shrink: 0;
    height: 2px;
    margin-top: 12px;
    background: #82acd02e;
    border-radius: 2px;
  }
  & .document-sheet b {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 28px;
    color: #93c2ff;
    font-size: 0.625rem;
    letter-spacing: 0.045em;
    font-weight: 500;
  }
  & .document-sheet b::after {
    content: '✓';
    display: grid;
    place-items: center;
    flex: 0 0 24px;
    height: 24px;
    border: 1px solid #4674a5;
    border-radius: 50%;
    color: #b5d6ff;
    font: 14px/1 var(--font);
  }
  & .document-feature .check-list li {
    border-bottom-color: var(--home-edge-soft);
  }
  & .document-feature .check-list li:last-child {
    border-bottom: 0;
  }

  &
    main
    :is(
      a.service-feature,
      a.case-feature,
      .text-link,
      .service-index > a,
      .case-side > a
    ):focus-visible {
    outline: 2px solid #9ccaff;
    outline-offset: 5px;
  }
  & main .text-link:hover,
  &
    main
    :is(a.service-feature, a.case-feature):is(:hover, :focus-visible)
    .text-link {
    color: #b0d3ff;
  }
  & main .text-link > span {
    color: #80b5f8;
  }
  & .journey li {
    border-top-color: #4674ae;
  }
  & .journey li::after {
    display: none;
  }
  & .journey li:hover h3 {
    color: #f4f8ff;
  }
  & .journey h3 {
    margin-top: 24px;
  }
  & .journey p {
    max-width: 42ch;
    margin-bottom: 0;
  }
  & #contact :is(.lead-form-card, .direct-card) {
    padding: clamp(24px, 2.6vw, 38px);
  }
  & #contact .direct-actions a {
    border-color: var(--home-edge-soft);
    min-height: 64px;
  }
  & #contact .direct-actions strong {
    color: #83b9ff;
  }
  & #contact .manager {
    border-color: var(--home-edge-soft);
  }
  & #contact .response-note {
    color: var(--home-secondary);
    line-height: 1.5;
  }
  & #contact .direct-card h3 {
    margin-block: 18px 14px;
  }
  & #contact .manager em {
    color: #a8ceff;
  }
  &
    #contact
    :is(
      input:not([type='checkbox']):not([type='file']):not(.form-trap),
      textarea
    ) {
    border-color: #466687;
    background: #081421;
  }
  &
    #contact
    :is(
      input:not([type='checkbox']):not([type='file']):not(.form-trap),
      textarea
    ):focus {
    border-color: #85baff;
    box-shadow: 0 0 0 3px #68a5ff18;
  }
  & #contact input[type='checkbox'] {
    accent-color: #68a5ff;
  }
}

/* Адаптация для (hover: hover) and (pointer: fine). */
@media (hover: hover) and (pointer: fine) {
  body.home-page {
    & main :is(a.service-feature, a.case-feature):hover {
      border-color: #6598d5;
    }
    & main :is(.service-index > a, .case-side > a):hover h3 {
      color: #9ac6ff;
    }
    & #contact .direct-actions a:hover {
      border-color: #6598d5;
    }
  }
}
/* Адаптация для (width <= 800px). */
@media (width <= 800px) {
  body.home-page {
    --home-radius: 22px;
    & .editor-heading .eyebrow {
      margin-bottom: 18px;
    }
    & .service-feature {
      padding: 26px;
    }
    & .document-art {
      height: 450px;
    }
    & .document-sheet {
      max-width: 320px;
    }
  }
}
/* Адаптация для (width <= 480px). */
@media (width <= 480px) {
  body.home-page {
    --home-radius: 20px;
    & #reliability .ownership-board {
      padding: 22px 18px;
    }
    & #reliability .ownership-head {
      flex-direction: column;
      gap: 6px;
    }
    & #reliability .layer {
      grid-template-columns: 6px minmax(76px, 0.82fr) minmax(0, 1.18fr);
      gap: 10px;
    }
    & #reliability .layer:not(:last-child)::before {
      left: 2.5px;
    }
    & #reliability .layer-caption strong {
      font-size: 1rem;
    }
    & #reliability .layer-caption small {
      font-size: 0.875rem;
      line-height: 1.5;
    }
    & #reliability .layer-stack {
      padding-block: 22px;
    }
    & #reliability .ownership-foot {
      padding-top: 18px;
    }
    & .service-feature {
      padding: 24px 20px;
    }
    & .service-feature .art-network {
      flex: none;
      height: 260px;
      min-height: 0;
      margin-block: 22px;
    }
    & .service-feature .network-node {
      padding: 9px 10px;
    }
    & .case-feature .art-platform {
      height: auto;
      min-height: 0;
      padding: 52px 14px 24px;
    }
    & .case-feature .browser-mock {
      width: 100%;
      transform: none;
    }
    & .case-feature .mock-toolbar {
      padding: 10px;
      font-size: 0.625rem;
      gap: 8px;
    }
    & .case-feature .mock-toolbar i {
      flex: 0 0 4px;
      height: 4px;
      margin-right: 17px;
      box-shadow:
        8px 0 0 #476389,
        16px 0 0 #476389;
    }
    & .case-feature .mock-body {
      grid-template-columns: 30px minmax(0, 1fr);
    }
    & .case-feature .mock-nav {
      padding: 12px 5px;
    }
    & .case-feature .mock-nav i {
      width: 12px;
      height: 12px;
      margin: 16px auto;
    }
    & .case-feature .mock-nav .mini-brand {
      width: 18px;
      height: 18px;
    }
    & .case-feature .mock-main {
      padding: 14px 10px;
    }
    & .case-feature .mock-title strong {
      font-size: 0.6875rem;
    }
    & .case-feature .mock-summary {
      gap: 6px;
      margin-block: 14px;
    }
    & .case-feature .mock-summary > div {
      padding: 9px 7px;
    }
    & .case-feature .mock-summary small {
      font-size: 0.625rem;
    }
    & .case-feature .mock-summary b {
      font-size: 0.6875rem;
      margin-block: 5px 8px;
    }
    & .case-feature .mock-table > div {
      grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) 26px;
      font-size: 0.625rem;
      gap: 6px;
      padding-block: 10px;
    }
    & .case-feature .mock-table > div > :last-child {
      text-align: right;
    }
    & .case-feature .mock-table > div:not(:first-child) > span:nth-child(2) {
      gap: 4px;
    }
    & .case-feature-copy {
      padding: 22px 20px 26px;
    }
    & .document-art {
      height: 390px;
    }
    & .document-sheet {
      width: 78%;
      max-width: 280px;
      padding: 24px;
    }
    & .document-sheet strong {
      margin-block: 26px 18px;
      font-size: 1.625rem;
    }
    & .document-sheet b {
      padding-top: 22px;
      font-size: 0.5625rem;
    }
    & #contact :is(.lead-form-card, .direct-card) {
      padding: 24px 18px;
    }
  }
}

@media (width <= 700px) {
  body.home-page {
    & .hero-copy :is(.hero-proof, .hero-next) {
      display: none;
    }
    & .hero .container {
      gap: 24px;
    }
    & .hero .hero-actions {
      gap: 4px;
    }
    & .hero .button-secondary {
      background: none;
      box-shadow: none;
      border-color: transparent;
    }
    & #reliability .ownership-head > span:last-child,
    & .document-sheet .document-stamp {
      display: none;
    }
    & #contact .lead-form-card {
      padding: 20px 0;
    }
    & #contact .direct-card {
      padding: 24px 0;
    }
  }
}
/* Сокращение движения по настройке пользователя. */
@media (prefers-reduced-motion: reduce) {
  body.home-page
    :is(
      .layer-gem,
      .layer-surface,
      .service-feature,
      .case-feature,
      .text-link > span
    ) {
    transition: none;
  }
}
/* Адаптация для (forced-colors: active). */
@media (forced-colors: active) {
  body.home-page {
    &
      main
      :is(.glass, .document-sheet, .network-node, .network-hub, .browser-mock) {
      border-color: CanvasText;
    }
    & .network-connections path {
      stroke: CanvasText;
    }
  }
}
