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

section[id] {
  scroll-margin-top: 16px;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 4px;
}

@media (max-width: 1180px) {
  header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding: 12px 20px;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--line);
    max-height: 100vh;
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  header .h-lockup {
    grid-area: 1 / 1;
    min-height: 44px;
    justify-self: start;
  }

  header:not(.menu-ready) {
    position: sticky;
  }

  header .nav-toggle {
    grid-area: 1 / 2;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 88px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--mint-muted);
    border-radius: 2px;
    background: var(--bg-panel);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
  }

  header.menu-ready .nav-toggle {
    display: inline-flex;
  }

  .nav-toggle svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  header .nav-cta {
    grid-area: 2 / 1;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 13px;
  }

  header .lang-switch {
    grid-area: 2 / 2;
    justify-self: end;
    gap: 2px;
    margin: 0;
  }

  .lang-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }

  header nav.primary-nav {
    grid-area: 3 / 1 / auto / -1;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }

  header.menu-ready:not(.menu-open) nav.primary-nav {
    display: none;
  }

  header .nav-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  header .nav-link.active,
  header .nav-link:hover {
    background: var(--bg-panel);
    color: var(--mint);
  }

  section:first-of-type {
    padding-top: 164px;
  }

  #hero {
    padding-top: 164px;
  }

  #hero:has(.hero-title) {
    min-height: 100svh;
    padding-bottom: 100px;
  }
}

@media (max-width: 700px) {
  section {
    padding-right: 20px;
    padding-left: 20px;
    overflow-wrap: anywhere;
  }

  .hero-text,
  .hero-content,
  .who-content,
  .principle-body,
  #consulting .consulting-text {
    flex-basis: 100%;
    min-width: 0;
    width: 100%;
  }

  .mission-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  }

  .module-grid,
  .axes-grid,
  .track-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  }

  .comp-grid,
  .expertise-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  }

  .hero-photo,
  .who-photo {
    max-width: 100%;
  }

  .btn-primary,
  .btn-secondary,
  .profile-chip {
    min-height: 44px;
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }

  input.field-input,
  textarea.field-textarea,
  select.field-input,
  #contact .field-input,
  #contact .field-textarea {
    min-height: 44px;
    font-size: 16px;
  }

  footer {
    padding: 36px 20px;
    overflow-wrap: anywhere;
  }

  footer .foot-col {
    min-width: 0;
    max-width: 100%;
  }

  footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    max-width: 100%;
  }

  .social-links {
    flex-wrap: wrap;
    gap: 12px;
  }

  .social-links a {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }
}

@media (max-width: 380px) {
  .hero-title {
    font-size: 40px;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .scroll-dot {
    animation: none;
  }
}
