/* ==========================================================================
   Origin Pixel — Responsive layer
   Loaded LAST (just before </body>) so it wins the cascade over the
   in-page <style> blocks. Desktop (>1200px) is deliberately untouched.

   Breakpoints
     1200  small laptop / iPad Pro landscape
     1024  iPad landscape
      900  iPad portrait (large)
      768  iPad portrait / large phone landscape
      600  phone landscape
      480  phone portrait
      380  small phone
   ========================================================================== */


/* ---------------------------------------------------------------
   0. GLOBAL SAFETY — kill horizontal scroll, contain wide children
   --------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; }

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Grid/flex children default to min-width:auto, which makes long words and
   wide children blow out the track. This is the #1 cause of side-scroll. */
*, *::before, *::after { min-width: 0; }

img, svg, video, canvas, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

pre, code, table { max-width: 100%; overflow-x: auto; }

/* Long unbroken strings (URLs, emails) shouldn't force the page wider */
p, li, b, span, h1, h2, h3, h4, a { overflow-wrap: break-word; }


/* ---------------------------------------------------------------
   1. NAVIGATION — burger appears earlier
   Was 860px, so iPad landscape (1024) showed a cramped desktop nav.
   --------------------------------------------------------------- */
@media (max-width: 1024px) {
  .menu-btn {
    display: block;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
  }
  .nav-in { justify-content: center; height: 60px; position: relative; }
  .nav-in > a {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    display: flex; align-items: center;
  }
  .nav-in img { height: 42px; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(0, 10, 38, .98);
    border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch;
    gap: 0; padding: 10px 24px 20px;
    display: none;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) {
    display: block !important;
    padding: 14px 4px;
    border-bottom: 1px solid rgba(67, 127, 250, .12);
    font-size: 16px;
  }
  .nav-links .btn { margin-top: 14px; text-align: center; justify-content: center; }
  nav, .nav-in { position: sticky; }
  .nav-in { position: relative; }
}


/* ---------------------------------------------------------------
   2. GROWTH ENGINE (#engine)
   Desktop grid is `auto repeat(5,1fr) auto` = 7 tracks. It held 7
   tracks all the way down to 960px, which crushed each stage to
   ~140px on tablet, then jumped straight to a single column.
   Add proper 3-col and 2-col intermediate steps.
   --------------------------------------------------------------- */

/* --- 1200 → 901 : three across --- */
@media (max-width: 1200px) and (min-width: 901px) {
  .openg-flow {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: stretch;
  }
  /* horizontal rail can't follow a wrapped grid — retire it */
  .openg-rail, .openg-packet { display: none !important; }

  .openg-cap {
    grid-column: 1 / -1;
    margin-top: 0;
    justify-self: center;
    align-self: center;
  }
  .openg-stage { padding: 26px 20px 22px; }
  .openg-ghost { font-size: 72px; }
}

/* --- 900 → 601 : two across --- */
@media (max-width: 900px) and (min-width: 601px) {
  .openg-flow {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .openg-rail, .openg-packet { display: none !important; }

  .openg-cap {
    grid-column: 1 / -1;
    margin-top: 0; margin-left: 0;
    justify-self: center; align-self: center;
  }
  /* undo the vertical-rail indent inherited from the old 960 rule */
  .openg-stage { padding: 24px 18px 20px; }
  .openg-ghost { font-size: 64px; }
}

/* --- 600 and below : single column, compact --- */
@media (max-width: 600px) {
  .openg-flow { grid-template-columns: 1fr; gap: 12px; }
  .openg-rail, .openg-packet { display: none !important; }
  .openg-cap {
    grid-column: 1 / -1;
    margin-top: 0; margin-left: 0;
    justify-self: center; align-self: center;
  }
  .openg-stage { padding: 20px 18px 18px !important; }
  .openg-ghost { font-size: 54px !important; opacity: .10 !important; }
  .openg-icon { width: 46px; height: 46px; margin-bottom: 13px; }
  .openg-stage b { font-size: 18px; }
  .openg-desc { font-size: 14px; }
}


/* ---------------------------------------------------------------
   3. THE LEAK (#pain) — 4 across was too tight below 1100px
   --------------------------------------------------------------- */
@media (max-width: 1100px) and (min-width: 641px) {
  .leaks { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .leak { padding-top: 26px; }
  .leak .conn, .leak .drips { display: none; }
  .pipe .plabel { display: none; }
}

@media (max-width: 640px) {
  .leaks { grid-template-columns: 1fr; gap: 12px; }
  .leak { padding-top: 22px; }
  .leak .conn, .leak .drips { display: none; }
  .leak b { font-size: 17px; }
}


/* ---------------------------------------------------------------
   4. SERVICES PREVIEW (#svc-preview) — 3 across down to 1024
   --------------------------------------------------------------- */
@media (max-width: 1024px) and (min-width: 641px) {
  .opsvc-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .opsvc-tile:first-child { grid-column: span 2; }
  .opsvc-tile { padding: 24px 20px 22px; }
}

@media (max-width: 640px) {
  .opsvc-grid { grid-template-columns: 1fr; gap: 12px; }
  .opsvc-tile:first-child { grid-column: span 1; }
  .opsvc-tile { padding: 22px 18px 20px; }
  .opsvc-tile b { font-size: 18px; padding-right: 44px; }
}


/* ---------------------------------------------------------------
   5. PROOF STRIP / STATS / GUARANTEE grids
   --------------------------------------------------------------- */
@media (max-width: 900px) {
  .proof-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 420px) {
  .proof-strip { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 1024px) and (min-width: 901px) {
  .guar { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 700px) {
  .stats { flex-wrap: wrap; gap: 18px; }
  .foot { flex-direction: column; text-align: center; gap: 14px; }
}


/* ---------------------------------------------------------------
   6. TOUCH DEVICES — no hover, so reveal the hover-only states
   The leak cards hide their "Seal it" pill behind :hover, and the
   service tiles hide their cue. On a phone/tablet that content was
   simply unreachable.
   --------------------------------------------------------------- */
/* "Hover a leak…" / "Tap a leak…" — swap the cue to match the input device.
   Both spans inherit body text colour, not the cyan .pain-punch span accent. */
.pain-punch .cue-hover,
.pain-punch .cue-tap { color: var(--txt); }
.pain-punch .cue-tap { display: none; }

@media (hover: none) and (pointer: coarse) {
  .pain-punch .cue-hover { display: none; }
  .pain-punch .cue-tap { display: inline; }

  .leak .seal {
    opacity: 1;
    background: rgba(10, 118, 254, .15);
    border-style: solid;
  }
  .leak .drips i { animation: none; opacity: 0; }
  .leak .conn { background: var(--cyan); }

  .opsvc-cue { opacity: 1; }

  /* remove lift-on-hover transforms that stick after a tap */
  .leak:hover, .openg-stage:hover, .opsvc-tile:hover { transform: none; }
}


/* ---------------------------------------------------------------
   7. TYPOGRAPHY — fluid scaling through the tablet band
   --------------------------------------------------------------- */
@media (max-width: 1024px) {
  .sec-head h2, section h2 { font-size: clamp(26px, 4.4vw, 40px); line-height: 1.18; }
  .sec-head p { font-size: clamp(15px, 1.9vw, 17px); }
  .sec-head { margin-bottom: 34px; }
  section { padding: 62px 0; }
}

@media (max-width: 768px) {
  .wrap { padding: 0 20px; }
  section { padding: 52px 0; }
  .sec-head h2, section h2 { font-size: clamp(24px, 6vw, 32px); }
}

@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  section { padding: 44px 0; }
  .sec-head { margin-bottom: 26px; }
}


/* ---------------------------------------------------------------
   8. FORMS & TAP TARGETS
   iOS zooms the page when a focused input is under 16px.
   --------------------------------------------------------------- */
@media (max-width: 1024px) {
  input, select, textarea {
    font-size: 16px !important;
    max-width: 100%;
  }
  .form { padding: 24px 20px; }

  /* WCAG-ish minimum hit area.
     .menu-btn is deliberately excluded — it owns its own display:block
     in section 1 and must not be re-typed to inline-flex here. */
  .btn, button:not(.menu-btn) {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .menu-btn { min-height: 44px; }
  .nav-links a { min-height: 44px; }
}

@media (max-width: 600px) {
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
}

/* --------------------------------------------------------------------
   Footer NAP (name / address / phone).
   Google cross-checks the address in your LocalBusiness schema against
   an address it can actually see on the page — so this has to render,
   not just sit in the JSON-LD.
   -------------------------------------------------------------------- */
.big-contact .fnap {
  margin: 10px 0 6px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--mut);
  font-style: normal;
}
@media (max-width: 700px) {
  .big-contact .fnap { font-size: 13.5px; }
}

/* Visible social links back up the sameAs entries in the schema.
   rel="me" is the signal that these profiles belong to this site. */
.big-contact .fsocial {
  margin: 4px 0 10px;
  font-size: 14px;
  color: var(--mut);
}
/* the footer sets `a{display:block}` for its big email/phone links —
   these two must stay inline so they read as one line */
.mega .big-contact .fsocial a,
.big-contact .fsocial a {
  display: inline !important;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(62, 139, 255, .35);
  padding-bottom: 1px;
}
.big-contact .fsocial a:hover { color: #fff; }

/* Hero eyebrow — "Premium digital partner — 25 services, one roof".
   The markup carries a hard <br class="mbr"> that the page turns on below
   760px, forcing it onto two lines. Drop the break and scale the type with
   the viewport so it always sits on a single line, down to 320px. */
@media (max-width: 760px) {
  .hero-tag .mbr { display: none !important; }
  .hero-tag {
    font-size: clamp(7.2px, 2.45vw, 10px);
    letter-spacing: .06em;
    white-space: nowrap;
    margin-bottom: 14px;
  }
}

/* Announcement bar was shrunk to 9.5px on small screens to stay on one
   line — unreadable, and it holds a CTA. Let it wrap at a legible size. */
@media (max-width: 600px) {
  .bar {
    font-size: 12.5px !important;
    line-height: 1.5;
    letter-spacing: 0;
    padding: 9px 14px !important;
  }
  .bar a { display: inline-block; margin-top: 2px; }
}


/* ---------------------------------------------------------------
   9. FLOATING WHATSAPP + STICKY CTA — keep clear of each other
      and of the iOS home indicator
   --------------------------------------------------------------- */
@media (max-width: 600px) {
  .wa-float {
    width: 52px; height: 52px;
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
  body.stickyon .wa-float {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
  #stickycta { padding-bottom: env(safe-area-inset-bottom, 0px); }
  #stickycta .btns { width: 100%; }
  #stickycta .btn { flex: 1; text-align: center; justify-content: center; }
}


/* ---------------------------------------------------------------
   10. LANDING PAGES — shared grid fallbacks
   --------------------------------------------------------------- */
@media (max-width: 1024px) {
  [class*="-grid"], [class*="grid-3"], [class*="grid-4"] { gap: 14px; }
}
