/* ==========================================================================
   MYCLOUD.UNO — CSS INDEX (INICIO)
   Hero Asimétrico, Polaroids Parallax, Servicios 01-04,
   Proceso Ultra-Animado y Diagrama de Infraestructura con Paquetes SVG
   ========================================================================== */

/* ==========================================================================
   1. HERO ASIMÉTRICO
   ========================================================================== */
.hero-section {
  padding-top: 40px;
  padding-bottom: 76px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin-top: 40px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* Titular gigante con entrada palabra por palabra */
.hero-title {
  font-size: clamp(2.7rem, 6.2vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  font-weight: 800;
  color: var(--ink);
}

.hero-title .word-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 4px;
}

.hero-title .w {
  display: inline-block;
  animation: hero-word-rise 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--i) * 65ms + 100ms);
  transform-origin: bottom left;
}

.hero-title .hl {
  color: var(--indigo);
  position: relative;
}

@keyframes hero-word-rise {
  from {
    transform: translateY(110%) rotate(3deg);
    opacity: 0;
  }
  to {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
}

.hero-lead {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 32em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-top: 6px;
}

/* Polaroids con Parallax: tres retratos en fila escalonada, sin pisarse */
.polaroids-stage {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  padding: 10px 6px 24px;
}

.pola-card {
  position: relative;
  width: auto;
  padding: 8px 8px 12px;
  background: #ffffff;
  border: var(--border-thick);
  border-radius: 8px;
  transform: rotate(var(--rot, 0deg)) translate(var(--tx, 0), var(--ty, 0));
  transition: transform 0.22s ease-out;
  user-select: none;
}

.pola-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: var(--border-thick);
  border-radius: 4px;
  background: #e9e5ff;
}

.pola-photo picture { display: block; width: 100%; height: 100%; }

.pola-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 28%;
  transition: transform 0.35s ease;
}

.pola-card:hover .pola-photo img {
  transform: scale(1.04);
}

.pola-caption {
  display: block;
  margin-top: 10px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.3;
  font-weight: 700;
  color: var(--muted);
}

.pola-card.p1 { --rot: 3deg;  margin-top: 46px; box-shadow: 6px 6px 0 var(--indigo); }
.pola-card.p2 { --rot: -3deg; margin-top: 0;    box-shadow: 6px 6px 0 var(--mint-bright); }
.pola-card.p3 { --rot: 2deg;  margin-top: 84px; box-shadow: 6px 6px 0 var(--amber); }

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .polaroids-stage {
    max-width: 480px;
    margin: 0 auto;
  }
}

/* Celular / tablet: sin parallax, así que un acabado más sobrio y prolijo,
   con una entrada escalonada y un flote muy suave. */
@media (max-width: 900px), (hover: none) {
  .polaroids-stage { gap: 14px; padding: 6px 4px 22px; }
  .pola-card {
    --rot: 0deg;
    padding: 6px 6px 10px;
    border: 1.5px solid var(--ink);
    border-radius: 14px;
    box-shadow: 0 14px 28px -12px rgba(15, 16, 51, 0.38) !important;
    animation: pola-in 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both, pola-float 7s ease-in-out 1s infinite;
  }
  .pola-photo { border: 0; border-radius: 9px; }
  .pola-caption { font-size: 0.66rem; letter-spacing: 0.02em; }
  .pola-card.p1 { margin-top: 30px; animation-delay: 0.15s, 1s; }
  .pola-card.p2 { margin-top: 0;    animation-delay: 0.3s, 2.2s; }
  .pola-card.p3 { margin-top: 56px; animation-delay: 0.45s, 3.4s; }
}

@keyframes pola-in {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pola-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .pola-card { animation: none !important; }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(2.2rem, 10vw, 3.2rem);
  }
  .polaroids-stage { gap: 12px; }
  .pola-card { padding: 6px 6px 8px; }
  .pola-caption { font-size: 0.62rem; }
}

/* ==========================================================================
   2. SECCIÓN "LO QUE HACEMOS" (01 - 04)
   ========================================================================== */
.services-summary {
  padding-block: 84px;
}

.services-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 40px;
}

.service-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1.1fr) minmax(0, 1.7fr) auto;
  align-items: center;
  gap: 24px;
  padding: 24px 28px;
  background: #ffffff;
  border: var(--border-thick);
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--row-color, var(--indigo));
  text-decoration: none;
  color: var(--ink);
  transform: translateY(0);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.service-row:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--row-color, var(--indigo));
  background: #fdfdff;
}

.service-row:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--row-color, var(--indigo));
}

.service-num {
  font-size: 3.2rem;
  line-height: 0.9;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 2px var(--row-color, var(--indigo));
}

.service-name {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tag-new {
  display: inline-block;
  padding: 3px 8px;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  background: var(--amber);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  transform: rotate(-3deg);
}

.service-desc {
  font-size: 1.02rem;
  color: var(--muted);
}

.service-arrow {
  width: 44px;
  height: 44px;
  border: var(--border-thick);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg);
  font-size: 1.25rem;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease;
}

.service-row:hover .service-arrow {
  transform: translateX(4px);
  background: var(--row-color, var(--indigo));
  color: #ffffff;
}

@media (max-width: 860px) {
  .service-row {
    grid-template-columns: 60px 1fr auto;
    padding: 20px 20px;
    gap: 16px;
  }
  .service-desc {
    grid-column: 2 / -1;
    font-size: 0.95rem;
  }
  .service-num {
    font-size: 2.4rem;
  }
  .service-name {
    font-size: 1.25rem;
  }
}

@media (max-width: 520px) {
  .service-row {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }
  .service-num {
    grid-column: 1 / -1;
    font-size: 2rem;
  }
  .service-desc {
    grid-column: 1 / -1;
  }
}

/* ==========================================================================
   3. SECCIÓN PROCESO "DE LA IDEA AL PRODUCTO FUNCIONANDO"
   ========================================================================== */
.process-section {
  padding-block: 96px 110px;
  position: relative;
  overflow: hidden;
}

.process-header {
  position: relative;
  max-width: 820px;
}

.process-title {
  font-size: clamp(2.3rem, 5.2vw, 4.2rem);
  line-height: 1.05;
  margin-top: 24px;
  letter-spacing: -0.045em;
}

.process-title .w-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.process-title .w-rise {
  display: inline-block;
  transform: translateY(115%);
  transition: transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.process-section.in-view .process-title .w-rise {
  transform: translateY(0);
}

.wavy-line-container {
  display: block;
  width: 220px;
  height: 24px;
  margin-top: 10px;
}

.wavy-line-svg {
  width: 100%;
  height: 100%;
}

.wavy-path {
  fill: none;
  stroke: var(--indigo);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

.process-section.in-view .wavy-path {
  stroke-dashoffset: 0;
}

/* Símbolos decorativos flotantes */
.float-deco {
  position: absolute;
  font-weight: 800;
  user-select: none;
  pointer-events: none;
  z-index: 1;
}

.deco-star {
  right: 5%;
  top: 30px;
  font-size: 2.4rem;
  color: var(--amber);
  animation: float-spin 8s linear infinite;
}

.deco-bracket {
  right: 18%;
  top: 110px;
  font-family: var(--font-mono);
  font-size: 2.8rem;
  color: var(--indigo-soft);
  animation: float-bob 4s ease-in-out infinite;
}

.deco-sparkle {
  left: 70%;
  bottom: 40px;
  font-size: 1.8rem;
  color: var(--mint-bright);
  animation: float-bob 3.5s ease-in-out infinite 0.7s;
}

@keyframes float-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes float-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Pista de pasos con línea y 4 nodos interactivos */
.process-track {
  position: relative;
  margin-top: 64px;
}

/* Línea punteada horizontal para desktop */
.process-line-wrap {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 24px;
  height: 4px;
  pointer-events: none;
  z-index: 0;
}

.process-line-bg {
  width: 100%;
  height: 100%;
  border-top: 3px dashed var(--ink);
  opacity: 0.35;
}

.process-line-active {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: calc(100% * var(--proc-p, 0));
  border-top: 3px solid var(--indigo);
  transition: width 0.1s linear;
}

.process-line-marker {
  position: absolute;
  left: calc(100% * var(--proc-p, 0));
  top: -8px;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  background: var(--amber);
  border: 2px solid var(--ink);
  box-shadow: 0 0 10px var(--amber);
  transition: left 0.1s linear;
}

/* Grid de Cards con rebote y activación */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  position: relative;
  z-index: 2;
}

.step-card {
  position: relative;
  min-height: 330px;
  padding: 24px 22px;
  background: #ffffff;
  border: var(--border-thick);
  border-radius: var(--border-radius-card);
  box-shadow: 8px 8px 0 var(--step-color, var(--indigo));
  display: flex;
  flex-direction: column;
  transform: translateY(35px) scale(0.96);
  opacity: 0;
  transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease, box-shadow 0.2s ease;
  transition-delay: calc(var(--step-idx, 0) * 110ms);
}

.step-card.in-view {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.step-card:nth-of-type(1) { transform: rotate(-1deg) translateY(35px) scale(0.96); }
.step-card:nth-of-type(2) { transform: rotate(1.2deg) translateY(55px) scale(0.96); margin-top: 24px; }
.step-card:nth-of-type(3) { transform: rotate(-1deg) translateY(35px) scale(0.96); }
.step-card:nth-of-type(4) { transform: rotate(1.2deg) translateY(55px) scale(0.96); margin-top: 24px; }

.step-card.in-view:nth-of-type(1) { transform: rotate(-1deg) translateY(0) scale(1); }
.step-card.in-view:nth-of-type(2) { transform: rotate(1.2deg) translateY(0) scale(1); }
.step-card.in-view:nth-of-type(3) { transform: rotate(-1deg) translateY(0) scale(1); }
.step-card.in-view:nth-of-type(4) { transform: rotate(1.2deg) translateY(0) scale(1); }

.step-card:hover {
  transform: translateY(-4px) scale(1.02) !important;
  box-shadow: 12px 12px 0 var(--step-color, var(--indigo));
}

.step-card.is-active-step {
  border-color: var(--step-color, var(--indigo));
}

.step-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.step-num {
  font-size: 3.6rem;
  line-height: 0.85;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 2px var(--step-color, var(--indigo));
}

.step-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: var(--border-thick);
  background: var(--bg);
  display: grid;
  place-items: center;
  box-shadow: 2px 2px 0 var(--ink);
  color: var(--step-color, var(--indigo));
}

.step-icon-wrap svg {
  width: 22px;
  height: 22px;
}

.step-title {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  margin-top: 18px;
}

.step-desc {
  font-size: 0.96rem;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 12px;
}

/* Card 04 estilo Dark */
.step-card.dark-card {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--ink);
}

.step-card.dark-card .step-num {
  -webkit-text-stroke-color: #ffffff;
}

.step-card.dark-card .step-desc {
  color: var(--on-navy);
}

.step-card.dark-card .step-icon-wrap {
  background: var(--navy-deep);
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--amber);
}

@media (max-width: 1024px) {
  .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .process-line-wrap {
    display: none;
  }
  .step-card:nth-of-type(even) {
    margin-top: 0;
  }
}

@media (max-width: 600px) {
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .step-card {
    min-height: auto;
  }
}

/* ==========================================================================
   4. BANDA OSCURA DE INFRAESTRUCTURA & DIAGRAMA DE PAQUETES
   Cliente → MikroTik → VPS Linux (Docker: Node.js & DB) → Sitio & Backups
   ========================================================================== */
.infra-section {
  position: relative;
  background: var(--navy);
  color: #ffffff;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  clip-path: polygon(0 4vw, 100% 0, 100% calc(100% - 4vw), 0 100%);
  margin-top: -4vw;
  padding-block: calc(4vw + 76px) calc(4vw + 84px);
  border-block: 2px solid var(--ink);
}

.infra-section .eyebrow {
  color: var(--mint-bright);
}

.infra-section .eyebrow::after {
  border-color: rgba(255, 255, 255, 0.3);
}

.infra-section .eyebrow em {
  color: var(--on-navy);
}

.infra-title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  color: #ffffff;
  margin-top: 24px;
  max-width: 18em;
}

.infra-title .hl-amber {
  color: var(--amber);
}

.infra-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.infra-chip {
  padding: 8px 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--border-radius-pill);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  transition: background 0.2s, border-color 0.2s;
}

.infra-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--mint-bright);
}

/* Contenedor del Diagrama Cyber-Hardware */
.diagram-card {
  margin-top: 48px;
  position: relative;
  overflow-x: auto;
  border: 2px solid rgba(99, 102, 241, 0.4);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(15, 18, 48, 0.95), rgba(10, 12, 36, 0.98));
  padding: 20px;
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(79, 70, 229, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  -webkit-overflow-scrolling: touch;
}

.diagram-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.diagram-status-live {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--mint-bright);
  font-weight: 700;
}

.diagram-status-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint-bright);
  box-shadow: 0 0 10px var(--mint-bright);
  animation: live-blink 1.4s infinite;
}

.diagram-legend {
  display: flex;
  gap: 16px;
  color: var(--on-navy);
  opacity: 0.85;
}

.diagram-wrapper {
  position: relative;
  min-width: 760px;
  width: 100%;
}

/* Vista móvil de pipeline oculta por defecto en desktop */
.pipeline-mobile-view {
  display: none;
}

.diagram-wrapper svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.5));
}

/* Animaciones de cables de fibra óptica */
.cable-flow-line {
  stroke-dasharray: 8 12;
  animation: cable-flow-anim 1.6s linear infinite;
}

.cable-flow-reverse {
  stroke-dasharray: 8 12;
  animation: cable-flow-anim-rev 1.6s linear infinite;
}

@keyframes cable-flow-anim {
  from { stroke-dashoffset: 40; }
  to { stroke-dashoffset: 0; }
}

@keyframes cable-flow-anim-rev {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: 40; }
}

/* Pulso del escáner en Cliente */
.scanner-ripple {
  transform-origin: 89px 105px;
  animation: scanner-expand 2.6s ease-out infinite;
}

.scanner-ripple:nth-child(2) {
  animation-delay: 0.8s;
}

.scanner-ripple:nth-child(3) {
  animation-delay: 1.6s;
}

@keyframes scanner-expand {
  0% {
    r: 10px;
    opacity: 0.9;
    stroke-width: 2.5;
  }
  100% {
    r: 34px;
    opacity: 0;
    stroke-width: 1;
  }
}

/* LEDs parpadeantes del router MikroTik */
.router-led-g {
  animation: led-flicker 1.8s infinite;
}

.router-led-y {
  animation: led-flicker 1.4s infinite 0.4s;
}

.router-led-o {
  animation: led-flicker 2.1s infinite 0.9s;
}

@keyframes led-flicker {
  0%, 100% { opacity: 0.95; filter: drop-shadow(0 0 5px currentColor); }
  45% { opacity: 0.2; filter: none; }
  55% { opacity: 0.95; filter: drop-shadow(0 0 5px currentColor); }
}

/* Resplandor del diamante SSL */
.ssl-prism-glow {
  transform-origin: 391px 125px;
  animation: ssl-breathe 3.2s ease-in-out infinite;
}

@keyframes ssl-breathe {
  0%, 100% {
    opacity: 0.45;
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.6));
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    filter: drop-shadow(0 0 20px rgba(52, 211, 153, 0.9)) drop-shadow(0 0 10px rgba(168, 85, 247, 0.8));
    transform: scale(1.05);
  }
}

/* Actividad en módulos de memoria Node.js y PostgreSQL */
.chip-activity-glow {
  animation: chip-pulse 2.2s ease-in-out infinite alternate;
}

@keyframes chip-pulse {
  from { opacity: 0.35; filter: drop-shadow(0 0 4px #fbbf24); }
  to { opacity: 0.85; filter: drop-shadow(0 0 12px #f97316); }
}

/* Ventiladores de refrigeración en la bahía de servidores */
.fan-rotator {
  transform-origin: center;
  animation: fan-spin 1.8s linear infinite;
}

@keyframes fan-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Hotspots interactivos y Tooltips */
.chassis-hotspot {
  cursor: pointer;
  fill: transparent;
  stroke: transparent;
  transition: fill 0.2s, stroke 0.2s;
}

.chassis-hotspot:hover {
  fill: rgba(79, 70, 229, 0.15);
  stroke: rgba(52, 211, 153, 0.8);
  stroke-width: 2;
  stroke-dasharray: 4 4;
}

.diagram-tooltip {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 18, 48, 0.95);
  border: 1.5px solid var(--mint-bright);
  border-radius: var(--border-radius-pill);
  padding: 6px 18px;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 20;
  white-space: nowrap;
}

.diagram-tooltip.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* Stack de características debajo del diagrama */
.infra-stack {
  list-style: none;
  margin: 54px 0 0;
  padding: 0;
}

.infra-stack-item {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: center;
  padding: 26px 0;
  border-top: 1.5px solid rgba(255, 255, 255, 0.24);
}

.infra-stack-item:last-child {
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.24);
}

.infra-stack-num {
  font-size: 3.4rem;
  line-height: 0.9;
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 2px #ffffff;
}

.infra-stack-item:nth-child(2) .infra-stack-num {
  -webkit-text-stroke-color: var(--mint-bright);
}

.infra-stack-item:nth-child(3) .infra-stack-num {
  -webkit-text-stroke-color: var(--amber);
}

.infra-stack-item:nth-child(4) .infra-stack-num {
  -webkit-text-stroke-color: var(--indigo-soft);
}

.infra-stack-title {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.infra-stack-desc {
  color: var(--on-navy);
  font-size: 1.02rem;
  line-height: 1.6;
}

@media (max-width: 820px) {
  .infra-stack-item {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 16px;
  }
  .infra-stack-desc {
    grid-column: 1 / -1;
  }
  .infra-stack-num {
    font-size: 2.6rem;
  }
}

/* ==========================================================================
   PIPELINE VERTICAL NATIVO PARA CELULARES (<= 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .infra-chips {
    gap: 6px;
    margin-top: 18px;
  }
  .infra-chip {
    padding: 6px 11px;
    font-size: 0.76rem;
  }

  .diagram-card {
    overflow-x: hidden;
    padding: 16px 12px;
    border-radius: 18px;
    margin-top: 24px;
    border-color: rgba(99, 102, 241, 0.35);
  }

  .diagram-header-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 12px;
    margin-bottom: 14px;
  }

  .diagram-status-live {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
  }

  .diagram-legend {
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
  }

  .diagram-wrapper {
    display: none !important;
  }

  .pipeline-mobile-view {
    display: block;
    position: relative;
    padding: 4px 0 6px 38px;
  }

  .pipeline-mobile-line {
    position: absolute;
    left: 15px;
    top: 16px;
    bottom: 24px;
    width: 2.5px;
    background: linear-gradient(180deg, #38bdf8 0%, #34d399 25%, #fbbf24 50%, #818cf8 75%, #34d399 100%);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.45);
  }

  .pipeline-pulse-dot {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 10px #38bdf8, 0 0 5px #34d399;
    animation: pipeline-pulse-travel 3.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  }

  @keyframes pipeline-pulse-travel {
    0% { top: 0%; opacity: 0; }
    8% { opacity: 1; }
    92% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
  }

  .pipeline-steps-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .pipeline-step-item {
    position: relative;
  }

  .pipeline-step-marker {
    position: absolute;
    left: -38px;
    top: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0d102e;
    border: 2px solid var(--blue-sky, #38bdf8);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.64rem;
    font-weight: 800;
    color: #ffffff;
    z-index: 2;
    transition: transform 0.2s, border-color 0.2s;
  }

  .pipeline-step-item:nth-child(2) .pipeline-step-marker {
    border-color: var(--mint-bright);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.35);
  }

  .pipeline-step-item:nth-child(3) .pipeline-step-marker {
    border-color: var(--amber);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
  }

  .pipeline-step-item:nth-child(4) .pipeline-step-marker {
    border-color: #818cf8;
    box-shadow: 0 0 10px rgba(129, 140, 248, 0.35);
  }

  .pipeline-step-item:nth-child(5) .pipeline-step-marker {
    border-color: var(--mint-bright);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.35);
  }

  .pipeline-step-card {
    background: rgba(19, 23, 61, 0.92);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: transform 0.18s, border-color 0.18s, background-color 0.18s, box-shadow 0.18s;
  }

  .pipeline-step-item.is-active .pipeline-step-card {
    border-color: rgba(56, 189, 248, 0.7);
    background: rgba(24, 30, 80, 0.98);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.22);
  }

  .pipeline-step-item.is-active .pipeline-step-marker {
    transform: scale(1.1);
  }

  .pipeline-step-card:active {
    transform: scale(0.98);
    border-color: var(--blue-sky);
    background: rgba(28, 34, 88, 0.98);
  }

  .pipeline-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
  }

  .pipeline-tag {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid currentColor;
  }

  .pipeline-status-pill {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--blue-sky);
    white-space: nowrap;
  }

  .pipeline-card-title {
    margin: 0 0 3px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
  }

  .pipeline-card-desc {
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.45;
    color: var(--on-navy, #c7cdff);
    opacity: 0.92;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pipeline-pulse-dot {
    animation: none;
    display: none;
  }
}
