/* Layout changes follow content needs, not individual device models. */
@media (max-width: 1200px) {
  .header-inner { gap: 20px; }
  .brand { font-size: 1.0625rem; }
  .brand-logo { width: 48px; height: auto; }
  nav#primary-navigation { gap: 20px; }
  nav ul { gap: 18px; }
  .process-ribbon { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 24px; }
  .process-ribbon li { border-top: 1px solid var(--line); }
  .process-ribbon { border-top: 0; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* Navigation switches before the desktop links become cramped. */
@media (max-width: 1100px) {
  :root { --header: 82px; }
  .mobile-toggle {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    min-width: 64px;
    min-height: 44px;
    border: 1px solid var(--line);
    padding: 10px 14px;
    background: var(--white);
    color: var(--ink);
    flex-shrink: 0;
    font-size: 0.9375rem;
  }
  .mobile-close {
    display: block;
    min-height: 48px;
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 8px 0 16px;
    background: var(--white);
    color: var(--blue);
    align-self: stretch;
    text-align: right;
    flex-shrink: 0;
  }
  .mobile-close:focus-visible { outline-offset: -3px; }
  nav#primary-navigation {
    display: none;
    position: fixed;
    inset: 0 0 0 auto;
    width: min(420px, 90vw);
    height: 100vh;
    height: 100dvh;
    padding: max(20px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom));
    background: var(--white);
    overflow-y: auto;
    overscroll-behavior: contain;
    align-items: stretch;
    justify-content: flex-start;
    flex-direction: column;
    gap: 20px;
    z-index: 50;
  }
  nav#primary-navigation.open { display: flex; animation: menu-enter var(--duration) ease-out; }
  body.menu-open { overflow: hidden; }
  .menu-backdrop {
    position: fixed;
    inset: 0;
    background: #061f3670;
    z-index: 40;
  }
  .menu-backdrop:not([hidden]) { display: block; }
  nav#primary-navigation ul { flex-direction: column; align-items: stretch; gap: 0; }
  nav#primary-navigation ul > li { border-bottom: 1px solid var(--line); }
  nav#primary-navigation ul a { display: block; font-size: 1.125rem; padding: 16px 0; white-space: normal; }
  .nav-pair { justify-content: space-between; }
  .submenu-toggle { width: 48px; height: 52px; flex-shrink: 0; font-size: 1.25rem; }
  .mega-menu { position: static; display: block; border: 0; padding: 0 0 16px; box-shadow: none; }
  .mega-menu[hidden] { display: none; }
  .mega-menu > div:first-child { display: none; }
  nav#primary-navigation .mega-menu > div:last-child a { padding: 12px; font-size: 1rem; }
  nav#primary-navigation > .button { flex-shrink: 0; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 48px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand { display: grid; grid-template-columns: 88px minmax(0, 1fr); column-gap: 24px; align-items: start; }
  .footer-logo { width: 88px; grid-row: 1 / 3; margin: 0; }
  .footer-brand h2 { margin-bottom: 12px; }
  .footer-brand p { grid-column: 2; margin-bottom: 8px; }
}

/* Tablet: give editorial content and the form comfortable full-width rows. */
@media (max-width: 900px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding: 48px var(--gutter) 36px; }
  .hero-copy h1 { font-size: clamp(2.5rem, 1.8rem + 3vw, 4rem); }
  .hero-copy p { font-size: 1.0625rem; }
  .hero-note { max-width: 620px; margin-top: 32px; }
  .hero-photo { min-height: 0; height: clamp(280px, 48vw, 430px); }
  .hero-photo img { object-position: center 48%; }
  .photo-caption { padding: 20px 28px; max-width: 90%; font-size: 1rem; }
  .page-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .page-hero { padding: 36px 0 44px; }
  .page-hero h1 { max-width: 22ch; }
  .page-hero img { max-height: 420px; aspect-ratio: 16 / 9; }
  .breadcrumb { margin-bottom: 24px; }
  .split, .split.reverse { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .split.reverse .split-copy { order: 0; }
  .split-copy { max-width: 720px; }
  .editorial-image { aspect-ratio: 3 / 2; max-height: 480px; }
  .resource-grid, .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .resource-grid > article:last-child, .principles > div:last-child { grid-column: 1 / -1; }
  .resource-grid > article:last-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; align-items: center; }
  .resource-grid > article:last-child .resource-copy { padding-top: 0; }
  .service-row { grid-template-columns: 32px minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; }
  .service-row .row-action { grid-column: 2 / -1; justify-self: start; }
  .service-row h3 { font-size: 1.35rem; }
  .industry-table article { grid-template-columns: 32px minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; }
  .industry-table h2 { font-size: 1.5rem; }
  .contact-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .contact-layout > aside { max-width: 700px; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .form-panel { padding: 32px; }
  .guide-grid, .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .legal-layout > aside { max-width: 650px; }
  .process-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .process-aside { position: static; }
  .process-aside h2 { font-size: var(--text-h2); }
  .process-aside nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
  .process-aside nav a { border-bottom: 1px solid var(--line); }
  .timeline { margin-left: 22px; padding-left: 36px; }
  .step-number { left: -58px; }
  .process-step { padding-bottom: 44px; }
  .process-step h2 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.15rem); }
  .band-row { flex-wrap: wrap; gap: 28px; }
  .band-row h2 { font-size: var(--text-h2); }
}

/* Phones: clear reading order, comfortable tap targets and natural card heights. */
@media (max-width: 620px) {
  :root { --header: 76px; --gutter: 20px; }
  .header-inner { gap: 12px; }
  .brand { font-size: 1rem; gap: 10px; }
  .brand-logo { width: 42px; height: auto; }
  .brand-sub { font-size: 0.625rem; letter-spacing: 0.2em; }
  .hero-copy { padding: 36px var(--gutter) 30px; }
  .hero-copy h1 { font-size: clamp(2.375rem, 1.65rem + 3.5vw, 3.1rem); }
  .hero-copy .eyebrow { font-size: 0.75rem; }
  .hero-copy p { font-size: 1rem; }
  .hero-actions { gap: 14px 22px; align-items: center; }
  .hero-note { margin-top: 28px; font-size: 0.8125rem; }
  .hero-photo { height: clamp(250px, 68vw, 360px); }
  .photo-caption { padding: 16px 20px; font-size: 0.9375rem; }
  .section-heading { margin-bottom: 32px; }
  .eyebrow { font-size: 0.75rem; margin-bottom: 18px; letter-spacing: 0.12em; }
  .page-hero { padding: 28px 0 36px; }
  .page-hero h1 { font-size: clamp(2.125rem, 1.45rem + 3.3vw, 2.75rem); }
  .page-hero img { aspect-ratio: 3 / 2; max-height: none; }
  .page-hero-grid { gap: 28px; }
  .breadcrumb { font-size: 0.8125rem; gap: 16px; }
  .editorial-image { aspect-ratio: 4 / 3; }
  .service-row { grid-template-columns: 28px minmax(0, 1fr); gap: 12px 16px; padding: 24px 0; }
  .service-row p { grid-column: 2; font-size: 1rem; }
  .service-row .row-action { display: inline-block; grid-column: 2; justify-self: start; font-size: 0.875rem; }
  .process-ribbon { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; margin: 32px 0; }
  .process-ribbon li { padding: 22px 0 0; }
  .process-ribbon span { margin-bottom: 12px; }
  .process-ribbon h3 { font-size: 1rem; }
  .industry-links { grid-template-columns: minmax(0, 1fr); margin: 24px 0; }
  .industry-links a { font-size: 1.25rem; padding: 18px 0; }
  .principles, .resource-grid, .detail-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .resource-grid > article:last-child { display: block; }
  .resource-grid > article:last-child .resource-copy { padding-top: 24px; }
  .principles > div:last-child, .resource-grid > article:last-child { grid-column: auto; }
  .principles h3, .resource-copy h3 { font-size: var(--text-h3); }
  .resource-copy { padding-top: 24px; }
  .resource-grid img { aspect-ratio: 3 / 2; }
  .industry-table article { grid-template-columns: 28px minmax(0, 1fr); gap: 12px 16px; padding: 28px 0; }
  .industry-table p { grid-column: 2; }
  .industry-table h2 { font-size: 1.375rem; }
  .process-aside nav { grid-template-columns: minmax(0, 1fr); }
  .process-aside nav a { padding-block: 12px; font-size: 0.9375rem; }
  .process-step p { font-size: 1rem; }
  .contact-band { padding: 44px 0; }
  .band-row { flex-direction: column; align-items: flex-start; }
  footer { padding-top: 48px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .footer-brand { grid-column: auto; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; }
  .footer-logo { width: 72px; }
  .footer-brand h2 { font-size: 1.5rem; }
  .footer-brand h2 span { font-size: 0.875rem; }
  footer h3 { font-size: 0.9375rem; margin-bottom: 12px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 12px; margin-top: 32px; padding-top: 16px; }
  .footer-bottom > div { gap: 24px; }
  .form-panel { padding: 24px 20px; }
  .form-panel h2 { font-size: 1.75rem; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .field { margin-bottom: 20px; }
  .scope-note { margin-top: 28px; }
  .legal-layout h2 { font-size: 1.5rem; }
  .legal-layout section { margin-bottom: 32px; }
  .error-number { font-size: 5rem; margin-bottom: 28px; }
  h2 br { display: none; }
}

@media (max-width: 370px) {
  :root { --gutter: 16px; }
  .brand { font-size: 0.9375rem; gap: 8px; }
  .brand-logo { width: 36px; height: auto; }
  .brand-sub { font-size: 0.5625rem; }
  .mobile-toggle { min-width: 58px; padding-inline: 10px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 10px; }
  .footer-brand { display: block; }
  .footer-logo { margin-bottom: 20px; }
  .form-panel { padding-inline: 16px; }
  nav#primary-navigation { width: 92vw; padding-inline: 20px; }
}

/* Short landscape screens must keep both menus independently scrollable. */
@media (max-height: 540px) and (min-width: 621px) {
  :root { --header: 72px; }
  .mega-menu { max-height: calc(100dvh - var(--header)); overflow-y: auto; }
  .process-aside { position: static; }
}
@keyframes menu-enter { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  nav#primary-navigation.open { animation: none; }
}
