/* Global iMPLEMENTAi site shell.
   One shared header, menu, footer, WhatsApp surface and mobile action layer. */

:root {
  --shell-blue: #0047FF;
  --shell-brand-royal: #0047FF;
  --shell-ink: #111111;
  --shell-muted: #667085;
  --shell-line: #E2E8F0;
  --shell-bg: #FFFFFF;
  --shell-soft: #F7F9FC;
  --shell-whatsapp: #25D366;
  --shell-max: 1180px;
}

[data-site-header],
[data-site-footer] {
  font-family: Inter, Arial, sans-serif;
}
[data-site-header] { min-height: 57px; }

[data-site-header] {
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: normal;
  position: sticky;
  top: 0;
  z-index: 1000;
  transform: translateY(0);
  transition: transform .28s cubic-bezier(.2,.75,.25,1);
  will-change: transform;
}

[data-site-header].global-header-hidden {
  transform: translateY(calc(-100% - 2px));
}

.global-site-header {
  position: relative;
  z-index: 1000;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--shell-line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.global-shell-container {
  width: min(var(--shell-max), calc(100% - 40px));
  margin: 0 auto;
}

.global-header-row {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
}

[data-site-header] *,
[data-site-header] *::before,
[data-site-header] *::after {
  box-sizing: border-box;
}

.global-brand {
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--shell-ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.04em;
  white-space: nowrap;
}

.global-brand .ai { color: var(--shell-blue); }
.global-brand .ae { font-weight: 600; }

.global-brand-wordmark {
  display: block;
  width: clamp(160px, 16vw, 210px);
  height: auto;
}

/* Keep transparent artwork compact in both header and footer. */
.global-header-row .global-brand,
.global-footer-brand .global-brand {
  display: flex;
  align-items: center;
  width: clamp(160px, 16vw, 210px);
  height: 32px;
  overflow: hidden;
}

.global-header-row .global-brand-wordmark,
.global-footer-brand .global-brand-wordmark {
  flex: 0 0 100%;
  width: 100%;
}

.global-nav {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.global-nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 10px;
  color: #111111;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  line-height: 20px;
  white-space: nowrap;
}

.global-nav a:hover,
.global-nav a[aria-current="page"] {
  color: var(--shell-blue);
  background: #F1F6FC;
}

.global-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.global-shell-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.global-shell-btn.primary {
  color: #fff;
  background: var(--shell-blue);
}

.global-shell-btn.secondary {
  color: var(--shell-ink);
  background: #fff;
  border-color: var(--shell-line);
}

.global-shell-btn.whatsapp,
body .btn[data-whatsapp],
body .fd-btn[data-whatsapp] {
  color: #111111;
  background: var(--shell-whatsapp);
  border-color: var(--shell-whatsapp);
}

.global-shell-btn:hover { transform: translateY(-1px); }

.global-shell-btn:focus-visible,
.global-nav a:focus-visible,
.global-menu-toggle:focus-visible,
.global-mobile-menu a:focus-visible {
  outline: 3px solid rgba(0,71,255,.28);
  outline-offset: 3px;
}

.global-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--shell-line);
  border-radius: 10px;
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.global-menu-icon {
  width: 22px;
  height: 22px;
  display: block;
  flex: 0 0 auto;
}

.global-menu-icon path {
  fill: none;
  stroke: #111827;
  stroke-width: 2.25;
  stroke-linecap: round;
}

.global-menu-label {
  display: none;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.global-mobile-menu {
  display: none;
  border-top: 1px solid var(--shell-line);
  background: #fff;
  padding: 12px 20px 20px;
}

.global-mobile-menu.open { display: grid; gap: 6px; }

.global-mobile-menu > a:not(.global-shell-btn) {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--shell-ink);
  text-decoration: none;
  font-weight: 700;
}

.global-mobile-menu > a[aria-current="page"] {
  color: var(--shell-blue);
  background: #F1F6FC;
}

.global-mobile-actions {
  display: none;
}

.global-whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1090;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--shell-whatsapp);
  color: #fff;
  border: 2px solid rgba(255,255,255,.95);
  box-shadow: 0 14px 34px rgba(17,24,39,.22);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.global-whatsapp-float:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 18px 40px rgba(17,24,39,.28); }
.global-whatsapp-float svg { width: 29px; height: 29px; fill: currentColor; }
.global-whatsapp-float:focus-visible { outline: 3px solid rgba(0,71,255,.32); outline-offset: 4px; }

.global-site-footer {
  margin-top: 0;
  border-top: 1px solid var(--shell-line);
  background: var(--shell-soft);
  color: var(--shell-ink);
}

.global-footer-cta {
  padding: 34px 0;
  border-bottom: 1px solid var(--shell-line);
}

.global-footer-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.global-footer-cta h2 {
  margin: 0 0 7px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -.035em;
}

.global-footer-cta p {
  margin: 0;
  color: #111111;
}

.global-footer-cta-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.global-footer-main {
  padding: 44px 0 26px;
}

.global-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.global-footer-brand p {
  max-width: 380px;
  color: #111111;
  line-height: 1.6;
}

.global-footer-col h3 {
  margin: 0 0 13px;
  font-size: 14px;
}

.global-footer-col a {
  display: block;
  margin: 9px 0;
  color: #111111;
  text-decoration: none;
  font-size: 14px;
}

.global-footer-col a:hover { color: var(--shell-blue); }

.global-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0 26px;
  border-top: 1px solid var(--shell-line);
  color: var(--shell-muted);
  font-size: 13px;
}

.global-footer-bottom-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.global-footer-bottom a {
  color: inherit;
  text-decoration: none;
}

@media (max-width: 1200px) {
  .global-nav { gap: 2px; }
  .global-nav a { padding: 0 9px; }
  .global-header-actions .whatsapp { display: none; }
}

@media (max-width: 1100px) {
  [data-site-header],
  [data-site-header].global-header-hidden {
    position: sticky;
    top: 0;
    transform: none !important;
    z-index: 5000;
  }

  .global-whatsapp-float {
    display: grid !important;
    right: 14px;
    bottom: calc(88px + env(safe-area-inset-bottom));
    z-index: 10000;
    width: 56px;
    height: 56px;
  }

  body.has-global-mobile-actions {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .global-shell-container {
    width: min(100% - 28px, var(--shell-max));
  }

  .global-header-row {
    min-height: 56px;
    gap: 12px;
  }

  .global-nav,
  .global-header-actions .global-shell-btn {
    display: none;
  }

  .global-header-actions {
    margin-left: auto;
  }

  .global-menu-toggle {
    display: inline-flex !important;
    width: auto;
    min-width: 48px;
    height: 44px;
    padding: 0 10px;
    gap: 6px;
    color: #111827;
    background: #fff;
    border: 1px solid var(--shell-line);
  }

  .global-menu-icon { display: block !important; }
  .global-menu-label { display: inline !important; }

  .global-mobile-actions {
    position: fixed !important;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 9999;
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
    background: rgba(255,255,255,.98);
    border: 1px solid var(--shell-line);
    border-radius: 16px;
    box-shadow: 0 12px 34px rgba(17,24,39,.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .global-mobile-actions .global-shell-btn,
  .global-mobile-actions .primary {
    display: inline-flex !important;
    min-width: 0;
  }

  .global-mobile-actions .global-shell-btn {
    min-height: 48px;
    background: var(--shell-brand-royal);
    color: #fff;
  }

  .global-footer-cta-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .global-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .global-brand { font-size: 18px; }

  .global-footer-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .global-footer-bottom {
    flex-direction: column;
  }

  .global-footer-cta-actions {
    width: 100%;
  }

  .global-footer-cta-actions .global-shell-btn {
    flex: 1 1 160px;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-site-header] { transition: none; }
  .global-shell-btn {
    transition: none !important;
  }
  .global-shell-btn:hover {
    transform: none;
  }
}

/* Align retained premium-era pages to the current shared shell grid. */
.prem-container {
  width: min(calc(100% - 40px), var(--shell-max));
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}
@media (max-width: 700px) {
  .prem-container { width: min(calc(100% - 28px), var(--shell-max)); }
}

/* Selective royal-blue chrome. The masked decoration never covers text or hit areas. */
.site-chrome { position: relative; }
.site-chrome-edge {
  position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  pointer-events: none;
  background: linear-gradient(115deg, #0047ff33 12%, #0047ff 30%, #b9d5ff 39%, #fff 42%, #387bff 46%, #0047ff33 62%);
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: site-chrome-sweep 7s ease-in-out infinite;
  animation-play-state: paused;
}
.site-motion-in-view > .site-chrome-edge { animation-play-state: running; }
[data-chrome-pattern="orbit"] > .site-chrome-edge {
  background-image: linear-gradient(35deg, #0047ff33 20%, #0047ff 35%, #e8f2ff 41%, #0047ff 48%, #0047ff22 65%);
  animation-direction: reverse; animation-duration: 9s;
}
[data-chrome-pattern="spark"] > .site-chrome-edge {
  background-image: radial-gradient(ellipse at center, #fff 0%, #b9d5ff 8%, #0047ff 20%, #0047ff22 55%);
  animation-duration: 11s;
}
@keyframes site-chrome-sweep {
  0%, 15% { background-position: 0% 50%; opacity: .55; }
  50% { background-position: 100% 50%; opacity: 1; }
  85%, 100% { background-position: 0% 50%; opacity: .55; }
}
@media (prefers-reduced-motion: reduce) {
  .site-chrome-edge { animation: none; background-position: 50% 50%; opacity: .65; }
}
@supports not ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
  .site-chrome-edge { display: none; }
  .site-chrome { outline: 1px solid #0047ff66; outline-offset: -1px; }
}
