/* =========================================================
   Tattoos. Medidas del Figma 02 - Tattoos:
   mobile (tattoos-mobile, 390) primero, desktop (tattoos-desktop, 1440) desde 64rem.
   Títulos de mobile con la misma escala achicada que el Inicio (ver "achicado en mobile").
   ========================================================= */

/* ---------- Hero ---------- */
.hero {
  --hero-overlay: 0.7;        /* AJUSTAR: oscuridad sobre la foto (Figma: negro al 70%) */
  position: relative;
  display: flex;
  align-items: center;
  height: 100vh;              /* igual que el Inicio: alto completo de la pantalla */
  height: 100svh;
  overflow: hidden;
  background-color: var(--color-black);
  color: var(--color-off-white);
}

.hero__media,
.hero__overlay,
.hero__placeholder,
.hero__full {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 56% center; /* AJUSTAR: encuadre mobile (Figma: manos y pierna al centro) */
}

/* Placeholder estirado y desenfocado hasta que llega la foto real */
.hero__placeholder img {
  filter: blur(16px);
  transform: scale(1.08);
}

.hero__full {
  opacity: 0;
  transition: opacity 600ms var(--ease-out); /* AJUSTAR: duración del crossfade */
}

.hero.is-loaded .hero__full,
.hero__full--static {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero__full {
    transition: none;
  }
}

.hero__overlay {
  background-color: rgb(0 0 0 / var(--hero-overlay));
}

.hero__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding-block: 50px;
}

.hero__eyebrow {
  font-family: var(--font-title);
  font-size: 1.5rem;      /* 24px (Figma 32, achicado en mobile) */
  line-height: 2.125rem;  /* 34px */
  color: var(--color-gold);
}

.hero__title {
  font-size: 2.625rem;    /* 42px (Figma 52, achicado en mobile) */
  line-height: 3.125rem;  /* 50px */
}

.hero__text {
  font-size: var(--text-body-lg);
  line-height: var(--leading-body-lg);
  color: var(--color-white);
}

.hero__cta {
  width: 172px;
}

/* =========================================================
   Barra de confianza DESKTOP (Figma: barra-confianza-tatuajes).
   En mobile se oculta: ahí van las opciones A y B.
   ========================================================= */
.process-bar {
  display: none;
}

/* =========================================================
   OPCIÓN A: barra de confianza (borrar este bloque entero si el cliente elige la B)
   Figma: confianza-mobile-v1. Línea de tiempo vertical, solo mobile.
   ========================================================= */
.process-timeline {
  padding: 32px;
  background-color: var(--color-black);
  color: var(--color-off-white);
}

.process-timeline__list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 0;
  list-style: none;
}

/* Figma: Heading/H3, a 24 px del círculo */
.process-timeline__item {
  position: relative;
  padding-left: 56px;     /* 32 del círculo + 24 de separación */
  font-family: var(--font-title);
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
}

/* Círculo dorado de 12 px centrado en un cuadro de 32 */
.process-timeline__item::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 10px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--color-gold);
}

/* Línea entre círculos (Figma: 1 px, 54 de alto, 8 px de aire con cada círculo) */
.process-timeline__item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 35px;
  left: 15.5px;
  width: 1px;
  height: 54px;
  background-color: var(--color-off-white);
}
/* FIN OPCIÓN A */

/* =========================================================
   OPCIÓN B: marquee de confianza (borrar este bloque entero si el cliente elige la A)
   Figma: confianza-mobile-v2. Solo mobile. Va hacia la izquierda, como el Figma.
   ========================================================= */
.process-marquee {
  --process-marquee-duration: 20s; /* AJUSTAR: tiempo de una vuelta (Figma: 20 s). Más alto, más lento */
  padding-block: 42px;
  background-color: var(--color-black);
  color: var(--color-off-white);
}

.process-marquee__window {
  padding-left: 32px;
  overflow: hidden;
}

.process-marquee__track {
  display: flex;
  width: max-content;
  animation: process-marquee var(--process-marquee-duration) linear infinite;
}

.process-marquee__list {
  display: flex;
  padding: 0;
  list-style: none;
}

.process-marquee__item {
  display: flex;
  align-items: center;
  font-family: var(--font-title);
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  white-space: nowrap;
}

/* Destello dorado del Figma, en un espacio de 60 x 42 */
.process-marquee__spark {
  width: 60px;
  height: 42px;
  fill: var(--color-gold);
}

/* Tres copias iguales: correrse un tercio es una vuelta exacta, sin corte */
@keyframes process-marquee {
  to {
    transform: translateX(-33.3333%);
  }
}

/* Sin movimiento: queda quieta y se puede deslizar a mano */
@media (prefers-reduced-motion: reduce) {
  .process-marquee__track {
    animation: none;
  }

  .process-marquee__window {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .process-marquee__list[aria-hidden="true"] {
    display: none;
  }
}
/* FIN OPCIÓN B */

/* =========================================================
   Nuestros estilos: marquee de tarjetas (Figma: estilos-galeria)
   ========================================================= */
.styles {
  --styles-gap: 24px;         /* Figma: separación entre tarjetas */
  --styles-card-width: 250px; /* Figma mobile */
  /* Velocidad: 30 px por segundo. Duración = ancho de una copia / 30.
     Mobile: 8 x (250 + 24) = 2192 px -> 73 s */
  --styles-duration: 73s;     /* AJUSTAR: más alto, más lento */
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding-block: 30px;
  background-color: var(--color-off-white);
}

.styles__title {
  font-size: 2.375rem;    /* 38px (Figma 52, achicado en mobile) */
  line-height: 2.75rem;   /* 44px */
  color: var(--color-blue);
}

/* La ventana deja ver la pista; el padding da lugar al contorno de foco */
.styles__window {
  padding-block: 6px;
  overflow: hidden;
}

/* De izquierda a derecha: arranca corrida una copia y vuelve a 0, en loop */
.styles__track {
  display: flex;
  width: max-content;
  animation: styles-marquee var(--styles-duration) linear infinite;
}

@keyframes styles-marquee {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}

/* Pausa: con el mouse encima, con foco de teclado adentro, o mientras se toca (clase de js/styles-marquee.js).
   Foco de teclado (:focus-visible) y no :focus-within: después de un clic o un toque el botón
   queda con foco y el marquee no volvería a arrancar. */
@media (hover: hover) {
  .styles__window:hover .styles__track {
    animation-play-state: paused;
  }
}

.styles__window:has(:focus-visible) .styles__track,
.styles__window.is-touching .styles__track {
  animation-play-state: paused;
}

/* Con teclado (clase de js/styles-marquee.js): el marquee se detiene con la primera copia a la vista
   y la ventana se desplaza hasta la tarjeta con foco. Al salir vuelve a arrancar. */
.styles__window.is-keyboard .styles__track {
  animation: none;
}

.styles__list {
  display: flex;
  padding: 0;
  list-style: none;
}

/* Separación como margen (no gap) para que las dos copias midan exactamente lo mismo */
.styles__item {
  flex: 0 0 auto;
  margin-right: var(--styles-gap);
}

.style-card {
  display: flex;
  flex-direction: column;
  width: var(--styles-card-width);
  overflow: hidden;
  text-align: left;
  color: var(--color-blue); /* color del contorno de foco */
}

.style-card__img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform 600ms var(--ease-out);
}

/* Figma: pie negro de 80, Inter SemiBold 20/28 dorado */
.style-card__label {
  position: relative; /* queda arriba de la foto al hacer zoom */
  display: flex;
  align-items: center;
  gap: 6px;
  height: 80px;
  padding: 16px;
  background-color: var(--color-black);
  color: var(--color-gold);
  font-size: var(--text-body-lg);
  font-weight: 600;
  line-height: var(--leading-body-lg);
}

/* Flecha en SVG: el Inter autoalojado no trae → (igual que las flechas del carrusel) */
.style-card__arrow {
  width: 20px;
  height: 20px;
  transition: transform var(--duration-base) var(--ease-out);
}

@media (hover: hover) {
  .style-card:hover .style-card__img {
    transform: scale(1.03);
  }

  .style-card:hover .style-card__arrow {
    transform: translateX(4px);
  }
}

/* Estilo elegido (no está en el Figma): nombre subrayado */
.style-card:hover .style-card__name,
.style-card[aria-pressed="true"] .style-card__name {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Sin movimiento: sin animación; la fila se desliza a mano y se oculta la copia */
@media (prefers-reduced-motion: reduce) {
  .styles__track {
    animation: none;
  }

  .styles__window {
    overflow-x: auto;
    padding-inline: var(--section-gutter);
    scrollbar-width: none;
  }

  .styles__list[aria-hidden="true"] {
    display: none;
  }
}

/* Pantalla táctil (clase de js/styles-marquee.js): la pista la mueve el JS y se arrastra con el dedo.
   pan-y: el scroll vertical de la página sigue siendo del navegador. Con movimiento reducido
   también: sin automático, pero con las dos copias para que el arrastre dé la vuelta. */
.styles__window.is-draggable {
  overflow: hidden;
  padding-inline: 0;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.styles__window.is-draggable .styles__track {
  animation: none;
  will-change: transform;
}

.styles__window.is-draggable .styles__list[aria-hidden="true"] {
  display: flex;
}

/* =========================================================
   Galería (Figma: galeria). Mobile: carrusel con puntos (js/carousel.js)
   ========================================================= */
.gallery {
  padding-block: 40px;
  background-color: var(--color-off-white);
}

.gallery__inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* "Galería" o el nombre del estilo elegido (js/gallery-filter.js). Mayúsculas como el Figma. */
.gallery__eyebrow {
  font-family: var(--font-title);
  font-size: 1.5rem;      /* 24px (Figma 28, achicado en mobile) */
  line-height: 2.125rem;  /* 34px */
  text-transform: uppercase;
  color: var(--color-light-blue);
}

/* Con un estilo elegido: amarillo de la marca (Brand/Gold) */
.gallery__eyebrow.is-style {
  color: var(--color-gold);
}

.gallery__title {
  font-size: 2.375rem;    /* 38px (Figma 44, achicado en mobile) */
  line-height: 2.75rem;   /* 44px */
  color: var(--color-blue);
}

.gallery__set {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.gallery__set[hidden] {
  display: none;
}

.gallery__grid {
  gap: 16px;
}

.gallery__item {
  height: 400px;          /* Figma mobile: 310 x 400 */
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Cambio de estilo: el set actual se desvanece y el nuevo entra foto por foto */
.gallery__set.is-leaving {
  opacity: 0;
  transition: opacity 250ms var(--ease-out); /* AJUSTAR: salida (igualar LEAVE_MS en js/gallery-filter.js) */
}

.gallery__set.is-entering .gallery__item {
  animation: gallery-in 500ms var(--ease-out) both; /* AJUSTAR: duración de la entrada de cada foto */
  animation-delay: calc(var(--i, 0) * 70ms);         /* AJUSTAR: escalonado entre fotos */
}

@keyframes gallery-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

/* Sin JS no hay filtro: se ven todos los estilos (y no la selección inicial, que los repite) */
@media (scripting: none) {
  .gallery__set[hidden] {
    display: flex;
  }

  .gallery__set[data-gallery-set="destacados"] {
    display: none;
  }
}

/* =========================================================
   El proceso (Figma: tattoos-proceso)
   ========================================================= */
.process {
  padding-block: 30px;
  background-color: var(--color-black);
  color: var(--color-off-white);
}

.process__inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.process__header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.process__eyebrow {
  font-family: var(--font-title);
  font-size: 1.5rem;      /* 24px (Figma 28, achicado en mobile) */
  line-height: 2.125rem;  /* 34px */
  color: var(--color-gold);
}

.process__title {
  font-size: 2.375rem;    /* 38px (Figma 44, achicado en mobile) */
  line-height: 2.75rem;   /* 44px */
}

.process__steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Figma: borde dorado arriba de 2 px, padding 12 24, separación 12 */
.process__step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 24px;
  border-top: 2px solid var(--color-gold);
}

.process__number {
  font-family: var(--font-title);
  font-size: var(--text-h2);
  font-weight: 600;
  line-height: var(--leading-h2);
  color: var(--color-gold);
}

.process__step-title {
  font-size: var(--text-h3);
  font-weight: 400;
  line-height: var(--leading-h3);
}

.process__step-text {
  font-size: var(--text-body-lg);
  line-height: var(--leading-body-lg);
}

/* =========================================================
   Desktop (frame de 1440)
   ========================================================= */
@media (min-width: 64rem) {
  /* Hero */
  .hero__media img {
    object-position: left 45%; /* AJUSTAR: encuadre desktop */
  }

  .hero__content {
    padding-block: 0;
  }

  .hero__content > * {
    max-width: 680px;     /* Figma: bloque de texto de 680 */
  }

  .hero__eyebrow {
    font-size: var(--text-h3);
    line-height: var(--leading-h3);
  }

  .hero__title {
    font-size: var(--text-h1);
    line-height: var(--leading-h1);
  }

  .hero__break {
    display: none;        /* desktop: el título va en una línea */
  }

  /* Barra de confianza desktop: 4 columnas separadas por una línea */
  .process-bar {
    display: block;
    padding-block: 70px;
    background-color: var(--color-black);
    color: var(--color-off-white);
  }

  .process-bar__list {
    display: flex;
    gap: 6px;
  }

  .process-bar__item {
    flex: 1;
    font-family: var(--font-title);
    font-size: var(--text-h3);
    line-height: var(--leading-h3);
    text-align: center;
    border-right: 1px solid var(--color-off-white);
  }

  .process-bar__item:last-child {
    border-right: 0;
  }

  /* Opciones A y B: solo mobile */
  .process-timeline,
  .process-marquee {
    display: none;
  }

  /* Nuestros estilos */
  .styles {
    --styles-card-width: 220px;  /* Figma desktop */
    /* Desktop: 8 x (220 + 24) = 1952 px -> 65 s a 30 px por segundo */
    --styles-duration: 65s;      /* AJUSTAR: más alto, más lento */
    gap: 48px;
    padding-block: 70px;
  }

  .styles__title {
    font-size: var(--text-h2);
    line-height: var(--leading-h2);
  }

  /* En pantallas más anchas que una copia (1952 px) se vería el final de la pista */
  .styles__window {
    width: 100%;
    max-width: 1952px;
    margin-inline: auto;
  }

  /* Galería: filas de 2 y de 3 alternadas, en el orden de los archivos.
     Grilla de 6 columnas: en fila de 2 cada foto ocupa 3, en fila de 3 ocupa 2. */
  .gallery {
    padding-block: 80px;
  }

  .gallery__inner {
    gap: 30px;
  }

  .gallery__eyebrow {
    font-size: var(--text-h3);
    line-height: var(--leading-h3);
  }

  .gallery__title {
    font-size: var(--text-h2);
    line-height: var(--leading-h2);
  }

  .gallery__grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px 30px;        /* Figma: 24 entre filas, 30 entre fotos */
    overflow: visible;
  }

  .gallery__item {
    grid-column: span 2;   /* fila de 3: 380 px */
  }

  .gallery__item:nth-child(5n + 1),
  .gallery__item:nth-child(5n + 2) {
    grid-column: span 3;   /* fila de 2: 585 px */
  }

  /* Última fila incompleta: las fotos que sobran ocupan todo el ancho */
  .gallery__item:nth-child(5n + 1):last-child,
  .gallery__item:nth-child(5n + 3):last-child {
    grid-column: span 6;   /* una sola foto: ancho completo */
  }

  .gallery__item:nth-child(5n + 3):nth-last-child(2),
  .gallery__item:nth-child(5n + 4):last-child {
    grid-column: span 3;   /* dos fotos en una fila de 3: mitad y mitad */
  }

  .gallery__dots {
    display: none;
  }

  .gallery__set {
    gap: 0;
  }

  /* El proceso: 3 pasos en fila */
  .process {
    padding-block: 117px;  /* Figma: 600 de alto con el contenido centrado */
  }

  .process__eyebrow {
    font-size: var(--text-h3);
    line-height: var(--leading-h3);
  }

  .process__title {
    font-size: var(--text-h2);
    line-height: var(--leading-h2);
  }

  .process__steps {
    flex-direction: row;
  }

  .process__step {
    flex: 1;
  }
}
