/* Responsive navigation and reading layouts shared by every QUALON page. */
.menu-toggle { display: none; }
img { max-width: 100%; }
main, .wrap, .section, .section > *, .solution-grid > *, .sector-apps > * { min-width: 0; }
.button { max-width: 100%; }
.table-wrap { max-width: 100%; overscroll-behavior-x: contain; }
header nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }

@media (max-width: 1000px) {
  html { scroll-padding-top: 100px; }
  header {
    position: sticky; top: 0; z-index: 50; max-width: none;
    padding: 16px max(20px, env(safe-area-inset-right)) 16px max(20px, env(safe-area-inset-left));
    gap: 12px; justify-content: space-between; background: #060608;
  }
  header .brand { min-width: 0; min-height: 44px; }
  header .brand .qualon-mark { font-size: 30px; }
  .nav-ready .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 44px; padding: 10px 12px; border: 1px solid #ffffff40;
    background: transparent; color: #fff; font-size: 14px; cursor: pointer;
    touch-action: manipulation;
  }
  .menu-toggle svg { width: 20px; height: 20px; }
  .nav-ready nav {
    display: none; position: absolute; top: 100%; inset-inline: 0;
    margin: 0; padding: 12px 20px 20px; width: 100%; background: #060608;
    border-bottom: 1px solid #ffffff40; box-shadow: 0 18px 30px #0008;
    max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px);
    overflow-y: auto; overscroll-behavior: contain;
  }
  .nav-ready.nav-open nav { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .nav-ready nav a { display: flex; align-items: center; min-height: 48px; padding: 12px 14px; font-size: 16px; }
  .nav-ready nav .nav-cta { width: auto; margin-top: 10px; justify-content: center; }
  .nav-ready nav a:focus-visible { outline-offset: -3px; }
  .skip:focus { position: fixed; z-index: 100; }
}

@media (max-width: 800px) {
  .photo-orbit { min-height: 0; }
  .photo-orbit .orbit-visual {
    position: relative; inset: auto; z-index: 0; flex: none; width: 100%;
    height: clamp(220px, 65vw, 410px);
  }
  .photo-orbit .orbit-visual::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(0deg, #060608 0%, transparent 35%);
  }
  .photo-orbit::after { background: none; }
  .photo-orbit .satellite-photo { object-position: 70% center; transform-origin: 70% center; }
  .photo-orbit .orbit-content { position: relative; padding-top: 0; padding-bottom: 28px; text-shadow: none; }
  .photo-orbit .orbit-content .eyebrow { margin-bottom: 18px; }
  .photo-orbit .orbit-content h1 { font-size: clamp(36px, 8vw, 56px); line-height: 1.06; }
  .photo-orbit .orbit-content .lead { font-size: 18px; margin: 20px 0; }
  .photo-orbit .orbit-content .button { margin-top: 4px; }
  .photo-orbit .orbit-bottom { align-items: flex-start; gap: 16px; padding-bottom: 12px; }
  .photo-orbit .orbit-bottom button { min-height: 44px; font-size: 14px; touch-action: manipulation; }
  .photo-orbit .orbit-caption { font-size: 12px; letter-spacing: .1em; }
  .photo-orbit .orbit-credit { margin-top: 0; padding-bottom: 28px; line-height: 1.6; }
}

@media (max-width: 700px) {
  body { font-size: 16px; line-height: 1.65; }
  .wrap {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
  h1, h2, h3, .eyebrow, .button, .related a, .node-flow span { overflow-wrap: anywhere; }
  h1, .subhero h1, .sector-hero h1, .solution-intro h1, .q-intro h1 { font-size: clamp(34px, 9vw, 48px); line-height: 1.1; }
  h2, .detail h2, .ranch-content h2, .observation-banner h2 { font-size: clamp(28px, 7.8vw, 40px); line-height: 1.14; }
  h3, .feature-list h3, .q-gallery h3, .catalogue-group > h3 { font-size: 25px; line-height: 1.2; }
  .domain-hero h1 { font-size: clamp(44px, 12vw, 64px); }
  .domain-hero h2, .solution-intro h2 { font-size: clamp(28px, 7.5vw, 38px); }
  .solution-card h3, .domain-card h3 { font-size: 34px; }
  .eyebrow { font-size: 12px; line-height: 1.7; letter-spacing: .1em; margin-bottom: 20px; }
  .lead, .feature-list p { font-size: 18px; line-height: 1.6; }
  .section { padding-top: 52px; padding-bottom: 52px; }
  .subhero { padding-top: 36px; padding-bottom: 44px; }
  .section-heading { margin-bottom: 28px; }
  .back { min-height: 44px; display: inline-flex; align-items: center; margin-bottom: 24px; }
  .button { min-height: 48px; gap: 12px; padding: 14px 18px; font-size: 16px; line-height: 1.4; text-align: left; touch-action: manipulation; }
  .actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin-top: 24px; }
  .actions .text-link { margin-top: 0; padding: 12px 0; }
  .hero-foot { flex-wrap: wrap; font-size: 12px; letter-spacing: .08em; }
  .solution-grid, .sector-apps, .node-grid, .sectors, .plans, .ranch-points, .stack, .feature-list { grid-template-columns: minmax(0, 1fr); }
  .solution-grid, .sector-apps, .feature-list { gap: 24px; margin-top: 28px; }
  .solution-intro { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .solution-intro .button { margin-top: 4px; }
  .solution-card > div, .visual-sector > div, .sector-apps article > div { padding: 22px; }
  .solution-card p, .sector-apps p, .sector p { font-size: 16px; }
  .solution-card > div > span, .sector-bottom { font-size: 14px; }
  .sector-apps a { display: inline-flex; align-items: center; min-height: 44px; }
  .visual-sector > img, .catalogue-group .visual-sector > img, .sector-apps img { height: auto; aspect-ratio: 16/9; object-fit: cover; }
  .sector { min-height: 0; }
  .sector-hero { min-height: 0; padding-top: 28px; padding-bottom: 64px; }
  .sector-hero .lead { color: #e4e4e8; }
  .sector-hero { background-image: linear-gradient(90deg, #060608e8, #0606089c), linear-gradient(0deg, #060608, transparent 75%), var(--scene-mobile, var(--scene)); }
  .image-label { font-size: 12px; line-height: 1.5; right: 20px; bottom: 16px; max-width: calc(100% - 40px); }
  .domain-card, .four-solutions .domain-card { min-height: 380px; }
  .domain-card > div { padding: 24px; }
  .stack article, .stack article + article { padding: 24px 0; border-left: 0; border-top: 1px solid var(--line); }
  .stack article:first-child { border-top: 0; }
  .plans { gap: 28px; margin-top: 30px; }
  .contact { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .contact > div + div { padding-top: 12px; }
  .contact a { overflow-wrap: anywhere; }
  .ranch-content { padding-top: 64px; padding-bottom: 48px; }
  .ranch-points { margin-top: 32px; }
  .ranch-points > div { padding: 22px 0; border-bottom: 1px solid var(--line); }
  .ranch-points p { max-width: none; }
  .ranch-picture > span { font-size: 12px; top: 16px; right: 20px; max-width: calc(100% - 40px); }
  .node-grid article { padding: 24px 0; }
  .node-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 28px 0; }
  .node-flow span { padding: 16px; font-size: 16px; }
  .scope { padding: 20px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  th, td { padding: 14px; }
  summary { font-size: 18px; padding-block: 4px; }
  .source-links { gap: 12px 20px; }
  .source-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .related a, .sector-jumps a { min-height: 44px; font-size: 14px; }
  .q-gallery { gap: 24px; margin-top: 28px; }
  .q-gallery img { height: auto; }
  footer { display: block; padding-bottom: max(28px, env(safe-area-inset-bottom)) !important; }
  footer > div + div { text-align: left; margin-top: 24px; gap: 4px; }
  footer a { padding-block: 10px; }
  footer span { overflow-wrap: anywhere; }
  footer p { font-size: 13px; }
}

@media (max-width: 380px) {
  header .brand .qualon-mark { font-size: 27px; }
  .nav-ready .menu-toggle { gap: 7px; padding-inline: 10px; }
  .node-flow { grid-template-columns: minmax(0, 1fr); }
  .photo-orbit .orbit-content .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .satellite-photo { will-change: auto; }
}
