/* =============== GOOGLE FONTS =============== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@500;700;800&display=swap');

/* =============== VARIABLES CSS =============== */
:root {
  --header-height: 4.5rem;
  
  /* Colors - Corporate Trust & Tech */
  --hue: 217;
  --primary-color: hsl(217, 91%, 60%); /* Azul Confianza B2B */
  --primary-color-alt: hsl(217, 91%, 50%); /* Azul Profundo */
  --secondary-color: hsl(190, 90%, 50%); /* Cian Tecnológico / Ciberseguridad */
  --gradient-1: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  
  /* Corporate Navy Theme */
  --body-color: hsl(222, 47%, 11%); /* Azul Marino Oscuro / Pizarra */
  --container-color: hsl(222, 47%, 14%); /* Contenedor sutilmente mas claro */
  --text-color: hsl(215, 15%, 75%); /* Gris claro azulado */
  --text-color-light: hsl(215, 15%, 60%);
  --title-color: hsl(0, 0%, 100%); /* Blanco */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);

  /* Typography */
  --body-font: 'Inter', sans-serif;
  --title-font: 'Outfit', sans-serif;
  --big-font-size: 2.5rem;
  --h1-font-size: 2.25rem;
  --h2-font-size: 1.5rem;
  --h3-font-size: 1.25rem;
  --normal-font-size: 1rem;
  --small-font-size: 0.875rem;

  /* Font weights */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;
  --font-bold: 700;

  /* Margins & Paddings */
  --m-0-5: 0.5rem;
  --m-0-75: 0.75rem;
  --m-1: 1rem;
  --m-1-5: 1.5rem;
  --m-2: 2rem;
  --m-2-5: 2.5rem;
  --m-3: 3rem;

  /* Z index */
  --z-tooltip: 10;
  --z-fixed: 100;
}

@media screen and (min-width: 968px) {
  :root {
    --big-font-size: 4.5rem;
    --h1-font-size: 3rem;
    --h2-font-size: 2.25rem;
    --h3-font-size: 1.5rem;
    --normal-font-size: 1.125rem;
  }
}

/* =============== BASE =============== */
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  color: var(--title-color);
  font-family: var(--title-font);
  font-weight: var(--font-bold);
  line-height: 1.2;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--text-color);
  transition: .3s;
}

img {
  max-width: 100%;
  height: auto;
}

/* =============== REUSABLE CLASSES =============== */
.container {
  max-width: 1100px;
  margin-left: var(--m-1-5);
  margin-right: var(--m-1-5);
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding: 6rem 0 2rem;
}

.section__title {
  font-size: var(--h2-font-size);
  text-align: center;
  margin-bottom: var(--m-3);
}

.section__subtitle {
  display: block;
  font-size: var(--small-font-size);
  color: var(--primary-color);
  text-align: center;
  font-weight: var(--font-medium);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: var(--m-0-5);
}

.main {
  overflow: hidden; /* For animations */
}

/* =============== BUTTONS =============== */
.button {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 4px;
  font-family: var(--title-font);
  font-weight: var(--font-medium);
  transition: .4s;
  cursor: pointer;
  border: none;
  outline: none;
}

.button--primary {
  background: var(--gradient-1);
  color: #fff;
  box-shadow: 0 10px 20px rgba(0, 242, 254, 0.2);
}

.button--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 25px rgba(0, 242, 254, 0.3);
}

.button--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid var(--text-color-light);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.button--ghost:hover {
  border-color: #fff;
  transform: translateX(5px);
}

.button--full {
  width: 100%;
}

/* =============== GLASSMORPHISM =============== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
}

/* =============== HEADER & NAV =============== */
.header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  background-color: transparent;
  transition: .4s;
}

.scroll-header {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  display: flex;
  align-items: center;
}

.nav__logo-img {
  max-width: 220px;
  height: auto;
}

.nav__toggle,
.nav__close {
  color: var(--title-color);
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
}

@media screen and (max-width: 767px) {
  .nav__menu {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    padding: 4rem 0 3rem;
    transition: .4s;
    border-bottom: 1px solid var(--glass-border);
  }
  .nav__toggle, .nav__close {
    display: block;
  }
}

.nav__menu.show-menu {
  top: 0;
}

.nav__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 2rem;
}

.nav__link {
  color: var(--text-color);
  font-family: var(--title-font);
  font-weight: var(--font-medium);
  font-size: var(--h3-font-size);
  transition: .3s;
}

.nav__link:hover {
  color: var(--primary-color);
}

.nav__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
}

/* Active link */
.active-link {
  color: var(--title-color);
  position: relative;
}
.active-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-1);
}

/* =============== HERO =============== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 8rem;
}

.hero__bg {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary-color) 0%, transparent 60%);
  opacity: 0.15;
  filter: blur(100px);
  z-index: -1;
}

.hero__title {
  font-size: var(--big-font-size);
  margin-bottom: var(--m-1);
  letter-spacing: -2px;
}

.hero__title-gradient {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__description {
  margin-bottom: var(--m-2);
  max-width: 500px;
  font-size: 1.125rem;
}

.hero__buttons {
  display: flex;
  flex-direction: column;
  row-gap: 1rem;
}

/* Hero abstract visuals */
.hero__images {
  position: relative;
  height: 400px;
  display: none; /* Show on desktop */
}

.glass-shape {
  position: absolute;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.3);
  animation: float 6s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shape-1 {
  width: 200px;
  height: 200px;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  top: 5%;
  right: 10%;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), transparent);
  font-size: 6rem;
  color: rgba(59, 130, 246, 0.8);
}

.shape-2 {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  bottom: 15%;
  left: 15%;
  background: linear-gradient(135deg, rgba(0, 204, 255, 0.15), transparent);
  animation-delay: 2s;
  font-size: 4rem;
  color: rgba(0, 204, 255, 0.8);
}

.shape-3 {
  width: 100px;
  height: 100px;
  border-radius: 16px;
  top: 45%;
  left: -5%;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), transparent);
  animation-delay: 4s;
  font-size: 3rem;
  color: rgba(59, 130, 246, 0.6);
  transform: rotate(-15deg);
}

.shape-4 {
  width: 120px;
  height: 120px;
  border-radius: 30%;
  top: 60%;
  right: -5%;
  background: linear-gradient(135deg, rgba(0, 204, 255, 0.15), transparent);
  animation-delay: 3s;
  font-size: 3.5rem;
  color: rgba(0, 204, 255, 0.6);
}

@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

/* =============== SERVICES =============== */
.services__container {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.service__card {
  text-align: left;
  transition: .4s;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background-size: cover;
  background-position: center;
  /* Efecto Marco Premium */
  border: 6px solid var(--container-color);
  outline: 1px solid var(--glass-border);
  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

/* Efecto Brillo / Shine */
.service__card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: .6s;
  z-index: 10;
  pointer-events: none;
}

.service__card:hover::after {
  left: 100%;
}

.service__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.6) 100%);
  backdrop-filter: blur(2px);
  z-index: 1;
  transition: .4s;
}

.service__card:hover .service__overlay {
  background: linear-gradient(to top, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.3) 100%);
  backdrop-filter: blur(0px);
}

.service__content {
  position: relative;
  z-index: 2;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service__card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.service__icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  margin-bottom: 2rem;
  box-shadow: 0 8px 16px rgba(0,242,254, 0.3);
}

.service__title {
  font-size: var(--h3-font-size);
  margin-bottom: 1rem;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.service__description {
  font-size: var(--small-font-size);
  color: #cbd5e1;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  font-weight: 500;
}

/* =============== ABOUT =============== */
.about__container {
  row-gap: 4rem;
}

.about__list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about__list li {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.about__list i {
  color: var(--primary-color);
  font-size: 1.25rem;
}

/* About Corporate Image */
.about__img-wrapper {
  padding: 0.75rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  display: inline-block;
  border-radius: 20px;
}

.about__img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

/* =============== CONTACT =============== */
.contact__box {
  padding: 3rem 2rem;
  text-align: center;
}

.contact__data {
  margin-bottom: 2rem;
}

.contact__title {
  margin-bottom: 1rem;
}

.contact__direct {
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* =============== FOOTER =============== */
.footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--glass-border);
  margin-top: 4rem;
}

.footer__container {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--glass-border);
}

.footer__logo {
  display: inline-block;
  margin-bottom: 1rem;
}

.footer__logo-img {
  max-width: 250px;
  height: auto;
}

.footer__title {
  font-size: var(--h3-font-size);
  margin-bottom: 1.5rem;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.footer__link {
  color: var(--text-color-light);
}

.footer__link:hover {
  color: #fff;
}

.footer__copy {
  display: block;
  margin-top: 3rem;
  text-align: center;
  font-size: var(--small-font-size);
  color: var(--text-color-light);
}

/* =============== MEDIA QUERIES =============== */
@media screen and (min-width: 768px) {
  body {
    margin: 0;
  }
  
  .nav {
    height: calc(var(--header-height) + 1.5rem);
  }
  
  .nav__list {
    flex-direction: row;
    column-gap: 3rem;
  }
  
  .nav__link {
    font-size: var(--normal-font-size);
  }
  
  .hero__buttons {
    flex-direction: row;
    column-gap: 1.5rem;
  }
  
  .contact__direct {
    max-width: 500px;
  }
  
  .about__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }
}

@media screen and (min-width: 968px) {
  .container {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }
  
  .hero__images {
    display: block;
  }
  
  .section {
    padding: 8rem 0 3rem;
  }
}

/* =============== ANIMATIONS (SCROLL REVEAL) =============== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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