/* =============================================
   SERPEXA, C.A. — LANDING PAGE STYLES
   ============================================= */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; width: 100%; }
body { margin: 0; background: #060A0F; font-family: 'Public Sans', sans-serif; color: #EDEFF2; transition: background 350ms ease, color 350ms ease; }

/* ===== KEYFRAMES ===== */
@keyframes kenBurns { 0% { transform: scale(1.08) translateY(0); } 100% { transform: scale(1.18) translateY(-2%); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes scrollDot { 0% { transform: translateY(0); opacity: 1; } 70% { opacity: 1; } 100% { transform: translateY(16px); opacity: 0; } }
@keyframes dashDraw { to { stroke-dashoffset: 0; } }
@keyframes fabPulseRing { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes fabBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes popScaleIn { 0% { transform: scale(0.5); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes successRing { 0% { transform: scale(0.8); opacity: 0.9; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes menuSlideDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes menuItemIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }
@keyframes tickerBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ===== GLOBAL ===== */
input:focus, textarea:focus { outline: 2px solid #2F6FED; outline-offset: 0; }
::selection { background: #2F6FED; color: #060A0F; }

/* ===== NAV ===== */
.nav-link:hover { color: #2F6FED !important; }
.nav-cta:hover { background: #FFFFFF !important; }
.mob-link:active { color: #2F6FED !important; }

/* ===== REVEALS ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 900ms cubic-bezier(.16,1,.3,1), transform 900ms cubic-bezier(.16,1,.3,1);
}
[data-reveal].revealed { opacity: 1; transform: translateY(0); }

/* ===== IMAGES ===== */
#cov-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===== MAP ===== */
.map-frame { overflow: hidden; border: 1px solid rgba(255,255,255,0.14); box-shadow: 0 30px 60px rgba(0,0,0,0.4); background: #101B27; transition: background 350ms ease, border-color 350ms ease; }
.map-frame iframe { border: 0; display: block; width: 100%; height: 380px; filter: grayscale(0.2) contrast(1.05); }

/* ===== FORM ===== */
#form-success { display: none; }
#form-panel { display: flex; }

/* ===== HOVER STATES ===== */
.wa-cta:hover { background: #25D366 !important; border-color: #25D366 !important; color: #06111E !important; }
.contact-phone:hover, .contact-email:hover { color: #2F6FED !important; }
.maps-link:hover { border-color: #2F6FED !important; color: #2F6FED !important; }
.hero-outline-btn:hover { border-color: #2F6FED !important; color: #2F6FED !important; }

/* ===== STICKY SERVICE CARDS ===== */
.service-card {
  position: sticky;
  width: 100%;
  background: #162A3F;
  padding: clamp(28px, 5vw, 48px) clamp(24px, 5vw, 52px);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(20px, 4vw, 40px);
  align-items: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(47,111,237,0.12);
  transition: transform 250ms ease, background 350ms ease, box-shadow 350ms ease;
}
/* Dark mode: cards elevadas → texto blanco */
.service-card .svc-title { color: rgba(255,255,255,0.95) !important; }
.service-card .svc-desc { color: rgba(255,255,255,0.62) !important; }
.service-card .service-ghost-num { color: rgba(255,255,255,0.1) !important; }

/* ===== CONTACT IMAGE ===== */
.contact-img-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  margin-top: 12px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.45);
  transition: transform 250ms ease;
}
.contact-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* ===== MODELO IMAGE ===== */
.modelo-img-inner {
  position: relative;
  aspect-ratio: 16/7;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(14,27,41,0.2);
  transition: transform 250ms ease;
}
.modelo-img-inner picture,
.modelo-img-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* ===== SECTOR BOXES ===== */
.sector-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: rgba(47,111,237,0.1);
  border: 1px solid rgba(47,111,237,0.3);
  margin-bottom: 10px;
  transition: background 350ms ease, border-color 350ms ease;
}
.sector-box:last-child { margin-bottom: 0; }

/* ===== THEME TOGGLE BUTTON ===== */
.theme-btn, .lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  height: 36px;
  flex-shrink: 0;
  transition: background 200ms, border-color 200ms, color 200ms;
}
.theme-btn:hover, .lang-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.4);
  color: #FFFFFF;
}

/* ===== DARK MODE: override inline-light sections ===== */
body:not(.lm) #quienes-somos { background: #0A121B !important; }
body:not(.lm) #quienes-somos .sec-label { color: #2F6FED !important; }
body:not(.lm) #quienes-somos .sec-h2 { color: #FFFFFF !important; }
body:not(.lm) #quienes-somos .sec-p { color: rgba(255,255,255,0.62) !important; }
body:not(.lm) .vision-card { border: 1px solid rgba(255,255,255,0.08); }

/* Servicios - dark mode: números al mismo color que subtítulos */
body:not(.lm) .service-ghost-num { color: rgba(255,255,255,0.95) !important; }

body:not(.lm) #modelo { background: #060A0F !important; }
body:not(.lm) #modelo .sec-label { color: rgba(255,255,255,0.35) !important; }
body:not(.lm) #modelo .sec-h2 { color: #FFFFFF !important; }
body:not(.lm) #timeline-track h3 { color: #FFFFFF !important; }
body:not(.lm) #timeline-track p { color: rgba(255,255,255,0.58) !important; }
body:not(.lm) .tl-ghost-num { color: #2F6FED !important; }
body:not(.lm) #tl-bar-0,
body:not(.lm) #tl-bar-1,
body:not(.lm) #tl-bar-2,
body:not(.lm) #tl-bar-3 { background: rgba(255,255,255,0.45) !important; }
body:not(.lm) #tl-label { color: rgba(255,255,255,0.35) !important; }
body:not(.lm) .tl-border-div { border-left-color: rgba(255,255,255,0.08) !important; }
body:not(.lm) #tl-dot-1,
body:not(.lm) #tl-dot-2,
body:not(.lm) #tl-dot-3 { background: rgba(255,255,255,0.2) !important; }

/* ===== LIGHT MODE ===== */
body.lm { background: #F5F7FA; color: #0E1B29; }

/* Logo swap - light mode */
body.lm #nav-logo { content: url('design_handoff_serpexa_landing/assets/logo-color.svg'); }
body.lm #footer-logo { content: url('design_handoff_serpexa_landing/assets/logo-color.svg'); }

/* Nav - light */
body.lm #nav { background: rgba(245,247,250,0.92) !important; border-color: rgba(14,27,41,0.12) !important; box-shadow: 0 12px 32px rgba(14,27,41,0.07) !important; }
body.lm #mob-menu { background: #FFFFFF !important; border-color: rgba(14,27,41,0.12) !important; }
body.lm .nav-link { color: rgba(14,27,41,0.6) !important; }
body.lm #nav-cta { background: #0E1B29 !important; color: #FFFFFF !important; }
body.lm .mob-link { color: rgba(14,27,41,0.8) !important; border-bottom-color: rgba(14,27,41,0.08) !important; }
body.lm #mob-btn { border-color: rgba(14,27,41,0.25) !important; color: #0E1B29 !important; }
body.lm .theme-btn, body.lm .lang-btn { border-color: rgba(14,27,41,0.2); color: rgba(14,27,41,0.7); }
body.lm .theme-btn:hover, body.lm .lang-btn:hover { background: rgba(14,27,41,0.06); border-color: rgba(14,27,41,0.35); color: #0E1B29; }
body.lm #progress-bar-wrap { background: rgba(14,27,41,0.08) !important; }

/* Marquee - light */
body.lm #marquee-band { background: #E8EDF5 !important; border-top-color: rgba(14,27,41,0.1) !important; border-bottom-color: rgba(14,27,41,0.1) !important; }
body.lm #marquee-band .mq-text { color: rgba(14,27,41,0.45) !important; }

/* Quiénes Somos - light */
body.lm #quienes-somos { background: #F5F7FA !important; }
body.lm .vision-card { background: #FFFFFF !important; box-shadow: 0 8px 32px rgba(14,27,41,0.08) !important; }
body.lm .vision-card p { color: rgba(14,27,41,0.7) !important; }

/* Cifras - light */
body.lm #cifras-section { background: #EBF0F7 !important; border-top-color: rgba(14,27,41,0.1) !important; border-bottom-color: rgba(14,27,41,0.1) !important; }
body.lm #cifras-section .cif-label { color: rgba(14,27,41,0.52) !important; }
body.lm .counter-val { color: #0E1B29 !important; }

/* Servicios - light */
body.lm #servicios { background: #F5F7FA !important; }
body.lm #servicios .sec-label { color: #2F6FED !important; }
body.lm #servicios .sec-h2 { color: #0E1B29 !important; }
body.lm #servicios .sec-p { color: rgba(14,27,41,0.6) !important; }
body.lm .service-card { background: #E2E7EF !important; box-shadow: 0 4px 28px rgba(14,27,41,0.1) !important; border-top-color: rgba(14,27,41,0.12) !important; }
body.lm .svc-title { color: #0E1B29 !important; }
body.lm .svc-desc { color: rgba(14,27,41,0.62) !important; }
body.lm .service-ghost-num { color: #2F6FED !important; }

/* Modelo - light */
body.lm #modelo { background: #F5F7FA !important; }
body.lm .tl-ghost-num { color: #2F6FED !important; }
body.lm .tl-border-div { border-left-color: rgba(14,27,41,0.1) !important; }

/* Cobertura - light */
body.lm #cobertura { background: #EBF0F7 !important; }
body.lm #cobertura .sec-label { color: #5B6B85 !important; }
body.lm #cobertura .sec-h2 { color: #0E1B29 !important; }
body.lm #cobertura .sec-p { color: rgba(14,27,41,0.62) !important; }
body.lm .sector-box { background: rgba(47,111,237,0.07) !important; border-color: rgba(47,111,237,0.22) !important; }
body.lm .sector-box .sbox-text { color: #0E1B29 !important; }
body.lm #cobertura .cov-top-border { border-top-color: rgba(14,27,41,0.12) !important; }

/* Contacto - light */
body.lm #contacto { background: #F0F4FB !important; }
body.lm #contacto .cont-corner { border-color: rgba(47,111,237,0.4) !important; }
body.lm #contacto .sec-label { color: #2F6FED !important; }
body.lm .cont-h2 { color: #0E1B29 !important; }
body.lm .cont-sub-label { color: rgba(14,27,41,0.45) !important; }
body.lm .cont-val { color: rgba(14,27,41,0.85) !important; }
body.lm .contact-phone, body.lm .contact-email { color: #0E1B29 !important; }
body.lm .cont-rif-val { color: rgba(14,27,41,0.85) !important; }
body.lm #form-panel { background: rgba(14,27,41,0.03) !important; border-color: rgba(14,27,41,0.12) !important; }
body.lm .form-badge { color: rgba(14,27,41,0.5) !important; }
body.lm .form-label { color: rgba(14,27,41,0.72) !important; }
body.lm .form-input { background: rgba(14,27,41,0.04) !important; border-color: rgba(14,27,41,0.16) !important; color: #0E1B29 !important; }
body.lm #form-success { background: rgba(47,111,237,0.05) !important; border-color: rgba(47,111,237,0.35) !important; }
body.lm .suc-h3 { color: #0E1B29 !important; }
body.lm .suc-p { color: rgba(14,27,41,0.62) !important; }
body.lm .suc-reset-btn { border-color: rgba(14,27,41,0.25) !important; color: #0E1B29 !important; }
body.lm .map-frame { background: #FFFFFF !important; border-color: rgba(14,27,41,0.12) !important; box-shadow: 0 8px 32px rgba(14,27,41,0.08) !important; }
body.lm .map-frame iframe { filter: none !important; }
body.lm .loc-label { color: #2F6FED !important; }
body.lm .loc-h3 { color: #0E1B29 !important; }
body.lm .loc-p { color: rgba(14,27,41,0.55) !important; }
body.lm .maps-link { color: #0E1B29 !important; border-color: rgba(14,27,41,0.28) !important; }
body.lm .footer-area { border-top-color: rgba(14,27,41,0.1) !important; }
body.lm .footer-rif { color: rgba(14,27,41,0.45) !important; }
body.lm .footer-copy { color: rgba(14,27,41,0.45) !important; }
body.lm .footer-by { color: rgba(14,27,41,0.3) !important; }

/* ===== RESPONSIVE MOBILE ===== */

/* Sin tilt en touch */
@media (hover: none) {
  .tilt-el { pointer-events: none !important; transform: none !important; }
}

/* ===== TIMELINE MOBILE SWIPE ===== */
@media (max-width: 860px) {
  #timeline-wrap { height: auto !important; min-height: 82vh; }
  #timeline-sticky { position: relative !important; height: 82vh !important; }
  #timeline-track { transition: transform 420ms cubic-bezier(.16,1,.3,1) !important; cursor: grab; }
  #timeline-track:active { cursor: grabbing; }
  /* swipe dots */
  #tl-dots { display: flex !important; }
}

@media (max-width: 640px) {
  .hero-sub-grid { grid-template-columns: 1fr !important; }
  .hero-btns-row { flex-direction: column !important; align-items: stretch !important; gap: 10px !important; }
  .hero-btns-row a { text-align: center; }
  .qs-photo { aspect-ratio: 16/9 !important; margin-top: 0 !important; }
  .cifras-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 32px 20px !important; }
  .svc-wrap { min-height: 0 !important; margin-bottom: 2px; }
  .service-card {
    grid-template-columns: 1fr !important;
    position: relative !important;
    top: auto !important;
    overflow: hidden;
    padding: 28px 24px !important;
    gap: 10px !important;
  }
  .service-ghost-num {
    display: none !important;
  }
  .tl-ghost-num { font-size: clamp(56px, 20vw, 120px) !important; }
  .contact-img-wrap { aspect-ratio: 4/3 !important; }
  .modelo-img-inner { aspect-ratio: 3/4 !important; }
  .contact-phones-wrap { gap: 24px !important; flex-wrap: wrap; }
  .map-frame iframe { height: 240px !important; }
  .footer-inner { flex-direction: column !important; align-items: center !important; gap: 10px !important; text-align: center; }
  .nav-controls { gap: 6px !important; }
}

@media (max-width: 400px) {
  .service-ghost-num { display: none !important; }
  .cifras-grid span[id^="cnt-"] { font-size: clamp(44px, 16vw, 80px) !important; }
}

@media (max-width: 720px) {
  .contact-grid { grid-template-columns: 1fr !important; }
}
