/* =========================================================
   MATEO APARICIO — Portfolio. Editorial dark, foto protagonista.
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
:root {
  --bg: #1b1b1f;
  --bg-2: #232328;
  --text: #f4f3ef;
  --muted: #a6a299;
  --soft: #79756e;
  --line: rgba(244, 243, 239, .16);
  --line-2: rgba(244, 243, 239, .3);
  --wrap: 1240px;
  --pad: clamp(20px, 5vw, 56px);
  --font: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: 'Space Grotesk', 'Inter', sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--text); color: var(--bg); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.mp-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--pad); }

h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; line-height: 1.02; margin: 0; }
.mp-eyebrow {
  margin: 0 0 18px; font-size: .74rem; font-weight: 600; letter-spacing: .22em;
  text-transform: uppercase; color: var(--muted);
}

/* ---------- Botones ---------- */
.mp-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 50px; padding: 0 26px; border-radius: 999px;
  font-weight: 600; font-size: .92rem; letter-spacing: -.01em;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .18s var(--ease), background .2s, color .2s, border-color .2s, opacity .2s;
}
.mp-btn--solid { background: var(--text); color: var(--bg); }
.mp-btn--solid:hover { transform: translateY(-2px); opacity: .9; }
.mp-btn--line { border-color: var(--line-2); color: var(--text); }
.mp-btn--line:hover { border-color: var(--text); background: rgba(244, 243, 239, .06); }

/* ---------- NAV ---------- */
.mp-nav {
  position: sticky; top: 0; z-index: 60;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
}
.mp-nav.is-scrolled {
  background: rgba(27, 27, 31, .8);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.mp-nav__row { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 74px; }
.mp-brand { font-family: var(--display); font-weight: 700; font-size: 1.06rem; letter-spacing: -.01em; }
.mp-nav__links { display: none; gap: 28px; }
.mp-nav__links a { color: var(--muted); font-size: .92rem; font-weight: 500; transition: color .2s; }
.mp-nav__links a:hover { color: var(--text); }
.mp-nav__cta { display: none; font-size: .9rem; font-weight: 600; color: var(--text); }
.mp-nav__cta:hover { color: var(--muted); }
.mp-burger { display: inline-flex; flex-direction: column; gap: 5px; width: 44px; height: 44px; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; }
.mp-burger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .2s; }
.mp-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mp-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mp-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mp-mobile { display: none; flex-direction: column; padding: 8px var(--pad) 22px; border-top: 1px solid var(--line); background: rgba(27,27,31,.97); }
.mp-mobile.is-open { display: flex; }
.mp-mobile a { padding: 14px 0; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); }
.mp-mobile a:hover { color: var(--text); }
@media (min-width: 860px) {
  .mp-nav__links, .mp-nav__cta { display: flex; }
  .mp-burger { display: none; }
}

/* ---------- HERO (fondo video / slideshow, full-bleed) ---------- */
.mp-hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  padding: 0 0 clamp(46px, 8vh, 96px); overflow: hidden; isolation: isolate;
}
.mp-hero__bg { position: absolute; inset: 0; z-index: -2; background: #1b1b1f; }
.mp-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; will-change: opacity, transform; animation: mpKen 36s ease-in-out infinite;
}
.mp-slide:nth-child(1) { animation-delay: 0s; }
.mp-slide:nth-child(2) { animation-delay: 6s; }
.mp-slide:nth-child(3) { animation-delay: 12s; }
.mp-slide:nth-child(4) { animation-delay: 18s; }
.mp-slide:nth-child(5) { animation-delay: 24s; }
.mp-slide:nth-child(6) { animation-delay: 30s; }
@keyframes mpKen {
  0% { opacity: 0; transform: scale(1.06); }
  3% { opacity: 1; }
  14% { opacity: 1; }
  18% { opacity: 0; transform: scale(1.13); }
  100% { opacity: 0; transform: scale(1.13); }
}
.mp-hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; opacity: 0; transition: opacity .8s ease; }
.mp-hero__video.is-ready { opacity: 1; }
.mp-hero__veil {
  position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(180deg, rgba(10,10,11,.5) 0%, rgba(10,10,11,.12) 32%, rgba(10,10,11,.88) 100%),
    linear-gradient(90deg, rgba(10,10,11,.72), transparent 62%);
}
.mp-hero__inner { position: relative; z-index: 1; max-width: 840px; }
.mp-hero .mp-eyebrow { color: #e7e4dc; }
.mp-hero__title {
  font-size: clamp(2.8rem, 7vw, 6rem); line-height: .96; letter-spacing: -.03em;
  margin: 16px 0 22px; color: #fff; text-shadow: 0 6px 44px rgba(0, 0, 0, .55);
}
.mp-lead { max-width: 52ch; color: #ece8e0; font-size: clamp(1.04rem, 1.4vw, 1.22rem); margin: 0 0 32px; text-shadow: 0 2px 22px rgba(0, 0, 0, .5); }
.mp-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.mp-scroll {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 1;
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line-2); color: #fff; font-size: 1.1rem;
}
@media (prefers-reduced-motion: reduce) { .mp-slide { animation: none; } .mp-slide:first-child { opacity: 1; } }

/* ---------- SECTIONS ---------- */
.mp-section { padding: clamp(64px, 9vw, 130px) 0; }
.mp-section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.mp-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.mp-head h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); margin-bottom: 14px; }
.mp-head p { color: var(--muted); font-size: 1.05rem; margin: 0; max-width: 60ch; }

/* ---------- GALLERY (colecciones) ---------- */
.mp-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
@media (max-width: 560px) { .mp-gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.mp-col {
  position: relative; display: block; width: 100%; margin: 0; padding: 0;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: var(--bg-2); color: var(--text); cursor: pointer; text-align: left;
  font-family: inherit; isolation: isolate;
  transition: transform .3s var(--ease), border-color .3s;
}
.mp-col:hover { transform: translateY(-3px); border-color: var(--line-2); }
.mp-col__media { display: block; aspect-ratio: 4 / 5; overflow: hidden; }
.mp-col__media img {
  width: 100%; height: 100%; object-fit: cover; filter: saturate(1.03);
  transition: transform .7s var(--ease);
}
.mp-col:hover .mp-col__media img, .mp-col:focus-visible .mp-col__media img { transform: scale(1.06); }
.mp-col::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,8,10,0) 36%, rgba(8,8,10,.3) 60%, rgba(8,8,10,.84) 100%);
}
.mp-col__cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 3px; }
.mp-col__t { font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: -.02em; color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,.5); }
.mp-col__m { font-size: .8rem; font-weight: 500; color: rgba(244,243,239,.82); letter-spacing: .01em; }
.mp-col__go {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  font-size: .74rem; font-weight: 700; color: #14140f; background: #fff;
  padding: 7px 12px; border-radius: 999px; opacity: 0; transform: translateY(-6px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.mp-col:hover .mp-col__go, .mp-col:focus-visible .mp-col__go { opacity: 1; transform: none; }
.mp-gallery__more { margin: 34px 0 0; }
.mp-gallery__more a { font-family: var(--display); font-weight: 600; color: var(--text); border-bottom: 1px solid var(--line-2); padding-bottom: 2px; }
.mp-gallery__more a:hover { border-color: var(--text); }

/* ---------- SERVICES ---------- */
.mp-services { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
@media (min-width: 720px) { .mp-services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .mp-services { grid-template-columns: repeat(4, 1fr); } }
.mp-service { background: var(--bg); padding: 30px 26px 34px; }
.mp-service__n { font-family: var(--display); font-size: .85rem; color: var(--soft); letter-spacing: .1em; }
.mp-service h3 { font-size: 1.3rem; margin: 14px 0 10px; }
.mp-service p { color: var(--muted); font-size: .96rem; margin: 0; }

/* ---------- ABOUT ---------- */
.mp-about { display: grid; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (min-width: 900px) { .mp-about { grid-template-columns: 1.3fr .7fr; } }
.mp-about__text h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); margin-bottom: 22px; }
.mp-about__text p { color: var(--muted); font-size: 1.08rem; max-width: 58ch; margin: 0 0 16px; }
.mp-about__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.mp-about__stats { display: grid; gap: 18px; }
.mp-stat { padding: 20px 0; border-top: 1px solid var(--line); }
.mp-stat strong { display: block; font-family: var(--display); font-size: 2.1rem; font-weight: 700; letter-spacing: -.02em; }
.mp-stat span { color: var(--muted); font-size: .95rem; }

/* ---------- CLIENTS ---------- */
.mp-clients { border-block: 1px solid var(--line); }
.mp-clients__title { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-family: var(--font); font-weight: 600; margin-bottom: 28px; }
.mp-clients__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 18px 48px; }
.mp-clients__list li { font-family: var(--display); font-weight: 600; font-size: clamp(1.4rem, 3.4vw, 2.6rem); color: var(--text); opacity: .9; }

/* ---------- CONTACT ---------- */
.mp-contact { text-align: center; }
.mp-contact__box { max-width: 740px; margin-inline: auto; }
.mp-contact h2 { font-size: clamp(2.2rem, 5.6vw, 4.4rem); margin-bottom: 16px; }
.mp-contact p { color: var(--muted); font-size: 1.1rem; max-width: 52ch; margin: 0 auto 34px; }
.mp-contact__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- FOOTER ---------- */
.mp-footer { border-top: 1px solid var(--line); padding: 34px 0; }
.mp-footer__row { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; justify-content: space-between; color: var(--muted); font-size: .9rem; }
.mp-footer__name { font-family: var(--display); font-weight: 700; color: var(--text); }

/* ---------- LIGHTBOX (serie de la colección) ---------- */
.mp-lightbox { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-rows: auto 1fr auto; background: rgba(6, 6, 7, .96); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.mp-lightbox[hidden] { display: none; }
.mp-lightbox__bar { display: flex; align-items: center; gap: 14px; padding: 16px clamp(14px, 4vw, 28px); z-index: 3; }
.mp-lightbox__title { font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: #fff; }
.mp-lightbox__count { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.mp-lightbox__stage { grid-row: 2; align-self: center; justify-self: center; display: grid; place-items: center; max-width: 94vw; max-height: 100%; padding: 0 64px; }
.mp-lightbox__stage img, .mp-lightbox__stage video { max-width: min(94vw, 1100px); max-height: 72vh; width: auto; height: auto; border-radius: 4px; box-shadow: 0 30px 90px rgba(0,0,0,.6); }
.mp-lightbox__link { color: var(--text); border: 1px solid var(--line-2); padding: 14px 22px; border-radius: 999px; font-weight: 600; }
.mp-lightbox__close { margin-left: auto; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(0,0,0,.4); color: #fff; font-size: 1.05rem; cursor: pointer; flex: 0 0 auto; }
.mp-lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(0,0,0,.42); color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer; z-index: 3; }
.mp-lightbox__nav--prev { left: 16px; }
.mp-lightbox__nav--next { right: 16px; }
.mp-lightbox__close:hover, .mp-lightbox__nav:hover { background: rgba(0,0,0,.75); border-color: var(--text); }
.mp-lightbox__thumbs { grid-row: 3; display: flex; gap: 8px; overflow-x: auto; padding: 10px clamp(14px, 4vw, 28px) 18px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.mp-lightbox__thumbs button { flex: 0 0 auto; width: 62px; height: 62px; padding: 0; border: 2px solid transparent; border-radius: 5px; overflow: hidden; background: var(--bg-2); cursor: pointer; opacity: .5; transition: opacity .2s, border-color .2s; }
.mp-lightbox__thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.mp-lightbox__thumbs button:hover { opacity: .85; }
.mp-lightbox__thumbs button.is-active { opacity: 1; border-color: var(--text); }
@media (max-width: 560px) {
  .mp-lightbox__stage { padding: 0 44px; }
  .mp-lightbox__stage img, .mp-lightbox__stage video { max-height: 60vh; }
  .mp-lightbox__nav { width: 40px; height: 40px; font-size: 1.4rem; }
  .mp-lightbox__nav--prev { left: 8px; } .mp-lightbox__nav--next { right: 8px; }
  .mp-lightbox__thumbs button { width: 50px; height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
