/*
 * Ou2there: fixes layered on top of the mirrored Framer output.
 * These correct bugs that also exist on the live Framer site (verified side by side).
 * Kept separate from the mirrored files so a re-sync (npm run mirror) does not lose them.
 * Selectors use Framer layer names (data-framer-name), which survive re-publishing,
 * rather than generated class hashes.
 */

/* ---------- Phone (Framer phone breakpoint is < 810px) ---------- */
@media (max-width: 809.98px) {
  /* 1. Mobile menu: the open state centred a 294px panel on a 1px-tall nav,
        pushing the logo, close button and first two links above the screen. */
  nav[data-framer-name="Phone - Open"] {
    justify-content: flex-start !important;
  }
  /* The menu panel was 72% transparent with no blur, so links blended into the hero text. */
  nav[data-framer-name="Phone - Open"] [data-framer-name="Navigation Container"] {
    background-color: rgba(10, 13, 20, 0.94) !important;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }
  /* A second "Get started" button floated below the panel, flush against the screen edge and
     over the hero copy. It duplicates "Contact Us" inside the panel, so hide it while open. */
  nav[data-framer-name="Phone - Open"] > :last-child:not(:has([data-framer-name="Navigation Container"])) {
    display: none !important;
  }

  /* 2. Services: the first text column extended 36px past its clipping wrapper,
        cutting off the right edge of "Solution Design". */
  [data-framer-name="Mobile Text Wrapper"] [data-framer-name="Texted Column"] {
    right: 0 !important;
    width: auto !important;
  }

  /* 2b. Hero: the inner hero section is a fixed 390px (Framer's phone frame) inside a
         375px screen, so the headline and intro bled 7px past each edge. */
  [data-framer-name="Animation Container"] > section[data-framer-name="Hero"] {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box !important;
  }
  [data-framer-name="Animation Container"] > section[data-framer-name="Hero"] > [data-framer-name="Content"],
  [data-framer-name="Animation Container"] > section[data-framer-name="Hero"] > [data-framer-name="Content"] > [data-framer-name="Subheading"],
  [data-framer-name="Animation Container"] > section[data-framer-name="Hero"] > [data-framer-name="Content"] > [data-framer-name="Subheading"] > * {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 3. Project cards: title and tags share a non-wrapping row, squeezing the
        title to ~35px ("Desku Inc" rendered one letter per line). */
  [data-framer-name="Default"] > [data-framer-name="Content"] > [data-framer-name="Row"] {
    flex-wrap: wrap !important;
    row-gap: 8px !important;
  }
  [data-framer-name="Default"] > [data-framer-name="Content"] > [data-framer-name="Row"] > :first-child {
    flex: 1 0 100% !important;
    width: 100% !important;
  }
}

/* 4. "How it works" card headings were set to never wrap and overflowed the card
      ("Get ongoing suppo…"). Applies to all widths; no effect where they already fit. */
[data-framer-name="Item"] [data-framer-name="Content"] > [data-framer-name] {
  white-space: normal !important;
  word-break: normal;
}
[data-framer-name="Item"] [data-framer-name="Content"] h3 {
  white-space: normal !important;
}

/* 5. Leftover "Get template (Free)" badge from the Framer template (links to framer.link). */
a[href*="framer.link/"] {
  display: none !important;
}

/* 6. Touch targets: enlarge the tappable area of small text links (footer, email)
      to >= 44px without changing layout. */
footer a, a[href^="mailto:"], a[href$="/privacy"], a[href$="/terms"],
nav[data-framer-name="Navigation Bar"] a {
  position: relative;
}
footer a::after, a[href^="mailto:"]::after, a[href$="/privacy"]::after, a[href$="/terms"]::after,
nav[data-framer-name="Navigation Bar"] a::after {
  content: "";
  position: absolute;
  inset: -14px -6px;
}

/* 7. Home link injected on case-study pages, which have no navigation of their own.
      Anchored to the top of the page (not fixed) so it never covers body text while scrolling. */
.o2-home {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1000;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(13, 13, 13, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.o2-home:hover { background: rgba(30, 30, 30, 0.9); transform: scale(1.05); }
.o2-home:active { transform: scale(0.96); }
.o2-home img { width: 30px; height: 30px; display: block; }
.o2-home:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid #ff8a1f !important;
  outline-offset: 3px;
}
