/* =========================
   HOW SECTION
========================= */
.how-section{
  position: relative;
  padding: 48px 16px 56px;
  font-family: "Montserrat", system-ui, Arial, sans-serif;
  background: url("../img/bg/fondo1.png") center/cover no-repeat;
  background-attachment: fixed;  /* efecto “fijo” solo en esta sección */
  overflow: hidden; /* evita desbordes */
}

.how-wrap{
  max-width: 1180px;
  margin: 0 auto;
}

.how-head{
  text-align: center;
  margin-bottom: 22px;
}

.how-head h2{
  margin: 0;
  font-weight: 900;
  letter-spacing: 1px;
  color: #0f172a;
  font-size: 34px;
}
.how-head h2 span,
.how-head p span,
.how-title span{
  color: #b7ff00;
  font-weight: 900;
}

.how-head p{
  margin: 10px auto 0;
  max-width: 860px;
  font-weight: 700;
  letter-spacing: .6px;
  color: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  text-transform: uppercase;
  line-height: 1.35;
}

.how-title{
  text-align: center;
  margin: 18px 0 22px;
  font-size: 18px;
  letter-spacing: .6px;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.88);
}

/* =========================
   GRID
========================= */
.how-grid{
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 28px;
  align-items: center;
}

/* =========================
   STEPS
========================= */
.how-steps{
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px 18px;
  align-items: start;
}

.how-card{
  position: relative;
  border-radius: 14px;
  background: rgba(255,255,255,.65);
  padding: 14px;
  box-shadow: 0 10px 26px rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.04);
  overflow: hidden;
}

/* BORDE ENTRE CORTADO QUE “GIRA” */
.how-card::before{
  content:"";
  position:absolute;
  inset: 10px;
  border-radius: 12px;
  border: 2px dashed rgba(70,70,70,.35);
  transform-origin: center;
  animation: dashSpin 5.5s linear infinite;
  pointer-events:none;
  opacity: .95;
}

/* el texto NO gira (va encima) */
.how-card__inner{
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 6px 10px;
}

.how-card__inner strong{
  display:block;
  font-size: 11px;
  font-weight: 900;
  color: #4a4a4a;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.how-card__inner span{
  display:block;
  margin-top: 8px;
  font-size: 10px;
  color: rgba(40,40,40,.75);
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  line-height: 1.35;
}

@keyframes dashSpin{
  to{ transform: rotate(360deg); }
}

/* =========================
   MEDIA (imagen sigue al mouse)
========================= */
.how-media{
  position: relative;
  width: 100%;
  min-height: 320px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
}

/* Imagen principal */
.how-hero{
  width: min(560px, 100%);
  height: auto;
  display:block;

  /* parallax con variables */
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1.02);
  transition: transform 180ms ease;
  will-change: transform;
  filter: drop-shadow(0 18px 26px rgba(0,0,0,.18));
  user-select: none;
  pointer-events: none;
}

/* Si separas en capas, puedes usarlas así:
.how-layer{ position:absolute; inset:auto; pointer-events:none; user-select:none; }
.how-layer--map{ width: 92%; opacity:.35; }
.how-layer--hex{ width: 70%; opacity:.9; }
.how-layer--shirts{ width: 78%; }
*/

/* =========================
   RESPONSIVE
========================= */

/* 1024px aprox (laptop) */
@media (max-width: 1100px){
  .how-grid{ grid-template-columns: 1.05fr .95fr; }
  .how-hero{ width: min(520px, 100%); }
}

/* 768px (tablet) -> 2 columnas (botones+imagen) pero sin desbordes */
@media (max-width: 900px){
  .how-grid{
    grid-template-columns: 1fr;   /* apila en columna para que no reviente */
    gap: 18px;
  }
  .how-steps{
    grid-template-columns: repeat(2, minmax(190px, 1fr));
  }
  .how-media{
    min-height: 300px;
  }
  .how-hero{ width: min(520px, 92%); }
}

/* 425px (móvil) -> 1 columna */
@media (max-width: 520px){
  .how-head h2{ font-size: 28px; }
  .how-title{ font-size: 16px; }

  .how-steps{
    grid-template-columns: 1fr;
  }
  .how-card::before{
    inset: 9px;
  }
  .how-media{ min-height: 260px; }
  .how-hero{ width: 96%; }
}
/* BORDE ENTRE CORTADO tipo “cadena” (se mueve alrededor del rectángulo) */
.how-card::before{
  content:"";
  position:absolute;
  inset: 10px;
  border-radius: 12px;

  border: 2px dashed rgba(70,70,70,.35);

  /* “Cadena”: las rayas avanzan */
  animation: dashMove 1.2s linear infinite;

  pointer-events:none;
  opacity: .95;
}

/* Movimiento tipo cadena (avanza alrededor del borde) */
@keyframes dashMove{
  to{ stroke-dashoffset: -100; } /* fallback por si usas svg */
}

/* Para CSS dashed: usamos background trick extra */
.how-card::before{
  border: none;
  background:
    /* TOP */
    repeating-linear-gradient(90deg,
      rgba(70,70,70,.35) 0 10px,
      transparent 10px 18px) top left / 100% 2px no-repeat,

    /* RIGHT */
    repeating-linear-gradient(180deg,
      rgba(70,70,70,.35) 0 10px,
      transparent 10px 18px) top right / 2px 100% no-repeat,

    /* BOTTOM */
    repeating-linear-gradient(90deg,
      rgba(70,70,70,.35) 0 10px,
      transparent 10px 18px) bottom left / 100% 2px no-repeat,

    /* LEFT */
    repeating-linear-gradient(180deg,
      rgba(70,70,70,.35) 0 10px,
      transparent 10px 18px) top left / 2px 100% no-repeat;

  border-radius: 12px;
  animation: chainMove 1.1s linear infinite;
}

@keyframes chainMove{
  to{
    background-position:
      -30px 0,        /* TOP (solo mueve X) */
      100% -30px,     /* RIGHT (X fijo a 100%, mueve Y) */
      30px 100%,      /* BOTTOM (Y fijo a 100%, mueve X) */
      0 30px;         /* LEFT (X fijo a 0, mueve Y) */
  }
}
