/* The homepage shares an entry document with the console and pricing routes. */
#root > div:has(> main > #quickstart):has(> main > #faq) {
  --ym-navy: #142542;
  --ym-muted: #526481;
  --ym-edge: #dce7f7;
  --ym-paper: #f7faff;
  --ym-shadow: 0 2px 5px #253c6509, 0 18px 44px -26px #223e7940;
  color: var(--ym-navy);
}

#root > div:has(> main > #quickstart):has(> main > #faq) > header {
  border-color: #dce7f5;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 1px 10px #1a376708;
}

main:has(> #quickstart):has(> #faq) {
  > section:first-child {
    position: relative;
    isolation: isolate;
    background:
      radial-gradient(ellipse at 78% 38%, #e0eaff 0%, transparent 56%),
      radial-gradient(ellipse at 16% 8%, #eff7ff 0%, transparent 50%),
      linear-gradient(170deg, #fbfdff 20%, #f5f8fe 100%);
  }

  > section:first-child > :first-child {
    opacity: .62;
  }

  > section:first-child .grid-bg {
    mask-image: radial-gradient(ellipse at 74% 42%, black 2%, transparent 72%);
    background-size: 37px 37px;
  }

  > section:first-child > .container-page {
    padding-block: clamp(56px, 7vw, 102px) clamp(64px, 8vw, 116px);
  }

  > section:first-child > .container-page > .grid {
    gap: clamp(34px, 5vw, 76px);
  }

  h1 {
    font-size: clamp(28px, 4vw, 56px);
    line-height: 1.1;
    letter-spacing: -.05em;
    color: var(--ym-navy);
  }

  > section:first-child h1 .text-brand {
    color: #105de0;
  }

  > section:first-child .ymneo-hero-subject {
    white-space: nowrap;
  }

  > section:first-child .badge-brand {
    border-color: #cddff9;
    background: rgb(255 255 255 / 72%);
    color: #184a9e;
    padding: 6px 11px;
  }

  > section:first-child .lead {
    color: var(--ym-muted);
    line-height: 1.74;
  }

  > section:first-child .btn-lg {
    min-height: 46px;
  }

  > section:first-child .btn-ghost {
    border-color: #cdddf3;
    background: rgb(255 255 255 / 78%);
  }

  > section:first-child .btn-primary,
  > section:nth-of-type(4) .btn-primary {
    background: linear-gradient(180deg, #1d70f5, #0d59db);
    box-shadow: 0 2px 3px #0e53cf29, 0 12px 22px -13px #1a60dc8c;
  }

  > section:first-child .btn-primary:hover,
  > section:nth-of-type(4) .btn-primary:hover {
    background: linear-gradient(180deg, #1969ed, #084ac0);
  }

  > section:first-child .animate-rise:has(> h1) > :last-child {
    margin-top: 23px;
    border-color: #d5e3f8;
    background: rgb(255 255 255 / 85%);
  }

  > section:first-child .animate-rise:has(> .card)::before {
    position: absolute;
    z-index: -1;
    inset: -37px -30px -31px;
    border: 1px solid #cfddf582;
    border-radius: 37px;
    background: linear-gradient(148deg, #ffffff6b, #d9e6ff50 95%);
    box-shadow: inset 0 1px 0 #fff9;
    content: "";
    transform: rotate(-3deg);
    pointer-events: none;
  }

  > section:first-child .card {
    border-color: #cedcf2;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 2px 9px #1c3c7b0c, 0 24px 52px -27px #162d6855;
  }

  > section:first-child .card > :first-child {
    background: linear-gradient(180deg, #f9fbff, #f3f7fe);
    border-color: #dce6f6;
  }

  > section:first-child .card > :nth-child(2) {
    padding: clamp(15px, 2vw, 25px);
  }

  > section:first-child .card > :nth-child(2) > :last-child {
    background: #f5f8fe;
    border-color: #e0e9f7;
  }

  > section:first-child .card > :nth-child(2) > :last-child > :last-child > div {
    background: linear-gradient(90deg, #c3d9fc, #e0eafa);
  }

  > section:first-child .card > :last-child {
    background: #f8faff;
  }

  > section:first-child .card .text-faint {
    color: #526481;
  }

  > section:first-child .card + div {
    bottom: -36px;
    left: auto;
    right: 18px;
    border-color: #dce7f7;
    box-shadow: var(--ym-shadow);
  }

  > section:nth-of-type(2) {
    background: linear-gradient(180deg, #f1f6fd, #f9fbff);
    border-color: var(--ym-edge);
  }

  > section:nth-of-type(2) .container-page {
    padding-block: 24px;
  }

  > section:nth-of-type(2) .container-page > div > :first-child {
    border-color: #cfe0f6;
    color: #115acf;
    background: #fff;
    box-shadow: 0 2px 5px #2843730b;
  }

  > section:nth-of-type(3) .card,
  > section:nth-of-type(4) .card {
    border-color: var(--ym-edge);
    box-shadow: var(--ym-shadow);
  }

  > section:nth-of-type(4) {
    border-top: 1px solid var(--ym-edge);
  }

  > section:nth-of-type(3) .card,
  > section:nth-of-type(4) .grid > *,
  > #quickstart .grid > * {
    min-width: 0;
  }

  > #quickstart {
    background: radial-gradient(ellipse at 79% 41%, #1b3159, transparent 66%), #101b30;
  }

  > #faq {
    background: linear-gradient(180deg, #f6f9fd, #fff);
    border-color: var(--ym-edge);
  }

  > section:last-child > div {
    background-color: #122449;
  }

  a:focus-visible,
  button:focus-visible {
    outline: 2px solid #2270ee;
    outline-offset: 4px;
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  main:has(> #quickstart):has(> #faq) .btn {
    transition: transform 170ms ease, box-shadow 170ms ease, background-color 170ms ease;
  }

  main:has(> #quickstart):has(> #faq) .btn:hover {
    transform: translateY(-2px);
  }

  main:has(> #quickstart):has(> #faq) .btn:active {
    transform: translateY(0);
  }
}

@media (max-width: 1023px) {
  main:has(> #quickstart):has(> #faq) > section:first-child .animate-rise:has(> .card) {
    margin-inline: auto;
    max-width: 640px;
  }
}

@media (max-width: 639px) {
  main:has(> #quickstart):has(> #faq) {
    > section:first-child > .container-page { padding-block: 37px 48px; }
    > section:first-child h1 { font-size: clamp(28px, 8.1vw, 38px); }
    > section:first-child .lead { font-size: 15px; line-height: 1.68; margin-top: 17px; }
    > section:first-child .animate-rise:has(> h1) > div { margin-top: 20px; }
    > section:first-child .animate-rise:has(> .card)::before { inset: -14px -8px; border-radius: 24px; transform: rotate(-2deg); }
    > section:first-child .card > :last-child > div { padding-inline: 8px; overflow-wrap: anywhere; }
    > section:nth-of-type(2) .container-page { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
    > section:nth-of-type(2) .container-page > div { gap: 7px; }
    > section:nth-of-type(2) .container-page > div > :first-child { flex-shrink: 0; width: 29px; height: 29px; }
    > section:nth-of-type(2) .container-page > div > :last-child { min-width: 0; overflow-wrap: anywhere; }
    > section:nth-of-type(4) .grid > div:first-child .flex:has(> .btn) { flex-wrap: wrap; }
    > #quickstart pre { overflow-x: auto; }
  }
}

@media (prefers-reduced-motion: reduce) {
  main:has(> #quickstart):has(> #faq) > section:first-child .animate-rise { animation: none; }
}

main:has(> #quickstart):has(> #faq) > section:first-child[data-ym-animated] .animate-rise {
  animation: none;
}
