/* ============================================================
   TRUCKBOX v7 — BASE LIGHT (reset, tipografía, utilidades)
   ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--t-body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
html.is-loading { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; }
h1, h2, h3, h4, h5 { font-family: var(--font-display); color: var(--ink); line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; }

::selection { background: var(--cyan-mid); color: #ffffff; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

/* Scrollbar */
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: #eef2f7; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--cyan-deep), var(--cyan-lite)); border-radius: 6px; border: 2px solid #eef2f7; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 8vw, 110px); position: relative; }
section[id], div[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

/* ---------- Tipografía ---------- */
.h1 { font-size: clamp(2.2rem, 5.6vw, 3.9rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; color: var(--ink); }
.h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 800; line-height: 1.1; color: var(--ink); }
.h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 700; color: var(--ink); }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.grad-ink { background: var(--grad-ink); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.mono { font-family: var(--font-mono); }
.text-lead { font-size: clamp(1rem, 1.3vw, 1.12rem); line-height: 1.7; color: var(--t-body); }

/* Eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-accent);
  background: rgba(8, 145, 178, 0.07);
  color: var(--cyan-deep);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow--emerald { border-color: rgba(5, 150, 105, 0.35); background: rgba(5, 150, 105, 0.08); color: var(--emerald-deep); }

/* ---------- Glass & panels (light) ---------- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
}
.panel {
  background: var(--panel-grad);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-panel);
}
.panel--accent { border-color: var(--line-accent); }

/* ---------- Decoración ---------- */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(8, 145, 178, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(8, 145, 178, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 55%, transparent 100%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; z-index: 0; }
.blob--cyan { background: rgba(6, 182, 212, 0.16); }
.blob--ice { background: rgba(56, 189, 248, 0.14); }
.blob--emerald { background: rgba(16, 185, 129, 0.12); }

/* Dot live */
.dot-live { position: relative; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--emerald); flex: none; }
.dot-live::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid rgba(5, 150, 105, 0.55); animation: ping-ring 1.8s var(--ease-out-expo) infinite; }
.dot-cyan { background: var(--cyan); }
.dot-cyan::after { border-color: rgba(8, 145, 178, 0.55); }

/* Icons */
.ico { font-family: "Material Symbols Outlined"; font-weight: 400; line-height: 1; display: inline-block; vertical-align: middle; user-select: none; }
.ico--filled { font-variation-settings: "FILL" 1; }

/* Visually hidden pero accesible */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Botones (light) ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 24px;
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform var(--dur-2) var(--ease-smooth), box-shadow var(--dur-2), background var(--dur-2), border-color var(--dur-2);
  will-change: transform;
}
.btn:active { transform: scale(0.98); }
.btn--primary { color: var(--t-on-color); background: var(--grad-brand); background-size: 180% auto; box-shadow: var(--glow-cyan-soft); }
.btn--primary:hover { background-position: right center; transform: translateY(-2px); box-shadow: var(--glow-cyan); }
.btn--ghost { color: var(--ink-soft); background: #ffffff; border: 1px solid var(--line-strong); }
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan-deep); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn--emerald { color: #ffffff; background: var(--grad-emerald); box-shadow: 0 12px 34px -14px rgba(16, 185, 129, 0.45); }
.btn--emerald:hover { transform: translateY(-2px); box-shadow: var(--glow-emerald); }
.btn--lg { padding: 17px 30px; font-size: 13.5px; border-radius: var(--r-lg); }
.btn--sm { padding: 10px 16px; font-size: 11.5px; border-radius: var(--r-sm); }
.btn--block { width: 100%; }
.btn-shine { overflow: hidden; }
.btn-shine::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.45) 50%, transparent 60%); transform: translateX(-120%); transition: transform 0.7s var(--ease-smooth); }
.btn-shine:hover::after { transform: translateX(120%); }

/* ---------- Gates de reveal ---------- */
html:not(.anim-ready) [data-reveal] { opacity: 1 !important; transform: none !important; }

/* ---------- Keyframes ---------- */
@keyframes ping-ring {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}
@keyframes pulse-soft { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes dash-flow { to { stroke-dashoffset: -260; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .dot-live::after, .pulse-soft { animation: none !important; }
}
