/* =============================================
   TERSATEC — Estilos Globales
   Editá las variables en :root para cambiar
   colores y fuentes en todo el sitio.
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* === VARIABLES === */
:root {
  --color-black:     #0a0a0a;
  --color-dark:      #111111;
  --color-card:      #181818;
  --color-red:       #CC0000;
  --color-red-hover: #E60000;
  --color-white:     #FFFFFF;
  --color-gray:      #888888;
  --color-gray-light:#BBBBBB;
  --color-border:    #2a2a2a;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --nav-height: 72px;
  --transition: all 0.3s ease;
  --radius: 4px;
}

/* === RESET === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-black);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* === UTILIDADES === */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: 16px;
  display: block;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--color-white);
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--color-gray-light);
  max-width: 600px;
  line-height: 1.7;
}

/* === FADE-IN ANIMATION === */
.fade-in {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }

/* === NAVBAR === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.97);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(12px);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.08em;
  color: var(--color-white);
}

.nav-logo-text span {
  color: var(--color-red);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gray-light);
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-red);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-white);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  background: var(--color-red);
  color: var(--color-white) !important;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.1em;
  transition: var(--transition) !important;
}

.nav-cta:hover {
  background: var(--color-red-hover) !important;
}

.nav-cta::after {
  display: none !important;
}

/* Menú hamburguesa (móvil) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  transition: var(--transition);
}

/* === BOTONES === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-red);
  color: var(--color-white);
  border-color: var(--color-red);
}

.btn-primary:hover {
  background: var(--color-red-hover);
  border-color: var(--color-red-hover);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.4);
}

.btn-outline:hover {
  border-color: var(--color-white);
  background: rgba(255,255,255,0.06);
  transform: translateY(-2px);
}

/* === TARJETAS === */
.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 36px 32px;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--color-red);
  box-shadow: 0 8px 40px rgba(204,0,0,0.12);
  transform: translateY(-4px);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  color: var(--color-red);
}

.card-title {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  color: var(--color-white);
}

.card-text {
  font-size: 15px;
  color: var(--color-gray);
  line-height: 1.7;
}

/* === DIVIDER === */
.divider {
  width: 48px;
  height: 3px;
  background: var(--color-red);
  margin: 20px 0 32px;
}

/* === FOOTER === */
.footer {
  background: var(--color-dark);
  border-top: 1px solid var(--color-border);
  padding: 72px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-brand .nav-logo {
  margin-bottom: 20px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--color-gray);
  line-height: 1.8;
  max-width: 280px;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gray);
  margin-bottom: 20px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col ul li a {
  font-size: 14px;
  color: var(--color-gray-light);
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--color-gray);
}

.footer-bottom span {
  color: var(--color-red);
}

/* === WHATSAPP FLOTANTE === */
.whatsapp-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(37,211,102,0.4);
  transition: var(--transition);
  z-index: 999;
  text-decoration: none;
}

.whatsapp-btn:hover {
  background: #20B858;
  transform: scale(1.08);
  box-shadow: 0 8px 32px rgba(37,211,102,0.5);
}

.whatsapp-btn svg {
  width: 32px;
  height: 32px;
  fill: white;
}

/* === HERO BASE === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-black);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../assets/images/hero.png');
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  z-index: 0;
  filter: brightness(0.35);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(204,0,0,0.08) 0%, transparent 70%);
}

/* Grid de puntos decorativo */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: var(--nav-height);
}

.hero-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-label::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--color-red);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(64px, 10vw, 140px);
  line-height: 0.92;
  letter-spacing: 0.02em;
  margin-bottom: 28px;
}

.hero-title em {
  font-style: normal;
  color: var(--color-red);
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--color-gray-light);
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 48px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero-scroll span {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gray);
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--color-red), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* === STATS BAR === */
.stats-bar {
  background: var(--color-dark);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 48px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.stat-item {
  text-align: center;
  padding: 0 24px;
  border-right: 1px solid var(--color-border);
}

.stat-item:last-child {
  border-right: none;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 52px;
  color: var(--color-white);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-number span {
  color: var(--color-red);
}

.stat-label {
  font-size: 13px;
  color: var(--color-gray);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* === BANNER CTA === */
.cta-banner {
  background: var(--color-red);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: rgba(0,0,0,0.1);
  border-radius: 50%;
}

.cta-banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  z-index: 1;
}

.cta-banner-text h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1;
  margin-bottom: 12px;
}

.cta-banner-text p {
  font-size: 16px;
  opacity: 0.85;
  max-width: 500px;
}

.cta-banner .btn-outline {
  border-color: rgba(255,255,255,0.6);
  white-space: nowrap;
  flex-shrink: 0;
}

.cta-banner .btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: white;
}

/* === PAGE HERO (páginas internas) === */
.page-hero {
  min-height: 50vh;
  display: flex;
  align-items: center;
  background: var(--color-dark);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 50%, rgba(204,0,0,0.06) 0%, transparent 70%);
}

.page-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
}

.page-hero .container {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--nav-height) + 40px);
  padding-bottom: 60px;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3) { border-top: 1px solid var(--color-border); }
  .stat-item:nth-child(4) { border-top: 1px solid var(--color-border); border-right: none; }
}

@media (max-width: 768px) {
  .section { padding: 72px 0; }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10,10,10,0.98);
    flex-direction: column;
    padding: 32px 24px;
    gap: 24px;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }

  .hero-title { font-size: clamp(52px, 15vw, 80px); }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .cta-banner .container {
    flex-direction: column;
    text-align: center;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .whatsapp-btn {
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
  }
}
