/* Mobile QA fix wave 2026-11-23, builders FB5 and FB6: footer, Contact page and the home page's
   own sections. Loads after every other section file. Nothing here applies at 1316 and wider;
   the one rule from 1280 (footer columns, 1280 to 1315) only lets labels that would otherwise
   run into the next column wrap. The home hero rules apply only to short landscape screens
   (480 high or less). */

/* ================================================================ Footer tap targets (M1-03)
   Touch layouts (below 1280): every footer link and control is a 44px target with at least 8px
   to its neighbors. Rows grow a little; type, colors and order are unchanged. */
@media (max-width: 1279px) {
	/* Phone and email: 44px rows. */
	.foot__lines p + p { display: flex; flex-wrap: wrap; align-items: center; row-gap: 8px; }
	.foot__lines p + p > a { display: inline-flex; align-items: center; min-height: 44px; }
	/* Social squares: 44px (the invisible 4px extension that reached 44 is no longer needed). */
	.social { width: 44px; height: 44px; }
	.social::after { content: none; }
	/* Legal links: 44px rows, 8px between wrapped rows. */
	.foot__legal { row-gap: 8px; }
	.foot__legal a { display: inline-flex; align-items: center; min-height: 44px; }
	/* Pause animations: the button is 44px high; the drawn 30px pill moves to a pseudo element,
	   so it looks exactly as before. */
	.motion-toggle { position: relative; isolation: isolate; height: 44px; background: transparent; box-shadow: none; }
	.motion-toggle::after { content: none; }
	.motion-toggle::before {
		content: ""; position: absolute; inset: 7px 0; z-index: -1; border-radius: var(--r-pill);
		background: var(--c-white); box-shadow: inset 0 0 0 1px var(--ink-10);
		transition: background-color var(--dur-fast);
	}
	.motion-toggle:hover { background: transparent; }
	.motion-toggle:hover::before { background: var(--c-lav-soft); }
}
/* The address keeps its own line above phone and email (its 10px phone margin becomes the row
   gap). From 1024 to 1279 it used to run inline with them; there the taller rows would leave the
   email alone on a line after a dangling dot, so it takes its own line as it does from 768 to 1023. */
@media (max-width: 1279px) {
	.foot__lines p + p > .foot__addr { flex-basis: 100%; margin-bottom: 0; }
	.foot__lines p + p > .foot__sep--addr { display: none; }
}
@media (max-width: 767px) {
	/* Open footer group: 44px link rows at a 44px pitch (stacked rows may touch). */
	.fcol__links { gap: 0; }
}
@media (min-width: 768px) and (max-width: 1279px) {
	/* Link columns (17 to 20px links on tablets): 44px rows at a 44px pitch (stacked rows may touch). */
	.fcol__links, html.js .fcol:not(.is-open) .fcol__links { gap: 0; }
	.fcol__links a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
	.foot__legal { row-gap: 8px; }
}

/* ================================================================ Footer email at 320 and 340 (M1-04)
   Phone and email no longer fit on one line below 360: the separator dot is dropped and the
   email takes its own line, whole. Above 360 nothing changes. */
@media (max-width: 359px) {
	.foot__lines p + p { column-gap: 16px; }
	.foot__lines p + p > .foot__sep:not(.foot__sep--addr) { display: none; }
}

/* ================================================================ Contact form type (M1-02)
   iOS Safari zooms into any field under 16px. Fields, selects, textareas and their placeholders
   are 16px below 1024; heights, line heights, labels and help text are unchanged. */
@media (max-width: 1023px) {
	.ct-input, .ct-input::placeholder { font-size: 16px; }
}

/* ================================================================ Contact form below 360 (M1-07, MV1 9b)
   At 320 "Company (optional)" did not fit its half of the grid and the "Company name"
   placeholder was cut ("Company n"; "Company nam" up to 381). Below 382 Company and Phone each take the full row, so
   both labels sit on one line and the placeholder shows whole. First and Last name keep their
   pair ("Jane" and "Doe" fit with room to spare). 360 and wider are unchanged. */
@media (max-width: 381px) {
	.ct-grid > .ct-field--half:has([name="company"]), .ct-grid > .ct-field--half:has([name="phone"]) { grid-column: 1 / -1; }
}

/* ================================================================ Contact hero phone and email links (lead, FB6)
   The phone link was a 22px tall box (an invisible ::after reached 44px only below 768). Below
   1280 each link's own box is 44px tall: 11px block padding taken back by an 11px negative
   margin, so the lines do not move. The links sit in separate rows at least 54px tall, so the
   hit areas keep 10px or more between them. The old ::after is no longer needed. */
@media (max-width: 1279px) {
	a.ct-line__v { padding-block: 11px; margin-block: -11px; }
	a.ct-line__v::after { content: none; }
}

/* ================================================================ Contact details email at 320 (M1-09)
   The email was 1px too wide for its line and broke before its last letter. Below 340 the gap
   beside the icon closes from 14px to 10px, so the address sits whole on one line. */
@media (max-width: 339px) {
	.ct-line { gap: 10px; }
}

/* ================================================================ Home hero, short landscape (M1-01)
   On landscape phones the floating trust bar sat on the subhead. On screens 480 high or less it
   joins the flow below the buttons, and the vertical gaps above the buttons tighten (type and
   sizes unchanged) so both buttons are on the first screen. Every portrait and desktop size is untouched. */
@media (min-width: 768px) and (max-height: 480px) {
	.hm-hero { padding-top: calc(var(--hm-head) + 20px); }
	.hm-hero__h1 { margin-top: 16px; }
	.hm-hero__sub { margin-top: 14px; }
	.hm-hero__btns { margin-top: 18px; }
	.hm-trust { --tx: 0; position: relative; left: auto; bottom: auto; translate: none; margin: 32px auto 0; }
}
/* 380 high or less (800 x 360): one more step, so the button row ends inside the screen. */
@media (min-width: 768px) and (max-height: 379px) {
	.hm-hero { padding-top: calc(var(--hm-head) + 8px); }
	.hm-hero__h1 { margin-top: 12px; }
	.hm-hero__sub { margin-top: 12px; }
	.hm-hero__btns { margin-top: 14px; }
}
/* Landscape phones under 768 wide (740 x 360, 667 x 375): the phone hero keeps its stacked
   layout, type and trust bar; only the space above the content (46 to 14px) and the gaps
   between chip, heading, subhead and buttons (20 to 12px) tighten, so the heading and the
   first button are on the first screen. Portrait screens never match (width is above height). */
@media (max-width: 767px) and (orientation: landscape) and (max-height: 480px) {
	.hm-hero { padding-top: calc(var(--hm-head) + 14px); }
	.hm-hero__stack { gap: 12px; }
}

/* ================================================================ Home card grids at 560 to 767 (M1-08)
   Short cards in two columns, as the 768 layout spreads them; an odd last card spans the row.
   The "From idea to production" bento, the plans and the hero are left as they are. */
@media (min-width: 560px) and (max-width: 767px) {
	.hm-why__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hm-why__cards > :last-child:nth-child(odd) { grid-column: 1 / -1; }
	.hm-bento__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hm-rev__row--cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hm-rev__row--cards > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ================================================================ Home headings below 390 (M1-10)
   .hm-h2 sets text-wrap: wrap on phones (to keep the drawn 390 breaks), which overrode the
   site-wide balance rule, so "Industries we build for" left "for" alone at 320. Below 390 the
   headings avoid a one-word last line. */
@media (max-width: 389px) {
	.hm-h2 { text-wrap: pretty; }
}

/* ================================================================ Footer columns at 1280 to 1315
   Six link columns are about 160px wide there and the longest labels (kept on one line from 768)
   ran into the next column ("Production Readiness Checklist" by 5px at 1280). Measured on the
   published copy: that label first clears the next column at 1311 (0.2px) and by 1px at 1316.
   Below 1316 labels may wrap; from 1316 (1366, 1440) the footer is as drawn. */
@media (min-width: 1280px) and (max-width: 1315px) {
	.fcol__links a { white-space: normal; }
}
