/* ================================================================
   LESMAC INGENIERÍA — global.css
   Tokens · Reset · Typography · Body/Background · Utilities
================================================================ */

/* ── TOKENS ──────────────────────────────────────────────── */
:root {
  --brass:        #C9A227;
  --brass-light:  #DDB62B;
  --brass-dark:   #A3841E;
  --slate:        #1E293B;
  --slate-mid:    #334155;
  --slate-light:  #475569;
  --steel:        #64748B;
  --white:        #FFFFFF;
  --cream:        #FFFCF5;

  /* Glass system */
  --glass-1:  rgba(255,255,255,.07);
  --glass-2:  rgba(255,255,255,.11);
  --glass-3:  rgba(255,255,255,.15);
  --glass-br: rgba(255,255,255,.16);
  --blur-sm:  blur(16px) saturate(180%);
  --blur-md:  blur(26px) saturate(180%);
  --blur-lg:  blur(36px) saturate(200%);

  /* Text over dark overlays */
  --tx-hi:   rgba(255,255,255,.96);
  --tx-mid:  rgba(255,255,255,.72);
  --tx-dim:  rgba(255,255,255,.48);
  --tx-mute: rgba(255,255,255,.32);

  /* Overlay opacities */
  --ov-hero:    rgba(4,10,22,.82);
  --ov-dark:    rgba(4,10,22,.78);
  --ov-medium:  rgba(4,10,22,.70);
  --ov-light:   rgba(4,10,22,.60);

  /* Spacing / Layout */
  --nav-h:   72px;
  --max-w:   1200px;
  --r:       8px;
  --r-lg:    16px;
  --r-xl:    24px;

  /* Shadows */
  --sh-card: 0 4px 28px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.14);
  --sh-hover:0 14px 52px rgba(0,0,0,.40), inset 0 1px 0 rgba(255,255,255,.22);

  /* Transitions */
  --t:    .25s ease;
  --t-lg: .45s ease;
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.65;
  color: var(--tx-hi);
  background-color: #060c18;
  background-image: url('../images/fondo.jpg');
  background-attachment: fixed;
  background-size: cover;
  background-position: center 30%;
  overflow-x: hidden;
  min-height: 100vh;
}
h1, h2, h3, h4, h5 { font-family: 'Poppins', sans-serif; line-height: 1.18; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (max-width: 768px) { body { background-attachment: scroll; } }

/* ── TYPOGRAPHY ──────────────────────────────────────────── */
.t-label {
  display: inline-block;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 3.5px; text-transform: uppercase;
  color: var(--brass); margin-bottom: 10px;
}
.t-h1 { font-size: clamp(34px, 6vw, 64px); font-weight: 800; color: var(--white); }
.t-h2 { font-size: clamp(26px, 4vw, 44px); font-weight: 700; color: var(--white); }
.t-h3 { font-size: clamp(18px, 2.5vw, 22px); font-weight: 600; color: var(--white); }
.t-lead { font-size: 16px; line-height: 1.85; color: var(--tx-mid); max-width: 600px; }
.t-body { font-size: 15px; line-height: 1.80; color: var(--tx-mid); }
.brass-line { width: 44px; height: 3px; background: var(--brass); margin: 18px 0 24px; border-radius: 2px; }

/* ── LAYOUT ──────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.page-section { padding: 96px 0; position: relative; }
.section-overlay::before {
  content: ''; position: absolute; inset: 0;
  background: var(--ov-dark); pointer-events: none; z-index: 0;
}
.section-overlay.ov-medium::before { background: var(--ov-medium); }
.section-overlay.ov-light::before  { background: var(--ov-light); }
.section-overlay > .container { position: relative; z-index: 1; }

.sec-head { text-align: center; margin-bottom: 56px; }
.sec-head .t-lead { margin: 8px auto 0; }

/* ── SCROLL REVEAL ───────────────────────────────────────── */
.rev {
  opacity: 0; transform: translateY(24px);
  transition: opacity .65s ease, transform .65s ease;
}
.rev.in { opacity: 1; transform: none; }
.rev.d1 { transition-delay: .08s; }
.rev.d2 { transition-delay: .16s; }
.rev.d3 { transition-delay: .24s; }
.rev.d4 { transition-delay: .32s; }
.rev.d5 { transition-delay: .40s; }

/* ── GLASS UTILITY ───────────────────────────────────────── */
.glass {
  background: var(--glass-1);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: 1px solid var(--glass-br);
  box-shadow: var(--sh-card);
  border-radius: var(--r-lg);
}
.glass-hover:hover {
  background: var(--glass-3);
  box-shadow: var(--sh-hover);
  transform: translateY(-4px);
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: 14px; padding: 13px 28px;
  border-radius: var(--r); border: none;
  transition: all var(--t); cursor: pointer; text-decoration: none;
  white-space: nowrap;
}
.btn-brass {
  background: var(--brass); color: var(--slate);
}
.btn-brass:hover {
  background: var(--brass-light); transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(201,162,39,.40);
}
.btn-glass {
  background: var(--glass-2); color: var(--white);
  backdrop-filter: var(--blur-sm); -webkit-backdrop-filter: var(--blur-sm);
  border: 1px solid var(--glass-br);
}
.btn-glass:hover {
  background: var(--glass-3); transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
}
.btn-outline {
  background: transparent; color: var(--white);
  border: 1.5px solid rgba(255,255,255,.32);
}
.btn-outline:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.55);
  transform: translateY(-2px);
}

/* ── BADGE ───────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--glass-2);
  backdrop-filter: var(--blur-sm); -webkit-backdrop-filter: var(--blur-sm);
  border: 1px solid rgba(255,255,255,.22);
  padding: 6px 16px; border-radius: 100px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--brass);
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brass);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.6); }
}

/* ── STATS BAR ───────────────────────────────────────────── */
.stats-bar {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--glass-1);
  backdrop-filter: var(--blur-md); -webkit-backdrop-filter: var(--blur-md);
  border: 1px solid var(--glass-br); border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 8px 36px rgba(0,0,0,.24);
}
.stat-item {
  padding: 24px 20px;
  border-right: 1px solid rgba(255,255,255,.08);
  text-align: left;
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(32px, 4vw, 48px); font-weight: 800;
  color: var(--brass); line-height: 1; margin-bottom: 4px;
}
.stat-lbl { font-size: 12.5px; color: var(--tx-dim); font-weight: 500; }

/* ── WA FLOATING ─────────────────────────────────────────── */
@keyframes wa-enter { from { opacity:0; transform:translateY(16px) scale(.85); } to { opacity:1; transform:none; } }
@keyframes wa-ring  { 0% { transform:scale(1); opacity:.7; } 80%,100% { transform:scale(1.9); opacity:0; } }
.wa-float {
  position: fixed; bottom: 28px; right: 28px; z-index: 500;
  display: flex; align-items: center; gap: 10px;
  animation: wa-enter .6s .8s cubic-bezier(.34,1.56,.64,1) both;
}
.wa-btn {
  position: relative; width: 56px; height: 56px;
  background: linear-gradient(135deg, #2ECC71, #25D366, #1DA851);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; text-decoration: none;
  box-shadow: 0 4px 20px rgba(37,211,102,.42);
  transition: transform var(--t), box-shadow var(--t);
}
.wa-btn:hover { transform: scale(1.08) translateY(-2px); box-shadow: 0 10px 32px rgba(37,211,102,.56); }
.wa-btn::before, .wa-btn::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(37,211,102,.40);
  animation: wa-ring 3s ease-in-out 1.2s infinite;
}
.wa-btn::after { border-color: rgba(37,211,102,.22); animation-delay: 1.7s; }
.wa-tip {
  background: rgba(6,12,24,.82);
  backdrop-filter: var(--blur-sm); -webkit-backdrop-filter: var(--blur-sm);
  border: 1px solid rgba(255,255,255,.12); border-radius: 20px;
  padding: 7px 15px; font-size: 12.5px; font-weight: 600;
  color: var(--tx-hi); white-space: nowrap; pointer-events: none;
  opacity: 0; transform: translateX(8px); transition: opacity var(--t), transform var(--t);
}
.wa-float:hover .wa-tip { opacity: 1; transform: translateX(0); }
@media (max-width: 540px) { .wa-float { bottom: 18px; right: 18px; } .wa-tip { display: none; } .wa-btn { width: 50px; height: 50px; } }

/* ── KEYFRAMES ───────────────────────────────────────────── */
@keyframes fade-up { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:none; } }
@keyframes shake { 0%,100% { transform:translateX(0); } 25% { transform:translateX(-4px); } 75% { transform:translateX(4px); } }
@keyframes spin  { to { transform:rotate(360deg); } }

/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a1020; }
::-webkit-scrollbar-thumb { background: var(--brass-dark); border-radius: 4px; }
