/* ============================================
   ELEMENTZ — Industrial Precision shell + tokens
   New namespaced layer (--ip-*). Does NOT replace
   global-theme.css legacy tokens.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  /* Surfaces — unified to a single flat pure-white background site-wide. */
  --ip-paper: #FFFFFF;
  --ip-band: #FFFFFF;
  --ip-card: #FFFFFF;
  --ip-img-placeholder: #F4F2EE;

  /* Text */
  --ip-ink: #20160F;
  --ip-ink-2: #14171C;
  --ip-muted: #6B7280;

  /* Lines */
  --ip-line: #E2DED6;
  --ip-line-bar: #E4DFD5;

  /* Accent (signal orange) */
  --ip-accent: #FF5A1F;
  --ip-accent-2: #E8521E;

  /* Maroon hero + footer */
  --ip-hero-a: #A23031;
  --ip-hero-b: #7A2122;
  --ip-footer: #561A1B;
  --ip-on-maroon: #F5ECDD;
  --ip-on-maroon-dim: rgba(245, 236, 221, 0.85);

  /* Fonts */
  --ip-font-display: 'Bricolage Grotesque', sans-serif;
  --ip-font-body: 'Inter', sans-serif;
  --ip-font-mono: 'IBM Plex Mono', monospace;
  --ip-font-card: 'Space Grotesk', sans-serif;

  /* Radii */
  --ip-r-hero: 40px;
  --ip-r-card: 10px;
  --ip-r-tag: 8px;
  --ip-r-pill: 999px;
}

/* ===== Header ===== */
.ip-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ip-paper);
  border-bottom: 1px solid transparent;
  font-family: var(--ip-font-body);
  transition: padding 0.3s ease;
}
.ip-header--scrolled {
  background: transparent;
  border-bottom-color: transparent;
  padding: 12px 24px;
}
.ip-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 56px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: max-width 0.3s ease, height 0.3s ease, padding 0.3s ease,
              box-shadow 0.3s ease, border-radius 0.3s ease;
}

/* Scrolled: the inner bar shrinks to a compact, floating, rounded white pill */
.ip-header--scrolled .ip-header__inner {
  max-width: 1000px;
  height: 60px;
  padding: 0 10px 0 26px;
  background: #FFFFFF;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(20, 23, 28, 0.06), 0 16px 40px -12px rgba(20, 23, 28, 0.22);
}
.ip-header__brand img { display: block; height: 39px; width: auto; }
.ip-header__nav { display: flex; align-items: center; gap: 30px; }
.ip-nav__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--ip-ink);
  text-decoration: none;
  white-space: nowrap;
}
.ip-nav__link.is-active { color: var(--ip-accent-2); font-weight: 600; }
.ip-nav__caret { color: var(--ip-muted); transition: transform 0.2s ease; }

/* ===== Desktop nav dropdown (Services) ===== */
/* The "Services" label still links to the index page; hovering or keyboard-
   focusing the item reveals a hairline white panel listing every live service. */
.ip-nav__item { position: relative; display: flex; align-items: center; }
.ip-nav__menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 6px);
  min-width: 260px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid var(--ip-line);
  border-radius: var(--ip-r-card);
  box-shadow: 0 1px 2px rgba(20, 23, 28, 0.06), 0 20px 44px -16px rgba(20, 23, 28, 0.26);
  /* Hidden until hover/focus — fade + lift in, no layout shift. */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  z-index: 110;
}
/* A small transparent bridge so the pointer can travel from label to panel
   across the 6px gap without the menu closing. */
.ip-nav__menu::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}
.ip-nav__item--has-menu:hover .ip-nav__menu,
.ip-nav__item--has-menu:focus-within .ip-nav__menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
}
.ip-nav__item--has-menu:hover .ip-nav__caret,
.ip-nav__item--has-menu:focus-within .ip-nav__caret {
  transform: rotate(180deg);
}
.ip-nav__menu-link,
.ip-nav__menu-all {
  font-size: 14px;
  font-weight: 500;
  color: var(--ip-ink);
  text-decoration: none;
  padding: 9px 12px;
  border-radius: var(--ip-r-tag);
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.ip-nav__menu-link:hover,
.ip-nav__menu-link:focus-visible,
.ip-nav__menu-all:hover,
.ip-nav__menu-all:focus-visible {
  background: var(--ip-img-placeholder);
  color: var(--ip-accent-2);
}
.ip-nav__menu-link.is-active { color: var(--ip-accent-2); }
.ip-nav__menu-sep {
  height: 1px;
  margin: 6px 12px;
  background: var(--ip-line);
}
.ip-nav__menu-all {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--ip-accent-2);
}
.ip-nav__menu-arrow { transition: transform 0.15s ease; }
.ip-nav__menu-all:hover .ip-nav__menu-arrow { transform: translateX(3px); }
.ip-header__cta {
  background: var(--ip-accent);
  color: #F2EBE3;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: var(--ip-r-tag);
  text-decoration: none;
  white-space: nowrap;
}
/* ===== Mobile menu (hamburger + drawer) ===== */
/* The toggle button is hidden on desktop; the desktop nav row is the menu there. */
.ip-header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  margin-left: 8px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.ip-header__toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--ip-ink);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
/* Hamburger morphs into an X while the menu is open. */
.ip-header--menu-open .ip-header__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ip-header--menu-open .ip-header__toggle-bar:nth-child(2) { opacity: 0; }
.ip-header--menu-open .ip-header__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Drawer: collapsed (max-height 0) by default, expands when open. Lives below
   the bar, full-width, white, with a hairline + soft shadow so it reads as a
   sheet dropping from the header. Hidden entirely on desktop. */
.ip-mobilenav {
  display: none;
  flex-direction: column;
  overflow: hidden;
  max-height: 0;
  background: #FFFFFF;
  border-top: 1px solid var(--ip-line);
  box-shadow: 0 16px 32px -16px rgba(20, 23, 28, 0.22);
  transition: max-height 0.32s ease;
}
.ip-header--menu-open .ip-mobilenav { max-height: 85vh; overflow-y: auto; }
.ip-mobilenav__link {
  padding: 15px 24px;
  font-family: var(--ip-font-body);
  font-size: 16px;
  font-weight: 500;
  color: var(--ip-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ip-line);
}
.ip-mobilenav__link.is-active { color: var(--ip-accent-2); font-weight: 600; }

/* Collapsible "Services" group inside the mobile drawer. */
.ip-mobilenav__group { display: flex; flex-direction: column; }
.ip-mobilenav__sublist-toggle {
  /* A button styled to match the other drawer links. */
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ip-line);
  cursor: pointer;
  text-align: left;
}
.ip-mobilenav__chevron {
  color: var(--ip-muted);
  font-size: 18px;
  line-height: 1;
  transition: transform 0.25s ease;
}
.ip-mobilenav__group.is-open .ip-mobilenav__chevron { transform: rotate(180deg); }
/* Sublist: collapsed by default, expands when the group is open. Tinted strip so
   the nested services read as a child level of the Services row. */
.ip-mobilenav__sublist {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 0;
  background: var(--ip-img-placeholder);
  transition: max-height 0.3s ease;
}
.ip-mobilenav__group.is-open .ip-mobilenav__sublist { max-height: 600px; }
.ip-mobilenav__sublink {
  padding: 13px 24px 13px 36px;
  font-family: var(--ip-font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--ip-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ip-line);
}
.ip-mobilenav__sublink.is-active { color: var(--ip-accent-2); font-weight: 600; }
.ip-mobilenav__sublink--all {
  font-weight: 600;
  color: var(--ip-accent-2);
}
.ip-mobilenav__cta {
  margin: 16px 24px 20px;
  padding: 14px 22px;
  background: var(--ip-accent);
  color: #F2EBE3;
  font-family: var(--ip-font-body);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  border-radius: var(--ip-r-tag);
  text-decoration: none;
}

@media (max-width: 1024px) {
  .ip-header__inner { padding: 0 24px; }
  .ip-header__nav { gap: 18px; }
}
@media (max-width: 768px) {
  /* Swap the desktop nav row + CTA for the hamburger; the drawer holds the links. */
  .ip-header__nav { display: none; }
  .ip-header__cta { display: none; }
  .ip-header__toggle { display: flex; }
  .ip-mobilenav { display: flex; }

  /* On mobile the header stays a flat, full-width sticky bar — it must NOT morph
     into the floating, inset, rounded "pill" the desktop scrolled-state uses
     (that read as a floating booking-widget card). Neutralize the scrolled-state
     transforms: keep the outer bar flush (no inset padding) and the inner bar
     full-width, square, shadowless, solid white. A bottom hairline appears only
     once scrolled so content scrolls cleanly beneath instead of bleeding in. */
  .ip-header--scrolled {
    padding: 0;
    background: var(--ip-paper);
    border-bottom-color: var(--ip-line);
  }
  .ip-header--scrolled .ip-header__inner {
    max-width: 100%;
    height: 64px;
    padding: 0 24px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }
}

/* ===== Footer ===== */
/* Multi-column link directory + CTA/social block, hairline divider, then a
   brand/legal bottom row. Brand maroon kept; cream text. Reference: Finofo footer. */
.ip-footer {
  position: relative;
  overflow: hidden;
  background: var(--ip-footer);
  color: var(--ip-on-maroon);
  font-family: var(--ip-font-body);
}
.ip-footer__traces {
  position: absolute;
  top: 0; right: 0;
  width: 1440px; height: 230px;
  max-width: 100%;
  pointer-events: none;
}

/* --- Top band: link directory (left) + CTA/social (right) --- */
.ip-footer__top {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 56px;
  padding: 64px 56px 44px;
  max-width: 1440px;
  margin: 0 auto;
}
.ip-footer__dir {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 40px 48px;
  flex: 1 1 auto;
  max-width: 920px;
}
.ip-footer__col { display: flex; flex-direction: column; gap: 11px; min-width: 0; }
.ip-footer__kicker {
  font-family: var(--ip-font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(245, 236, 221, 0.55);
  margin-bottom: 6px;
}
.ip-footer__link {
  font-family: var(--ip-font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--ip-on-maroon-dim);
  text-decoration: none;
  transition: color 0.18s ease;
}
.ip-footer__link:hover { color: #FFFFFF; }
.ip-footer__link--sm { font-size: 14px; }
.ip-footer__link--more {
  margin-top: 4px;
  color: var(--ip-on-maroon);
  font-weight: 500;
}
.ip-footer__addr {
  margin-top: 6px;
  font-style: normal;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(245, 236, 221, 0.55);
}
/* Keep the company name on a single line (don't wrap "...Pvt Ltd"). */
.ip-footer__addr-name { white-space: nowrap; }
/* Space the second office address below the first. */
.ip-footer__addr--second { margin-top: 14px; }

/* CTA + social, pinned top-right */
.ip-footer__cta {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
}
.ip-footer__quote {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px 13px 26px;
  background: #FFFFFF;
  color: var(--ip-footer);
  border-radius: var(--ip-r-pill);
  text-decoration: none;
  font-family: var(--ip-font-display);
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ip-footer__quote:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28); }
.ip-footer__quote-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  background: var(--ip-accent);
  color: #FFFFFF;
  border-radius: var(--ip-r-pill);
  font-size: 15px;
}
.ip-footer__social { display: flex; gap: 10px; }
.ip-footer__social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid rgba(245, 236, 221, 0.30);
  border-radius: var(--ip-r-pill);
  color: var(--ip-on-maroon);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.ip-footer__social-btn:hover { background: #FFFFFF; color: var(--ip-footer); border-color: #FFFFFF; }

/* --- Bottom band: brand + fine print + legal --- */
.ip-footer__bottom {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 22px 56px 26px;
  border-top: 1px solid rgba(245, 236, 221, 0.16);
  max-width: 1440px;
  margin: 0 auto;
}
.ip-footer__logo { display: block; height: 52px; width: auto; }
.ip-footer__fineprint {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(245, 236, 221, 0.52);
  max-width: 640px;
}
.ip-footer__legal { display: flex; gap: 24px; font-size: 13px; }
.ip-footer__legal a {
  color: rgba(245, 236, 221, 0.70);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease;
}
.ip-footer__legal a:hover { color: #FFFFFF; }

@media (max-width: 1024px) {
  .ip-footer__top { flex-direction: column; gap: 40px; padding: 48px 28px 36px; }
  .ip-footer__dir { grid-template-columns: repeat(2, 1fr); gap: 32px 40px; max-width: 100%; }
  .ip-footer__cta { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
  .ip-footer__bottom {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px;
    text-align: left;
  }
  .ip-footer__legal { gap: 20px; }
}
@media (max-width: 560px) {
  .ip-footer__dir { grid-template-columns: 1fr 1fr; }
  .ip-footer__cta { flex-direction: column; align-items: flex-start; gap: 16px; }
  .ip-footer__quote { width: 100%; justify-content: space-between; }
}

/* ===== Scroll-to-top: orange button, single up-arrow, above the Tidio chat ===== */
#scrollTop {
  position: fixed !important;
  bottom: 118px !important;
  right: 24px !important;
  width: 56px !important;
  height: 56px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--ip-accent) !important;
  background-color: var(--ip-accent) !important;
  border: none !important;
  border-radius: 50% !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 18px -4px rgba(255, 90, 31, 0.45) !important;
  cursor: pointer;
  overflow: visible !important;
  z-index: 998 !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, background-color 0.2s ease !important;
}
#scrollTop.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#scrollTop:hover {
  background: var(--ip-accent-2) !important;
  background-color: var(--ip-accent-2) !important;
  color: #FFFFFF !important;
  transform: translateY(-2px);
}
#scrollTop svg {
  display: block;
  position: relative;
  z-index: 2;
}
/* neutralize legacy pseudo-element fill + second icon from the old theme */
#scrollTop::before,
#scrollTop::after { display: none !important; }

/* Mobile: align the scroll-to-top button's RIGHT EDGE with the Tidio chat bubble's
   right edge (both flush on the same right line) and stack it directly above. On
   phones Tidio's launcher sits ~16px from the bottom-right; the desktop values
   (right:24px, bottom:118px) left the 56px button staggered left of and floating
   above the bubble. Match the bubble's right inset (right:16px) and sit just above
   it (bubble top ≈80px from bottom → button bottom 88px = ~8px gap). Desktop unchanged. */
@media (max-width: 768px) {
  #scrollTop {
    right: 16px !important;
    bottom: 88px !important;
  }
}

/* ===== Thin scrollbar (site-wide) =====
   Neutral ink thumb derived from --ip-ink at low opacity so it reads as a
   quiet hairline, matching the minimal design language. Hex fallback keeps it
   visible even if the --ip-* layer fails to load. */
* {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in oklab, var(--ip-ink, #20160F) 20%, transparent) transparent;
}
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background-color: color-mix(in oklab, var(--ip-ink, #20160F) 20%, transparent);
  border-radius: 9999px;
}
*::-webkit-scrollbar-thumb:hover {
  background-color: color-mix(in oklab, var(--ip-ink, #20160F) 35%, transparent);
}

