/* ═══════════════════════════════════════════════════
   VERTEX LOGISTICS — Global Design System
   Version 2.0 · Tesla × DHL × Uber Freight
   ═══════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  /* Brand */
  --brand-gold: #F59E0B;
  --brand-gold-dark: #D97706;
  --brand-blue: #1A56DB;
  --brand-blue-hover: #1D4ED8;

  /* Light mode */
  --bg: #FFFFFF;
  --bg-2: #F9FAFB;
  --bg-3: #F3F4F6;
  --surface: #FFFFFF;
  --surface-2: #F9FAFB;
  --border: rgba(0,0,0,.1);
  --text: #0A0A0B;
  --text-2: #374151;
  --text-3: #6B7280;
  --text-inv: #FFFFFF;
  --shadow: 0 4px 24px rgba(0,0,0,.08);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.14);
  --nav-bg: rgba(255,255,255,.88);
  --glass: rgba(255,255,255,.7);
  --card-bg: #FFFFFF;

  /* Spacing */
  --sp-xs: 4px; --sp-sm: 8px; --sp-md: 16px; --sp-lg: 24px;
  --sp-xl: 32px; --sp-2xl: 48px; --sp-3xl: 64px; --sp-4xl: 96px;

  /* Typography */
  --f: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --f-display: 'Inter', sans-serif;

  /* Borders */
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 24px; --r-full: 9999px;

  /* Transitions */
  --tr: .22s cubic-bezier(.4,0,.2,1);
  --tr-slow: .5s cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
  --bg: #0A0A0B;
  --bg-2: #111113;
  --bg-3: #18181B;
  --surface: #18181B;
  --surface-2: #1F1F23;
  --border: rgba(255,255,255,.09);
  --text: #F9FAFB;
  --text-2: #D1D5DB;
  --text-3: #9CA3AF;
  --text-inv: #0A0A0B;
  --shadow: 0 4px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.5);
  --nav-bg: rgba(10,10,11,.88);
  --glass: rgba(18,18,20,.72);
  --card-bg: #18181B;
}

/* ── Reset ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; font-size:16px; }
body {
  font-family: var(--f); background: var(--bg); color: var(--text);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
  transition: background var(--tr), color var(--tr);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; font-family: var(--f); border: 0; }
input, select, textarea { font-family: var(--f); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Utilities ── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1440px; margin: 0 auto; padding: 0 24px; }
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0; }
.grad-text {
  background: linear-gradient(135deg, var(--brand-gold), #FBBF24);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.grad-text-blue {
  background: linear-gradient(135deg, var(--brand-blue), #60A5FA);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: var(--sp-sm);
  padding: 14px 28px; border-radius: var(--r-full);
  font-size: 15px; font-weight: 600; transition: var(--tr);
  white-space: nowrap; text-align: center; border: 0;
}
.btn-primary {
  background: var(--brand-gold); color: #000;
  box-shadow: 0 4px 20px rgba(245,158,11,.35);
}
.btn-primary:hover { background: var(--brand-gold-dark); transform: translateY(-1px); box-shadow: 0 8px 28px rgba(245,158,11,.45); }
.btn-secondary {
  background: var(--brand-blue); color: #fff;
  box-shadow: 0 4px 20px rgba(26,86,219,.3);
}
.btn-secondary:hover { background: var(--brand-blue-hover); transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--brand-gold); color: var(--brand-gold); }
.btn-white { background: #fff; color: #000; }
.btn-white:hover { background: rgba(255,255,255,.88); transform: scale(.98); }
.btn-ghost { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(10px); }
.btn-ghost:hover { background: rgba(255,255,255,.2); }
.btn-sm { padding: 10px 20px; font-size: 13px; }
.btn-lg { padding: 18px 36px; font-size: 17px; }
.btn-wsp { background: #25D366; color: #fff; box-shadow: 0 4px 20px rgba(37,211,102,.35); }
.btn-wsp:hover { background: #22C55E; transform: translateY(-1px); }

/* ── Labels/Badges ── */
.label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 5px 14px; border-radius: var(--r-full);
  background: rgba(245,158,11,.12); color: var(--brand-gold); border: 1px solid rgba(245,158,11,.2);
}
.label-blue { background: rgba(26,86,219,.1); color: var(--brand-blue); border-color: rgba(26,86,219,.2); }
.label-green { background: rgba(34,197,94,.1); color: #16A34A; border-color: rgba(34,197,94,.2); }
[data-theme="dark"] .label-green { color: #4ADE80; }

/* ── Section Headers ── */
.section-tag {
  font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--brand-gold); display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.section-tag::before { content:''; width:28px; height:2px; background:var(--brand-gold); border-radius:2px; }
.section-h {
  font-size: clamp(28px, 3.5vw, 48px); font-weight: 800;
  letter-spacing: -1.5px; line-height: 1.1; color: var(--text);
}
.section-sub {
  font-size: clamp(15px, 1.8vw, 19px); color: var(--text-3);
  font-weight: 400; line-height: 1.7; max-width: 600px;
}

/* ── Cards ── */
.card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: var(--sp-xl);
  box-shadow: var(--shadow); transition: var(--tr);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand-gold); }
.card-glass {
  background: var(--glass); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px); border: 1px solid var(--border);
  border-radius: var(--r-xl);
}

/* ── Form Inputs ── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; }
.form-control {
  width: 100%; padding: 13px 16px;
  background: var(--bg-2); border: 1.5px solid var(--border);
  border-radius: var(--r-md); color: var(--text); font-size: 15px; font-family: var(--f);
  outline: none; transition: var(--tr);
}
.form-control:focus { border-color: var(--brand-gold); background: var(--bg); box-shadow: 0 0 0 3px rgba(245,158,11,.12); }
.form-control::placeholder { color: var(--text-3); }
.form-control-select { -webkit-appearance: none; appearance: none; cursor: pointer; }
select.form-control option { background: var(--bg-2); }

/* ── Reveal animations ── */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-left { opacity: 0; transform: translateX(-32px); transition: opacity .7s ease, transform .7s ease; }
.reveal-left.visible { opacity: 1; transform: none; }
.reveal-right { opacity: 0; transform: translateX(32px); transition: opacity .7s ease, transform .7s ease; }
.reveal-right.visible { opacity: 1; transform: none; }
.reveal-scale { opacity: 0; transform: scale(.95); transition: opacity .7s ease, transform .7s ease; }
.reveal-scale.visible { opacity: 1; transform: scale(1); }
.delay-1 { transition-delay: .1s !important; }
.delay-2 { transition-delay: .2s !important; }
.delay-3 { transition-delay: .3s !important; }
.delay-4 { transition-delay: .4s !important; }
.delay-5 { transition-delay: .5s !important; }

/* ── Progress bar ── */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; z-index: 9999;
  background: linear-gradient(90deg, var(--brand-gold), var(--brand-blue));
  width: 0%; transition: width .1s linear;
}

/* ── Back to top ── */
#back-top {
  position: fixed; bottom: 100px; right: 24px; z-index: 500;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand-gold); color: #000; font-size: 18px;
  display: grid; place-items: center; box-shadow: 0 4px 16px rgba(245,158,11,.4);
  opacity: 0; transform: translateY(10px); transition: var(--tr);
  pointer-events: none;
}
#back-top.show { opacity: 1; transform: none; pointer-events: auto; }
#back-top:hover { transform: translateY(-2px); }

/* ── Cookie banner ── */
#cookie-banner {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  width: min(540px, calc(100vw - 32px)); z-index: 800;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 20px 24px;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 16px;
  animation: slideUp .4s ease;
}
@keyframes slideUp { from{opacity:0;transform:translateX(-50%) translateY(20px)} to{opacity:1;transform:translateX(-50%) translateY(0)} }

/* ── Chatbot ── */
#chatbot-widget {
  position: fixed; bottom: 28px; right: 28px; z-index: 600;
}
.chat-fab {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--brand-gold); color: #000; font-size: 24px;
  display: grid; place-items: center; box-shadow: 0 8px 28px rgba(245,158,11,.45);
  border: 0; transition: var(--tr);
}
.chat-fab:hover { transform: scale(1.08); }
.chat-window {
  position: absolute; bottom: 70px; right: 0;
  width: 340px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); overflow: hidden;
  opacity: 0; transform: scale(.92) translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.chat-window.open { opacity: 1; transform: none; pointer-events: all; }
.chat-header {
  background: var(--brand-gold); padding: 16px 18px;
  display: flex; align-items: center; gap: 10px;
}
.chat-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,.2); display: grid; place-items: center; font-size: 18px; }
.chat-header-info h4 { font-size: 14px; font-weight: 700; color: #000; }
.chat-header-info span { font-size: 11px; color: rgba(0,0,0,.6); }
.chat-messages { height: 260px; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 82%; }
.chat-msg.bot { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; }
.chat-bubble {
  padding: 10px 14px; border-radius: 16px; font-size: 13px; line-height: 1.5;
}
.chat-msg.bot .chat-bubble { background: var(--bg-2); color: var(--text); border-radius: 4px 16px 16px 16px; }
.chat-msg.user .chat-bubble { background: var(--brand-gold); color: #000; border-radius: 16px 4px 16px 16px; }
.chat-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chat-option {
  font-size: 12px; padding: 6px 12px; border-radius: var(--r-full);
  background: var(--bg-3); border: 1px solid var(--border); color: var(--text-2);
  cursor: pointer; transition: var(--tr);
}
.chat-option:hover { background: var(--brand-gold); color: #000; border-color: var(--brand-gold); }
.chat-input-row { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.chat-input {
  flex: 1; padding: 9px 14px; border: 1px solid var(--border); border-radius: var(--r-full);
  background: var(--bg-2); color: var(--text); font-size: 13px; outline: none;
  transition: var(--tr);
}
.chat-input:focus { border-color: var(--brand-gold); }
.chat-send { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-gold); color: #000; font-size: 16px; display: grid; place-items: center; }
.chat-typing { display: flex; gap: 4px; align-items: center; padding: 10px 14px; }
.chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: blink 1.4s infinite; }
.chat-typing span:nth-child(2) { animation-delay: .2s; }
.chat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100%{opacity:.2}40%{opacity:1} }

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 400;
  height: 64px; transition: background var(--tr), border var(--tr), box-shadow var(--tr);
}
.nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,.08);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; height: 100%; gap: 0;
}
.nav-brand { display: flex; align-items: center; gap: 10px; margin-right: auto; flex-shrink: 0; }
.nav-brand img { height: 38px; width: auto; }
.nav-brand-name { display: flex; flex-direction: column; line-height: 1; }
.nav-brand-name b { font-size: 15px; font-weight: 800; letter-spacing: 1.5px; }
.nav-brand-name small { font-size: 9px; letter-spacing: 3px; opacity: .5; font-weight: 500; text-transform: uppercase; margin-top: 1px; }
.nav-links { display: flex; align-items: center; gap: 0; }
.nav-links a {
  font-size: 13px; font-weight: 500; padding: 0 14px; height: 64px;
  display: flex; align-items: center; opacity: .75; transition: var(--tr);
}
.nav-links a:hover { opacity: 1; color: var(--brand-gold); }
.nav-links a.active { opacity: 1; color: var(--brand-gold); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: 16px; }
.nav-theme-toggle {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-2); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 17px; transition: var(--tr);
  color: var(--text);
}
.nav-theme-toggle:hover { border-color: var(--brand-gold); }
.nav-burger { display: none; width: 40px; height: 40px; border-radius: 50%; background: var(--bg-2); border: 1px solid var(--border); flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav-burger span { display: block; width: 18px; height: 1.5px; background: var(--text); border-radius: 2px; transition: var(--tr); }
.mob-nav {
  display: none; position: fixed; inset: 64px 0 0; z-index: 399;
  background: var(--bg); border-top: 1px solid var(--border);
  padding: 16px 0; flex-direction: column; overflow-y: auto;
}
.mob-nav.open { display: flex; }
.mob-nav a { padding: 16px 24px; font-size: 16px; font-weight: 500; border-bottom: 1px solid var(--border); }
.mob-nav .mob-ctas { padding: 20px 24px; display: flex; flex-direction: column; gap: 10px; }

/* ══════════════════════════════════════════════
   RESPONSIVE — 4 Breakpoints
   Desktop  >1200px  | Laptop 1200-1024px
   Tablet   1024-768px | Mobile <768px / <480px
   ══════════════════════════════════════════════ */

/* ── LAPTOP (max 1200px) ── */
@media (max-width: 1200px) {
  .container { padding: 0 20px; }
  .container-wide { padding: 0 20px; }
}

/* ── TABLET + NAV COLAPSO (max 1080px) ── */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-actions .btn { display: none; }
  .nav-burger { display: flex; }

  /* NAV — solo logo + tema + hamburguesa */
  .nav-inner { padding: 0 20px; }
  .nav-brand img { height: 32px; }
  .nav-brand-name b { font-size: 14px; }

  /* Chatbot más pequeño en tablet */
  .chat-window { width: 300px; }
}

/* ── TABLET (max 900px) ── */
@media (max-width: 900px) {
  /* Spacing */
  :root {
    --sp-4xl: 64px;
    --sp-3xl: 48px;
  }

  /* Botones */
  .btn-lg { padding: 15px 26px; font-size: 16px; }

  /* Chatbot */
  .chat-window { width: 280px; bottom: 65px; }
  #chatbot-widget { bottom: 18px; right: 18px; }
  #back-top { bottom: 85px; right: 18px; }

  /* Card cookie */
  #cookie-banner { padding: 16px 18px; }
}
