.contact-layout > *,
.contact-form,
.form-grid,
.field,
.field input,
.field select,
.field textarea {
  min-width: 0;
}

.tabs { max-width: 100%; }

.nav-backdrop {
  position: fixed;
  z-index: 1001;
  inset: var(--header-h) 0 0;
  background: rgba(16, 43, 67, .38);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
}

.nav-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

body.nav-open {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

body.nav-open .site-header { position: fixed; inset: 0 0 auto; width: 100%; }
body.nav-open .mobile-nav-drawer { touch-action: pan-y; }

.mobile-nav-drawer { display: none; }

@media (max-width: 1080px) {
  .hero-grid,
  .page-hero .container {
    grid-template-columns: 1fr;
  }

  .hero-visual { max-width: 760px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1380px) {
  .header-inner > .desktop-nav { display: none; }
  .header-inner > .menu-toggle { display: grid; order: 0; flex: 0 0 auto; }
  .header-inner > .brand { order: 1; flex: 0 1 auto; }
  .header-inner > .header-actions { order: 2; z-index: 2; margin-left: auto; }
  .header-actions > .btn { display: none; }

  .mobile-nav-drawer {
    --drawer-top: var(--header-h);
    position: fixed;
    z-index: 1002;
    top: var(--drawer-top);
    bottom: 0;
    left: 0;
    display: grid;
    width: min(88vw, 420px);
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - var(--drawer-top));
    align-content: start;
    gap: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 22px 20px calc(30px + env(safe-area-inset-bottom));
    border-right: 1px solid var(--border-default);
    background: var(--surface-primary);
    box-shadow: var(--shadow);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(-104%, 0, 0);
    transition: transform .28s cubic-bezier(.22, 1, .36, 1), visibility .28s;
  }

  .mobile-nav-drawer.is-open {
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
  }

  .mobile-nav-group {
    display: grid;
    gap: 2px;
    padding: 18px 0;
    border-top: 1px solid var(--border-muted);
  }

  .mobile-nav-group:first-child { padding-top: 4px; border-top: 0; }
  .mobile-nav-heading { padding: 0 12px 7px; color: var(--text-muted); font-family: var(--mono); font-size: .69rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

  .mobile-nav-drawer a {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 700;
    text-decoration: none;
  }

  .mobile-nav-drawer a:hover,
  .mobile-nav-drawer a:focus-visible,
  .mobile-nav-drawer a[aria-current="page"] {
    background: var(--surface-secondary);
    color: var(--text-primary);
    box-shadow: none;
  }

  .mobile-nav-drawer .mobile-nav-group > a { padding-left: 12px; }
  .nav-backdrop { top: var(--drawer-top, var(--header-h)); }
}

@media (max-width: 760px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  .brand img { width: 150px; }
  .header-inner { gap: 8px; }
  .lang-switch button { min-width: 32px; }
  .grid-2,
  .grid-3,
  .grid-4,
  .split,
  .contact-layout,
  .footer-grid { grid-template-columns: 1fr; }
  .roadmap { grid-template-columns: 1fr; }
  .roadmap li { padding: 8px 8px 8px 26px; border-top: 0; border-left: 2px solid var(--border-default); }
  .roadmap li::before { top: 14px; left: -7px; }
  .form-grid { grid-template-columns: 1fr; }
  .field--full { grid-column: auto; }
  .video-card { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .page-hero { padding-top: 54px; }
  .mobile-nav-drawer { --drawer-top: 68px; max-height: calc(100dvh - 68px); }
  .nav-backdrop { top: 68px; }
  .header-inner > .brand img { width: 150px; }
  .header-inner > .header-actions { gap: 5px; }
  .header-inner > .header-actions .lang-switch button { display: grid; width: 44px; min-width: 44px; height: 44px; place-items: center; }
}

@media (max-width: 430px) {
  .header-inner > .brand img { width: 96px; }
  .header-inner { gap: 5px; }
  .header-inner > .header-actions { flex: 0 0 auto; }
  .header-inner > .menu-toggle { width: 44px; height: 44px; }
  .header-inner > .header-actions .lang-switch { gap: 0; padding: 0; border: 0; }
  .header-inner > .header-actions .lang-switch button { width: 44px; min-width: 44px; height: 44px; padding: 0; border: 0; pointer-events: auto; cursor: pointer; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
