/* B2BOX Pro — Global tokens & base styles */
:root {
  /* Backgrounds */
  --bg-primary: #0A0A0A;
  --bg-secondary: #111111;
  --bg-tertiary: #1A1A1A;
  --bg-elevated: #1F1F1F;

  /* Text */
  --text-primary: #FFFFFF;
  --text-secondary: #A3A3A3;
  --text-tertiary: #6B6B6B;
  --text-quaternary: #4A4A4A;

  /* Accent — azul royal (B2BOX Pro brand) */
  --accent: #2F4FFF;
  --accent-hover: #4F6BFF;
  --accent-dim: #1F3BD9;
  --accent-deep: #0A1F8F;
  --accent-glow: rgba(47, 79, 255, 0.22);
  --accent-glow-strong: rgba(47, 79, 255, 0.45);
  --accent-on: #FFFFFF;

  /* States */
  --success: #4ADE80;
  --error: #FF4747;
  --warning: #FFB547;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);

  /* Spacing helpers */
  --section-py: 120px;
  --container-px: 32px;
  --container-max: 1320px;

  /* Type */
  --font-display: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg-primary); color: var(--text-primary); font-family: var(--font-body); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg, video { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #FFFFFF; }

/* Container */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-px); width: 100%; }

/* Type scale */
.t-display-xl { font-family: var(--font-display); font-size: clamp(56px, 9vw, 128px); font-weight: 600; line-height: 0.96; letter-spacing: -0.045em; }
.t-display-l  { font-family: var(--font-display); font-size: clamp(44px, 6vw, 84px);  font-weight: 600; line-height: 1.02; letter-spacing: -0.035em; }
.t-display-m  { font-family: var(--font-display); font-size: clamp(36px, 4.4vw, 60px); font-weight: 600; line-height: 1.06; letter-spacing: -0.028em; }
.t-h3         { font-family: var(--font-display); font-size: clamp(24px, 2.4vw, 32px); font-weight: 600; line-height: 1.2;  letter-spacing: -0.018em; }
.t-h4         { font-family: var(--font-display); font-size: 22px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.t-body-l     { font-size: 19px; line-height: 1.55; color: var(--text-secondary); font-weight: 400; }
.t-body       { font-size: 16px; line-height: 1.6; color: var(--text-secondary); }
.t-body-s     { font-size: 14px; line-height: 1.55; color: var(--text-secondary); }
.t-caption    { font-size: 12px; line-height: 1.4; color: var(--text-tertiary); }
.t-mono       { font-family: var(--font-mono); font-size: 13px; line-height: 1.4; letter-spacing: 0; }
.t-eyebrow    { font-family: var(--font-mono); font-size: 11px; line-height: 1; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-tertiary); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-body); font-weight: 500; font-size: 15px; padding: 14px 22px; border-radius: 8px; transition: all 220ms cubic-bezier(.2,.8,.2,1); white-space: nowrap; }
.btn-lg { padding: 18px 28px; font-size: 16px; }
.btn-xl { padding: 22px 36px; font-size: 18px; }
.btn-primary { background: var(--accent); color: var(--accent-on); box-shadow: 0 0 0 0 var(--accent-glow); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 8px 32px var(--accent-glow-strong); }
.btn-ghost { color: var(--text-primary); border: 1px solid var(--border-medium); background: transparent; }
.btn-ghost:hover { border-color: var(--border-strong); background: rgba(255,255,255,0.03); }
.btn-link { color: var(--text-primary); padding: 0; }
.btn-link:hover { color: var(--accent); }

/* Badge */
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--border-medium); border-radius: 999px; font-family: var(--font-mono); font-size: 11px; line-height: 1; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-secondary); background: rgba(255,255,255,0.02); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow-strong); }

/* Card */
.card { background: var(--bg-secondary); border: 1px solid var(--border-subtle); border-radius: 16px; transition: border-color 220ms, transform 220ms, background 220ms; }
.card:hover { border-color: var(--border-medium); }

/* Section */
.section { padding: var(--section-py) 0; position: relative; }
@media (max-width: 768px) {
  :root { --section-py: 80px; --container-px: 20px; }
}

/* Grid lines background (subtle) */
.bg-grid {
  background-image:
    linear-gradient(to right, var(--border-subtle) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px);
  background-size: 80px 80px;
}

.bg-noise::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms cubic-bezier(.2,.8,.2,1), transform 700ms cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* Pulsing dot */
@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.7; }
  100% { transform: scale(2.4); opacity: 0; }
}
@keyframes breathe {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.cursor-blink::after { content: '|'; display: inline-block; margin-left: 2px; color: var(--accent); animation: blink 1s steps(1) infinite; }

/* Utility */
.accent { color: var(--accent); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.flex { display: flex; }
.grid { display: grid; }
.center { display: flex; align-items: center; justify-content: center; }
.divider { height: 1px; background: var(--border-subtle); width: 100%; }

/* Header */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: background 300ms, backdrop-filter 300ms, border-color 300ms; border-bottom: 1px solid transparent; }
.site-header.scrolled { background: rgba(10,10,10,0.72); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom-color: var(--border-subtle); }
.site-header .inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 0; font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.045em; line-height: 1; }
.logo .lockup { display: inline-flex; align-items: center; gap: 4px; }
.logo .b2box { color: var(--text-primary); }
.logo .cube { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin: 0 -2px; }
.logo .pro { background: var(--accent); color: #FFFFFF; padding: 3px 8px 4px; border-radius: 5px; font-weight: 800; letter-spacing: -0.02em; margin-left: 6px; font-size: 14px; line-height: 1; }
.site-header.scrolled .logo .b2box { color: var(--text-primary); }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a { font-size: 14px; color: var(--text-secondary); position: relative; padding: 6px 0; }
.nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 220ms cubic-bezier(.2,.8,.2,1); }
.nav a:hover { color: var(--text-primary); }
.nav a:hover::after { transform: scaleX(1); }
/* Active state: page corresponds to this nav item (set by site.js applyActiveNav). */
.nav a.active, .nav a.is-active { color: var(--text-primary); font-weight: 600; }
.nav a.active::after, .nav a.is-active::after { transform: scaleX(1); }
.country-select { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border-subtle); font-size: 13px; color: var(--text-secondary); background: transparent; }
.country-select:hover { border-color: var(--border-medium); color: var(--text-primary); }

@media (max-width: 1024px) {
  .nav { display: none; }
  .country-select { display: none; }
  .header-cta { display: none; }
}
.menu-trigger { display: none; }
@media (max-width: 1024px) {
  .menu-trigger { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--border-subtle); }
}

/* Footer */
.site-footer { padding: 96px 0 48px; border-top: 1px solid var(--border-subtle); margin-top: 80px; position: relative; overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 48px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 18px; font-weight: 500; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { font-size: 14px; color: var(--text-secondary); transition: color 200ms; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 32px; margin-top: 64px; border-top: 1px solid var(--border-subtle); flex-wrap: wrap; gap: 16px; }
.footer-bottom .meta { font-size: 13px; color: var(--text-tertiary); display: flex; gap: 24px; flex-wrap: wrap; }
.footer-mega { font-family: var(--font-display); font-weight: 700; font-size: clamp(80px, 18vw, 240px); letter-spacing: -0.06em; line-height: 0.85; background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0)); -webkit-background-clip: text; background-clip: text; color: transparent; text-align: center; margin-top: 48px; user-select: none; animation: breathe 6s ease-in-out infinite; }

/* ════════════════════════════════════════════════════════════════
   LANGUAGE SWITCHER
   ════════════════════════════════════════════════════════════════ */
.lang-switcher { position: relative; display: inline-block; }
.lang-switch-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: transparent; border: 1px solid rgba(15, 23, 64, 0.14);
  color: #0A2540; font-family: 'Inter Tight', sans-serif;
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  transition: all 180ms ease;
}
.lang-switch-btn:hover { border-color: #2F4FFF; color: #2F4FFF; }
.lang-switch-btn[aria-expanded="true"] { border-color: #2F4FFF; color: #2F4FFF; }
.lang-switch-label { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; }
.lang-switch-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border: 1px solid rgba(15, 23, 64, 0.10);
  border-radius: 12px; padding: 6px; min-width: 220px;
  box-shadow: 0 18px 40px -16px rgba(15, 23, 64, 0.25), 0 4px 12px -4px rgba(15, 23, 64, 0.1);
  list-style: none; margin: 0; z-index: 1000;
}
.lang-switch-menu li { padding: 0; }
.lang-switch-menu a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border-radius: 8px;
  font-family: 'Inter Tight', sans-serif; font-size: 14px; font-weight: 600;
  color: #0A2540; text-decoration: none; transition: background 160ms;
}
.lang-switch-menu a:hover { background: #F2F5FA; }
.lang-switch-menu a.is-current { background: rgba(47, 79, 255, 0.08); color: #2F4FFF; }
.lang-switch-menu a span { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 500; color: #6B7C93; }
/* dark mode auto-fit */
.dark-theme .lang-switch-btn { color: #fff; border-color: rgba(255,255,255,0.18); }
.dark-theme .lang-switch-btn:hover { border-color: #abff97; color: #abff97; }
.dark-theme .lang-switch-menu { background: #0A1740; border-color: rgba(255,255,255,0.10); }
.dark-theme .lang-switch-menu a { color: #fff; }
.dark-theme .lang-switch-menu a:hover { background: rgba(255,255,255,0.06); }
.dark-theme .lang-switch-menu a.is-current { background: rgba(171,255,151,0.12); color: #abff97; }
.dark-theme .lang-switch-menu a span { color: rgba(255,255,255,0.55); }










/* ════════════════════════════════════════════════════════════════
   PRODUCT BAR · v8 — simple hide on scroll
   - At top: Dynamic Island visible (floating pill, no blur)
   - On scroll past 50px: DI slides up + fades out
   - Header slides up from below DI to top:0 to fill the space
   - Body padding shrinks accordingly
   ════════════════════════════════════════════════════════════════ */

:root {
  --pb-top-offset: 14px;
  --pb-island-h: 52px;
  --pb-logo-h: 22px;
  --pb-btn-w: 180px;
  --pb-reserved: 74px;  /* offset + island + gap = total space above header */
  --header-h: 74px;
}

/* When hidden — DI gone, header at top */
html.is-pb-hidden {
  --pb-reserved: 0px;
}

@media (max-width: 900px) {
  :root { --pb-btn-w: 144px; --pb-logo-h: 18px; }
}

@media (max-width: 600px) {
  :root {
    --pb-top-offset: 8px;
    --pb-island-h: 46px;
    --pb-logo-h: 16px;
    --pb-reserved: 62px;
  }
}

/* Body padding + header position both react to --pb-reserved */
body {
  padding-top: calc(var(--pb-reserved) + var(--header-h));
  transition: padding-top .45s cubic-bezier(.4, 0, .2, 1);
}

.site-header {
  top: var(--pb-reserved) !important;
  transition: top .45s cubic-bezier(.4, 0, .2, 1),
              background-color .3s ease,
              backdrop-filter .3s ease;
}

/* Dynamic Island
   NOTE: no CSS keyframe animation here — a fill-mode:both animation would
   override the transform set by .is-pb-hidden (animations beat normal rules
   in the cascade). Entry fade is handled by transition + initial inline state. */
.product-bar {
  position: fixed;
  top: var(--pb-top-offset);
  left: 0; right: 0;
  z-index: 200;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transform: translateY(0);
  opacity: 1;
  transition: transform .45s cubic-bezier(.4, 0, .2, 1),
              opacity .35s cubic-bezier(.4, 0, .2, 1);
}

/* HIDDEN STATE — slides up out of view */
html.is-pb-hidden .product-bar {
  transform: translateY(-130px);
  opacity: 0;
  pointer-events: none !important;
}

.pb-island {
  pointer-events: auto;
  display: grid;
  grid-template-columns: repeat(3, var(--pb-btn-w));
  gap: 5px;
  padding: 5px;
  background: #0A0C1C;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
  box-shadow: 0 18px 50px -10px rgba(0,0,0,0.55),
              0 0 0 1px rgba(255,255,255,0.04) inset;
  height: var(--pb-island-h);
}

.pb-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  border-radius: 999px;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  overflow: visible;
  transition: background .28s cubic-bezier(.2,.8,.2,1);
}

/* Inactive logos — brand color trick (white B2BOX + colored suffix) */
.pb-logo {
  height: var(--pb-logo-h);
  width: auto;
  display: block;
  filter: invert(1) hue-rotate(180deg);
  opacity: 0.92;
  pointer-events: none;
  transition: filter .35s cubic-bezier(.2,.8,.2,1),
              opacity .35s cubic-bezier(.2,.8,.2,1),
              transform .35s cubic-bezier(.2,.8,.2,1);
}

/* Hover */
.pb-btn:hover { background: rgba(255,255,255,0.08); }
.pb-btn:hover .pb-logo { opacity: 1; transform: scale(1.05); }

/* Active state — white pill + ORIGINAL logo (after 1s delay) */
.pb-btn[data-active="true"] {
  animation: pbActivate 1s cubic-bezier(.4,0,.2,1) both;
  animation-delay: 1s;
  cursor: default;
}
.pb-btn[data-active="true"] .pb-logo {
  animation: pbLogoActivate .8s cubic-bezier(.4,0,.2,1) both;
  animation-delay: 1.2s;
}
.pb-btn[data-active="true"]:hover { background: #fff; }
.pb-btn[data-active="true"]:hover .pb-logo {
  filter: none; opacity: 1; transform: scale(1.08);
}

@keyframes pbActivate {
  0%   { background: transparent; box-shadow: 0 0 0 0 rgba(255,255,255,0); }
  35%  { background: rgba(255,255,255,0.98); box-shadow: 0 0 0 5px rgba(255,255,255,0.12), 0 6px 20px -2px rgba(255,255,255,0.20); }
  100% { background: #ffffff; box-shadow: 0 4px 14px -4px rgba(255,255,255,0.20); }
}
@keyframes pbLogoActivate {
  from { filter: invert(1) hue-rotate(180deg); opacity: 0.92; transform: scale(1); }
  to   { filter: none; opacity: 1; transform: scale(1.06); }
}

/* Tooltip (solid bg, no blur) */
.pb-tip {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  padding: 11px 16px;
  border-radius: 12px;
  background: #0A0C1C;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 14px 36px -10px rgba(0,0,0,0.6);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
  font-family: 'Inter Tight', sans-serif;
  z-index: 201;
}
.pb-tip::before {
  content: '';
  position: absolute; top: -6px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px;
  background: #0A0C1C;
  border-left: 1px solid rgba(255,255,255,0.16);
  border-top: 1px solid rgba(255,255,255,0.16);
}
.pb-tip-name {
  font-size: 14px; font-weight: 700; color: #ffffff;
  letter-spacing: -0.012em; line-height: 1.1;
  display: inline-flex; align-items: center; gap: 5px;
}
.pb-tip-name svg { opacity: 0.55; }
.pb-tip-desc {
  font-size: 12px; font-weight: 500;
  color: rgba(255,255,255,0.68);
  letter-spacing: 0.005em; line-height: 1.2;
}
.pb-btn:hover .pb-tip {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition: opacity .22s ease .05s, transform .22s ease .05s, visibility 0s linear 0s;
}

/* Mobile */
@media (max-width: 600px) {
  .pb-island {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: calc(100% - 16px);
    max-width: 420px;
  }
  .pb-tip { font-size: 11px; padding: 8px 12px; }
  .pb-tip-name { font-size: 12.5px; }
  .pb-tip-desc { font-size: 11px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  body, .product-bar, .site-header, .pb-logo, .pb-btn,
  .pb-btn[data-active="true"], .pb-btn[data-active="true"] .pb-logo, .pb-tip {
    animation: none !important; transition: none !important;
  }
  .pb-btn[data-active="true"] { background: #fff; }
  .pb-btn[data-active="true"] .pb-logo { filter: none; opacity: 1; transform: scale(1.06); }
  html.is-pb-hidden .product-bar { transform: translateY(-100px); opacity: 0; }
}
