/* Lake Foundry — mobile layer. Loads after lake-foundry.css.
   Media queries only; no new tokens, no new colours. Page-level grids are
   reached through data-m hooks because they are authored as inline styles,
   which a stylesheet can only override with !important.
   data-m="stack" -> one column   data-m="pair" -> two columns, then one */

.lf-nav__toggle { display: none; }

@media (max-width: 820px) {
  .lf-column { padding-inline: var(--space-4); }
  .lf-section { padding-block: var(--space-8); }

  /* Navigation: lockup + burger on one line, links collapse */
  .lf-nav { justify-content: space-between; gap: var(--space-4); }
  .lf-nav__toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0 10px;
    background: none;
    border: 1px solid var(--line-hairline);
    color: var(--ink);
    cursor: pointer;
  }
  .lf-nav__toggle:hover { border-color: var(--line-strong); }
  .lf-nav__toggle span { display: block; height: 1px; background: currentColor; }
  .lf-nav__links { display: none; }
  .lf-nav[data-nav-open="true"] {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .lf-nav[data-nav-open="true"] .lf-nav__links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    margin-block-start: var(--space-4);
    border-block-start: 1px solid var(--line-hairline);
  }
  .lf-nav[data-nav-open="true"] .lf-nav__links > li {
    border-block-end: 1px solid var(--line-hairline);
  }
  .lf-nav[data-nav-open="true"] .lf-navlink {
    display: flex;
    align-items: center;
    min-height: 52px;
  }
  .lf-nav[data-nav-open="true"] .lf-nav__links > li:last-child {
    border-block-end: 0;
    padding-block-start: var(--space-4);
  }
  .lf-nav[data-nav-open="true"] .lf-btn { box-sizing: border-box; width: 100%; justify-content: center; min-height: 48px; }

  /* Hero */
  .lf-hero__title { font-size: clamp(34px, 9vw, 48px) !important; line-height: 1.02 !important; }
  .lf-hero__inner { padding-block: var(--space-8); }
  .lf-hero__lede { font-size: 18px; line-height: 28px; }
  .lf-hero__inner .lf-btn { box-sizing: border-box; width: 100%; justify-content: center; min-height: 48px; }

  /* Page grids */
  [data-m="stack"] { grid-template-columns: minmax(0, 1fr) !important; }
  [data-m="pair"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  [data-m] > * { grid-column: auto !important; }
  [data-m] figure img { min-height: 0 !important; aspect-ratio: 4 / 3 !important; }

  .lf-industries, [data-m="list"] {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
    grid-auto-flow: row !important;
    columns: 1 !important;
  }

  /* Quote band */
  .lf-quote-band__inner { flex-direction: column; align-items: flex-start; gap: var(--space-5); }
  .lf-quote-band__title { font-size: 34px; line-height: 36px; }
  .lf-quote-band .lf-btn { box-sizing: border-box; width: 100%; justify-content: center; min-height: 48px; }
  .lf-quote-band__inner > * { max-width: 100%; }

  /* Tables scroll rather than squeeze */
  .lf-spec { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 520px) {
  [data-m="pair"] { grid-template-columns: minmax(0, 1fr) !important; }
  .lf-hero__title { font-size: clamp(30px, 10vw, 38px) !important; }
}
