/* Shared responsive behavior for every language and service page. */
.mobile-nav-toggle {
  display: none;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .nav-inner {
    padding-inline: 24px;
  }

  .split,
  .founders {
    grid-template-columns: 1fr !important;
  }

  .grid,
  .rich-grid,
  .process {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .founder-portrait-panel {
    max-width: 720px;
  }
}

@media (max-width: 1023px) {
  body.mobile-nav-open {
    overflow: hidden;
  }

  .nav {
    z-index: 20;
  }

  .nav-inner {
    position: relative;
    height: 72px;
    min-width: 0;
  }

  .brand {
    min-width: 0;
    max-width: calc(100% - 150px);
    white-space: nowrap;
  }

  .brand span {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }

  .mobile-language {
    display: block !important;
    width: 58px;
    min-height: 40px;
    padding: 0 7px;
    border-color: rgba(110, 168, 255, 0.28);
    background: rgba(8, 15, 18, 0.9);
    font-weight: 750;
  }

  .mobile-nav-toggle {
    width: 42px;
    height: 42px;
    display: inline-flex;
    flex: 0 0 42px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    border: 1px solid rgba(110, 168, 255, 0.28);
    border-radius: 8px;
    background: rgba(8, 15, 18, 0.9);
    color: #ffffff;
    cursor: pointer;
  }

  .mobile-nav-toggle span {
    width: 17px;
    height: 1.5px;
    display: block;
    border-radius: 2px;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
  }

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

  .mobile-nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

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

  .mobile-nav-toggle:focus-visible,
  .mobile-language:focus-visible {
    outline: 2px solid #6ea8ff;
    outline-offset: 3px;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 14px;
    right: 14px;
    max-height: calc(100svh - 96px);
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(110, 168, 255, 0.24);
    border-radius: 8px;
    background: rgba(6, 13, 16, 0.98);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.48);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  }

  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-links > a,
  .nav-group > a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    font-weight: 700;
  }

  .nav-links > a:hover,
  .nav-links > a:focus-visible,
  .nav-group > a:hover,
  .nav-group > a:focus-visible {
    background: rgba(110, 168, 255, 0.1);
  }

  .nav-group {
    width: 100%;
  }

  .nav-menu {
    position: static !important;
    min-width: 0;
    display: grid !important;
    gap: 2px;
    padding: 2px 0 8px 12px;
    border: 0;
    border-left: 1px solid rgba(110, 168, 255, 0.2);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .nav-menu a {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: rgba(247, 243, 234, 0.68);
  }

  .language-links {
    display: flex !important;
    justify-content: center;
    gap: 12px;
    margin-top: 4px;
    padding: 13px 12px 5px;
    border-top: 1px solid rgba(247, 243, 234, 0.1);
    font-size: 0.85rem;
  }
}

@media (max-width: 767px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  .hero-content,
  .section-inner,
  .footer-inner {
    width: min(100% - 28px, var(--max)) !important;
  }

  .split,
  .grid,
  .rich-grid,
  .metric-row,
  .process,
  .why,
  .legal-grid,
  .founders,
  .founder-credentials,
  .founder-highlights {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .card,
  .metric,
  .step,
  .why-item,
  .founder-card,
  .contact-panel,
  .legal-panel {
    width: 100%;
    min-width: 0;
    border-radius: 8px;
  }

  .founders {
    align-items: start;
  }

  .founder-portrait-panel {
    width: 100%;
    max-width: 620px;
    order: 1;
  }

  .founder-copy {
    min-width: 0;
    order: 2;
  }

  .founder-portrait {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: center top;
  }

  .actions {
    width: 100%;
    align-items: stretch;
  }

  .button {
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }

  .breadcrumb {
    overflow-wrap: anywhere;
  }

  h1,
  h2,
  h3,
  p,
  li,
  a {
    overflow-wrap: anywhere;
  }

  section {
    padding-block: 72px;
  }

  .service-hero {
    min-height: 0;
    padding-block: 118px 64px;
  }

  .footer-inner {
    grid-template-columns: 1fr !important;
  }

  .footer-links {
    justify-content: flex-start !important;
  }
}

@media (max-width: 480px) {
  .nav-inner {
    padding-inline: 14px !important;
  }

  .brand {
    max-width: calc(100% - 122px);
    font-size: 0.91rem;
  }

  .mobile-language {
    width: 54px;
  }

  .mobile-nav-toggle {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .hero-content {
    padding-top: 112px;
  }

  h1 {
    font-size: clamp(2.35rem, 11vw, 3rem) !important;
    line-height: 0.98 !important;
  }

  h2 {
    font-size: clamp(2rem, 9vw, 2.7rem);
    line-height: 1.02;
  }

  .hero-subtitle,
  .lead {
    font-size: 1rem;
  }

  .button {
    width: 100%;
    min-height: 50px;
    padding-inline: 16px;
  }

  .card,
  .metric,
  .step,
  .why-item,
  .founder-card,
  .contact-panel,
  .legal-panel {
    padding: 20px !important;
  }

}
