/* Stuwius site shell: shared header, footer, pill buttons and scroll reveal.
   Used by the homepage (with home.css) and by every public page (with their own CSS).
   Small and self-contained: selectors are scoped to .hp-* so the old style.css can't fight them. */
:root {
  --brand-600: #3f56a0;
  --brand-700: #354a89;
  --brand-800: #2b3e72;
  --brand-500: #4a5fa8;
  --brand-400: #6378b8;
  --brand-200: #c5cce8;
  --brand-100: #e8ebf5;
  --brand-50: #f2f4fa;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --hp-radius-lg: 20px;
  --hp-ease: cubic-bezier(.22, .61, .36, 1);
  --hp-shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 8px 24px rgba(63, 86, 160, .08);
  --hp-shadow-lg: 0 2px 6px rgba(17, 24, 39, .05), 0 22px 48px rgba(63, 86, 160, .16);
  --hp-header-h: 68px;
}
html { scroll-padding-top: calc(var(--hp-header-h) + 12px); }

.hp-header, .hp-header *, .hp-header *::before, .hp-header *::after,
.hp-footer, .hp-footer *, .hp-footer *::before, .hp-footer *::after { box-sizing: border-box; }
.hp-header, .hp-footer { font-family: "DM Sans", "DM Sans Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.6; -webkit-font-smoothing: antialiased; }
.hp-header img, .hp-footer img { max-width: 100%; height: auto; display: block; }
.hp-header h3, .hp-footer h3, .hp-footer p { margin: 0; }
.hp-header nav, .hp-footer nav { background: none; border: 0; padding: 0; box-shadow: none; }
.hp-header :focus-visible, .hp-footer :focus-visible { outline: 3px solid var(--brand-400); outline-offset: 3px; border-radius: 6px; }

.hp-skip {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  background: var(--brand-600); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.hp-skip:focus { top: 12px; }
.hp-container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Pill buttons ---------- */
.hp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 600; font-size: .98rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: transform .2s var(--hp-ease), box-shadow .25s var(--hp-ease), background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.hp-btn-sm { padding: 9px 18px; font-size: .92rem; }
.hp-btn-lg { padding: 15px 28px; font-size: 1.03rem; }
.hp-btn.hp-btn-primary { background: var(--brand-600); color: #fff; box-shadow: 0 6px 18px rgba(63, 86, 160, .28); }
.hp-btn.hp-btn-primary:hover { background: var(--brand-700); color: #fff; box-shadow: 0 10px 26px rgba(63, 86, 160, .36); }
.hp-btn.hp-btn-ghost { background: #fff; color: var(--brand-600); border-color: var(--brand-200); }
.hp-btn.hp-btn-ghost:hover { border-color: var(--brand-600); background: var(--brand-50); }
.hp-btn.hp-btn-white { background: #fff; color: var(--brand-700); box-shadow: 0 8px 22px rgba(0, 0, 0, .15); }
.hp-btn.hp-btn-white:hover { background: var(--brand-50); }
.hp-btn.hp-btn-outline-white { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.hp-btn.hp-btn-outline-white:hover { border-color: #fff; background: rgba(255, 255, 255, .1); }

/* ---------- Header ---------- */
.hp-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500; margin: 0; padding: 0; height: auto; display: block;
  background: rgba(255, 255, 255, .86); color: var(--gray-900);
  -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s, border-color .25s, background .25s;
}
.hp-header.is-scrolled { box-shadow: 0 4px 20px rgba(17, 24, 39, .07); border-bottom-color: var(--gray-200); background: rgba(255, 255, 255, .95); }
/* Inner pages: a spacer reserves the fixed header's height (replacing the old header's body padding),
   so content starts below it with no layout shift. */
body.landing-page { padding-top: 0; }
.hp-header-spacer { display: block; flex: 0 0 auto; height: var(--hp-header-h); outline: none; }
.hp-header-inner {
  max-width: 1240px; margin: 0 auto; height: var(--hp-header-h);
  display: flex; align-items: center; gap: 20px; padding: 0 24px;
}
.hp-logo { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.hp-header .hp-logo-img { width: auto; height: 40px; }
.hp-nav { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.hp-header .hp-nav-link {
  position: relative; padding: 8px 14px; border-radius: 999px; text-decoration: none;
  color: var(--gray-700) !important; font-weight: 500; font-size: .97rem; transition: color .2s, background .2s;
}
.hp-nav-link::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; border-radius: 2px;
  background: var(--brand-600); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--hp-ease);
}
.hp-header .hp-nav-link:hover, .hp-header .hp-nav-link.is-active { color: var(--brand-600) !important; }
.hp-header .hp-nav-link.is-active::after { transform: scaleX(1); }
.hp-auth { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.hp-header .hp-auth-link { text-decoration: none; font-weight: 600; color: var(--gray-700) !important; padding: 8px 12px; border-radius: 999px; }
.hp-header .hp-auth-link:hover { color: var(--brand-600) !important; background: var(--brand-50); }

.hp-burger {
  display: none; width: 44px; height: 44px; margin-left: auto; padding: 0; border: 0; border-radius: 12px; background: var(--brand-50);
  cursor: pointer; position: relative; flex-shrink: 0;
}
.hp-burger span {
  position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: var(--brand-700);
  transition: transform .25s var(--hp-ease), opacity .2s;
}
.hp-burger span:nth-child(1) { top: 15px; }
.hp-burger span:nth-child(2) { top: 21px; }
.hp-burger span:nth-child(3) { top: 27px; }
.hp-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hp-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hp-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.hp-mobile-menu {
  border-top: 1px solid var(--gray-200); background: #fff; padding: 12px 20px 20px;
  box-shadow: 0 18px 30px rgba(17, 24, 39, .1);
  animation: hp-drop .25s var(--hp-ease);
}
.hp-mobile-menu[hidden] { display: none; }
.hp-mobile-menu nav { display: flex; flex-direction: column; }
.hp-header .hp-mobile-menu nav a {
  padding: 14px 6px; text-decoration: none; font-weight: 600; font-size: 1.05rem; color: var(--gray-900) !important;
  border-bottom: 1px solid var(--gray-100);
}
.hp-mobile-auth { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.hp-mobile-auth .hp-btn:only-child { grid-column: 1 / -1; }
@keyframes hp-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Services dropdown (desktop) ---------- */
.hp-dd { position: relative; }
.hp-header .hp-dd-toggle {
  display: inline-flex; align-items: center; gap: 5px; min-height: 44px; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 500; font-size: .97rem; line-height: 1.6;
}
.hp-dd-caret { transition: transform .2s var(--hp-ease); flex-shrink: 0; }
.hp-dd-toggle[aria-expanded="true"] .hp-dd-caret, .hp-m-toggle[aria-expanded="true"] .hp-dd-caret { transform: rotate(180deg); }
.hp-dd-panel {
  position: absolute; top: calc(100% + 10px); left: 50%; z-index: 510; width: 540px; max-width: calc(100vw - 32px);
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 8px 20px; padding: 18px 20px;
  background: #fff; border: 1px solid var(--gray-200); border-radius: 16px; box-shadow: var(--hp-shadow-lg);
  opacity: 0; visibility: hidden; transform: translate(-50%, -6px); pointer-events: none;
  transition: opacity .18s var(--hp-ease), transform .18s var(--hp-ease), visibility 0s linear .18s;
}
.hp-dd-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; } /* hover bridge */
.hp-dd.is-open .hp-dd-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); pointer-events: auto; transition-delay: 0s; }
.hp-dd-head { margin: 0 0 6px; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gray-500); }
.hp-dd-col ul { list-style: none; margin: 0; padding: 0; }
.hp-header .hp-dd-col a {
  display: flex; align-items: center; min-height: 36px; padding: 6px 10px; margin: 0 -10px; border-radius: 10px;
  color: var(--gray-900) !important; text-decoration: none; font-weight: 500; font-size: .94rem; line-height: 1.3;
}
.hp-header .hp-dd-col a:hover, .hp-header .hp-dd-col a:focus-visible, .hp-header .hp-dd-col a[aria-current="page"] { background: var(--brand-50); color: var(--brand-700) !important; }
.hp-header .hp-dd-col a.hp-dd-all { margin-top: 12px; gap: 6px; font-weight: 700; color: var(--brand-600) !important; }

/* Grouped Services menu: 4 columns centred under the header bar, links row at the foot */
.hp-dd--svc { position: static; }
.hp-header-inner { position: relative; }
.hp-dd--svc .hp-dd-panel { top: 100%; width: max-content; grid-template-columns: repeat(4, auto); gap: 6px 0; }
.hp-dd-panel--groups .hp-dd-col { padding: 0 18px; }
.hp-dd-panel--groups .hp-dd-col + .hp-dd-col { border-left: 1px solid var(--gray-100); }
.hp-dd-panel--groups .hp-dd-head, .hp-header .hp-m-head { color: var(--brand-600); }
.hp-header .hp-dd-foot { grid-column: 1 / -1; display: flex; gap: 22px; border: 0 !important; border-top: 1px solid var(--gray-100) !important; margin-top: 6px; }
.hp-header .hp-dd-foot a.hp-dd-all { margin: 6px -10px 0; }
.hp-header .hp-m-head { border-top: 1px solid var(--gray-100); padding-top: 12px; }

/* ---------- Phone menu: Services accordion ---------- */
.hp-header .hp-m-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 52px; padding: 14px 6px;
  border: 0; border-bottom: 1px solid var(--gray-100); background: none; cursor: pointer; text-align: left;
  font: inherit; font-weight: 600; font-size: 1.05rem; color: var(--gray-900);
}
.hp-m-sub { display: flex; flex-direction: column; padding: 4px 0 8px 10px; border-bottom: 1px solid var(--gray-100); }
.hp-m-sub[hidden] { display: none; }
.hp-m-toggle-label { display: inline-flex; align-items: center; gap: 10px; }
.hp-m-toggle-label svg { color: var(--brand-600); }
.hp-header .hp-mobile-menu .hp-m-contact a { font-weight: 600; color: var(--brand-700) !important; }
.hp-header .hp-mobile-menu .hp-m-sub a { display: flex; align-items: center; min-height: 44px; padding: 8px 6px; font-weight: 500; font-size: 1rem; border-bottom: 0; }
.hp-header .hp-mobile-menu .hp-m-sub a.hp-m-all { font-weight: 700; color: var(--brand-600) !important; }
.hp-m-head { margin: 8px 6px 2px; font-size: .875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gray-500); }
.hp-header .hp-mobile-menu nav a { display: flex; align-items: center; min-height: 52px; }
.hp-header .hp-mobile-menu nav a.hp-m-tools { color: var(--brand-600) !important; }
/* The phone menu scrolls inside the viewport when the Services list is open. */
.hp-mobile-menu { max-height: calc(100vh - var(--hp-header-h)); max-height: calc(100dvh - var(--hp-header-h)); overflow-y: auto; overscroll-behavior: contain; }

/* Narrow laptops: tighten the nav so it never wraps before the phone menu takes over. */
@media (max-width: 1180px) {
  .hp-header .hp-nav-link { padding: 8px 10px; }
  .hp-nav-link::after { left: 10px; right: 10px; }
  .hp-header-inner { gap: 14px; }
}
@media (max-width: 1060px) {
  .hp-nav, .hp-auth { display: none; }
  .hp-burger { display: block; }
}
@media (min-width: 1061px) { .hp-mobile-menu { display: none !important; } }

/* ---------- Footer ---------- */
.hp-footer {
  position: relative; overflow: hidden; isolation: isolate; margin: 0; display: block; text-align: left;
  background: #0f1a3a; color: rgba(255, 255, 255, .72); padding: 30px 0 0; font-size: .9rem; line-height: 1.5;
}
.hp-footer .hp-container { max-width: 1100px; }
.hp-footer-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr) minmax(0, 1.3fr) 280px; gap: 24px; }
.hp-footer-logo-wrap { display: inline-block; background: #fff; border-radius: 10px; padding: 6px 10px; margin-bottom: 10px; }
.hp-footer .hp-footer-logo { width: auto; height: 28px; }
.hp-footer .hp-footer-contact { margin-top: 8px; font-style: normal; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.hp-footer-addr { color: rgba(255, 255, 255, .78); }
.hp-footer-phones { display: flex; flex-wrap: wrap; gap: 2px 14px; }
/* Social icon buttons: 36px circles (44px tap targets on phones, below); fixed sizes, no layout shift. */
.hp-footer .hp-footer-social { display: flex; gap: 10px; margin: 0; }
.hp-footer .hp-social { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; }
.hp-social-ic { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); transition: background .2s, border-color .2s, transform .2s; }
.hp-footer .hp-social:hover, .hp-footer .hp-social:focus-visible { color: #fff; }
.hp-social:hover .hp-social-ic, .hp-social:focus-visible .hp-social-ic { border-color: transparent; }
.hp-social--whatsapp:hover .hp-social-ic, .hp-social--whatsapp:focus-visible .hp-social-ic { background: #1ebe5d; }
.hp-social--instagram:hover .hp-social-ic, .hp-social--instagram:focus-visible .hp-social-ic { background: #d6246e; }
.hp-social--linkedin:hover .hp-social-ic, .hp-social--linkedin:focus-visible .hp-social-ic { background: #0a66c2; }
.hp-footer .hp-social:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.hp-footer a { color: rgba(255, 255, 255, .78); text-decoration: none; transition: color .2s; }
.hp-footer a:hover { color: #fff; }
.hp-footer-col { display: flex; flex-direction: column; min-width: 0; }
.hp-footer-col h3 { font-family: inherit; color: #fff; font-size: .9rem; font-weight: 700; margin-bottom: 8px; letter-spacing: .02em; }
.hp-footer-links { display: flex; flex-direction: column; gap: 4px; }
.hp-footer-col--company .hp-footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); grid-template-rows: repeat(6, auto); grid-auto-flow: column; gap: 4px 22px; }
/* Map card: fixed 280x160 box (aspect-ratio), filled by the lazy Google Maps iframe: no layout shift. */
.hp-map { position: relative; width: 100%; max-width: 280px; aspect-ratio: 7 / 4; border-radius: 12px; overflow: hidden; background: #dfe6ee; }
.hp-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hp-footer .hp-map-open { margin-top: 6px; font-weight: 600; }
.hp-footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 20px; margin-top: 22px; padding-top: 10px; padding-bottom: 12px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .84rem; }
/* Glowing shape drifting behind the links and a moving accent line on top. */
.hp-footer::before {
  content: ""; position: absolute; top: 0; left: 0; width: 200%; height: 3px; z-index: 1;
  background: linear-gradient(90deg, transparent, #6f8cff, #25D366, #6f8cff, transparent, #6f8cff, #25D366, #6f8cff, transparent);
  animation: hp-line 10s linear infinite; will-change: transform;
}
.hp-footer-glow {
  position: absolute; z-index: -1; width: 520px; height: 520px; border-radius: 50%; top: -220px; left: 30%;
  background: radial-gradient(circle, rgba(92, 120, 220, .35), transparent 70%); pointer-events: none;
  animation: hp-float-a 20s ease-in-out infinite; will-change: transform;
}
@keyframes hp-line { to { transform: translateX(-50%); } }

/* ---------- Soft drifting shapes behind a section (transform-only, behind content) ---------- */
.hp-blobs { position: relative; isolation: isolate; overflow: hidden; }
.hp-blobs::before, .hp-blobs::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
  filter: blur(70px); opacity: .5; will-change: transform;
}
.hp-blobs::before { width: 380px; height: 380px; background: #d6defa; top: -80px; left: -120px; animation: hp-float-a 22s ease-in-out infinite; }
.hp-blobs::after { width: 300px; height: 300px; background: #e3e9ff; bottom: -60px; right: -100px; animation: hp-float-b 26s ease-in-out infinite; }
.hp-blobs-alt::before { background: #cbd5f6; left: auto; right: -140px; top: 10%; }
.hp-blobs-alt::after { background: #dfe6fd; right: auto; left: -110px; bottom: 6%; }
@keyframes hp-float-a { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(60px, 40px) scale(1.12); } }
@keyframes hp-float-b { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-50px, -36px) scale(1.08); } }

/* ---------- Scroll reveal (only when JS is on) ---------- */
.hp-js .hp-reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--hp-ease), transform .7s var(--hp-ease); transition-delay: var(--d, 0s); }
.hp-js .hp-reveal.is-visible { opacity: 1; transform: none; }
/* Pages that had a one-off load animation on the same element: the scroll reveal replaces it. */
.hp-js .hp-reveal { animation: none; }
.hp-js .hp-reveal.is-visible { transition-property: opacity, transform, box-shadow, border-color, background; }

/* Hover effects only where there is a real mouse (no stuck "lifted" state on touch). */
@media (hover: hover) and (pointer: fine) {
  .hp-social:hover .hp-social-ic { transform: translateY(-1px); }
  .hp-btn:hover { transform: translateY(-2px); }
  .hp-btn:active { transform: translateY(0); }
  .hp-nav-link:hover::after { transform: scaleX(1); }
}

@media (max-width: 920px) {
  .hp-footer-grid { grid-template-columns: 1fr 1fr; gap: 24px 28px; }
}
@media (max-width: 640px) {
  :root { --hp-header-h: 62px; }
  .hp-container { padding: 0 18px; }
  .hp-header-inner { padding: 0 16px; }
  .hp-header .hp-logo-img { height: 34px; }
  .hp-header .hp-logo { min-height: 44px; min-width: 44px; }
  .hp-footer { padding-top: 28px; }
  .hp-footer-bottom { font-size: .875rem; margin-top: 18px; flex-direction: column-reverse; align-items: flex-start; }
  .hp-footer-grid { grid-template-columns: 1fr; gap: 18px; }
  /* Phone tap targets: every footer link at least 44px tall; links flow in rows to keep the footer short. */
  .hp-footer-links, .hp-footer-col--company .hp-footer-links { display: flex; flex-flow: row wrap; gap: 0 18px; }
  .hp-footer-col h3 { margin-bottom: 0; }
  .hp-footer-col a, .hp-footer .hp-footer-contact a { display: inline-flex; align-items: center; min-height: 44px; }
  .hp-footer .hp-footer-social { gap: 4px; margin-left: -4px; }
  .hp-footer .hp-social { width: 44px; height: 44px; }
  .hp-footer .hp-footer-contact { gap: 0; }
  /* Keep the last line (copyright, left) clear of the floating WhatsApp button (62px, 20px from the edges). */
  .hp-footer-bottom { padding: 6px 86px 22px 18px; }
  .hp-blobs::before { width: 240px; height: 240px; filter: blur(50px); }
  .hp-blobs::after { width: 200px; height: 200px; filter: blur(50px); }
  .hp-footer-glow { width: 340px; height: 340px; left: 10%; }
}

@media (prefers-reduced-motion: reduce) {
  .hp-header *, .hp-footer, .hp-footer *, .hp-footer::before, .hp-blobs::before, .hp-blobs::after, .hp-reveal {
    animation: none !important; transition-duration: .01ms !important;
  }
  .hp-js .hp-reveal { opacity: 1; transform: none; }
}
