/* ================================================================
   MATERIALES — Texturas y efectos de superficie premium
   Acero, carbono, aluminio cepillado, vidrio y metal
   ================================================================ */

/* --- Variables de materiales --- */
:root {
  /* Brushed aluminum / Plata cepillada */
  --brush-light: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 1px,
    rgba(191, 196, 201, 0.08) 1px,
    rgba(191, 196, 201, 0.08) 2px
  );

  /* Carbon fiber pattern */
  --carbon-weave: repeating-conic-gradient(
    from 45deg at 40% 60%,
    rgba(0, 0, 0, 0.1) 0deg 90deg,
    rgba(0, 0, 0, 0.03) 90deg 180deg
  );

  /* Polished steel reflection */
  --steel-reflect: linear-gradient(
    180deg,
    rgba(191, 196, 201, 0.15) 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.1) 100%
  );

  /* Dark mirror surface */
  --mirror-dark: linear-gradient(
    135deg,
    rgba(47, 52, 58, 0.8) 0%,
    rgba(27, 27, 27, 1) 100%
  );

  /* Metallic sheen overlay */
  --metallic-sheen: linear-gradient(
    90deg,
    transparent 0%,
    rgba(191, 196, 201, 0.12) 20%,
    rgba(191, 196, 201, 0.08) 50%,
    rgba(191, 196, 201, 0.12) 80%,
    transparent 100%
  );

  /* Deep red metallic accent */
  --red-metallic: linear-gradient(
    135deg,
    rgba(230, 57, 70, 0.1) 0%,
    rgba(230, 57, 70, 0.05) 50%,
    rgba(220, 40, 65, 0.08) 100%
  );
}

/* --- Superficies de carbono (secciones oscuras) --- */
.section,
body {
  background: var(--ink-0);
  background-image:
    var(--carbon-weave),
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.02) 0px,
      transparent 1px,
      transparent 2px,
      rgba(0, 0, 0, 0.02) 3px
    );
  background-size: 100% 100%, auto auto;
}

/* --- Acabado pulido en paneles principales --- */
.panel-1,
.service-card,
.stat-readout,
.contact-info {
  background: linear-gradient(135deg,
    var(--panel-1) 0%,
    var(--panel-2) 100%
  );
  background-attachment: fixed;
}

.panel-1::before,
.service-card::before {
  background: var(--brush-light);
}

/* --- Efecto de acero satinado en tarjetas --- */
.video-gauge-frame {
  background:
    var(--steel-reflect),
    linear-gradient(135deg,
      rgba(27, 27, 27, 0.85),
      rgba(47, 52, 58, 0.65)
    );
}

/* --- Reflejos metálicos en elementos interactivos --- */
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--metallic-sheen);
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.btn-primary:hover::before {
  opacity: 0.6;
}

/* --- Superficie espejo oscuro en secciones featured --- */
.section-taller,
.section-nosotros {
  background: var(--mirror-dark);
  position: relative;
}

.section-taller::before,
.section-nosotros::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--red-metallic);
  pointer-events: none;
  opacity: 0.5;
}

/* --- Acabado de titanio en acentos --- */
.process-index,
.service-tag {
  background: linear-gradient(135deg,
    rgba(27, 27, 27, 0.7),
    rgba(47, 52, 58, 0.5)
  );
  box-shadow:
    inset 0 1px 2px rgba(191, 196, 201, 0.1),
    inset 0 -1px 2px rgba(0, 0, 0, 0.3);
}

.eyebrow {
  background: transparent;
  box-shadow: none;
}

/* --- Líneas de cobre (énfasis visual) --- */
.service-tag,
.process-index {
  border-color: rgba(191, 196, 201, 0.25);
  color: var(--laser);
}

/* --- Textura de vidrio esmerilado en overlays --- */
.hero-overlay,
.hero-vignette {
  background-blend-mode: multiply;
}

/* --- Sombra proyectada tipo premium (realismo de material) --- */
.service-card {
  box-shadow:
    /* Sombra ambient (luz global) */
    0 2px 8px rgba(0, 0, 0, 0.25),
    /* Sombra de distancia (profundidad) */
    0 8px 24px rgba(0, 0, 0, 0.35),
    /* Glow de borde metálico */
    0 0 0 1px rgba(191, 196, 201, 0.1) inset;
}

.service-card:hover {
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 12px 36px rgba(0, 0, 0, 0.4),
    0 0 0 2px rgba(191, 196, 201, 0.15) inset,
    0 0 24px rgba(230, 57, 70, 0.1) inset;
}

/* --- Efecto de movimiento fluido en transiciones --- */
.service-card,
.btn,
.social-btn {
  transition:
    transform var(--dur-fast) cubic-bezier(0.4, 0.0, 0.2, 1),
    box-shadow var(--dur-fast) ease-out,
    background var(--dur-fast) ease-out,
    border-color var(--dur-fast) ease-out;
}

/* --- Superficie refractiva en elementos flotantes --- */
.video-gauge-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    225deg,
    rgba(191, 196, 201, 0.08) 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.08) 100%
  );
  border-radius: 28px;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* --- Degradado de color principal en backgrounds --- */
.section-head {
  background: transparent;
}

/* --- Énfasis en rojo metalizado (máximo 15-20% de pantalla) --- */
/* Los acentos rojos están limitados a: */
/* - Eyebrows: pequeños, marginales */
/* - Tags: pequeños, marginales */
/* - Botones de acción: presentes pero no dominantes */
/* - Detalles de hover: sutiles */

.laser {
  color: var(--laser);
}

.laser-dim {
  color: var(--laser-dim);
}

/* --- Material cobre/titanio para detalles elegantes --- */
.chrome {
  color: var(--chrome);
}

/* --- Efectos de movimiento con física real --- */
@media (prefers-reduced-motion: no-preference) {
  .service-card:hover {
    animation: none;
    transform: translateY(-8px) scale(1.02);
  }

  .btn:active {
    animation: buttonPress 0.2s ease-out;
  }
}

@keyframes buttonPress {
  0% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

/* --- Profundidad y perspectiva --- */
.wrap {
  perspective: 1000px;
}

.service-grid > article {
  transform-style: preserve-3d;
}

/* --- Acabado brillante en botones primarios --- */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 100%
  );
  animation: shine 0.6s ease-out forwards;
}

@keyframes shine {
  0% {
    left: -100%;
  }
  50% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

.btn-primary:hover::after {
  animation: shine 0.6s ease-out;
}

/* --- Texturas en fondos de sección --- */
.cta-band {
  background:
    var(--red-metallic),
    var(--carbon-weave),
    linear-gradient(120deg,
      rgba(92, 20, 32, 0.4),
      rgba(58, 13, 16, 0.5) 50%,
      rgba(13, 13, 13, 0.6)
    );
  background-size: 100% 100%, 100% 100%, auto;
}

/* --- Estado focus con estilo premium --- */
:focus-visible {
  outline: 2px solid var(--laser);
  outline-offset: 3px;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(230, 57, 70, 0.2);
}

/* --- Responsive materials --- */
@media (max-width: 640px) {
  .service-card {
    box-shadow:
      0 2px 6px rgba(0, 0, 0, 0.25),
      0 6px 16px rgba(0, 0, 0, 0.3),
      0 0 0 1px rgba(191, 196, 201, 0.1) inset;
  }

  .btn-primary {
    box-shadow:
      0 8px 20px rgba(220, 40, 65, 0.2),
      0 0 0 1px rgba(191, 196, 201, 0.15) inset;
  }
}
