/* ==========================================================================
   Assistive Engineering Solutions — Responsive Rules
   Mobile-first. Breakpoints:
   Mobile:  up to 640px
   Tablet:  641px – 1024px
   Desktop: 1025px and above
   ========================================================================== */

h1 { font-size: var(--text-h1-mobile); }
h2 { font-size: var(--text-h2-mobile); }

section { padding: var(--space-xl-mobile) var(--space-md); }

/* Logo scales down on mobile so it doesn't crowd the header next to
   the hamburger menu button; full size from tablet width up. */
.logo-img {
  width: 140px;
}

.menu-toggle { display: inline-flex; align-items: center; justify-content: center; }

.main-nav { display: none; width: 100%; }

.main-nav[data-open="true"] {
  display: block;
  position: absolute; top: 100%; left: 0; right: 0;
  background-color: var(--color-bg);
  border-bottom: var(--border-width-hairline) solid var(--color-border);
  box-shadow: 0 8px 16px rgba(11, 60, 155, 0.12);
  z-index: var(--z-mobile-menu);
}

.main-nav[data-open="true"] ul { flex-direction: column; gap: 0; padding: var(--space-md); }
.main-nav[data-open="true"] li { padding: var(--space-sm) 0; }

.header-inner { position: relative; }

@media (min-width: 641px) {
  h1 { font-size: var(--text-h1); }
  h2 { font-size: var(--text-h2); }
  section { padding: var(--space-xl) var(--space-lg); }
  .logo-img { width: 180px; }

  .global-lang-select {
    font-size: 0.8rem;
    padding: 0.4em 0.6em;
    max-width: 130px;
  }

  .grid-auto { grid-template-columns: repeat(2, 1fr); }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
}

@media (min-width: 1025px) {
  .menu-toggle { display: none; }
  .main-nav { display: block; position: static; width: auto; border-bottom: none; box-shadow: none; }
  .main-nav ul { flex-direction: row; gap: var(--space-lg); padding: 0; }
  .grid-auto { grid-template-columns: repeat(3, 1fr); }
  section { padding: var(--space-xl) var(--space-lg); }

  /* Hero: side-by-side at desktop, text ~45%, illustration ~55%,
     so the illustration is large and visually dominant rather than a
     small decorative element. Stacks naturally below this width. */
  .hero-grid {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-xl);
  }
  .hero-text {
    flex: 0 0 45%;
    max-width: 45%;
  }
  .hero-visual {
    flex: 0 0 55%;
    max-width: 55%;
  }
  .hero-illustration {
    max-width: 100%;
  }
}

@media (min-width: 1400px) {
  body { font-size: 1.05rem; }
}
