/* ============================================================
   VANGUARD SOLUTIONS — HOME CSS
   ============================================================ */

/* ── HERO SECTION ───────────────────────────────────────────── */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg-secondary);
}

/* Particles canvas */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Glow orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  z-index: 0;
}

.hero-orb--cyan {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0,240,255,0.12) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  animation: orbFloat 8s ease-in-out infinite;
}

.hero-orb--purple {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(191,0,255,0.1) 0%, transparent 70%);
  bottom: 0;
  left: -80px;
  animation: orbFloat 10s ease-in-out infinite reverse;
}

.hero-orb--green {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(57,255,20,0.07) 0%, transparent 70%);
  top: 40%;
  right: 20%;
  animation: orbFloat 12s ease-in-out infinite;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(20px, -30px) scale(1.05); }
  66%       { transform: translate(-15px, 15px) scale(0.95); }
}

/* Grid lines */
.hero-grid {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 60px, rgba(0,240,255,0.018) 60px, rgba(0,240,255,0.018) 61px),
    repeating-linear-gradient(90deg, transparent, transparent 60px, rgba(0,240,255,0.018) 60px, rgba(0,240,255,0.018) 61px);
  pointer-events: none;
  z-index: 0;
}

/* Content */
.hero-content {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: 5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
}

.hero-badge {
  animation: fadeSlideDown 0.8s ease forwards;
}

/* ── HERO TITLE ─────────────────────────────────────────────── */
.hero-title {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.1;
  animation: fadeSlideDown 1s 0.1s ease both;
  text-shadow: 0 0 60px rgba(0, 240, 255, 0.08);
}

.hero-title-accent {
  display: block;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.3));
}

/* Glitch effect */
.glitch-text {
  position: relative;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.glitch-text::before {
  animation: glitch-before 4s infinite;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glitch-text::after {
  animation: glitch-after 4s infinite;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes glitch-before {
  0%, 90%, 100% { clip-path: none; transform: none; }
  92%            { clip-path: inset(20% 0 60% 0); transform: translate(-3px, 2px); }
  94%            { clip-path: inset(50% 0 30% 0); transform: translate(3px, -1px); }
  96%            { clip-path: inset(70% 0 10% 0); transform: translate(-2px, 1px); }
}

@keyframes glitch-after {
  0%, 90%, 100% { clip-path: none; transform: none; }
  91%            { clip-path: inset(40% 0 40% 0); transform: translate(3px, 1px); }
  93%            { clip-path: inset(10% 0 80% 0); transform: translate(-3px, -2px); }
  95%            { clip-path: inset(80% 0 5% 0); transform: translate(2px, 2px); }
}

/* ── TYPING SUBTITLE ────────────────────────────────────────── */
.hero-subtitle {
  font-family: var(--font-tech);
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(224, 224, 224, 0.75);
  animation: fadeSlideDown 1s 0.2s ease both;
}

.typing-prefix {
  color: rgba(224,224,224,0.5);
}

.typing-text {
  color: var(--cyan);
  text-shadow: var(--glow-text-cyan);
}

.typing-cursor {
  display: inline-block;
  color: var(--cyan);
  animation: blink 1s step-end infinite;
  margin-left: 2px;
  text-shadow: var(--glow-text-cyan);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── HERO DESC ──────────────────────────────────────────────── */
.hero-desc {
  max-width: 580px;
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  color: rgba(224, 224, 224, 0.6);
  line-height: 1.8;
  animation: fadeSlideDown 1s 0.3s ease both;
}

/* ── HERO ACTIONS ───────────────────────────────────────────── */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  animation: fadeSlideDown 1s 0.4s ease both;
}

.hero-btn {
  font-size: 0.95rem;
}

/* ── HERO STATS ─────────────────────────────────────────────── */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  margin-top: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255,255,255,0.06);
  animation: fadeSlideDown 1s 0.5s ease both;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hero-stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 900;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.72rem;
  font-family: var(--font-tech);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(224,224,224,0.45);
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: linear-gradient(transparent, rgba(0,240,255,0.3), transparent);
}

/* ── SCROLL INDICATOR ───────────────────────────────────────── */
.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  z-index: 1;
  animation: bounceDown 2s ease-in-out infinite;
}

.hero-scroll-indicator span {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(224,224,224,0.3);
  font-family: var(--font-tech);
}

.scroll-mouse {
  width: 22px;
  height: 34px;
  border: 1.5px solid rgba(0,240,255,0.3);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding: 4px 0;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background: var(--cyan);
  border-radius: 2px;
  animation: scrollWheel 1.5s ease-in-out infinite;
  box-shadow: var(--glow-cyan);
}

@keyframes scrollWheel {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(10px); opacity: 0; }
}

@keyframes bounceDown {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ── SERVICES PREVIEW ───────────────────────────────────────── */
.services-preview {
  background: var(--bg-primary);
}

.services-preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .services-preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-preview-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Última fila: 2 cards centradas */
  .service-preview-card:nth-child(4) {
    grid-column: 1 / 2;
    margin-left: auto;
    max-width: 100%;
  }

  .service-preview-card:nth-child(5) {
    grid-column: 2 / 3;
    margin-right: auto;
  }

  /* Ajustar para centrar las dos últimas */
  .services-preview-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .service-preview-card:nth-child(1) { grid-column: 1 / 3; }
  .service-preview-card:nth-child(2) { grid-column: 3 / 5; }
  .service-preview-card:nth-child(3) { grid-column: 5 / 7; }
  .service-preview-card:nth-child(4) { grid-column: 2 / 4; }
  .service-preview-card:nth-child(5) { grid-column: 4 / 6; }
}

.service-preview-card {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.spc-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: rgba(0,240,255,0.08);
  border: 1px solid rgba(0,240,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-med);
}

.spc-icon-wrap--purple {
  background: rgba(191,0,255,0.08);
  border-color: rgba(191,0,255,0.2);
}

.spc-icon-wrap--green {
  background: rgba(57,255,20,0.08);
  border-color: rgba(57,255,20,0.2);
}

.spc-icon {
  font-size: 1.4rem;
  color: var(--cyan);
}

.spc-icon-wrap--purple .spc-icon { color: var(--purple); }
.spc-icon-wrap--green .spc-icon  { color: var(--green); }

.service-preview-card:hover .spc-icon-wrap {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(0,240,255,0.2);
}

.service-preview-card:hover .spc-icon-wrap--purple {
  box-shadow: 0 0 15px rgba(191,0,255,0.2);
}

.service-preview-card:hover .spc-icon-wrap--green {
  box-shadow: 0 0 15px rgba(57,255,20,0.2);
}

.service-preview-card h3 {
  font-size: 1.05rem;
  color: #fff;
}

.service-preview-card p {
  font-size: 0.875rem;
  color: rgba(224,224,224,0.6);
  flex: 1;
}

.spc-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-tech);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  transition: gap var(--transition-fast), text-shadow var(--transition-fast);
}

.spc-link:hover {
  gap: 0.7rem;
  text-shadow: var(--glow-text-cyan);
}

/* ── WHY US ─────────────────────────────────────────────────── */
.why-us {
  position: relative;
  overflow: hidden;
}

.why-us-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0,240,255,0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(191,0,255,0.04) 0%, transparent 50%),
    #050508;
  z-index: 0;
}

.why-us-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}

@media (min-width: 900px) {
  .why-us-grid {
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
  }
}

.why-us-text h2 {
  color: #fff;
  line-height: 1.2;
}

.why-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.why-item {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.why-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: rgba(0,240,255,0.1);
  border: 1px solid rgba(0,240,255,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--cyan);
  box-shadow: var(--glow-cyan);
  margin-top: 3px;
}

.why-item strong {
  display: block;
  color: #fff;
  font-family: var(--font-tech);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
}

.why-item p {
  font-size: 0.875rem;
  color: rgba(224,224,224,0.55);
  line-height: 1.6;
}

/* ── WHY VISUAL ─────────────────────────────────────────────── */
.why-us-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.why-visual-card {
  width: min(420px, 100%);
  aspect-ratio: 1;
  position: relative;
}

.wvc-inner {
  width: 100%;
  height: 100%;
  background: rgba(0,240,255,0.02);
  border: 1px solid rgba(0,240,255,0.08);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  position: relative;
  overflow: hidden;
}

.wvc-inner::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(0,240,255,0.04) 60deg, transparent 120deg);
  animation: rotateConic 8s linear infinite;
}

@keyframes rotateConic {
  to { transform: rotate(360deg); }
}

.wvc-hex-grid {
  display: grid;
  grid-template-columns: repeat(3, 70px);
  grid-template-rows: repeat(3, 70px);
  gap: 8px;
  position: relative;
  z-index: 1;
}

.wvc-hex {
  width: 70px;
  height: 70px;
  background: rgba(0,240,255,0.05);
  border: 1px solid rgba(0,240,255,0.15);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: rgba(0,240,255,0.5);
  transition: all var(--transition-med);
  animation: hexPulse var(--dur, 3s) var(--del, 0s) ease-in-out infinite;
}

.wvc-hex.h1 { --dur: 3.2s; --del: 0s; }
.wvc-hex.h2 { --dur: 3.5s; --del: 0.3s; }
.wvc-hex.h3 { --dur: 2.8s; --del: 0.6s; }
.wvc-hex.h4 { --dur: 3.1s; --del: 0.9s; }
.wvc-hex.h6 { --dur: 3.4s; --del: 1.2s; }
.wvc-hex.h7 { --dur: 2.9s; --del: 0.4s; }

.center-hex {
  background: rgba(0,240,255,0.12) !important;
  border-color: rgba(0,240,255,0.4) !important;
  color: var(--cyan) !important;
  font-size: 1.5rem !important;
  box-shadow: var(--glow-cyan);
  grid-column: 2;
  grid-row: 2;
  animation: none !important;
}

@keyframes hexPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50%       { transform: scale(1.05); opacity: 0.8; }
}

.wvc-label {
  position: relative;
  z-index: 1;
  text-align: center;
}

.wvc-label span {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--cyan);
  text-shadow: var(--glow-text-cyan);
  letter-spacing: 0.1em;
}

.wvc-sublabel {
  font-family: var(--font-tech) !important;
  font-size: 0.7rem !important;
  color: rgba(224,224,224,0.4) !important;
  letter-spacing: 0.08em !important;
  text-shadow: none !important;
  margin-top: 0.2rem;
}

/* ── BLOG SECTION ───────────────────────────────────────────── */
.blog-section {
  background: var(--bg-primary);
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
}

.blog-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.blog-card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.06);
}

.blog-card-tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(0,240,255,0.15);
  border: 1px solid rgba(0,240,255,0.3);
  color: var(--cyan);
  font-family: var(--font-tech);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 50px;
  backdrop-filter: blur(8px);
}

.blog-card-tag--purple {
  background: rgba(191,0,255,0.15);
  border-color: rgba(191,0,255,0.3);
  color: #d060ff;
}

.blog-card-tag--green {
  background: rgba(57,255,20,0.12);
  border-color: rgba(57,255,20,0.3);
  color: var(--green);
}

.blog-card-body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.blog-meta {
  display: flex;
  gap: var(--space-sm);
  font-size: 0.72rem;
  font-family: var(--font-tech);
  letter-spacing: 0.05em;
  color: rgba(224,224,224,0.35);
}

.blog-meta i {
  margin-right: 0.2rem;
  color: rgba(0,240,255,0.4);
}

.blog-card h3 {
  font-size: 1rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.4;
  transition: color var(--transition-fast);
}

.blog-card:hover h3 {
  color: var(--cyan);
}

.blog-card p {
  font-size: 0.85rem;
  color: rgba(224,224,224,0.55);
  line-height: 1.7;
  flex: 1;
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-tech);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  transition: gap var(--transition-fast), text-shadow var(--transition-fast);
  margin-top: auto;
}

.blog-read-more:hover {
  gap: 0.7rem;
  text-shadow: var(--glow-text-cyan);
}

/* ── CTA SECTION ────────────────────────────────────────────── */
.cta-section {
  position: relative;
  background: var(--bg-secondary);
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(0,240,255,0.06) 0%, transparent 60%);
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  overflow: hidden;
}

.cta-orb {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.cta-orb--left {
  left: -150px;
  top: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(0,240,255,0.08) 0%, transparent 70%);
}

.cta-orb--right {
  right: -150px;
  top: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(191,0,255,0.08) 0%, transparent 70%);
}

.cta-content h2 {
  color: #fff;
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

/* ── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── NOVATIENDA (destacado en la portada) ───────────────────── */
.nt-teaser { background: linear-gradient(180deg, transparent, rgba(0, 240, 255, 0.04), transparent); }
.nt-teaser-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.nt-teaser-text h2 { margin-top: 0.6rem; }
.nt-teaser-visual { position: relative; padding-bottom: 8%; }
.nt-teaser-desktop { width: 92%; border: 1px solid var(--glass-border); border-radius: var(--radius-md); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.85); }
.nt-teaser-phone { position: absolute; right: 0; bottom: 0; width: 26%; padding: 4px; border-radius: 20px; background: #1A1C22; border: 1px solid var(--glass-border); box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.85); }
@media (max-width: 800px) { .nt-teaser-inner { grid-template-columns: 1fr; } }

.grad-text {
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}