/* ── TruDomicil Mobile Styles ──────────────────────────────────────────────
   All rules are scoped to mobile breakpoints or utility classes that only
   appear in the mobile drawer. Desktop experience is completely untouched.
   ───────────────────────────────────────────────────────────────────────── */

/* ── Hamburger toggle button (hidden on desktop, shown on mobile) ── */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  flex-shrink: 0;
  transition: background 0.2s;
}
.nav-toggle:hover  { background: rgba(255,255,255,0.1); }
.nav-toggle:focus-visible { outline: 2px solid #16A9B7; outline-offset: 2px; }

.nav-toggle-bar {
  display: block;
  position: absolute;
  width: 22px;
  height: 2px;
  background: #b7bcc2;
  border-radius: 2px;
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.3s ease, opacity 0.2s ease, width 0.3s ease;
}
.nav-toggle-bar:nth-child(1) { top: calc(50% - 7px); }
.nav-toggle-bar:nth-child(2) { top: calc(50% - 1px); }
.nav-toggle-bar:nth-child(3) { top: calc(50% + 5px); }

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateX(-50%) translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0; width: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateX(-50%) translateY(-6px) rotate(-45deg);
}

/* ── Mobile drawer ── */
.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 98;
  background: rgba(1,5,20,0.98);
  padding: 80px 28px 48px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.mobile-drawer.is-open {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.drawer-nav { display: flex; flex-direction: column; }

.drawer-link {
  display: flex;
  align-items: center;
  font-size: 24px;
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  color: #e8e4dc;
  text-decoration: none;
  padding: 18px 0;
  border-bottom: 1px solid rgba(237,232,223,0.1);
  min-height: 44px;
  transition: color 0.2s;
}
.drawer-link:hover,
.drawer-link:focus-visible { color: #16A9B7; outline: none; }

.drawer-services-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 24px;
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  color: #e8e4dc;
  padding: 18px 0;
  border: none;
  border-bottom: 1px solid rgba(237,232,223,0.1);
  background: none;
  cursor: pointer;
  text-align: left;
  min-height: 44px;
  transition: color 0.2s;
}
.drawer-services-toggle:hover,
.drawer-services-toggle:focus-visible { color: #16A9B7; outline: none; }
.drawer-services-toggle svg { transition: transform 0.25s ease; flex-shrink: 0; }
.drawer-services-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.drawer-services-sub {
  display: none;
  flex-direction: column;
  padding: 4px 0 8px 0;
  border-bottom: 1px solid rgba(237,232,223,0.1);
}
.drawer-services-sub.is-open { display: flex; }

.drawer-services-sub a {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #8a9099;
  text-decoration: none;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(237,232,223,0.05);
  min-height: 44px;
  transition: color 0.2s;
}
.drawer-services-sub a:hover,
.drawer-services-sub a:focus-visible { color: #16A9B7; outline: none; }
.drawer-services-sub a:first-child {
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.03em;
}

.drawer-bottom {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  background: #0097a7;
  color: #fff;
  padding: 14px 28px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s;
}
.drawer-cta:hover { background: #007b8f; }

.drawer-lang {
  display: flex !important;
  justify-content: center;
  gap: 8px;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
}
.drawer-lang a {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: rgba(255,255,255,0.55) !important;
  text-decoration: none;
  padding: 10px 20px !important;
  border-radius: 5px !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  min-height: 44px;
  display: flex !important;
  align-items: center;
  transition: background 0.2s, color 0.2s;
}
.drawer-lang a.lang-active {
  background: rgba(255,255,255,0.18) !important;
  color: #fff !important;
}

/* ─────────────────────────────────────────────────────────────────────────
   MOBILE BREAKPOINT OVERRIDES
   ───────────────────────────────────────────────────────────────────────── */

/* ── Nav ── */
@media (max-width: 768px) {
  /* Show hamburger */
  .nav-toggle { display: flex; }

  /* Show drawer */
  .mobile-drawer { display: block; }

  /* Hide entire nav-links: Get Started + lang toggle live in the drawer on mobile */
  .nav-links { display: none !important; }

  /* Body scroll lock while drawer is open */
  body.drawer-open { overflow: hidden; }

  /* ── Drawer content visibility (two-class specificity beats inline .lang-toggle rules) ── */
  .mobile-drawer .drawer-nav { display: flex !important; flex-direction: column !important; }
  .mobile-drawer .drawer-link {
    display: flex !important;
    visibility: visible !important;
    color: #e8e4dc !important;
    font-size: 24px !important;
    font-family: 'DM Serif Display', Georgia, serif !important;
    padding: 18px 0 !important;
    border-bottom: 1px solid rgba(237,232,223,0.1) !important;
    min-height: 44px !important;
    text-decoration: none !important;
  }
  .mobile-drawer .drawer-services-toggle {
    display: flex !important;
    visibility: visible !important;
    color: #e8e4dc !important;
    font-size: 24px !important;
    font-family: 'DM Serif Display', Georgia, serif !important;
    background: none !important;
    border: none !important;
    border-bottom: 1px solid rgba(237,232,223,0.1) !important;
    padding: 18px 0 !important;
    min-height: 44px !important;
    width: 100% !important;
    text-align: left !important;
  }
  .mobile-drawer .drawer-bottom {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    margin-top: 36px !important;
    visibility: visible !important;
  }
  /* Two-class selector beats inline .lang-toggle (one class) */
  .mobile-drawer .drawer-lang {
    display: flex !important;
    justify-content: center !important;
    gap: 8px !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
    visibility: visible !important;
  }
  .mobile-drawer .drawer-lang a {
    display: flex !important;
    align-items: center !important;
    visibility: visible !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: rgba(255,255,255,0.7) !important;
    padding: 10px 20px !important;
    border-radius: 5px !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    min-height: 44px !important;
    text-decoration: none !important;
    background: rgba(255,255,255,0.05) !important;
  }
  .mobile-drawer .drawer-lang a.lang-active {
    background: rgba(255,255,255,0.18) !important;
    color: #fff !important;
  }
}

/* ── "One account, one team" band section ──
   The inline CSS sets overflow: hidden on .band-inner at 820px which clips
   the image's negative top-inset pop-out effect. Restore overflow: visible. */
@media (max-width: 820px) {
  .band-inner { overflow: visible !important; }

  /* Both heads pop above the card, cut fades at shoulder level.
     50% horizontal centres both people in frame. */
  .band-figure-wrap { height: 220px !important; }
  .band-figure-clip { inset: -80px 0 0 0 !important; }
  .band-photo {
    object-position: 50% 0% !important;
    -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%) !important;
    mask-image: linear-gradient(to bottom, #000 82%, transparent 100%) !important;
  }
}

/* ── "Ready to hand off" CTA section — show image on mobile ──
   The inline CSS hides .cta-figure-wrap below 820px. We restore it and
   reposition the image to show the subject's face and upper body. */
@media (max-width: 820px) {
  /* Match desktop style — person anchored at bottom, head pops above card.
     Clip height (150 + 100 = 250px) matches image height so nothing is cropped. */
  .cta-figure-wrap {
    display: block !important;
    position: relative;
    height: 180px;
    overflow: visible;
  }

  .cta-figure-clip {
    position: absolute;
    inset: -120px 0 0 0 !important;
    overflow: hidden;
    border-radius: 0 0 var(--radius-lg, 28px) var(--radius-lg, 28px);
  }

  .cta-figure {
    position: absolute !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    left: auto !important;
    height: 300px !important;
    width: auto !important;
    object-fit: contain !important;
  }
}

/* ── Hero floating bubbles — keep them below the face on mobile ──
   chip-1 at top:92px overlaps the person's head on small screens.
   Move both chips to the lower portion of the visual on mobile. */
@media (max-width: 768px) {
  .chip-1 {
    top: auto !important;
    bottom: 130px !important;
    left: 4px !important;
    right: auto !important;
  }
  .chip-2 {
    bottom: 56px !important;
    right: 4px !important;
  }
}

/* ── General mobile layout ── */
@media (max-width: 768px) {
  /* Section vertical rhythm */
  section { padding: 56px 20px !important; }
  .hero   { padding: 100px 20px 52px !important; }

  /* Full-width section leads */
  .section-lead { max-width: 100%; }

  /* Hero buttons stack */
  .hero-btns { flex-direction: column; gap: 10px; }
  .hero-btns a { justify-content: center; text-align: center; }

  /* Touch targets for primary CTAs */
  .btn-primary,
  .btn-ghost,
  .btn-ink {
    min-height: 48px;
    padding: 14px 24px;
  }
}
