/* ═══════════════════════════════════════════════════════════════
   INDEX.CSS — Estilos exclusivos de la página principal
   Depende de: common.css
═══════════════════════════════════════════════════════════════ */

/* ─── HERO CONTAINER ─── */

.hero-container {
  --green: #1AAA27;
  --purple: #80329F;
  --dark: #0D1117;
  --white: #FAFAFA;
  --muted: #8B949E;
  font-family: 'DM Sans', sans-serif;
  background: var(--dark);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  width: 100%;
  box-sizing: border-box;
}

/* Noise grain overlay */

.hero-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  opacity: .4;
}

/* SVG intro — banner de texto */

svg.intro {
  background: linear-gradient(135deg, #1AAA27, #80329F);
  max-width: 1200px;
  width: 100%;
  height: 300px;
  position: relative;
  margin: 0 auto;
  box-shadow: 0 30px 50px -20px rgba(30, 58, 138, 0.3);
}

section:first-of-type {
  margin-bottom: 3rem;
}

/* ─── BLOBS AMBIENTALES ─── */

.hero-container .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .25;
  pointer-events: none;
  z-index: 0;
}

.hero-container .blob-1 {
  width: 600px;
  height: 600px;
  background: var(--green);
  top: -200px;
  left: -150px;
  animation: drift1 14s ease-in-out infinite alternate;
}

.hero-container .blob-2 {
  width: 500px;
  height: 500px;
  background: var(--purple);
  bottom: -180px;
  right: -120px;
  animation: drift2 18s ease-in-out infinite alternate;
}

@keyframes drift1 {
  to {
    transform: translate(60px, 80px) scale(1.1);
  }
}

@keyframes drift2 {
  to {
    transform: translate(-60px, -40px) scale(1.08);
  }
}

/* ─── HERO WRAPPER ─── */

.hero-container .hero {
  position: relative;
  z-index: 2;
  padding-top: 80px;
  padding-bottom: 80px;
  min-height: 600px;
}

/* ─── PANEL IZQUIERDO ─── */

.hero-container .left {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

/* Línea divisoria vertical (solo desktop) */

.hero-container .left::after {
  content: '';
  position: absolute;
  right: 0;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: linear-gradient( to bottom, transparent, rgba(26,170,39,.6) 30%, rgba(128,50,159,.6) 70%, transparent );
}

/* SVG hero text — dentro del container */

.hero-container svg.intro {
  width: 100%;
  max-width: 100%;
  height: auto;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  display: block;
}

.hero-container svg.intro text {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
}

/* GREEN stroke draw-on */

.ts-green {
  fill: none;
  stroke: var(--green);
  stroke-width: 1.5px;
  stroke-linecap: butt;
  stroke-linejoin: round;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: draw 1.8s cubic-bezier(.4,0,.2,1) forwards;
}

.ts-green:nth-child(2) {
  animation-delay: .3s;
}

.ts-green:nth-child(3) {
  animation-delay: .6s;
}

/* WHITE fill fade-in */

.ts-fill {
  fill: var(--white);
  opacity: 0;
  animation: fadeUp .6s ease forwards;
}

.ts-fill:nth-child(5) {
  animation-delay: .5s;
}

.ts-fill:nth-child(6) {
  animation-delay: .8s;
}

.ts-fill:nth-child(7) {
  animation-delay: 1.1s;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── BADGE ─── */

.hero-container .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(26,170,39,.12);
  border: 1px solid rgba(26,170,39,.3);
  border-radius: 100px;
  padding: 6px 14px 6px 8px;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp .5s .1s ease forwards;
}

.hero-container .badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}

.hero-container .badge span {
  font-size: 12px;
  font-weight: 500;
  color: var(--green);
  letter-spacing: .08em;
  text-transform: uppercase;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 6px var(--green);
  }
  50% {
    box-shadow: 0 0 14px var(--green);
  }
}

/* ─── PANEL DERECHO ─── */

.hero-container .right {
  display: flex;
  align-items: center;
  padding: 20px 0 20px 40px;
}

.hero-container .tagline {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 300;
  color: var(--white);
  line-height: 1.35;
  opacity: 0;
  animation: fadeUp .7s 1s ease forwards;
}

.hero-container .tagline strong {
  font-weight: 700;
  color: var(--green);
  position: relative;
}

.hero-container .tagline strong::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green), transparent);
}

/* ─── STATS ROW ─── */

.hero-container .stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  opacity: 0;
  animation: fadeUp .7s 1.3s ease forwards;
}

.hero-container .stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-container .stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.hero-container .stat-num span {
  color: var(--green);
}

.hero-container .stat-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.hero-container .stat-divider {
  width: 1px;
  background: rgba(255,255,255,.08);
  align-self: stretch;
}

/* ─── CTA ROW ─── */

.hero-container .cta-row {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  opacity: 0;
  animation: fadeUp .7s 1.5s ease forwards;
}

/* ─── CORNER ACCENTS ─── */

.hero-container .corner-tl, .hero-container .corner-br {
  position: absolute;
  width: 28px;
  height: 28px;
  z-index: 3;
}

.hero-container .corner-tl {
  top: 0;
  left: 0;
  border-top: 2px solid var(--green);
  border-left: 2px solid var(--green);
}

.hero-container .corner-br {
  bottom: 0;
  right: 0;
  border-bottom: 2px solid var(--purple);
  border-right: 2px solid var(--purple);
}

/* ─── SCROLL HINT ─── */

.hero-container .scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  z-index: 3;
  animation: fadeUp .7s 2s ease forwards;
}

.hero-container .scroll-hint span {
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-container .scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--muted), transparent);
  animation: scrollDrop 1.6s 2.5s ease-in-out infinite;
}

@keyframes scrollDrop {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }
  50% {
    transform: scaleY(1);
    transform-origin: top;
  }
  51% {
    transform: scaleY(1);
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

/* ─── SECCIONES INTERIORES ─── */

.idx-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.idx-section {
  background: var(--white);
}

.idx-alt {
  background: var(--surface);
}

/* Tipografía */

.idx-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}

.idx-heading {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 48px;
}

.idx-heading span {
  color: var(--green);
}

.idx-body-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 640px;
  margin-bottom: 0;
}

/* ─── SERVICIOS GRID ─── */

.idx-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
}

.idx-svc-card {
  background: var(--white);
  padding: 40px 36px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: background .2s;
}

.idx-svc-card:hover {
  background: var(--surface);
}

.idx-svc-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.idx-svc-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 16px;
}

.idx-svc-title em {
  font-style: normal;
  color: var(--green);
}

.idx-svc-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 24px;
}

.idx-svc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--green);
  text-decoration: none;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: gap .2s;
}

.idx-svc-link:hover {
  gap: 10px;
  color: var(--green);
}

/* ─── SPLIT / PAIN POINTS ─── */

.idx-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.idx-split-left .idx-heading {
  margin-bottom: 16px;
}

.idx-btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--green);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 14px 28px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: background .2s, transform .2s;
  margin-top: 28px;
}

.idx-btn-primary:hover {
  background: #14901f;
  color: #fff;
  transform: translateY(-2px);
}

.idx-pain-list {
  display: flex;
  flex-direction: column;
}

.idx-pain-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.idx-pain-item:last-child {
  border-bottom: none;
}

.idx-pain-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  margin-top: 7px;
}

.idx-pain-item p {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.65;
  margin: 0;
}

/* ─── TIMELINE / PROCESO ─── */

.idx-timeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--border);
}

.idx-tl-item {
  background: var(--white);
  padding: 40px 36px;
  display: flex;
  gap: 24px;
  transition: background .2s;
}

.idx-tl-item:hover {
  background: var(--surface);
}

.idx-tl-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.idx-tl-num {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--white);
  background: var(--ink);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: .04em;
  flex-shrink: 0;
}

.idx-tl-line {
  width: 1px;
  background: var(--border);
  flex: 1;
  margin-top: 8px;
}

.idx-tl-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
}

.idx-tl-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

.idx-tl-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.idx-meta-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.idx-meta-badge {
  display: inline-block;
  background: var(--green-light);
  color: var(--green);
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
}

/* ─── CASOS DE ÉXITO ─── */

.idx-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.idx-case-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}

.idx-case-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(26, 170, 39, .08);
}

.idx-case-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.idx-case-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: var(--green-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
}

.idx-case-industry {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 2px;
}

.idx-case-meta {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.idx-case-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 24px;
}

.idx-case-metrics {
  display: flex;
  gap: 2px;
  background: var(--border);
}

.idx-metric {
  flex: 1;
  background: var(--surface);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
}

.idx-metric-val {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
}

.idx-metric-lbl {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 4px;
}

/* Trust band */

.idx-trust-band {
  background: var(--dark);
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.idx-trust-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: rgba(255,255,255,.6);
  margin: 0;
  max-width: 240px;
}

.idx-trust-stats {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.idx-trust-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.idx-trust-num {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.idx-trust-lbl {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 4px;
}

/* ─── FAQ (index) ─── */

.idx-faq {
  max-width: 760px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.idx-faq-item {
  border-bottom: 1px solid var(--border);
}

.idx-faq-q {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  transition: color .2s;
}

.idx-faq-q:hover {
  color: var(--green);
}

.idx-faq-a {
  display: none;
  padding: 0 0 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
}

.idx-faq-item.active .idx-faq-q {
  color: var(--green);
}

.idx-faq-item.active .idx-faq-icon {
  transform: rotate(180deg);
}

.idx-faq-item.active .idx-faq-a {
  display: block;
}

.idx-faq-a p {
  margin-bottom: 10px;
}

.idx-faq-a ul {
  padding-left: 20px;
  margin-bottom: 10px;
}

.idx-faq-a li {
  margin-bottom: 6px;
}

.idx-faq-cta {
  max-width: 760px;
  margin: 40px auto 0;
  text-align: center;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.idx-faq-cta p {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 16px;
}

.idx-faq-cta .idx-btn-primary {
  margin-top: 0;
}

/* ─── RESPONSIVE ─── */

@media (max-width: 991px) {
  .idx-split {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 991px) {
  .idx-timeline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991px) {
  .idx-trust-band {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }
}

@media (max-width: 991px) {
  .idx-trust-text {
    max-width: 100%;
  }
}

@media (max-width: 991px) {
  .idx-trust-stats {
    justify-content: center;
  }
}

@media (max-width: 991px) {
  .hero-container .hero {
    padding-top: 50px;
    padding-bottom: 60px;
    min-height: auto;
  }
}

@media (max-width: 991px) {
  .hero-container .left {
    padding-bottom: 40px;
    justify-content: center;
  }
}

@media (max-width: 991px) {
  .hero-container .left::after {
    display: none;
  }
}

@media (max-width: 991px) {
  .hero-container .right {
    padding-left: 0;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 991px) {
  .hero-container .tagline {
    text-align: center;
  }
}

@media (max-width: 991px) {
  .hero-container .tagline strong::after {
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    right: auto;
  }
}

@media (max-width: 991px) {
  .hero-container .stats {
    justify-content: center;
  }
}

@media (max-width: 991px) {
  .hero-container .cta-row {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .idx-inner {
    padding: 0 20px;
  }
}

@media (max-width: 576px) {
  .idx-svc-card, .idx-tl-item {
    padding: 28px 24px;
  }
}

@media (max-width: 576px) {
  .idx-trust-stats {
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .hero-container .tagline {
    font-size: 30px;
  }
}

@media (max-width: 480px) {
  .hero-container .stats {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .hero-container .stat-divider {
    display: none;
  }
}

