/* =========================================================================
   Reset + primitivas compartidas
   ========================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  /* El panel de nav móvil vive fuera de pantalla (translateX); sin esto
     ensancha el documento y aparece scroll horizontal. `clip` no rompe
     position: sticky como sí lo haría `hidden`. */
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
figure,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

a:hover {
  color: var(--xg);
}

::selection {
  background: var(--xg);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--xg);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------- layout -- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.section {
  padding-block: var(--section-y);
}

.section--flush-top {
  padding-top: 0;
}

.section--tint {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
}

/* Encabezado de sección: "01 — CATEGORÍAS" + título + acción */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 2.5rem);
  flex-wrap: wrap;
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.eyebrow {
  font-family: var(--mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.14em;
  color: var(--xg);
  margin-bottom: 0.85rem;
}

.eyebrow--muted {
  color: var(--text-4);
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.04;
  text-wrap: balance;
}

.section-note {
  font-family: var(--mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  color: var(--text-4);
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--text-2);
  max-width: 30rem;
}

/* ------------------------------------------------------------ botones -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.6rem;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn--primary {
  background: var(--xg);
  color: #fff;
}

.btn--primary:hover {
  background: var(--xg-bright);
  color: #fff;
}

.btn--dark {
  background: var(--ink);
  color: #fff;
}

.btn--dark:hover {
  background: var(--xg);
  color: #fff;
}

.btn--outline {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}

.btn--outline:hover {
  background: var(--ink);
  color: #fff;
}

.btn--ghost-light {
  border-color: var(--ink-3);
  color: var(--on-dark);
  background: transparent;
}

.btn--ghost-light:hover {
  border-color: var(--on-dark);
  color: #fff;
  background: rgba(244, 244, 241, 0.06);
}

.btn--sm {
  padding: 0.65rem 1.05rem;
  font-size: 0.82rem;
}

.btn--block {
  width: 100%;
}

.link-underline {
  font-weight: 600;
  font-size: 0.9rem;
  border-bottom: 2px solid var(--xg);
  padding-bottom: 3px;
}

/* --------------------------------------------------------------- misc -- */

/* Hexágono de la marca, usado como viñeta */
.hex {
  width: 12px;
  height: 11px;
  background: var(--xg);
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  flex-shrink: 0;
}

.tag {
  font-family: var(--mono);
  font-size: var(--fs-mono-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.55rem;
  background: var(--xg);
  color: #fff;
}

.tag--dark {
  background: var(--ink);
}

.tag--sale {
  background: #b8452f;
}

/* Cinta que se desplaza (marquee) */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--panel);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee var(--marquee-speed, 34s) linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* Esqueletos de carga */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  animation: shimmer 1.3s infinite;
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

/* Aparición al hacer scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}