/* 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; }
