/* ═══════════════════════════════════════════════════════════════════════ */
/*  sx-nav.css — Shared Stripe-style nav (loaded on every page)            */
/*                                                                          */
/*  This file contains:                                                     */
/*   1. The design tokens (--gg-*) for both light and dark themes           */
/*   2. The nav + mega-menu styles                                          */
/*   3. The mobile drawer styles                                            */
/*   4. body padding so content doesn't hide under the fixed nav            */
/*                                                                          */
/*  Pair with /sx-nav.js which injects the HTML and wires events.          */
/* ═══════════════════════════════════════════════════════════════════════ */

/* ─ Design tokens — Advanta brand v1.0 (paper + ink + terracotta) ─────
   Variable names kept as --gg-* for backwards compatibility with the
   existing component CSS. The VALUES are locked per ../../DESIGN.md:
   - --gg-font      Manrope (display + body, 400-800)
   - --gg-font-mono JetBrains Mono (data/labels/index codes, 400-500)
   - --gg-cta       Terracotta #c26643 — the single brand accent
   - --gg-surface   Paper #fbfaf7 — warm page background
   - --gg-navy      Ink #161513 — primary text, dark surfaces
   The Stripe-clone palette is retired per PRODUCT.md anti-references.
*/
:root, [data-theme="light"] {
  --gg-navy:        #161513;   /* Ink — primary text + dark surfaces */
  --gg-navy-deep:   #0a0908;   /* Ink-deep — hero ink */
  --gg-slate:       #525049;   /* Graphite — secondary text (warm) */
  --gg-slate-soft:  #6b6a63;   /* Graphite-2 — muted text */
  --gg-cta:         #c26643;   /* Terracotta — the single brand accent */
  --gg-cta-hover:   #c26643;
  --gg-cta-deep:    #7a3d25;
  --gg-cta-soft:    rgba(194,102,67,.10);
  --gg-cta-edge:    rgba(194,102,67,.28);
  --gg-cta-border:  rgba(194,102,67,.40);
  --gg-edge:        #d8d4ca;   /* Line — default border, warm-neutral */
  --gg-edge-soft:   #e6e2d8;   /* Line-soft — secondary divider */
  --gg-bg-soft:     #f3f1ea;   /* Paper-2 — card surface */
  --gg-paper-3:     #efece2;   /* Paper-3 — inset / pre / table head */
  --gg-dark:        #161513;
  --gg-success:     #1f6b4a;   /* Positive — data-only green, never brand */
  --gg-success-fg:  #155538;
  --gg-success-bg:  rgba(31,107,74,.10);
  --gg-success-edge:rgba(31,107,74,.30);
  --gg-shadow-cta:      rgba(22,21,19,.18) 0px 8px 24px -8px;
  --gg-shadow-elevated: rgba(22,21,19,.15) 0px 24px 40px -24px, rgba(22,21,19,.08) 0px 14px 28px -14px;
  --gg-ease:        cubic-bezier(.32, .72, 0, 1);
  --gg-font:        'Manrope', system-ui, -apple-system, sans-serif;
  --gg-font-mono:   'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --gg-surface:     #fbfaf7;   /* Paper — page background */
  --gg-card:        #fbfaf7;
  --gg-terracotta-soft: #f6e2d6;
}

/* ─ Dark theme — ink-deep surface, paper text, terracotta accent ─── */
[data-theme="dark"] {
  --gg-navy:        #f5f3ee;   /* Ice — primary text on dark */
  --gg-navy-deep:   #ffffff;
  --gg-slate:       #cfccc4;   /* Ice-mute — secondary text on dark */
  --gg-slate-soft:  #9c998f;
  --gg-cta:         #d97e5b;   /* Terracotta brightened slightly for dark surfaces */
  --gg-cta-hover:   #e89673;
  --gg-cta-deep:    #f6e2d6;
  --gg-cta-soft:    rgba(217,126,91,.16);
  --gg-cta-edge:    rgba(217,126,91,.34);
  --gg-cta-border:  rgba(217,126,91,.42);
  --gg-edge:        rgba(245,243,238,.10);
  --gg-edge-soft:   rgba(245,243,238,.06);
  --gg-bg-soft:     #1f1d1a;
  --gg-paper-3:     #2a2724;
  --gg-dark:        #0a0908;
  --gg-success:     #4ad88c;
  --gg-success-fg:  #86efac;
  --gg-success-bg:  rgba(74,216,140,.12);
  --gg-success-edge:rgba(74,216,140,.32);
  --gg-shadow-cta:      rgba(0,0,0,.5) 0px 8px 24px -8px;
  --gg-shadow-elevated: rgba(0,0,0,.5) 0px 30px 45px -30px, rgba(0,0,0,.3) 0px 18px 36px -18px;
  --gg-surface:     #161513;   /* Ink — page background in dark mode (no more navy residue) */
  --gg-card:        #1f1d1a;
}

/* ─ Body padding under fixed nav ─────────────────────────────────────── */
body.has-sx-nav { padding-top: 64px; }

/* ═════════════════════════════════════════════════════════════════════ */
/*  WAVE-GG11 — Nav-level upgrades                                        */
/*  Scroll progress · Command palette · Status indicator · Locale picker  */
/* ═════════════════════════════════════════════════════════════════════ */

/* ─ Scroll progress bar (2px gradient at top of nav) ─────────────────── */
.sx-scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 1002;
  pointer-events: none;
}
.sx-scroll-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #c26643 0%, #c26643 50%, #7a3d25 100%);
  transition: width .08s linear;
  box-shadow: 0 0 12px rgba(194,102,67,.5);
}
body.has-sx-announce .sx-scroll-progress { top: 36px; }
@media (max-width: 720px) { body.has-sx-announce .sx-scroll-progress { top: 52px; } }

/* ─ System status indicator pill ─────────────────────────────────────── */
.sx-nav-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(31,107,74,.08);
  border: 1px solid rgba(31,107,74,.24);
  border-radius: 100px;
  font-family: var(--gg-font);
  font-size: 12px;
  font-weight: 500;
  color: var(--gg-success-fg);
  text-decoration: none;
  letter-spacing: -.005em;
  transition: background .15s var(--gg-ease), border-color .15s var(--gg-ease);
  white-space: nowrap;
}
.sx-nav-status:hover {
  background: rgba(31,107,74,.14);
  border-color: rgba(31,107,74,.4);
}
.sx-nav-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gg-success);
  box-shadow: 0 0 0 0 rgba(31,107,74,.5);
  animation: sx-status-pulse 2s var(--gg-ease) infinite;
}
@keyframes sx-status-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(31,107,74,.6); }
  100% { box-shadow: 0 0 0 6px rgba(31,107,74,0); }
}
[data-theme="dark"] .sx-nav-status {
  background: rgba(74,222,128,.1);
  border-color: rgba(74,222,128,.28);
  color: #86efac;
}
@media (max-width: 1180px) {
  .sx-nav-status { display: none !important; }
}

/* ─ Command palette trigger button (⌘K) ──────────────────────────────── */
.sx-nav-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 12px;
  background: var(--gg-bg-soft);
  border: 1px solid var(--gg-edge);
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--gg-font);
  font-size: 13px;
  color: var(--gg-slate-soft);
  letter-spacing: -.005em;
  transition: all .15s var(--gg-ease);
}
.sx-nav-search:hover {
  border-color: var(--gg-cta-edge);
  background: var(--gg-cta-soft);
  color: var(--gg-cta);
}
.sx-nav-search-kbd {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  background: var(--gg-edge);
  color: var(--gg-slate);
  font-family: 'Fragment Mono', monospace;
  font-size: 10.5px;
  font-weight: 500;
  border-radius: 4px;
  letter-spacing: 0;
}
[data-theme="dark"] .sx-nav-search {
  background: rgba(245,242,234,.04);
  border-color: rgba(245,242,234,.08);
}
[data-theme="dark"] .sx-nav-search-kbd {
  background: rgba(245,242,234,.08);
  color: rgba(245,242,234,.7);
}
@media (max-width: 1280px) {
  .sx-nav-search-label { display: none; }
  .sx-nav-search { padding: 7px 9px; }
}
@media (max-width: 980px) {
  .sx-nav-search { display: none !important; }
}

/* ─ Command palette modal ────────────────────────────────────────────── */
.sx-cmd-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10,37,64,.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  opacity: 0;
  transition: opacity .2s var(--gg-ease);
}
.sx-cmd-overlay.is-open { display: flex; opacity: 1; }
.sx-cmd-modal {
  width: min(640px, calc(100% - 32px));
  background: #fff;
  border: 1px solid var(--gg-edge);
  border-radius: 14px;
  box-shadow:
    rgba(22,21,19,.32) 0 50px 100px -20px,
    rgba(0,0,0,.4) 0 30px 60px -30px;
  overflow: hidden;
  transform: translateY(8px) scale(.98);
  transition: transform .25s var(--gg-ease);
}
.sx-cmd-overlay.is-open .sx-cmd-modal { transform: translateY(0) scale(1); }
[data-theme="dark"] .sx-cmd-modal {
  background: var(--gg-card);
  border-color: rgba(245,242,234,.08);
}
.sx-cmd-input-wrap {
  display: flex; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--gg-edge);
  gap: 12px;
}
[data-theme="dark"] .sx-cmd-input-wrap { border-bottom-color: rgba(245,242,234,.06); }
.sx-cmd-input-wrap svg { color: var(--gg-slate-soft); flex-shrink: 0; }
.sx-cmd-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--gg-font);
  font-size: 15px;
  color: var(--gg-navy);
}
.sx-cmd-input::placeholder { color: var(--gg-slate-soft); }
.sx-cmd-esc {
  font-family: 'Fragment Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 7px;
  background: var(--gg-edge);
  color: var(--gg-slate);
  border-radius: 4px;
  border: none;
  cursor: pointer;
}
.sx-cmd-list {
  max-height: 60vh;
  overflow-y: auto;
  padding: 8px;
}
.sx-cmd-group-label {
  font-family: var(--gg-font);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gg-slate-soft);
  padding: 12px 12px 6px;
}
.sx-cmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  color: var(--gg-navy);
  font-family: var(--gg-font);
  font-size: 14px;
  border: none;
  width: 100%;
  background: transparent;
  text-align: left;
}
.sx-cmd-item:hover, .sx-cmd-item.is-active {
  background: var(--gg-cta-soft);
  color: var(--gg-cta);
}
[data-theme="dark"] .sx-cmd-item:hover,
[data-theme="dark"] .sx-cmd-item.is-active { background: rgba(194,102,67,.12); }
.sx-cmd-item-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--gg-cta-soft);
  color: var(--gg-cta);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sx-cmd-item-content { flex: 1; min-width: 0; }
.sx-cmd-item-title { font-weight: 500; }
.sx-cmd-item-sub { font-size: 12px; color: var(--gg-slate-soft); margin-top: 1px; }
.sx-cmd-item.is-active .sx-cmd-item-sub { color: inherit; opacity: .8; }
.sx-cmd-item-arrow { color: var(--gg-slate-soft); opacity: 0; transition: opacity .15s var(--gg-ease); }
.sx-cmd-item:hover .sx-cmd-item-arrow,
.sx-cmd-item.is-active .sx-cmd-item-arrow { opacity: 1; color: inherit; }
.sx-cmd-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--gg-slate-soft);
  font-family: var(--gg-font);
  font-size: 13.5px;
}

/* ─ Locale switcher (PT/ES/EN dropdown) ──────────────────────────────── */
.sx-nav-locale {
  position: relative;
}
.sx-nav-locale-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  background: transparent;
  border: 1px solid var(--gg-edge);
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--gg-font);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--gg-slate);
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: all .15s var(--gg-ease);
}
.sx-nav-locale-btn:hover {
  border-color: var(--gg-cta-edge);
  color: var(--gg-cta);
  background: var(--gg-cta-soft);
}
.sx-nav-locale-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 140px;
  background: #fff;
  border: 1px solid var(--gg-edge);
  border-radius: 8px;
  box-shadow: var(--gg-shadow-elevated);
  padding: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .15s var(--gg-ease), transform .15s var(--gg-ease);
}
[data-theme="dark"] .sx-nav-locale-menu { background: var(--gg-card); border-color: rgba(245,242,234,.08); }
.sx-nav-locale.is-open .sx-nav-locale-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.sx-nav-locale-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-family: var(--gg-font);
  font-size: 13px;
  color: var(--gg-navy);
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}
.sx-nav-locale-item:hover { background: var(--gg-cta-soft); color: var(--gg-cta); }
[data-theme="dark"] .sx-nav-locale-item:hover { background: rgba(194,102,67,.12); }
.sx-nav-locale-item.is-current { color: var(--gg-cta); font-weight: 500; }
.sx-nav-locale-item.is-current::after {
  content: '✓';
  margin-left: auto;
  font-weight: 600;
}
/* Disabled locale items (country pages not yet built) */
.sx-nav-locale-item.is-disabled {
  cursor: not-allowed;
  color: var(--gg-slate-soft);
  opacity: .6;
}
.sx-nav-locale-item.is-disabled:hover {
  background: transparent;
  color: var(--gg-slate-soft);
}
.sx-nav-locale-soon {
  margin-left: auto;
  font-family: 'Fragment Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  padding: 1px 6px;
  background: var(--gg-cta-soft);
  color: var(--gg-cta);
  border: 1px solid var(--gg-cta-edge);
  border-radius: 100px;
  letter-spacing: .02em;
}
[data-theme="dark"] .sx-nav-locale-soon { background: rgba(194,102,67,.12); }
@media (max-width: 1100px) {
  .sx-nav-locale { display: none !important; }
}

/* ─ Mega-menu icons — tinted by color variant ────────────────────────── */
.sx-mega-icon { transition: transform .2s var(--gg-ease); }
.sx-mega-link:hover .sx-mega-icon { transform: scale(1.08); }
body.has-sx-announce { padding-top: 100px; }
@media (max-width: 720px) {
  body.has-sx-announce { padding-top: 104px; }
}

/* ─ Announcement bar (above nav, dismissible, links to changelog) ─────── */
.sx-announce {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1001;
  background: linear-gradient(90deg, #161513 0%, #1f1d1a 35%, #c26643 100%);
  color: #fff;
  font-family: var(--gg-font);
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: -.005em;
  border-bottom: 1px solid rgba(245,242,234,.06);
}
.sx-announce-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 44px 0 20px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
}
/* Long/short variants — long shows on desktop, short on mobile */
.sx-announce-text-full { display: inline; }
.sx-announce-text-short { display: none; }
.sx-announce-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: rgba(245,242,234,.14);
  border: 1px solid rgba(245,242,234,.22);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  margin-right: 2px;
}
.sx-announce a.sx-announce-cta {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity .15s var(--gg-ease);
}
.sx-announce a.sx-announce-cta:hover { opacity: .85; }
.sx-announce a.sx-announce-cta svg { transform: translateX(0); transition: transform .2s var(--gg-ease); }
.sx-announce a.sx-announce-cta:hover svg { transform: translateX(2px); }
.sx-announce-dismiss {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px; height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(245,242,234,.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background .15s var(--gg-ease), color .15s var(--gg-ease);
}
.sx-announce-dismiss:hover {
  background: rgba(245,242,234,.12);
  color: #fff;
}
@media (max-width: 720px) {
  .sx-announce-inner {
    min-height: 40px;
    padding: 4px 38px 4px 12px;
    gap: 8px;
    line-height: 1.25;
    flex-wrap: nowrap;
  }
  .sx-announce-text { font-size: 12px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sx-announce-text-full { display: none; }
  .sx-announce-text-short { display: inline; }
  .sx-announce-cta { font-size: 12px; flex-shrink: 0; }
  .sx-announce-cta span,
  .sx-announce-cta-label { display: none; }
  .sx-announce-pill { display: none; }
}
body.has-sx-announce .sx-nav { top: 36px; }
body.has-sx-announce .sx-mega { top: 100px; }
@media (max-width: 720px) {
  body.has-sx-announce .sx-nav { top: 40px; }
  body.has-sx-announce .sx-mega { top: 104px; }
}
body.has-sx-announce .sx-mobile-drawer { top: 100px; }
@media (max-width: 720px) {
  body.has-sx-announce .sx-mobile-drawer { top: 104px; }
}

/* ─ Hide any legacy nav once the new one is injected ─────────────────── */
body.has-sx-nav nav#nav { display: none !important; }

/* ─ Nav container ────────────────────────────────────────────────────── */
.sx-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--gg-surface);
  border-bottom: 1px solid var(--gg-edge);
  transition: background .25s var(--gg-ease), border-color .25s var(--gg-ease), box-shadow .25s var(--gg-ease);
  font-family: var(--gg-font);
}
.sx-nav.is-scrolled {
  box-shadow: 0 1px 0 0 var(--gg-edge), 0 8px 32px -16px rgba(22,21,19,.08);
}
[data-theme="dark"] .sx-nav {
  background: var(--gg-surface);
  border-bottom-color: rgba(245,243,238,.10);
}
[data-theme="dark"] .sx-nav.is-scrolled {
  box-shadow: 0 1px 0 0 rgba(245,243,238,.10), 0 8px 32px -16px rgba(0,0,0,.4);
}

.sx-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
@media (max-width: 1180px) {
  .sx-nav-inner { gap: 16px; padding: 0 20px; }
}
/* Brand v1.0 lockup — Cavalo (img) + Advanta wordmark (text).
   The Cavalo SVG ships with currentColor; we tint it via the parent's CSS
   filter (because the img element doesn't inherit currentColor by default).
   The wordmark is General Sans 700 with a terracotta acute on the period. */
.sx-nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  color: var(--gg-navy);
  transition: opacity .2s var(--gg-ease);
}
.sx-nav-logo:hover { opacity: 0.85; }
/* Cavalo SVG is now INLINED into the nav HTML (see sx-nav.js → CAVALO_SVG).
   The <span class="sx-nav-cavalo"> wrapper sets size + color; the inner SVG
   paths fill="currentColor" so they pick up the wrapper's CSS color.
   One CSS property recolors the mark site-wide. */
.sx-nav-cavalo {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gg-cta); /* terracotta */
  flex-shrink: 0;
}
.sx-nav-cavalo svg {
  width: 100%;
  height: 100%;
  display: block;
}
.sx-nav-wordmark {
  font-family: var(--gg-font);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--gg-navy);
  white-space: nowrap;
}
.sx-nav-acute {
  color: var(--gg-cta);
  font-weight: 600;
}
@media (max-width: 640px) {
  .sx-nav-cavalo { height: 32px; width: 32px; }
  .sx-nav-wordmark { font-size: 22px; }
}
[data-theme="dark"] .sx-nav-cavalo {
  color: var(--gg-navy); /* in dark mode, --gg-navy resolves to paper */
}

.sx-nav-items {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}
.sx-nav-item {
  position: relative;
}
.sx-nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--gg-font);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--gg-navy);
  letter-spacing: -.005em;
  text-decoration: none;
  border-radius: 6px;
  transition: background .15s var(--gg-ease), color .15s var(--gg-ease);
  white-space: nowrap;
}
@media (max-width: 1180px) {
  .sx-nav-trigger { padding: 8px 10px; font-size: 14px; }
}
.sx-nav-trigger:hover,
.sx-nav-item.is-open > .sx-nav-trigger {
  background: var(--gg-cta-soft);
  color: var(--gg-cta);
}
/* Active-page state — highlights the current page in the nav */
.sx-nav-item.is-active > .sx-nav-trigger,
a.sx-nav-trigger.is-active {
  color: var(--gg-cta);
}
.sx-nav-item.is-active > .sx-nav-trigger::after,
a.sx-nav-trigger.is-active::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -22px;
  height: 2px;
  background: var(--gg-cta);
  border-radius: 1px;
}
.sx-nav-trigger { position: relative; }
/* External-link arrow indicator for outbound nav links (e.g. Developers → tech.advanta.pt) */
.sx-nav-ext {
  margin-left: 2px;
  opacity: .55;
  transition: opacity .15s var(--gg-ease), transform .15s var(--gg-ease);
}
.sx-nav-trigger:hover .sx-nav-ext { opacity: 1; transform: translate(1px, -1px); }
/* "New" pill badge on a nav trigger (e.g. Developers) — compact */
.sx-nav-trigger-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  margin-left: 1px;
  background: linear-gradient(90deg, #c26643 0%, #c26643 100%);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  border-radius: 100px;
  line-height: 1.4;
  vertical-align: middle;
}
@media (max-width: 1180px) {
  .sx-nav-trigger-pill { display: none; }
}
[data-theme="dark"] .sx-nav-trigger:hover,
[data-theme="dark"] .sx-nav-item.is-open > .sx-nav-trigger {
  background: rgba(129,140,248,.12);
  color: var(--gg-cta);
}
.sx-nav-trigger-arrow {
  display: inline-block;
  transition: transform .2s var(--gg-ease);
  opacity: .6;
  font-size: 10px;
  margin-left: 2px;
}
.sx-nav-item.is-open .sx-nav-trigger-arrow { transform: rotate(180deg); }

.sx-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--gg-cta);
  color: #fff;
  border-radius: 6px;
  font-family: var(--gg-font);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: var(--gg-shadow-cta);
  transition: background .2s var(--gg-ease), transform .2s var(--gg-ease), box-shadow .2s var(--gg-ease);
  flex-shrink: 0;
}
.sx-nav-cta:hover {
  background: var(--gg-cta-hover);
  transform: translateY(-1px);
}

.sx-nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.sx-nav-signin {
  font-family: var(--gg-font);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--gg-navy);
  text-decoration: none;
  padding: 8px 4px;
  transition: color .15s var(--gg-ease);
  letter-spacing: -.005em;
  white-space: nowrap;
}
.sx-nav-signin:hover { color: var(--gg-cta); }
/* Hide Sign in earlier than the burger breakpoint to relieve nav-right crowding */
@media (max-width: 1100px) {
  .sx-nav-signin { display: none !important; }
}
/* Theme toggle gets cramped on tablets — keep it but reduce gap on narrow */
@media (max-width: 1100px) {
  .sx-nav-right { gap: 10px; }
}
.sx-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: transparent;
  border: 1px solid var(--gg-edge);
  border-radius: 6px;
  cursor: pointer;
  color: var(--gg-slate);
  transition: background .15s var(--gg-ease), border-color .15s var(--gg-ease), color .15s var(--gg-ease);
}
.sx-theme-toggle:hover {
  background: var(--gg-cta-soft);
  border-color: var(--gg-cta-edge);
  color: var(--gg-cta);
}

/* ─ MEGA-MENU PANELS — full-width Stripe-style drop ──────────────────── */
.sx-mega {
  position: fixed;
  top: 64px;
  left: 0; right: 0;
  width: 100vw;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .22s var(--gg-ease), transform .22s var(--gg-ease), visibility .22s var(--gg-ease);
  background: #fff;
  border-top: 1px solid var(--gg-edge);
  border-bottom: 1px solid var(--gg-edge);
  box-shadow:
    rgba(22,21,19,.12) 0px 30px 60px -20px,
    rgba(0,0,0,.06) 0px 18px 36px -18px;
  padding: 40px 0 48px;
}
[data-theme="dark"] .sx-mega {
  background: var(--gg-card);
  border-top-color: rgba(245,242,234,.08);
  border-bottom-color: rgba(245,242,234,.08);
  box-shadow:
    rgba(0,0,0,.5) 0px 30px 60px -20px,
    rgba(0,0,0,.3) 0px 18px 36px -18px;
}
.sx-nav-item.is-open .sx-mega {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateY(0);
}

.sx-mega-grid {
  display: grid;
  gap: 48px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.sx-mega-grid--3 { grid-template-columns: 1.1fr 1.1fr 1fr; }
.sx-mega-grid--2-1 { grid-template-columns: 1.2fr 1fr; }
.sx-mega-grid--4 { grid-template-columns: repeat(4, 1fr); }
.sx-mega-grid--2 { grid-template-columns: 1fr 1.2fr; }

.sx-mega-col { display: flex; flex-direction: column; gap: 4px; }
.sx-mega-label {
  font-family: var(--gg-font);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--gg-slate-soft);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin: 0 0 16px;
  padding: 0 12px;
}
.sx-mega-link {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background .15s var(--gg-ease);
}
.sx-mega-link:hover { background: var(--gg-cta-soft); }
[data-theme="dark"] .sx-mega-link:hover { background: rgba(194,102,67,.1); }
.sx-mega-icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 6px;
  background: var(--gg-cta-soft);
  border: 1px solid var(--gg-cta-edge);
  color: var(--gg-cta);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sx-mega-icon--green { background: var(--gg-success-bg); border-color: var(--gg-success-edge); color: var(--gg-success-fg); }
.sx-mega-icon--ruby { background: rgba(225,29,72,.12); border-color: rgba(225,29,72,.3); color: #be123c; }
.sx-mega-icon--violet { background: rgba(194,102,67,.12); border-color: rgba(194,102,67,.3); color: #c26643; }
.sx-mega-icon--amber { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.3); color: #b45309; }
.sx-mega-title {
  font-family: var(--gg-font);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--gg-navy);
  letter-spacing: -.005em;
  margin: 0 0 4px;
  line-height: 1.3;
  display: block;
}
.sx-mega-desc {
  font-family: var(--gg-font);
  font-size: 13px;
  font-weight: 400;
  color: var(--gg-slate-soft);
  line-height: 1.45;
  margin: 0;
  display: block;
}
.sx-mega-featured {
  grid-column: -2 / -1;
  padding: 22px;
  background: linear-gradient(135deg, var(--gg-cta-soft) 0%, rgba(194,102,67,.06) 100%);
  border: 1px solid var(--gg-cta-edge);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform .2s var(--gg-ease), box-shadow .2s var(--gg-ease), border-color .2s var(--gg-ease);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.sx-mega-featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #c26643 0%, #c26643 50%, #7a3d25 100%);
  border-radius: 12px 12px 0 0;
}
.sx-mega-featured:hover {
  transform: translateY(-2px);
  box-shadow: var(--gg-shadow-elevated);
  border-color: var(--gg-cta);
}
.sx-mega-featured-eyebrow {
  font-family: var(--gg-font);
  font-size: 11px;
  font-weight: 500;
  color: var(--gg-cta);
  letter-spacing: 0;
  margin: 0 0 6px;
}
.sx-mega-featured-title {
  font-family: var(--gg-font);
  font-size: 15px;
  font-weight: 500;
  color: var(--gg-navy);
  margin: 0 0 6px;
  letter-spacing: -.008em;
  line-height: 1.3;
}
.sx-mega-featured-desc {
  font-family: var(--gg-font);
  font-size: 12.5px;
  font-weight: 300;
  color: var(--gg-slate);
  line-height: 1.5;
  margin: 0 0 14px;
  flex: 1;
}
.sx-mega-featured-link {
  font-family: var(--gg-font);
  font-size: 13px;
  font-weight: 500;
  color: var(--gg-cta);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ─ Mobile drawer ────────────────────────────────────────────────────── */
.sx-nav-burger {
  display: none;
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid var(--gg-edge);
  border-radius: 6px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--gg-navy);
}
.sx-mobile-drawer {
  position: fixed;
  inset: 64px 0 0;
  background: #fff;
  z-index: 999;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity .25s var(--gg-ease), transform .25s var(--gg-ease);
}
[data-theme="dark"] .sx-mobile-drawer { background: var(--gg-surface); }
.sx-mobile-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.sx-mobile-drawer-inner { padding: 16px 20px 40px; }
.sx-mobile-section {
  border-bottom: 1px solid var(--gg-edge);
  padding: 12px 0;
}
.sx-mobile-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--gg-font);
  font-size: 16px;
  font-weight: 500;
  color: var(--gg-navy);
  letter-spacing: -.008em;
  text-decoration: none;
}
.sx-mobile-section-head[aria-expanded="true"] .sx-mobile-section-arrow { transform: rotate(180deg); }
.sx-mobile-section-arrow { transition: transform .2s var(--gg-ease); color: var(--gg-slate-soft); }
.sx-mobile-section-body { display: none; padding: 8px 4px 12px; }
.sx-mobile-section[data-open="true"] .sx-mobile-section-body { display: block; }
.sx-mobile-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 4px;
  color: inherit;
  text-decoration: none;
}
.sx-mobile-link strong {
  font-family: var(--gg-font);
  font-size: 14px;
  font-weight: 500;
  color: var(--gg-navy);
  display: block;
  margin-bottom: 2px;
}
.sx-mobile-link span {
  font-family: var(--gg-font);
  font-size: 12.5px;
  font-weight: 300;
  color: var(--gg-slate-soft);
}
.sx-mobile-cta {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sx-mobile-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  background: var(--gg-cta);
  color: #fff;
  border-radius: 6px;
  font-family: var(--gg-font);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: var(--gg-shadow-cta);
}

@media (max-width: 980px) {
  .sx-nav-items { display: none !important; }
  .sx-nav-burger { display: inline-flex !important; }
  .sx-nav-cta { display: none !important; }
  .sx-theme-toggle { display: none !important; }
}
@media (min-width: 981px) {
  .sx-mobile-drawer { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/*  WAVE-GG global typography + chrome — applies to EVERY page             */
/* ═══════════════════════════════════════════════════════════════════════ */

/* Body typography (when sx-nav is present) */
body.has-sx-nav,
body.has-sx-nav p,
body.has-sx-nav li {
  font-family: var(--gg-font);
}
body.has-sx-nav { font-size: 17px; line-height: 1.55; color: var(--gg-navy); }
body.has-sx-nav h1, body.has-sx-nav h2, body.has-sx-nav h3, body.has-sx-nav h4 {
  font-family: var(--gg-font);
  color: var(--gg-navy);
  letter-spacing: -.022em;
}
body.has-sx-nav h1 { font-weight: 300; }
body.has-sx-nav h2 { font-weight: 300; }

/* Auto-injected 5-column footer */
.sx-footer {
  background: var(--gg-bg-soft);
  border-top: 1px solid var(--gg-edge);
  padding: 88px 0 32px;
  font-family: var(--gg-font);
}
[data-theme="dark"] .sx-footer {
  background: var(--gg-surface);
  border-top-color: rgba(245,242,234,.08);
}
.sx-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 48px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 64px;
}
@media (max-width: 880px) { .sx-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 560px) { .sx-footer-grid { grid-template-columns: 1fr; gap: 24px; } }
/* Brand v1.0 footer lockup — Cavalo + Advanta + index code */
.sx-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--gg-navy);
  margin-bottom: 8px;
}
.sx-footer-cavalo {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gg-cta); /* terracotta */
  flex-shrink: 0;
}
.sx-footer-cavalo svg {
  width: 100%;
  height: 100%;
  display: block;
}
[data-theme="dark"] .sx-footer-cavalo {
  color: var(--gg-navy);
}
.sx-footer-wordmark {
  font-family: var(--gg-font);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.038em;
  line-height: 1;
  color: var(--gg-navy);
}
.sx-footer-acute {
  color: var(--gg-cta);
  font-weight: 600;
}
.sx-footer-index {
  font-family: var(--gg-font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gg-slate);
  margin: 0 0 14px;
}
.sx-footer-tagline {
  font-family: var(--gg-font);
  font-size: 15px;
  font-weight: 400;
  color: var(--gg-slate);
  line-height: 1.55;
  max-width: 320px;
  margin: 0 0 20px;
}
.sx-footer-social { display: flex; gap: 10px; margin-top: 16px; }
.sx-footer-social a {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--gg-edge);
  border-radius: 6px;
  color: var(--gg-slate);
  text-decoration: none;
  transition: all .15s var(--gg-ease);
}
.sx-footer-social a:hover {
  border-color: var(--gg-cta);
  color: var(--gg-cta);
  background: var(--gg-cta-soft);
}
.sx-footer-col h4 {
  font-family: var(--gg-font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gg-navy);
  margin: 0 0 16px;
}
.sx-footer-col a {
  font-family: var(--gg-font);
  font-size: 14.5px;
  font-weight: 400;
  color: var(--gg-slate-soft);
  text-decoration: none;
  padding: 6px 0;
  display: block;
  transition: color .15s var(--gg-ease);
}
.sx-footer-col a:hover { color: var(--gg-cta); }
.sx-footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 0;
  border-top: 1px solid var(--gg-edge);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.sx-footer-copy { font-family: var(--gg-font); font-size: 13px; color: var(--gg-slate-soft); margin: 0; }
.sx-footer-meta { display: flex; gap: 24px; flex-wrap: wrap; }
.sx-footer-meta span, .sx-footer-meta a {
  font-family: var(--gg-font);
  font-size: 13px;
  color: var(--gg-slate-soft);
  text-decoration: none;
}
.sx-footer-meta a:hover { color: var(--gg-cta); }

/* Wave-GG11 — footer enhancements */
.sx-footer-pill {
  display: inline-block;
  padding: 1px 7px;
  background: linear-gradient(90deg, #c26643, #c26643);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: 100px;
  margin-left: 4px;
  vertical-align: middle;
}
.sx-footer-status-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gg-success);
  margin-right: 6px;
  vertical-align: 1px;
  box-shadow: 0 0 0 0 rgba(31,107,74,.5);
  animation: sx-status-pulse 2s var(--gg-ease) infinite;
}
.sx-footer-status-link {
  display: inline-flex;
  align-items: center;
}
.sx-footer-lisbon {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.sx-footer-countries {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 2px 8px;
  background: var(--gg-bg-soft);
  border: 1px solid var(--gg-edge);
  border-radius: 100px;
}
[data-theme="dark"] .sx-footer-countries { background: rgba(245,242,234,.04); border-color: rgba(245,242,234,.06); }
.sx-footer-countries a {
  padding: 4px 6px !important;
  font-size: 12px !important;
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
}

/* Hide legacy footers when our shared footer is injected */
body.has-sx-nav.has-sx-footer footer:not(.sx-footer),
body.has-sx-nav.has-sx-footer .site-footer:not(.sx-footer) {
  display: none !important;
}


/* ─── Wave-GG17 · Login chooser dropdown ───────────────────────────── */
.sx-nav-login {
  position: relative;
  display: inline-flex;
}
.sx-nav-login .sx-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}
.sx-nav-login-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 380px;
  background: #fff;
  border: 1px solid var(--gg-edge);
  border-radius: 12px;
  box-shadow: var(--gg-shadow-elevated);
  padding: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(.98);
  transform-origin: top right;
  transition: opacity .15s var(--gg-ease), transform .15s var(--gg-ease);
  z-index: 60;
}
[data-theme="dark"] .sx-nav-login-menu {
  background: var(--gg-card);
  border-color: rgba(245,242,234,.08);
}
.sx-nav-login.is-open .sx-nav-login-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.sx-nav-login-head {
  padding: 6px 12px 10px;
  font-family: var(--gg-font);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gg-slate);
}
.sx-nav-login-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background .12s var(--gg-ease);
}
.sx-nav-login-item:hover {
  background: var(--gg-cta-soft);
}
[data-theme="dark"] .sx-nav-login-item:hover {
  background: rgba(194,102,67,.08);
}
.sx-nav-login-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.sx-nav-login-icon--corp {
  background: rgba(194,102,67,.1);
  color: #c26643;
}
.sx-nav-login-icon--pme {
  background: rgba(74,216,140,.12);
  color: #16a34a;
}
[data-theme="dark"] .sx-nav-login-icon--corp { background: rgba(194,102,67,.15); color: #c26643; }
[data-theme="dark"] .sx-nav-login-icon--pme  { background: rgba(74,222,128,.12); color: #4ad88c; }
.sx-nav-login-body {
  flex: 1;
  min-width: 0;
}
/* Wave-GG25 — intent label sits above the title to clarify what's behind each option */
.sx-nav-login-intent {
  font-family: var(--gg-font);
  font-size: 11px;
  font-weight: 500;
  color: var(--gg-slate-soft);
  letter-spacing: 0;
  margin-bottom: 2px;
  text-transform: none;
}
.sx-nav-login-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--gg-font);
  font-size: 14px;
  font-weight: 500;
  color: var(--gg-navy);
}
[data-theme="dark"] .sx-nav-login-title { color: var(--gg-text); }
.sx-nav-login-sub {
  margin-top: 2px;
  font-family: var(--gg-font);
  font-size: 12px;
  line-height: 1.4;
  color: var(--gg-slate);
}
.sx-nav-login-status {
  flex-shrink: 0;
  white-space: nowrap;
  font-family: 'Fragment Mono', monospace;
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1.5;
  padding: 2px 7px;
  border-radius: 100px;
  background: rgba(74,216,140,.12);
  color: #16a34a;
  border: 1px solid rgba(74,216,140,.2);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.sx-nav-login-status--soon {
  background: rgba(245,158,11,.12);
  color: #d97706;
  border-color: rgba(245,158,11,.2);
}
[data-theme="dark"] .sx-nav-login-status { background: rgba(74,222,128,.12); color: #4ad88c; }
[data-theme="dark"] .sx-nav-login-status--soon { background: rgba(245,158,11,.15); color: #fbbf24; }
.sx-nav-login-arrow {
  flex-shrink: 0;
  color: var(--gg-slate-soft);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .12s var(--gg-ease), transform .12s var(--gg-ease);
}
.sx-nav-login-item:hover .sx-nav-login-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--gg-cta);
}
@media (max-width: 1100px) {
  .sx-nav-login { display: none !important; }
}

/* Mobile drawer stacked CTAs */
.sx-mobile-cta--stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sx-mobile-cta-primary,
.sx-mobile-cta-ghost {
  display: block;
  padding: 14px 16px;
  border-radius: 10px;
  text-align: center;
  font-family: var(--gg-font);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all .12s var(--gg-ease);
}
.sx-mobile-cta-primary {
  background: var(--gg-cta);
  color: #fff;
}
.sx-mobile-cta-primary:hover { background: var(--gg-cta-strong, var(--gg-cta)); }
.sx-mobile-cta-ghost {
  background: var(--gg-bg-soft);
  color: var(--gg-navy);
  border: 1px solid var(--gg-edge);
}
[data-theme="dark"] .sx-mobile-cta-ghost {
  background: rgba(245,242,234,.04);
  color: var(--gg-text);
  border-color: rgba(245,242,234,.08);
}
.sx-mobile-cta-ghost:hover {
  border-color: var(--gg-cta-edge);
  color: var(--gg-cta);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/*  WAVE-GG32 — Design polish layer (Emil + Impeccable + redesign skill)  */
/*                                                                          */
/*  One-file sitewide upgrade. No per-page changes needed.                 */
/*  Applies: stronger easing · button :active / :focus-visible feedback ·  */
/*  scroll smoothing · headline text-wrap balance · tabular numerals on    */
/*  KPI surfaces. Surgical, additive, overrides existing rules selectively.*/
/* ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* Stronger easing than the built-in cubic-bezier defaults.
     `--gg-ease` already exists (.16,1,.3,1); these add intent-specific variants. */
  --gg-ease-out:      cubic-bezier(0.23, 1, 0.32, 1);      /* entering · feels responsive */
  --gg-ease-in-out:   cubic-bezier(0.77, 0, 0.175, 1);     /* on-screen movement */
  --gg-ease-press:    cubic-bezier(0.4, 0, 0.6, 1);        /* button :active feedback */
}

/* ─ Global: smooth scroll for anchor links (with reduced-motion guard) ─ */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─ Global: headline balance — avoids orphan words on widow lines ─ */
h1, h2, h3 { text-wrap: balance; }
p, li     { text-wrap: pretty; }

/* ─ Buttons: replace `transition: all` with specific properties + faster timing ─
   Emil's rule: button feedback should be 100-160ms. The previous 200ms `all` was
   slow AND animated unintended properties (color, border, shadow simultaneously).
   This selector is more specific than `.ec-btn` so it overrides cleanly. */
.ec-btn,
a.ec-btn,
button.ec-btn {
  transition:
    transform 140ms var(--gg-ease-out),
    background-color 140ms var(--gg-ease-out),
    border-color 140ms var(--gg-ease-out),
    box-shadow 140ms var(--gg-ease-out),
    color 140ms var(--gg-ease-out);
  will-change: transform;
}

/* ─ Buttons: :active press feedback on ALL variants ─
   Currently only `.ec-sticky-cta-btn:active` has press feedback. Every clickable
   element should confirm the press. Scale 0.97 is Emil's recommendation — felt, not seen. */
.ec-btn:active,
a.ec-btn:active,
button.ec-btn:active {
  transform: scale(0.97);
  transition-duration: 80ms;       /* press feedback snappier than release */
}

/* ─ Buttons: :focus-visible ring for keyboard users ─
   Visible focus is an accessibility requirement, not optional.
   `:focus-visible` (not `:focus`) avoids the ring on mouse clicks. */
.ec-btn:focus-visible,
a.ec-btn:focus-visible,
button.ec-btn:focus-visible {
  outline: 2px solid var(--gg-cta);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ─ Numerals: tabular alignment for any number that updates or compares ─
   Prevents the jitter that proportional digits create when KPIs change. */
.ec-hero-trust strong,
.ec-hero-card-meta strong,
[class*="kpi"],
[class*="stat"],
[class*="metric"],
[class*="number"],
[class*="value"],
[class*="amount"],
[class*="percent"],
[class*="yield"],
[data-numeric] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

/* ─ Cards: soften press feedback on clickable cards (Emil: feedback should be felt) ─ */
[role="button"]:not(button):active,
.ec-card[onclick]:active,
.ec-card-clickable:active {
  transform: scale(0.995);
  transition: transform 100ms var(--gg-ease-press);
}

/* ─ Sticky CTA: harmonise with the new system ─
   Was `transform: scale(.96)` with no transition timing; keep but route through ease-press. */
.ec-sticky-cta-btn:active {
  transform: scale(0.96);
  transition: transform 80ms var(--gg-ease-press);
}

/* ─ Form inputs: focus polish ─ */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gg-cta);
  outline-offset: 1px;
  border-color: transparent;
}

/* ─ Anti-jank: promote interactive elements to compositor layer ─
   Translate-on-hover paired with property transitions can flicker on certain GPUs.
   Forcing transform: translateZ(0) puts them on their own layer. */
.ec-btn-primary,
.ec-btn-ghost {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* ─ Reduce-motion fallback for buttons specifically ─ */
@media (prefers-reduced-motion: reduce) {
  .ec-btn:active,
  a.ec-btn:active,
  button.ec-btn:active,
  .ec-sticky-cta-btn:active { transform: none; }
  .ec-btn-primary:hover     { transform: none; }   /* override the existing translateY(-1px) */
}

/* ═══════════════════════════════════════════════════════════════════════ */
/*  WAVE-GG33 — Impeccable detector AA + readability fixes                */
/*                                                                          */
/*  Source: `npx impeccable detect dist/index.html` flagged 47 issues.    */
/*  Color fixes applied as direct hex updates across 17 HTML files (45    */
/*  replacements). This block adds the remaining cascade-level fixes:    */
/*  tiny-text floor, link contrast, all-caps label safety.               */
/* ═══════════════════════════════════════════════════════════════════════ */

/* ─ Tiny-text floor: ONLY on known offenders in content sections ─
   Earlier version used a `body div:not(...)` global rule which clobbered the
   navigation UI (the .sx-nav-login dropdown, where the 9.5px "Disponível"
   status badge is intentional). The fix: target specific known-offender
   classes only, leaving nav and other UI controls untouched. */
.ec-browser-stat-trend,
.ec-browser-stat-label,
.ec-hero-float-label,
.ec-eyebrow-value,
.ec-hero-trust,
.ec-hero-trust span,
.ec-hero-trust strong,
.ec-feature-card [class*="-meta"],
.ec-section [class*="-meta"],
.ec-section [class*="-trend"] {
  font-size: max(12px, 1em) !important;
}

/* True uppercase labels: keep small but never below 11px. Exempts nav explicitly. */
.ec-eyebrow:not(.sx-nav-login *),
[class*="-eyebrow"]:not(.sx-nav-login *),
.ec-row-badge {
  font-size: max(11px, 1em);
}

/* ─ Slate-soft text: bump up if used in light-theme contexts where contrast fails ─
   Impeccable detected #9c998f fallback (3.0:1 on white). The literal fallbacks
   were updated to #5e6a7a (5.3:1) in the HTML edits. This catches edge cases
   where var() resolves to the dark-theme value in light mode. */
:root, [data-theme="light"] {
  --gg-slate-soft: #5e6a7a;   /* was #6b6a63 — slightly darker for AA cushion */
}

/* ═══════════════════════════════════════════════════════════════════════ */
/*  WAVE-GG34 — Committed design upgrades (Impeccable + high-end-visual)  */
/*                                                                          */
/*  Real design changes, not just polish:                                  */
/*  · Primary font Inter → Geist (banned-font swap, three skills agreed)  */
/*  · Display typography upgrade (heavier weight, tighter tracking, scale)*/
/*  · Button-in-Button CTA pattern (high-end-visual-design Section 4B)   */
/*  · Eyebrow-tag scaffolding cleanup (brand.md bans repeated tiny caps)  */
/*  · Nested card "Double-Bezel" architecture for primary feature cards   */
/* ═══════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* Override the brand font token — Manrope takes primacy.
   Chosen because: variable optical sizing + weight, genuine character, NOT on the
   impeccable/brand.md overused-font list (which bans Inter, Outfit, Plus Jakarta,
   DM Sans, Instrument, Geist). System fallbacks ensure graceful degradation. */
:root, [data-theme="light"], [data-theme="dark"] {
  --gg-font: 'General Sans', system-ui, sans-serif;
  --gg-font-mono: 'Fragment Mono', ui-monospace, monospace;
}

/* Make body inherit the new stack — Inter is hardcoded in some places (line 113 of index.html etc.) */
body, html {
  font-family: var(--gg-font);
  font-feature-settings: "ss01", "ss02", "cv01", "cv03";   /* Geist alternates: closed-storey a/g, single-storey g */
}

/* Display typography upgrade — committed to a heavier, tighter, more confident hierarchy ─
   brand.md: "Distinctive + refined is the goal. A single well-chosen family with committed
   weight/size contrast is stronger than a timid display+body pair." */
.ec-hero-title-main,
h1[class*="hero"],
h1.ec-hero-title-main {
  font-family: var(--gg-font) !important;
  font-weight: 600 !important;                     /* was 600 — committed heavier */
  letter-spacing: -0.035em !important;             /* was -0.030em — tighter for display */
  font-feature-settings: "ss01", "ss02", "cv01" !important;
}

/* Numbers in hero KPIs feel premium with tabular-nums + Geist's tabular feature ─ */
.ec-browser-stat-value,
[class*="kpi-val"],
[class*="-stat-value"],
[class*="-yield"] {
  font-variant-numeric: tabular-nums slashed-zero;
  font-feature-settings: "tnum", "lnum", "zero", "ss01";
}

/* ─ Button-in-Button: nest a trailing arrow inside its own pill within primary CTAs ─
   high-end-visual-design Section 4B: "The arrow NEVER sits naked next to the text.
   It must be nested inside its own distinct circular wrapper."
   Implementation: target buttons whose label ends with → (existing markup pattern). */
.ec-btn-primary {
  padding-right: 8px;   /* tighter on the right where the pill lives */
}
.ec-btn-primary > svg,
.ec-btn-primary > .ec-btn-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 4px;
  border-radius: 999px;
  background: rgba(245,242,234,0.15);
  transition:
    transform 220ms var(--gg-ease-out),
    background-color 220ms var(--gg-ease-out);
}
.ec-btn-primary:hover > svg,
.ec-btn-primary:hover > .ec-btn-arrow {
  transform: translateX(2px);
  background: rgba(245,242,234,0.22);
}
[data-theme="dark"] .ec-btn-primary > svg,
[data-theme="dark"] .ec-btn-primary > .ec-btn-arrow {
  background: rgba(10, 37, 64, 0.10);
}

/* Eyebrow scaffolding cleanup ─
   brand.md: "Repeated tiny uppercase tracked labels above every section heading."
   The site has 20+ `.ec-eyebrow` instances. Each section opens with the same micro-pill,
   which is template grammar, not voice. We tone them down — remove the pill chrome,
   keep them as quiet kickers (no border, no background, no dot indicator). */
.ec-eyebrow:not(:first-of-type) {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--gg-slate-soft);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.ec-eyebrow:not(:first-of-type) .ec-eyebrow-dot {
  display: none;
}

/* ─ Double-Bezel cards (high-end-visual-design Section 4A): nested concentric architecture ─
   Only apply where the markup includes a single content wrapper as :first-child.
   EXPLICITLY excludes .ec-ai-tile (its :first-child is the icon, not a wrapper) so the
   override doesn't clobber colored icon backgrounds. */
.ec-feature-card,
.ec-hero-card,
.ec-glass-card,
[class*="-feature-card"] {
  background: linear-gradient(180deg, rgba(10, 37, 64, 0.018), rgba(10, 37, 64, 0.05)) !important;
  padding: 6px !important;
  border-radius: 24px !important;
  border: 1px solid rgba(10, 37, 64, 0.06) !important;
  box-shadow:
    0 1px 2px rgba(10, 37, 64, 0.04),
    0 8px 24px -12px rgba(10, 37, 64, 0.08) !important;
  position: relative;
}
.ec-feature-card > *:first-child,
.ec-hero-card > *:first-child {
  background: var(--gg-card, #fff);
  border-radius: calc(24px - 6px);
  padding: 20px;
  box-shadow: inset 0 1px 0 rgba(245,242,234,0.6);
}
[data-theme="dark"] .ec-feature-card,
[data-theme="dark"] .ec-hero-card {
  background: linear-gradient(180deg, rgba(245,242,234,0.025), rgba(245,242,234,0.06)) !important;
  border-color: rgba(245,242,234,0.08) !important;
}
[data-theme="dark"] .ec-feature-card > *:first-child,
[data-theme="dark"] .ec-hero-card > *:first-child {
  background: var(--gg-card, #1f1d1a);
  box-shadow: inset 0 1px 0 rgba(245,242,234,0.05);
}

/* ─ Section padding upgrade: brand.md "Macro-Whitespace" + high-end-visual "py-24 to py-40" ─
   Current spacing is too dense for a brand surface. Bump section padding sitewide. */
section[class*="-section"],
.ec-section {
  padding-top: clamp(80px, 8vw, 160px);
  padding-bottom: clamp(80px, 8vw, 160px);
}

/* ─ Headlines: lighter line-height than I previously set (1.05 stays for display) ─
   The "tight-leading" detector rule applies to body text; display text is OK at 1.05.
   I'm explicitly forcing this so the polish layer doesn't fight the existing rules. */
.ec-hero-title-main,
.ec-section-title,
h1, h2 {
  text-wrap: balance;
}
.ec-hero-title-main { line-height: 1.04; }    /* tighter on display = more authority */


/* ════════════════════════════════════════════════════════════════════
   FLOATING ISLAND NAV — site-wide (mirrors the homepage nav redesign).
   Detached pill nav. Outer container is the same paper-cream as the
   page (NOT transparent) so the Heritage hero gradient doesn't bleed
   through and tint the nav.
   ════════════════════════════════════════════════════════════════════ */
body.has-sx-nav { padding-top: 88px; }
.sx-nav {
  position: fixed !important; top: 0 !important; left: 0; right: 0;
  background: var(--gg-surface) !important;
  padding-top: 14px !important;
  padding-bottom: 14px !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  border: none !important;
  border-bottom: 1px solid transparent !important;
  box-shadow: none !important;
}
.sx-nav.is-scrolled {
  background: var(--gg-surface) !important;
  border-bottom: 1px solid var(--gg-edge) !important;
  box-shadow: 0 8px 24px -16px rgba(22,21,19,.10) !important;
}
[data-theme="dark"] .sx-nav,
[data-theme="dark"] .sx-nav.is-scrolled { background: transparent !important; }
.sx-nav-inner {
  max-width: 1120px !important;
  height: 58px !important;
  padding: 0 12px 0 22px !important;
  border-radius: 999px !important;
  background: #fbfaf7 !important;
  border: 1px solid var(--gg-edge) !important;
  box-shadow: 0 6px 22px -10px rgba(22,21,19,.14), 0 1px 0 0 rgba(22,21,19,.04) !important;
}
[data-theme="dark"] .sx-nav-inner {
  background: rgba(38,32,26,.92) !important;
  border: 1px solid rgba(245,242,234,.10) !important;
  box-shadow: 0 10px 34px -10px rgba(0,0,0,.55), 0 2px 8px -3px rgba(0,0,0,.4) !important;
}
.sx-scroll-progress { top: 0 !important; }
.sx-mega {
  position: fixed !important;
  /* Was: calc(100% + 14px) — with position:fixed, 100% means 100vh,
     so the dropdown rendered ~14px BELOW the fold. Fix: align with the
     bottom of the floating pill nav (~64px) + a small gap. */
  top: 78px !important;
  bottom: auto !important;
  left: 50% !important; right: auto !important;
  width: min(1060px, calc(100vw - 32px)) !important;
  transform: translateX(-50%) translateY(-10px) !important;
  border-radius: 22px !important;
  border: 1px solid rgba(10,14,31,.08) !important;
  box-shadow: 0 30px 70px -22px rgba(10,14,31,.34), 0 6px 20px -14px rgba(10,14,31,.2) !important;
  background: #ffffff !important;
  padding: 24px !important;
}
.sx-nav-item.is-open .sx-mega { transform: translateX(-50%) translateY(0) !important; }
[data-theme="dark"] .sx-mega {
  background: #11162b !important;
  border: 1px solid rgba(245,242,234,.09) !important;
  box-shadow: 0 30px 70px -22px rgba(0,0,0,.62), 0 6px 20px -14px rgba(0,0,0,.5) !important;
}
.sx-mega-grid { max-width: none !important; padding: 0 !important; gap: 26px !important; }
.sx-mega-label { letter-spacing: .14em !important; font-size: 11px !important; }
.sx-mega-link {
  border-radius: 13px !important; padding: 9px 11px !important;
  transition: background .2s ease, transform .2s ease !important;
}
.sx-mega-link:hover { background: var(--gg-cta-soft) !important; transform: translateX(3px); }
.sx-mega-icon { border-radius: 11px !important; }
.sx-mega-featured {
  border-radius: 16px !important;
  background: linear-gradient(160deg, #12152e 0%, #1c2249 100%) !important;
  border: 1px solid rgba(245,242,234,.08) !important;
  overflow: hidden;
}
.sx-mega-featured::before { display: none !important; }
.sx-mega-featured-eyebrow { color: #3ee37a !important; }
.sx-mega-featured-title { color: #ffffff !important; }
.sx-mega-featured-desc { color: rgba(245,242,234,.62) !important; }
.sx-mega-featured-link { color: #ffffff !important; }

/* ── Mobile drawer locale switcher ─────────────────────────────────────
   Visible only inside the mobile drawer (hidden on desktop where the top-bar
   dropdown owns this). Lays out as a 2-column chip grid so flags + labels fit
   on small screens. Current locale is highlighted. ─────────────────────── */
.sx-mobile-locale {
  margin: 24px 24px 16px;
  padding: 18px 0 4px;
  border-top: 1px solid var(--gg-edge, rgba(15,30,52,.08));
}
.sx-mobile-locale-label {
  margin: 0 0 12px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gg-slate-soft, #94a3b8);
}
.sx-mobile-locale-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.sx-mobile-locale-chip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--gg-edge, rgba(15,30,52,.1));
  border-radius: 10px;
  background: #fff;
  color: var(--gg-navy, #0a2540);
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
  min-height: 44px;             /* iOS tap target */
}
.sx-mobile-locale-chip:hover,
.sx-mobile-locale-chip:focus-visible {
  border-color: var(--gg-cta, #c26643);
  background: rgba(194,102,67,.04);
}
.sx-mobile-locale-chip.is-current {
  border-color: var(--gg-cta, #c26643);
  background: rgba(194,102,67,.08);
  color: var(--gg-cta, #c26643);
  font-weight: 600;
}
.sx-mobile-locale-chip.is-current::after {
  content: '✓';
  margin-left: auto;
  font-weight: 700;
  font-size: 13px;
}
[data-theme="dark"] .sx-mobile-locale-chip {
  background: rgba(251,250,247,.04);
  border-color: rgba(251,250,247,.12);
  color: var(--gg-text, #fbfaf7);
}
[data-theme="dark"] .sx-mobile-locale-chip.is-current {
  background: rgba(194,102,67,.16);
  border-color: var(--gg-cta, #c26643);
  color: var(--gg-cta, #c26643);
}
