body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background: #050505;
  /* Darker background for contrast */
  color: #eee;
  overflow-x: hidden;
}

#fractal-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

nav {
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(18, 21, 31, 0.4);
  /* More transparent */
  backdrop-filter: blur(15px);
  /* Stronger blur */
  padding: 0.8rem 2rem;
  position: fixed;
  /* Fixed to float */
  top: 1.5rem;
  /* Distance from top */
  right: 2rem;
  /* Distance from right */
  left: auto;
  /* Reset left */
  transform: none;
  /* Reset transform */
  z-index: 100;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  /* Pillow shape */
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  width: auto;
  /* Fit content */
  min-width: auto;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: #ddd;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.6rem 1.2rem;
  /* More padding for pill */
  border-radius: 30px;
  /* Pill shape */
}

nav a:hover,
nav a.active {
  color: #fff;
  background: rgba(71, 215, 136, 0.15);
  /* Subtle green pill */
  transform: translateY(0);
  box-shadow: 0 0 10px rgba(71, 215, 136, 0.1);
}

nav a::after {
  display: none;
  /* Remove underline for pillow style */
}

/* Scroll Reveal */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

header.hero {
  width: 100vw;
  min-height: 80vh;
  /* Taller hero */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: transparent;
  /* Let canvas show through */
  text-align: center;
  padding: 0 1rem;
  box-sizing: border-box;
  border-bottom: none;
  box-shadow: none;
  position: relative;
}

.deep-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
  display: flex;
  gap: 0.2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  color: #fff;
  text-shadow: 0 0 20px rgba(71, 215, 136, 0.3);
}

.fractal-text {
  color: #47D788;
  opacity: 0;
  transform: scale(0.9);
  margin-left: 1rem;
  background: linear-gradient(45deg, #47D788, #2bb36b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(71, 215, 136, 0.4));
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: #aaa;
  margin-top: 2rem;
  max-width: 600px;
  font-weight: 300;
  letter-spacing: 0.5px;
  opacity: 0;
  /* For animation */
  animation: fadeIn 1s ease forwards 2.5s;
  /* Simple fade in delay */
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.section {
  padding: 4rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Cards mercado financiero */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  justify-items: center;
}

.card {
  background: rgba(18, 21, 31, 0.6);
  /* unified glass background */
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 260px;
  box-shadow: 0 0 12px rgba(71, 215, 136, 0.25);
  backdrop-filter: blur(8px);
  transition: transform 0.3s, box-shadow 0.3s;
  opacity: 0;
  transform: translateY(30px);
  box-sizing: border-box;
}

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

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(71, 215, 136, 0.5);
}

.card h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #47D788;
  font-weight: 600;
}

.card .price {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.card .change {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.card .change.positive {
  color: #08c76e;
}

.card .change.negative {
  color: #ff4b5c;
}

.card svg {
  width: 100%;
  height: 60px;
  display: block;
}

/* Info-cards */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  justify-items: center;
  padding: 0 1rem;
}

.info-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #12151f;
  border-radius: 16px;
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: 0 8px 20px rgba(71, 215, 136, 0.2);
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
  max-width: 320px;
  text-align: center;
  box-sizing: border-box;
}

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

.info-card .graphic {
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.info-card .text h3 {
  color: #47D788;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  margin-bottom: 0.5rem;
}

.info-card .text p {
  color: #ccc;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  line-height: 1.5;
}

/* Servicios Destacados: 2 columnas PC con línea */
.servicios-destacados {
  display: flex;
  flex-wrap: wrap;
  background: #12151f;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(71, 215, 136, 0.2);
}

.servicio {
  flex: 1;
  /* ocupa igual espacio sin cortar */
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  box-sizing: border-box;
  min-width: 0;
}

.servicio h3 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  color: #47D788;
  margin-bottom: 0.8rem;
}

.servicio p {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  color: #ccc;
  line-height: 1.6;
}

.servicio:first-child::after {
  content: "";
  position: absolute;
  top: 10%;
  bottom: 10%;
  right: 0;
  width: 1px;
  background: #47D78855;
}

/* CTA */
.cta-section {
  text-align: center;
  padding: 4rem 1rem;
  background: #12151f;
  border-top: 1px solid #222;
  border-bottom: 1px solid #222;
}

.cta-section h2 {
  color: #47D788;
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 1rem;
}

.cta-section p {
  color: #ccc;
  margin-bottom: 2rem;
  font-size: clamp(0.9rem, 3vw, 1.1rem);
}

.cta-btn {
  background: transparent;
  border: 2px solid #47D788;
  border-radius: 30px;
  color: #47D788;
  padding: 0.7rem 2.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.4s ease;
}

.cta-btn:hover {
  background: #47D788;
  color: #0f1117;
}

footer {
  text-align: center;
  padding: 1rem;
  color: #555;
  background: #12151f;
}

/* Ajustes móviles */
@media(max-width:768px) {
  .servicios-destacados {
    flex-direction: column;
  }

  .servicio:first-child::after {
    display: none;
  }
}

@media(max-width:480px) {
  header.hero h1 {
    font-size: clamp(1.6rem, 6vw, 2rem);
  }

  header.hero p {
    font-size: clamp(0.8rem, 3.5vw, 1rem);
  }

  .card-container {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .card {
    max-width: 140px;
    padding: 1rem;
  }

  .info-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .card .price {
    font-size: 1.2rem;
  }

  .card .change {
    font-size: 0.9rem;
  }

  .info-card .text h3 {
    font-size: 1.2rem;
  }

  .info-card .text p {
    font-size: 0.9rem;
  }

  .servicio h3 {
    font-size: 1.4rem;
  }

  .servicio p {
    font-size: 0.95rem;
  }
}