/* mobile.css — phone layout (≤767px) and tablet fixes (≤1023px, where the top header is replaced by the bottom pill).
   Loaded after main.css, service.css and nav.css. */

/* Nothing may widen the page: a wider page makes phones zoom out and breaks the fixed/sticky bars. */
html, body { overflow-x: clip; }

/* ---------- top bar: colour cycle + flicker (all screens) ---------- */
@keyframes tpFlick { 0%, 80%, 84%, 88%, 100% { filter: none; } 82%, 86% { filter: brightness(1.22) saturate(1.25); } }
.auditbar { animation: tpFlick 5s steps(1) infinite !important; }
.auditbar__tag { animation: glitch 4s steps(1) infinite; }
@media (prefers-reduced-motion: reduce) { .auditbar, .auditbar__tag { animation: none !important; } }

/* ---------- tablets & phones: no top header, so sticky things sit flush at the top ---------- */
@media (max-width: 1023px) {
  .story__gutter { top: env(safe-area-inset-top, 0px) !important; }
}

@media (max-width: 767px) {
  /* top bar: one slim line */
  .auditbar__link { padding: 7px 42px 7px 12px; gap: 8px; font-size: 12px; line-height: 1.3; justify-content: flex-start; }
  .auditbar__link > span:nth-child(2) { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .auditbar__more { display: none; }
  .auditbar__tag { font-size: 10px; padding: 2px 6px; flex: none; }
  .auditbar__arrow { flex: none; }
  .auditbar__close { width: 28px; height: 28px; font-size: 18px; }

  /* what is Tech Pumpkin: heading sticks flush at the top; less empty space under the cards */
  .story__gutter { padding-block: 12px 10px; box-shadow: 0 8px 12px -10px rgba(11,11,20,.25); }
  .story__pin { padding-bottom: 0; }
  .center-cta--story { margin-top: 28px !important; }
  .stats { margin-top: 28px; gap: 12px; }
  .stat { padding: 18px 16px; box-shadow: 4px 4px 0 var(--ink); }
  .stat__n { font-size: clamp(30px, 10vw, 40px); }
  .stat__l { font-size: 12px; margin-top: 10px; }

  /* sound familiar: compact cards — problem and fix together, no flipping, height fits content */
  .errs .sec-head { margin-bottom: 24px; }
  .errs__grid { gap: 14px; }
  .err { height: auto; perspective: none; transform: none !important; opacity: 1 !important; }
  .err__in { height: auto; transform: none !important; transform-style: flat; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; border: 2px solid var(--ink); }
  .err__face { position: relative; inset: auto; transform: none !important; backface-visibility: visible; -webkit-backface-visibility: visible; border-radius: 0; padding: 16px 18px; box-shadow: none !important; border: 0; }
  .err__front { padding-bottom: 12px; }
  .err__front h3 { margin-top: 8px; font-size: 19px; }
  .err__hint { display: none; }
  .err__back { padding-top: 14px; }
  .err__back .err__code, .err__back h3 { display: none; }
  .err__back p { margin-top: 0; font-size: 14.5px; }
  .err__back .tag { margin-top: 12px; }
  .errs--seq .errs__stage { height: auto; display: block; padding-top: 0; }
  .errs--seq .errs__grid { height: auto; display: grid; }
  .errs--seq .err { position: relative; top: auto; margin-top: 0; }

  /* five pillars: slim progress bar instead of the bubbles; content centred while it sticks */
  .rail { gap: 6px; overflow: visible; padding: 0; }
  .rail li { flex: 1; }
  .rail button { width: 100%; height: 5px; padding: 0; font-size: 0; border: 0; border-radius: 9px; background: rgba(255,255,255,.18); }
  .rail button i { display: none; }
  .rail li.is-active button { background: var(--c); }
  .pin__logo { width: 64px; }
  .ppanel__dl { display: none; }

  /* pillar cards below: plain scrolling list */
  .pcard { position: relative; top: auto !important; min-height: 0; margin-bottom: 14px; box-shadow: 6px 6px 0 var(--ink); transform: none !important; filter: none !important; }

  /* services: every pillar visible as wrapped buttons, tiles as a simple list */
  .svc-tabs { position: static; flex-wrap: wrap; overflow: visible; margin-inline: 0; padding: 0 0 4px; background: none; }
  .svc-tabs button { font-size: 13px; padding: 8px 12px; }
  .svc-tiles { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); overflow: visible; scroll-snap-type: none; margin-inline: 0; padding: 0; gap: 10px; }
  .tile { min-height: 0; }
  .tile__next { display: none !important; }

  /* how we work: the line runs behind the steps and the deploy badge */
  .git__line { z-index: 0; }
  .git__steps, .git__done { position: relative; z-index: 1; }

  /* why Tech Pumpkin: each criterion becomes a card — no sideways scrolling */
  .cmp-wrap { overflow: visible; padding: 0; }
  .cmp-ring, #cmp-ring, .cmp-glare { display: none !important; }
  .cmp { min-width: 0; display: block; font-size: 15px; }
  .cmp thead { display: none; }
  .cmp tbody { display: grid; gap: 12px; }
  .cmp tbody tr { display: grid; grid-template-columns: minmax(0, 1fr); border: 2px solid var(--ink); border-radius: 16px; overflow: hidden; background: #fff; }
  .cmp th, .cmp td { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--lline); }
  .cmp tbody th { font-weight: 700; font-size: 16px; padding-block: 14px; }
  .cmp td::before { content: attr(data-l); font-family: var(--f-mono); font-size: 12px; color: var(--lmu); font-weight: 400; }
  .cmp td.tp::before { color: var(--g); }
  .cmp tbody tr:last-child .tp, .cmp td.tp { border-radius: 0; }
  .cmp td:last-child { border-bottom: 0; }
  .cmp .tpv { transform-origin: right center; }
  .cmp td.tp.is-hl .tpv { transform: scale(1.08); }

  /* industries: the 8th card ("your industry?") evens out the grid */
  .ind-cta { display: list-item !important; }

  /* FAQ: search box scrolls with the page */
  .fsearch { position: static !important; }

  /* insights: a simple vertical list */
  .ins__grid { display: grid; grid-template-columns: minmax(0, 1fr); overflow: visible; scroll-snap-type: none; margin-inline: 0; padding: 0; gap: 14px; }
  .ins__grid > * { width: auto !important; min-width: 0 !important; flex: none; }
}
.ind-cta { display: none; list-style: none; }
.ind--cta { border-style: dashed; }
