html {
  scroll-padding-top: 24px;
}

body {
  overflow-x: hidden;
}

.footer-grid {
  grid-template-columns: 1.4fr 1fr 1fr;
}

.legal .legal-link {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-underline-offset: 3px;
}

.legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.legal .language {
  flex: 0 0 auto;
}

.onprem-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 48px;
  margin-top: 30px;
  padding: 28px 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: #171717;
}

.onprem-card h3 {
  margin: 12px 0 8px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.onprem-card div > p:last-child {
  max-width: 72ch;
  margin: 0;
  color: #a8a8a8;
  font-size: 14.5px;
  line-height: 1.62;
}

.onprem-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #d6d6d6;
  white-space: nowrap;
  font: 400 9.5px/1.2 "Space Mono", monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.logos .portfolio-logo {
  width: 180px;
  min-height: 44px;
  justify-content: center;
  opacity: 1;
}

.logos-track,
.logos-sequence {
  display: flex;
  align-items: center;
}

.logos-track {
  width: 100%;
}

.logos-sequence {
  width: 100%;
  justify-content: space-between;
  gap: 28px;
}

.logos-sequence[aria-hidden="true"] {
  display: none;
}

.portfolio-logo img {
  display: block;
  width: auto;
  height: 28px;
  max-width: 170px;
  object-fit: contain;
  opacity: 0.7;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle,
.mobile-menu {
  display: none;
}

.nav-toggle {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(15, 15, 15, 0.35);
  place-content: center;
  gap: 6px;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.nav-toggle span {
  display: block;
  width: 17px;
  height: 1px;
  background: #f4f4f4;
  transition: transform 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1.3fr 1fr;
  }

  .nav-toggle {
    display: grid;
  }

  .mobile-menu {
    position: absolute;
    z-index: 20;
    top: 78px;
    left: 0;
    right: 0;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    background: rgba(17, 17, 17, 0.94);
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
  }

  .mobile-menu.open {
    display: flex;
    flex-direction: column;
  }

  .mobile-menu a {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 10px;
    color: #e6e6e6;
    text-decoration: none;
    font-size: 15px;
  }

  .mobile-menu a + a {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .mobile-menu a:active {
    background: rgba(255, 255, 255, 0.08);
  }

  .language-option {
    min-width: 40px;
    min-height: 36px;
  }

  .button {
    min-height: 46px;
  }

  .product-window {
    max-width: 100%;
  }

  .product-content {
    overflow: hidden;
  }

  .tabs {
    max-width: 100%;
  }

  .tabs button {
    min-height: 40px;
  }

  .directory-tools {
    scrollbar-width: none;
  }

  .directory-tools::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 640px) {
  .onprem-card {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 24px 22px;
  }

  .onprem-card h3 {
    font-size: 20px;
  }

  .onprem-badge {
    justify-self: start;
    white-space: normal;
  }

  .shell {
    width: calc(100% - 32px);
  }

  .hero {
    height: auto;
    min-height: 100svh;
  }

  .hero-film {
    object-position: 61% center;
  }

  .hero-shade {
    background: linear-gradient(180deg, rgba(15, 15, 15, 0.88), rgba(15, 15, 15, 0.32) 28%, rgba(15, 15, 15, 0.7) 64%, #0f0f0f 96%);
  }

  .nav {
    min-height: 76px;
  }

  .brand {
    font-size: 19px;
  }

  .language {
    margin-left: auto;
  }

  .nav-toggle {
    flex: 0 0 44px;
  }

  .hero-copy {
    padding: 52px 0 max(42px, env(safe-area-inset-bottom));
    gap: 18px;
  }

  .hero h1 {
    max-width: 12ch;
    font-size: clamp(42px, 13vw, 54px);
    line-height: 1.01;
  }

  .hero-lede {
    max-width: 37ch;
    font-size: 15px;
    line-height: 1.58;
  }

  .hero-actions {
    margin-top: 4px;
  }

  .hero-actions .button {
    min-height: 50px;
  }

  .proof-inner {
    gap: 24px;
  }

  .proof-inner > .eyebrow {
    max-width: none;
    flex: auto;
  }

  .logos {
    width: 100%;
    display: block;
    overflow: hidden;
    margin-inline: -16px;
    width: calc(100% + 32px);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  }

  .logos-track {
    width: max-content;
    animation: portfolio-slide 22s linear infinite;
    will-change: transform;
  }

  .logos-sequence {
    width: auto;
    flex: none;
    justify-content: flex-start;
    gap: 0;
  }

  .logos-sequence[aria-hidden="true"] {
    display: flex;
  }

  .logos span {
    font-size: 13px;
  }

  .logos .portfolio-logo {
    width: 176px;
    flex: 0 0 176px;
    justify-content: center;
    padding-inline: 16px;
  }

  @keyframes portfolio-slide {
    to {
      transform: translate3d(-50%, 0, 0);
    }
  }

  .section {
    padding: 68px 0;
  }

  .section h2 {
    margin-top: 18px;
    font-size: clamp(32px, 9vw, 40px);
    line-height: 1.08;
  }

  .split-intro {
    gap: 24px;
  }

  .split-intro > p,
  .muted {
    font-size: 14.5px;
  }

  .problem-grid,
  .use-grid {
    margin-top: 42px;
  }

  .product-window {
    margin-top: 34px;
  }

  .product-bar {
    gap: 10px;
  }

  .product-brand {
    font-size: 12px;
  }

  .cohort {
    white-space: normal;
    line-height: 1.4;
  }

  .tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(74px, 1fr));
    overflow-x: auto;
  }

  .tabs button {
    white-space: nowrap;
    padding-inline: 11px;
  }

  .stat {
    min-width: 0;
    padding: 19px 16px;
  }

  .stat strong {
    font-size: 23px;
  }

  .chart {
    padding: 24px 18px;
  }

  .directory-grid {
    padding-inline: 16px;
    gap: 9px;
  }

  .directory-grid .person {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .change-head {
    align-items: flex-start;
  }

  .change-head h3 {
    margin-bottom: 0;
  }

  .change-head span {
    display: none;
  }

  .change-row {
    padding-block: 15px;
  }

  .question-box {
    align-items: flex-start;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.5;
  }

  .ask-panel {
    padding: 22px 16px;
  }

  .ask-options {
    display: grid;
  }

  .ask-options button {
    min-height: 44px;
    border-radius: 12px;
    text-align: left;
    line-height: 1.35;
  }

  .feature-list {
    margin-top: 42px;
  }

  .feature {
    padding: 23px 0;
  }

  .feature h3 {
    font-size: 19px;
  }

  .feature p {
    font-size: 14px;
  }

  .use-card {
    padding: 24px 22px;
  }

  .compare-row {
    font-size: 13.5px;
  }

  .contact-form {
    padding: 24px 18px;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 16px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  footer {
    padding-top: 52px;
  }

  .legal {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: max(40px, env(safe-area-inset-bottom));
  }

  .legal .language {
    margin-left: 0;
  }
}

@media (max-width: 390px) {
  .shell {
    width: calc(100% - 24px);
  }

  .nav {
    gap: 8px;
  }

  .language-option {
    min-width: 36px;
    padding-inline: 8px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-lede {
    font-size: 14.5px;
  }

  .product-window {
    margin-inline: -4px;
  }

  .tabs {
    grid-template-columns: repeat(4, minmax(70px, 1fr));
  }

  .stat {
    padding-inline: 13px;
  }

  .stat strong {
    font-size: 21px;
  }

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

  .directory-grid > *:nth-child(n + 2) {
    display: none;
  }

  .feature {
    grid-template-columns: 30px 1fr;
    gap: 12px;
  }

  .contact-form {
    margin-inline: -2px;
  }
}

@media (hover: hover) {
  .mobile-menu a:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-film {
    display: none;
  }

  .product-brand i {
    animation: none;
  }

  .logos-track {
    animation: none;
  }

  .button,
  .nav-toggle span {
    transition: none;
  }
}
