/* ==========================================================
   ROBIOTEC HOME
   VERSIÓN COMPACTA
========================================================== */

.home-page {
  overflow-x: hidden;
  background: #080c11;
}

.home-container {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

/* Menos espacio vertical entre secciones */
.home-section {
  padding: 56px 0;
}

.section-heading {
  max-width: 680px;
  margin: 0 auto 30px;
  text-align: center;
}

.compact-heading {
  margin-bottom: 24px;
}

.section-heading > span,
.section-label,
.home-cta-content > span {
  display: inline-block;
  margin-bottom: 8px;

  color: var(--brand-red-light);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.section-heading h2 {
  margin-bottom: 8px;
  color: #fff;
  font-size: clamp(27px, 3.5vw, 40px);
  line-height: 1.12;
}

.section-heading p {
  max-width: 580px;
  margin: 0 auto;

  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  line-height: 1.6;
}

/* ==========================================================
   HERO COMPACTO
========================================================== */

.home-hero {
  position: relative;

  min-height: 560px;
  display: flex;
  align-items: center;

  overflow: hidden;

  background:
    radial-gradient(
      circle at 20% 32%,
      rgba(241, 56, 17, 0.16),
      transparent 27%
    ),
    radial-gradient(
      circle at 82% 60%,
      rgba(47, 128, 255, 0.13),
      transparent 29%
    ),
    linear-gradient(135deg, #05080c 0%, #091018 50%, #070a0f 100%);
}

.hero-grid {
  position: absolute;
  inset: 0;

  opacity: 0.25;

  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);

  background-size: 34px 34px;

  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent,
    #000 18%,
    #000 86%,
    transparent
  );

  mask-image: linear-gradient(
    to bottom,
    transparent,
    #000 18%,
    #000 86%,
    transparent
  );
}

.hero-glow {
  position: absolute;

  width: 340px;
  height: 340px;

  border-radius: 50%;
  filter: blur(110px);

  pointer-events: none;
}

.hero-glow-red {
  left: -150px;
  top: 20%;

  background: rgba(241, 56, 17, 0.14);
}

.hero-glow-blue {
  right: -140px;
  bottom: -80px;

  background: rgba(47, 128, 255, 0.12);
}

.hero-container {
  position: relative;
  z-index: 2;

  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 48px 0;

  display: grid;
  grid-template-columns: 1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

.hero-kicker {
  display: inline-block;
  margin-bottom: 13px;

  color: var(--brand-red-light);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.hero-copy h1 {
  max-width: 570px;

  color: #fff;
  font-size: clamp(42px, 5.2vw, 68px);
  line-height: 0.98;
  letter-spacing: -1.8px;
}

.hero-copy h1 span {
  display: block;
  color: var(--brand-red);
}

.hero-copy p {
  max-width: 520px;
  margin-top: 17px;

  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;

  margin-top: 24px;
}

/* ==========================================================
   BOTONES
========================================================== */

.home-button {
  min-height: 43px;
  padding: 0 20px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  border-radius: 999px;

  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.home-button-primary {
  background: linear-gradient(90deg, var(--brand-red), var(--brand-red-light));

  box-shadow: 0 0 16px rgba(241, 56, 17, 0.3);
}

.home-button-primary:hover {
  transform: translateY(-2px);

  box-shadow: 0 0 25px rgba(241, 56, 17, 0.55);
}

.home-button-outline {
  border: 1px solid rgba(255, 106, 69, 0.65);

  background: rgba(0, 0, 0, 0.15);
}

.home-button-outline:hover {
  transform: translateY(-2px);

  background: rgba(241, 56, 17, 0.12);
}

/* ==========================================================
   ESCENA DEL LOGO
========================================================== */

.coin-area {
  position: relative;

  width: min(430px, 39vw);
  aspect-ratio: 1.15 / 1;
  margin: auto;

  display: grid;
  place-items: center;

  overflow: hidden;

  perspective: 1050px;
  transform-style: preserve-3d;

  cursor: ew-resize;
}

.coin-background-grid {
  position: absolute;
  inset: 0;

  opacity: 0.24;

  background-image:
    linear-gradient(rgba(255, 106, 69, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 106, 69, 0.16) 1px, transparent 1px);

  background-size: 24px 24px;

  -webkit-mask-image: radial-gradient(circle, #000, transparent 70%);

  mask-image: radial-gradient(circle, #000, transparent 70%);
}

.coin-wrapper {
  position: relative;
  z-index: 5;

  width: 42%;
  aspect-ratio: 1;

  display: grid;
  place-items: center;

  transform-style: preserve-3d;
  perspective: 900px;
}

/* La moneda real: ahora es un <canvas> renderizado con Three.js
   en coin.js (antes era un truco de dos caras planas en CSS,
   pero se veía "aplastado" en los ángulos intermedios porque
   no tenía volumen real). */
#coinCanvas {
  width: 100%;
  height: 100%;

  display: block;
}

/* ==========================================================
   ÓRBITAS
========================================================== */

.coin-orbit {
  position: absolute;

  border-radius: 50%;

  border: 1px solid rgba(255, 106, 69, 0.28);

  pointer-events: none;
}

.coin-orbit-outer {
  width: 78%;
  aspect-ratio: 1;

  animation: orbitRotation 20s linear infinite;
}

.coin-orbit-middle {
  width: 63%;
  aspect-ratio: 1;

  border-color: rgba(47, 128, 255, 0.23);

  animation: orbitRotation 15s linear infinite reverse;
}

.coin-orbit-inner {
  width: 50%;
  aspect-ratio: 1;

  border-color: rgba(255, 255, 255, 0.15);

  animation: orbitRotation 11s linear infinite;
}

.coin-point {
  position: absolute;
  z-index: 4;

  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: var(--brand-red-light);

  box-shadow: 0 0 14px rgba(255, 106, 69, 0.95);
}

/* Los puntos viven dentro de .coin-orbit-outer, así que giran
   junto con el anillo en vez de quedarse fijos. Se ubican
   exactamente sobre la circunferencia del anillo padre. */
.coin-point-top {
  top: 0;
  left: 50%;

  transform: translate(-50%, -50%);
}

.coin-point-right {
  top: 50%;
  right: 0;

  transform: translate(50%, -50%);
}

.coin-point-bottom {
  bottom: 0;
  left: 50%;

  transform: translate(-50%, 50%);
}

.coin-point-left {
  top: 50%;
  left: 0;

  transform: translate(-50%, -50%);

  background: #2f80ff;

  box-shadow: 0 0 14px rgba(47, 128, 255, 0.9);
}

.coin-help {
  position: absolute;
  bottom: 4px;

  color: rgba(255, 255, 255, 0.35);
  font-size: 10px;
  letter-spacing: 0.8px;

  opacity: 0;

  transition: opacity 0.25s ease;
}

.coin-area:hover .coin-help {
  opacity: 1;
}

@keyframes orbitRotation {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================
   SERVICIOS MÁS COMPACTOS
========================================================== */

.services-section {
  background:
    radial-gradient(circle at 50% 0%, rgba(241, 56, 17, 0.06), transparent 28%),
    #080c11;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.service-card {
  min-height: 215px;
  padding: 24px 20px;

  text-align: center;

  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.085);

  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.04),
    rgba(241, 56, 17, 0.025)
  );

  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-6px);

  border-color: rgba(255, 106, 69, 0.45);

  box-shadow: 0 16px 35px rgba(241, 56, 17, 0.1);
}

.service-card i {
  margin-bottom: 16px;

  color: var(--brand-red-light);
  font-size: 32px;
}

.service-card h3 {
  margin-bottom: 10px;

  color: #fff;
  font-size: 18px;
}

.service-card p {
  color: rgba(255, 255, 255, 0.61);
  font-size: 13px;
  line-height: 1.6;
}

/* ==========================================================
   PROYECTO DESTACADO MÁS PEQUEÑO
========================================================== */

.featured-section {
  padding-top: 8px;
  background: #080c11;
}

.featured-project {
  min-height: 300px;

  display: grid;
  grid-template-columns: 0.9fr 1.1fr;

  overflow: hidden;

  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.09);

  background: linear-gradient(
    130deg,
    rgba(255, 255, 255, 0.035),
    rgba(241, 56, 17, 0.025)
  );
}

.featured-image {
  position: relative;
  min-height: 300px;
}

.featured-image::after {
  content: "";

  position: absolute;
  inset: 0;

  background: linear-gradient(90deg, transparent 50%, #0a0e13 100%);
}

.featured-image img {
  width: 100%;
  height: 100%;

  display: block;
  object-fit: cover;
}

.featured-content {
  padding: 34px 38px;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-content h2 {
  margin-bottom: 12px;

  color: #fff;
  font-size: clamp(27px, 3.4vw, 40px);
}

.featured-content > p {
  margin-bottom: 17px;

  color: rgba(255, 255, 255, 0.67);
  font-size: 14px;
  line-height: 1.65;
}

.featured-features {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;

  margin-bottom: 20px;
}

.featured-features div {
  display: flex;
  align-items: center;
  gap: 7px;

  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
}

.featured-features i {
  width: 29px;
  height: 29px;

  display: grid;
  place-items: center;

  border-radius: 50%;
  border: 1px solid rgba(255, 106, 69, 0.4);

  color: var(--brand-red-light);
  font-size: 12px;
}

/* ==========================================================
   PROCESO COMPACTO
========================================================== */

.process-section {
  background: #080c11;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);

  overflow: hidden;

  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.process-card {
  min-height: 155px;
  padding: 20px 16px;

  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: start;
  gap: 10px;

  border-right: 1px solid rgba(255, 255, 255, 0.08);

  background: rgba(255, 255, 255, 0.022);
}

.process-card:last-child {
  border-right: none;
}

.process-number {
  width: 31px;
  height: 31px;

  display: grid;
  place-items: center;

  border-radius: 50%;
  border: 1px solid var(--brand-red-light);

  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.process-card > i {
  margin-top: 3px;

  color: var(--brand-red-light);
  font-size: 23px;
}

.process-card h3 {
  margin-bottom: 7px;

  color: #fff;
  font-size: 15px;
}

.process-card p {
  color: rgba(255, 255, 255, 0.57);
  font-size: 12px;
  line-height: 1.5;
}

/* ==========================================================
   ESTADÍSTICAS COMPACTAS
========================================================== */

.stats-section-home {
  padding: 0 0 54px;
  background: #080c11;
}

.stats-grid-home {
  display: grid;
  grid-template-columns: repeat(4, 1fr);

  overflow: hidden;

  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);

  background: rgba(255, 255, 255, 0.022);
}

.stats-grid-home article {
  min-height: 108px;
  padding: 20px;

  display: flex;
  align-items: center;
  gap: 15px;

  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.stats-grid-home article:last-child {
  border-right: none;
}

.stats-grid-home i {
  color: var(--brand-red-light);
  font-size: 30px;
}

.stats-grid-home strong {
  display: block;
  margin-bottom: 4px;

  color: var(--brand-red-light);
  font-size: 31px;
  line-height: 1;
}

.stats-grid-home span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

/* ==========================================================
   CTA COMPACTO
========================================================== */

.cta-section-home {
  padding: 0 0 58px;
  background: #080c11;
}

.home-cta {
  position: relative;

  min-height: 175px;
  padding: 30px 36px;

  display: grid;
  grid-template-columns: 1.25fr auto 0.4fr;
  align-items: center;
  gap: 26px;

  overflow: hidden;

  border-radius: 15px;
  border: 1px solid rgba(255, 106, 69, 0.17);

  background:
    radial-gradient(circle at 84% 50%, rgba(241, 56, 17, 0.2), transparent 25%),
    linear-gradient(120deg, #10151b, #0a0e13);
}

.home-cta-content h2 {
  margin-bottom: 8px;

  color: #fff;
  font-size: clamp(25px, 3.5vw, 36px);
  line-height: 1.12;
}

.home-cta-content p {
  color: rgba(255, 255, 255, 0.63);
  font-size: 13px;
}

.cta-icon {
  display: grid;
  place-items: center;
}

.cta-icon i {
  color: var(--brand-red-light);
  font-size: 75px;

  filter: drop-shadow(0 0 20px rgba(241, 56, 17, 0.35));
}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 980px) {
  .home-hero {
    min-height: auto;
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 22px;

    padding: 55px 0 35px;
    text-align: center;
  }

  .hero-copy p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .coin-area {
    width: min(390px, 78vw);
  }

  .services-grid,
  .process-grid,
  .stats-grid-home {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-card:nth-child(2),
  .stats-grid-home article:nth-child(2) {
    border-right: none;
  }

  .process-card:nth-child(-n + 2),
  .stats-grid-home article:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .featured-project {
    grid-template-columns: 1fr;
  }

  .featured-image {
    min-height: 260px;
  }

  .featured-image::after {
    background: linear-gradient(180deg, transparent 55%, #0a0e13 100%);
  }

  .home-cta {
    grid-template-columns: 1fr auto;
  }

  .cta-icon {
    display: none;
  }
}

@media (max-width: 650px) {
  .home-section {
    padding: 45px 0;
  }

  .hero-copy h1 {
    font-size: 41px;
  }

  .hero-copy p {
    font-size: 14px;
  }

  .services-grid,
  .process-grid,
  .stats-grid-home {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: auto;
  }

  .process-card,
  .stats-grid-home article {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .process-card:last-child,
  .stats-grid-home article:last-child {
    border-bottom: none;
  }

  .featured-content {
    padding: 27px 22px;
  }

  .featured-image {
    min-height: 220px;
  }

  .home-cta {
    grid-template-columns: 1fr;
    padding: 27px 22px;
  }

  .home-cta .home-button {
    width: 100%;
  }
}

@media (max-width: 470px) {
  .hero-actions {
    flex-direction: column;
  }

  .home-button {
    width: 100%;
  }

  .coin-area {
    width: 92vw;
  }

  .coin-wrapper {
    width: 45%;
  }

  .coin-help {
    display: none;
  }
}

/* Respeta usuarios que prefieren pocas animaciones */
@media (prefers-reduced-motion: reduce) {
  .coin-orbit {
    animation: none;
  }

  .service-card,
  .home-button {
    transition: none;
  }
}