/* ============================================================
   HOMBRE ALFA — Páginas internas (Colecciones, RedPill, Nosotros,
   Contacto, Blog). Comparte tokens.css con home.css pero es un
   archivo independiente para no tocar home.css.
   ============================================================ */

/* ----- Botones compartidos (duplicado de home.css a propósito,
   para no depender de que home.css esté cargado en estas páginas) ----- */
.ha-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
}

.ha-btn--primary {
  background: var(--ha-amber);
  color: var(--ha-text-on-amber);
  border-color: var(--ha-amber);
}
.ha-btn--primary:hover {
  background: var(--ha-amber-hover);
  border-color: var(--ha-amber-hover);
}

.ha-btn--ghost {
  background: transparent;
  color: var(--ha-white);
  border-color: var(--ha-hairline-strong);
}
.ha-btn--ghost:hover {
  border-color: var(--ha-white);
}

.ha-btn--amber {
  color: #D9822B;
  border-color: #D9822B;
}
.ha-btn--amber:hover {
  background: rgba(217,130,43,0.08);
  border-color: #E8963D;
  color: #E8963D;
}

/* ============================================================
   Hero genérico de página interna
   ============================================================ */
.ha-page-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ha-black);
  padding: 8rem 2rem 4rem;
}

.ha-page-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Marco con proporción fija para el emblema: evita que dos <img>
   calculen su propio object-fit por separado (causaba un ligero
   desajuste/fantasma entre la imagen base y la capa de fuego). */
.ha-page-hero__emblem-frame {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 1672 / 941;
  display: grid;
}

.ha-page-hero__emblem-frame img {
  grid-area: 1 / 1;
}

.ha-page-hero__bg img,
.ha-page-hero__bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fuego vivo en el emblema (mismo sistema que Home): máscara que aísla
   solo los píxeles de tono fuego real de la foto (no gris de roca),
   animando brillo/saturación de un duplicado de la propia imagen. */
.ha-universe__fire-glow {
  pointer-events: none;
  -webkit-mask-image: url('../img/marca-emblema-mask.png');
  mask-image: url('../img/marca-emblema-mask.png');
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  animation: ha-fire-breathe 3.2s ease-in-out infinite;
}

@keyframes ha-fire-breathe {
  0%   { opacity: 0.35; filter: brightness(1.6) saturate(1.4) contrast(1.15); }
  30%  { opacity: 0.85; filter: brightness(2.4) saturate(1.9) contrast(1.3); }
  50%  { opacity: 0.55; filter: brightness(1.9) saturate(1.5) contrast(1.2); }
  70%  { opacity: 1;    filter: brightness(2.8) saturate(2) contrast(1.35); }
  100% { opacity: 0.35; filter: brightness(1.6) saturate(1.4) contrast(1.15); }
}

.ha-page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(5,5,5,0.55) 0%, rgba(5,5,5,0.35) 40%, rgba(5,5,5,0.92) 100%);
}

.ha-page-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin-inline: auto;
  width: 100%;
}

.ha-page-hero__tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ha-amber);
  margin: 0 0 1rem;
}

.ha-page-hero__title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ha-white);
  margin: 0 0 1rem;
  max-width: 900px;
}

.ha-page-hero__title em {
  font-style: italic;
  color: var(--ha-amber);
}

.ha-page-hero__sub {
  font-size: clamp(1rem, 1.2vw + 0.7rem, 1.25rem);
  color: var(--ha-smoke);
  line-height: 1.6;
  max-width: 620px;
  margin: 0;
}

/* ============================================================
   Secciones genéricas de contenido
   ============================================================ */
.ha-page-section {
  padding: 6rem 2rem;
}

.ha-page-section--charcoal { background: var(--ha-charcoal); }
.ha-page-section--black { background: var(--ha-black); }

/* ----- Partículas CTA (color/forma variable por colección) ----- */
.ha-page-section--cta {
  position: relative;
  overflow: hidden;
}

.ha-cta-particle {
  position: absolute;
  width: var(--size, 3px);
  height: var(--size, 3px);
  border-radius: 50%;
  background: var(--particle-color, #D9822B);
  box-shadow: 0 0 6px var(--particle-color, #D9822B);
  opacity: 0;
  bottom: var(--from, 6%);
  left: var(--x, 50%);
  pointer-events: none;
  animation: ha-cta-particle-rise var(--dur, 4s) ease-in infinite;
  animation-delay: var(--delay, 0s);
}

.ha-cta-particle--star {
  border-radius: 0;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

@keyframes ha-cta-particle-rise {
  0%   { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
  10%  { opacity: var(--peak, 0.7); }
  45%  { opacity: calc(var(--peak, 0.7) * 0.6); transform: translateY(calc(var(--travel, 200px) * -0.45)) translateX(calc(var(--drift, 10px) * 0.5)) rotate(90deg); }
  80%  { opacity: calc(var(--peak, 0.7) * 0.25); }
  100% { transform: translateY(calc(var(--travel, 200px) * -1)) translateX(var(--drift, 10px)) rotate(180deg); opacity: 0; }
}

.ha-page-section__inner {
  max-width: 1280px;
  margin-inline: auto;
}

.ha-page-section__inner--narrow {
  max-width: 760px;
}

.ha-page-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ha-amber);
  margin: 0 0 1rem;
}

.ha-page-heading {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ha-white);
  margin: 0 0 1.5rem;
  letter-spacing: -0.02em;
}

.ha-page-body {
  font-size: 1.0625rem;
  color: var(--ha-smoke);
  line-height: 1.8;
  margin: 0 0 1.25rem;
}

.ha-page-body:last-child { margin-bottom: 0; }

.ha-page-body strong { color: var(--ha-white); font-weight: 700; }
.ha-page-body em { font-style: italic; color: var(--ha-amber); }

/* ----- Grid de valores/pilares (reutilizable) ----- */
.ha-page-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.ha-page-value {
  padding: 1.75rem;
  border: 1px solid var(--ha-hairline);
  border-radius: 2px;
  background: var(--ha-black);
}

.ha-page-value__name {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ha-amber);
  margin: 0 0 0.6rem;
}

.ha-page-value__desc {
  font-size: 0.9375rem;
  color: var(--ha-smoke);
  line-height: 1.6;
  margin: 0;
}

/* ============================================================
   Grid de colecciones (página índice /colecciones)
   ============================================================ */
.ha-coll-index__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.ha-coll-index__card,
.ha-coll-index__card:hover,
.ha-coll-index__card:focus,
.ha-coll-index__card:visited {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 2px;
  overflow: hidden;
  text-decoration: none;
  border: none;
  outline: none;
  background: var(--ha-ash);
}

.ha-coll-index__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease;
}

.ha-coll-index__card:hover img {
  transform: scale(1.04);
}

.ha-coll-index__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.15) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
}

.ha-coll-index__name {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
  color: var(--ha-white);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 0.4rem;
}

.ha-coll-index__sub {
  font-size: 0.8125rem;
  color: var(--ha-smoke);
  line-height: 1.4;
  margin: 0;
}

/* ============================================================
   Página de colección individual (taxonomy-coleccion.php)
   ============================================================ */
.ha-coll-single__logo-wrap {
  position: absolute;
  right: 4rem;
  bottom: 3rem;
  z-index: 1;
  width: 140px;
  height: 140px;
  perspective: 1000px;
  background: transparent !important;
}

.ha-coll-single__logo-3d {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: ha-logo-spin-3d 9s linear infinite;
  background: transparent !important;
}

.ha-coll-single__logo-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  backface-visibility: hidden;
  background: transparent !important;
}

.ha-coll-single__logo-face--back {
  transform: rotateY(180deg);
}

@keyframes ha-logo-spin-3d {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}

@media (max-width: 768px) {
  .ha-coll-single__logo-wrap {
    right: 1.25rem;
    left: auto;
    bottom: auto;
    top: 4.5rem;
    width: 64px;
    height: 64px;
  }
}

.ha-coll-single__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.ha-coll-single__empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--ha-smoke);
}

.ha-coll-single__empty-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ha-white);
  margin: 0 0 0.75rem;
}

/* ----- Tarjeta de producto (duplicado de home.css, mismo motivo) ----- */
.ha-product-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.ha-product-card__img {
  aspect-ratio: 1 / 1;
  background: #222222;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid transparent;
  transition: border-color 0.4s ease;
}

.ha-product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  object-position: center !important;
  display: block;
  box-sizing: border-box;
  transition: transform 0.4s ease;
}

@media (hover: hover) {
  .ha-product-card:hover .ha-product-card__img { border-color: #D9822B; }
  .ha-product-card:hover .ha-product-card__img img { transform: scale(1.04); }
}

.ha-product-card__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: var(--ha-charcoal);
  padding: 1rem;
}

.ha-product-card__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ha-white);
  margin: 0;
  letter-spacing: 0.02em;
}

.ha-product-card__price {
  font-size: 0.8125rem;
  color: var(--ha-smoke);
  margin: 0;
}

/* ============================================================
   Contacto
   ============================================================ */
.ha-contact__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.ha-contact__item {
  margin-bottom: 2rem;
}

.ha-contact__item-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ha-amber);
  margin: 0 0 0.5rem;
}

.ha-contact__item-value {
  font-size: 1.375rem;
  color: var(--ha-white);
  text-decoration: none;
  font-weight: 600;
  transition: color 150ms ease;
}

.ha-contact__item-value:hover { color: var(--ha-amber); }

.ha-contact__social {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
}

.ha-contact__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--ha-hairline);
  border-radius: 4px;
  color: var(--ha-smoke);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: color 150ms ease, border-color 150ms ease;
}

.ha-contact__social a:hover {
  color: var(--ha-amber);
  border-color: var(--ha-amber);
}

/* ============================================================
   Blog — archivo y single
   ============================================================ */
.ha-blog__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.ha-blog-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.ha-blog-card__img {
  aspect-ratio: 4 / 3;
  background: var(--ha-ash);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.ha-blog-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.ha-blog-card:hover .ha-blog-card__img img {
  transform: scale(1.04);
}

.ha-blog-card__tag {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ha-amber);
  margin: 0 0 0.5rem;
}

.ha-blog-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ha-white);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.ha-blog-card__excerpt {
  font-size: 0.9375rem;
  color: var(--ha-smoke);
  line-height: 1.6;
  margin: 0;
}

.ha-blog-single__meta {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ha-amber);
  margin: 0 0 1rem;
}

.ha-blog-single__content {
  max-width: 760px;
  margin-inline: auto;
  font-size: 1.0625rem;
  color: var(--ha-smoke);
  line-height: 1.85;
}

.ha-blog-single__content p { margin: 0 0 1.5rem; }
.ha-blog-single__content h2 {
  font-size: 1.5rem;
  color: var(--ha-white);
  margin: 2.5rem 0 1rem;
}

/* ============================================================
   Páginas legales (Aviso legal, Privacidad, Cookies, Términos, Envíos)
   ============================================================ */
.ha-legal__updated {
  font-size: 0.8125rem;
  color: var(--ha-amber);
  letter-spacing: 0.04em;
  margin-bottom: 2.5rem;
}

.ha-blog-single__content h3 {
  font-size: 1.125rem;
  color: var(--ha-white);
  margin: 1.75rem 0 0.75rem;
}

.ha-blog-single__content a {
  color: var(--ha-amber);
}

/* Dato pendiente de completar con la información real de la empresa
   antes de publicar en producción (CIF, domicilio social, registro,
   proveedor de hosting/pago, etc.). Resaltado a propósito para que
   no pase desapercibido en revisión. */
.ha-legal-placeholder {
  color: var(--ha-amber);
  background: rgba(217, 130, 43, 0.12);
  padding: 0.05em 0.4em;
  border-radius: 2px;
  font-style: normal;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .ha-page-values,
  .ha-coll-index__grid,
  .ha-coll-single__grid { grid-template-columns: repeat(2, 1fr); }
  .ha-blog__grid { grid-template-columns: repeat(2, 1fr); }
  .ha-contact__grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 768px) {
  .ha-page-hero { min-height: 50vh; padding: 6rem 1.25rem 3rem; }
  .ha-page-section { padding: 4rem 1.25rem; }
  .ha-page-values,
  .ha-coll-index__grid,
  .ha-coll-single__grid,
  .ha-blog__grid { grid-template-columns: 1fr; }
}
